Thanks v3 ● Pragmatic! ● Everything in the same place ● only one application to deploy ● only one application to explain to newcomers (even if a lot of time is needed to understand everything) It was a good choice at this moment.
24 906 Commits There is “only” 15 506 commits for symfony/symfony There is “only” 10 228 commits for joyent/node There is “only” 9 266 commits for twbs/bootstrap There is 44 809 commits for rails/rails (but it’s ruby… #troll)
Definition “In computing, microservices is a software architecture design pattern, in which complex applications are composed of small, independent processes communicating with each other using language-agnostic APIs. These services are small, highly decoupled and focus on doing a small task.” You know from where comes this definition
Pros ● easy to: ○ understand ○ write / launch tests ○ deploy ● always the same code base: ○ same command to consume ○ same deployment script ○ … ● We made OSS: swarrot/swarrot
Cons ● process: ○ new repo ○ new build plan in bamboo ○ a bit of chef for deployment ● new side projects: ○ to configure our broker (Rabbit) ○ to deal with configuration ● increase ops complexity
Goals ● identify & isolate the business logic ● identify & isolate data calls ● without rewriting the whole application ● without impacting the actual delivery ● must be usable everywhere (not only in our main application) Do what we want with our data and our business
Implementation Strict separation of concerns ● business ● data One repository for everything ● tried with more => complex for development ● still easily splittable
Data ● 1 interface. Can have several implementations. ● easy to ○ add cache ○ change backend ○ shard data ● Strict rules: ○ findOne* => return an array or throw exception ○ findBy* => return an Adapter ○ ...
● Lots of entry points! (called “action”) ● Request / Response / Handler pattern ● Flat request / response => no objects. \o/ ● can call 0-n times the data layer. Business
Goal ● Several independent applications ● Centralized application to handler permissions / connection ● A bit like SensioConnect for all Sensio products