nearForm ❤️ micro-services. Richard Rodger @rjrodger
4 years of Node.js 50+ projects
startups to gorillas 1 user to 1 000 000
every kind team all skill levels
Your services communicate using asynchronous messages.
All services can see All messages …
and react to the ones they care about - a useful fiction!
You use pattern-matching to react to the right messages.
Messages are just JSON documents. Patterns are just property-value pairs.
info:user, what:login
Here’s what software components should do for you.
•re-usable •which really means: composable
•extensible •easy to add functionality
•encapsulated and loosely coupled •the implementation does not leak
•well-defined interface •but note: this does not mean strict!
You always add services, never modify. Pattern matching makes this work.
Write more micro-services when you need to specialise.
Add more specific patterns for more fine-grained functionality.
Jon Postel: You should be liberal in what you accept, and strict in what you emit.
Define a schema for the properties of the Chair entity.
Make sure you cover all the business cases!
You’ll discover more services than you’ll design.
Architecture. The boxes and arrows don’t work anymore.
You use micro-services to perform actions. They don’t describe the world.
Don’t keep any state in your services. We’ve tried that already with OOP.
It doesn’t work.
You’ll need some tools to make this work.
senecajs.org nearform.com/nscale nodejs.org docker.com