Aug 12, 2018

[goto 2018] The Robustness of Go • Francesc Campoy

https://www.youtube.com/watch?v=40d26ZGfhR8

Define robust


Memory safety

  • Pointers for convenience, but no pointers arithmetics.
  • Escape analysis for automated allocation on heap/stack.
  • Garbage collection: no dangling pointers.
  • Automatic bound checks for slices and arrays.

 

Make go unsafe

  • Use unsafe.
  • Use cgo.
  • Bug in compiler(runtime).

 

Fragility

  • Mutable shared state.
  • Check data race. (Always enable this!)
    # go run -race test.go
  • Use monads to handle error...
    But go doesn't have generic. Thus don't think about it...

 

System Runs Forever Self-heal and Scale

Talk:
https://www.infoq.com/presentations/self-heal-scalable-system

6 rules:

  • Isolation
  • Concurrency (Actor model, Erlang)
  • Failure detection
  • Fault identification
  • Live code upgrade
  • Stable Storage


k8s provides what golang doesn't provide.
Use k8s. XD

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.