MicroservicesComboStyle

From CitconWiki
Revision as of 03:34, 21 September 2014 by Douglassquirrel (talk | contribs) (Created page with "* What do we think micro services are.. * We want to be able to rewrite services and remove legacy code ** Make all "objects" separate processes that can run on diff...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search
  • What do we think micro services are..
  • We want to be able to rewrite services and remove legacy code
    • Make all "objects" separate processes that can run on different machines
    • Rather than single process tight binding between classes
    • We could run two of them on the same box to scale
    • Ability to rewrite each object even using different languages if required
    • Could communicate using direct RPC, e.g. as a fully meshed graph
      • Would require agreement on contracts between objects
      • Not favoured approach
      • "Orchestrated style"
    • Combo Model
      • Tuple Spaces - Immutable data store
      • Objects publish immutable facts to central store
      • Objects can publish requests to store
      • Other objects can publish responses to requests to store
      • Objects interested in responses can take those and relay to end users/devices
      • Basically it's pub/sub
      • Can add other subscribers after the fact and consume existing events
      • Promotes loose coupling
      • "Combo Style"
      • What about large messages, too large to pass round
        • Upload the large payload to a repository e.g. via webservice
        • Publish a "pointer" to the data
      • Why not just do RPC to request data directly
      • How do you handle errors
        • If you don’t get a response in a given time frame there is a problem
        • The client only needs to care the other service wsa unavailable and timed out, it should not concern itself with the specific error
      • How do you handle say an order fulfilment scenario where the micro service handling fulfilment was down when the fulfilment request was sent
        • In our case, each subscriber e.g the OrderProcessingService has its own unique persistent queue of messages it will resume processing when it starts up again
      • How do you "fix" data
        • E.g. order sent with wrong email
        • We want to correct the email without double fullfiilling the order
        • The order fulfilment step needs to be idempotent
        • The email sending service would not be, it would send the confirmation email again regardless
        • Each service will still hold its own state, or have its own database
      • When would you switch a service to use queues/RabbitMQ
  • Prediction: 20/09/14 DS: Formal verification of microservices system proof, using COQ? <- fix me