Top Banner

Click here to load reader

Micro-services Battle Scars

Aug 20, 2015

ReportDownload

Software

  1. 1. 4 years of Node.js50+ projectsstartups to gorillas1 user to 1 000 000every kind teamall skill levelsnearForm micro-services.Richard Rodger @rjrodger
  2. 2. What do you think micro-servicesare made of?
  3. 3. You run lots of little processes,on many machines.
  4. 4. All services can seeAll messages and react to the ones they careabout - a useful fiction!Your services communicate usingasynchronous messages.
  5. 5. Messages are just JSON documents.Patterns are just property-value pairs.info:user, what:loginYou use pattern-matching toreact to the right messages.
  6. 6. You get real software components.Finally!
  7. 7. re-usablewhich really means: composableextensibleeasy to add functionalityencapsulated and loosely coupledthe implementation does not leakwell-defined interfacebut note: this does not mean strict!Heres what software componentsshould do for you.
  8. 8. How do you write micro-servicesto handle this?
  9. 9. Write more micro-services whenyou need to specialise.Add more specific patterns formore fine-grained functionality.You always add services, never modify.Pattern matching makes this work.
  10. 10. You get service compositionwhen you use pattern matching.
  11. 11. nodezoo.com - github.com/rjrodger/nodezooAn example system big enough to be interesting.
  12. 12. PILE OF POOU+1F4A9You can get yourself into troublewith micro-services
  13. 13. You may get a rash of little web servers.This never ends well.
  14. 14. Define a schema for theproperties of the Chair entity.Make sure you cover allthe business cases!Jon Postel: You should be liberal inwhat you accept, and strict in what you emit.
  15. 15. You can never get awayfrom some anti-patterns.
  16. 16. You can use any language!What could possibly go wrong?
  17. 17. Architecture. The boxes and arrowsdont work anymore.Youll discover more servicesthan youll design.
  18. 18. Dont keep any state in your services.Weve tried that already with OOP.It doesnt work.You use micro-services to perform actions.They dont describe the world.
  19. 19. Youll need practice.Micro-services break lots of rules.
  20. 20. ROCKETU+1F680You can be awesomewith micro-services.
  21. 21. You can swap databases mid-project!Or anything else. Infinite Power!
  22. 22. Your system will scale.
  23. 23. You can actually do continuous deployment!Micro-services are the unit of deployment.
  24. 24. You can verify new micro-service versions workby running them beside old versions.
  25. 25. senecajs.org nearform.com/nscalenodejs.org docker.comYoull need some tools to make this work.
  26. 26. Thanks!Richard [email protected]
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.