Sign up for free to use this document yourself.
  • Reactive

    is readily responsive to a stimulus

    • react to events (event-driven)
    • react to load (scalable)
    • react to failures (resilient)
    • react to users (responsive)
  • Functional Programming

    • pattern matching
    • anonymous functions
    • recursion
    • combinators: map, reduce and etc
    • iterable collections: Array, Set, Map, Object, String
    • monads (unit, and bind)
  • Current solution is callbacks, but they have a problems:

    • needs shared mutable state.
    • cannot be composed.
    • leads quickly to “call-back hell”.

    How To Do Better: use fundamental constructions from functional programming to get composable event abstractions.

    • Events are first class.
    • Events are often represented as messages.
    • Handlers of events are also first-class.
    • Complex handlers can be composed from primitive ones.
  • Event-Driven

    Systems are composed from loosely coupled event handlers.

    • Events can be handled asynchronously, without blocking.
  • Scalable

    An application is scalable if it is able to be expanded according to its
    usage.

    • scale up: make use of parallelism in multi-core systems
    • scale out: make use of multiple server nodes

    Important for scalability: Minimize shared mutable state.
    Important for scale out: Location transparency, resilience.

  • Resilient

    An application is resilient if it can recover quickly from failures.
    Failures can be:

    • software failures
    • hardware failures
    • connection failures

    Typically, resilience cannot be added as an afterthought; it needs to be
    part of the design from the beginning.
    Needed:

    • loose coupling
    • strong encapsulation of state
    • pervasive supervisor hierarchies
  • Responsive

    An application is responsive if it provides rich, real-time interaction with
    its users even under load and in the presence of failures.
    Responsive applications can be built on an event-driven, scalable, and
    resilient architecture. Still need careful attention to algorithms, system design, back-pressure, and many other details.

{"cards":[{"_id":"3a6025435568476719000095","treeId":"3a6024215568476719000092","seq":1,"position":1,"parentId":null,"content":"# Reactive\nis readily responsive to a stimulus\n\n- react to events (event-driven)\n- react to load (scalable)\n- react to failures (resilient)\n- react to users (responsive)"},{"_id":"3a602e4f5568476719000096","treeId":"3a6024215568476719000092","seq":1,"position":1,"parentId":"3a6025435568476719000095","content":"## Event-Driven\n\nSystems are composed from loosely coupled event handlers.\n* Events can be handled asynchronously, without blocking."},{"_id":"3a60351e5568476719000097","treeId":"3a6024215568476719000092","seq":1,"position":2,"parentId":"3a6025435568476719000095","content":"## Scalable\nAn application is scalable if it is able to be expanded according to its\nusage.\n- *scale up*: make use of parallelism in multi-core systems\n- *scale out*: make use of multiple server nodes\n\nImportant for scalability: Minimize shared mutable state.\nImportant for scale out: Location transparency, resilience."},{"_id":"3a603ab25568476719000098","treeId":"3a6024215568476719000092","seq":1,"position":3,"parentId":"3a6025435568476719000095","content":"## Resilient\nAn application is resilient if it can recover quickly from failures.\nFailures can be:\n- software failures\n- hardware failures\n- connection failures\n\nTypically, resilience cannot be added as an afterthought; it needs to be\npart of the design from the beginning. \nNeeded:\n- loose coupling\n- strong encapsulation of state\n- pervasive supervisor hierarchies"},{"_id":"3a6043045568476719000099","treeId":"3a6024215568476719000092","seq":1,"position":4,"parentId":"3a6025435568476719000095","content":"## Responsive\nAn application is responsive if it provides rich, real-time interaction with\nits users even under load and in the presence of failures.\nResponsive applications can be built on an event-driven, scalable, and\nresilient architecture. Still need careful attention to algorithms, system design, back-pressure, and many other details."},{"_id":"3a605594556847671900009c","treeId":"3a6024215568476719000092","seq":1,"position":1.5,"parentId":null,"content":"# Functional Programming\n\n- pattern matching\n- anonymous functions\n- recursion\n- combinators: map, reduce and etc\n- iterable collections: Array, Set, Map, Object, String\n- monads (unit, and bind)"},{"_id":"3a604e35556847671900009a","treeId":"3a6024215568476719000092","seq":1,"position":2,"parentId":null,"content":"Current solution is **callbacks**, but they have a problems:\n- needs shared mutable state.\n- cannot be composed.\n- leads quickly to “call-back hell”.\n\nHow To Do Better: use fundamental constructions from functional programming to get **composable** event abstractions.\n- Events are first class.\n- Events are often represented as messages.\n- Handlers of events are also first-class.\n- Complex handlers can be composed from primitive ones."}],"tree":{"_id":"3a6024215568476719000092","name":"Reactive programming","publicUrl":"reactive-programming"}}