I’ve been toying with the SOA idea in Ruby workspace lately. Part of it comes from reading Service-oriented design with Ruby & Rails by Paul Dix and part from watching that, by now famous, Uncle Bob’s talk Architecture the Lost Years. What really got me interested was the idea to package domain logic separately from the persistence and delivery mechanisms. At that time I also ran into roar and roar-rails gems from Nick Sutterer. All of this resulted in a small thought experiment and an accompanying Github repo.
I imagined to be a fruit shake maker 🙂 The entire ecosystem consists of the following components:
- Book of orcharding – contains all the domain / business rules about fruit management
- Orchard – serves us as the persistence layer for the orcharding rules
- Tutti frutti – exposes orcharding rules as a json api
- Smoothie mixer – rails project that consumes the api and delivers delishes fruit smoothies
At some later point in time, I was thinking about adding some other kind of client, e.g. command line or android/ios app. These clients would preferably use the same business gem for main logic and json client gem to communicate with the json api. It is a work in progress, hope you like it 🙂 And kudos to Nick for the beautiful gems!