How do we determine when something goes in a new microservice, an existing microservice that's not referencedata or the referencedata microservice?

8 views
Skip to first unread message

Craig Appl

unread,
Jan 19, 2018, 8:58:32 AM1/19/18
to OpenLMIS Dev
Hi Everyone,

Background:
I reviewed a new feature for the gap analysis that requires administrators to able to send emails to users. When I looked where the email information is in the system I see that it is in the referencedata GitHub repository and microservice. I assumed this email address would be part of the user record and first looked in the auth service to see if it was available.


Question:
This brings up a bigger question about how we determine when a service gets added as an independent microservice, when it's added to an existing microservice that's not referencedata or when it is created within the referencedata microservice. Does the OpenLMIS team have documentation on these decisions?

Thank you,
Craig

 

Nick Reid

unread,
Jan 19, 2018, 10:04:45 AM1/19/18
to Craig Appl, OpenLMIS Dev

I'll let Josh correct me if I'm wrong


New service guidelines documentation


The general idea is that each service establishes a bounded context around a collection of nouns. We like Martin Fowler, and his bounded context article


From what I've seen in our architecture, I think the dividing line between services is the "verb" or "singular action" a service establishes. For instance, there is a notification service that sends emails


Helpful?

-- nick --


Nick Reid | nick...@villagereach.org
Software Developer, Information Systems Group


VillageReach Starting at the Last Mile
2900 Eastlake Ave. E, Suite 230, Seattle, WA 98102, USA
CELL: +1.510.410.0020
SKYPE: nickdotreid
www.villagereach.org



From: openlm...@googlegroups.com <openlm...@googlegroups.com> on behalf of Craig Appl <ca...@ona.io>
Sent: Friday, January 19, 2018 5:58:32 AM
To: OpenLMIS Dev
Subject: [openlmis-dev] How do we determine when something goes in a new microservice, an existing microservice that's not referencedata or the referencedata microservice?
 
--
You received this message because you are subscribed to the Google Groups "OpenLMIS Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openlmis-dev...@googlegroups.com.
To post to this group, send email to openlm...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/openlmis-dev/2c5ebcb5-a160-4c5f-9518-5dbf576ccb34%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Josh Zamor

unread,
Jan 19, 2018, 5:35:12 PM1/19/18
to Nick Reid, Craig Appl, OpenLMIS Dev
Thanks Nick and Craig,

Great questions and that’s the right documentation.  One more thing I’ll note on the “singular action” and “nouns”:  not all our services are the same.  We have a few which are more “infrastructure” such as Notification, Consul, Reporting, Log, Diagnostics.  Those do tend to have a more easily identifiable single action:  send a notification via email (or SMS in the future), fill in a Jasper report, central log management, or health report of services.  It might be a little harder to identify what the single “action” of some of our other Services are:  Requisition is the requisitioning process, templates and all the actions you can do to those items:  approve, draft, convert to Order etc.  Similar with Fulfillment, it fulfills Orders, handles shipments, and (currently) handles the PoD.  These tend to be workflow Services which users work with directly most often.

Some of these responsibilities may shift in the future, though we certainly do follow the ethos of not splitting services too early.  Put another way, we tend to make larger Services, or add to existing Services, until it is abundantly clear that we should create a new Service.  

Here in the Tech Committee forum (and the bi-weekly calls) is the place to discuss the responsibilities of our Services, potential new Services, extensions to those Services and ideas for additions to them.

Best,
Josh



Craig Appl

unread,
Jan 22, 2018, 11:49:48 AM1/22/18
to OpenLMIS Dev
Thanks Nick and Josh,

Do you have any tips on identifying the bounded contexts across the entire platform for a new developer? I see the components in the docker-compose.yml file, but it just shows me which microservices are part of the reference distro. I need to go a layer deeper to see what data elements, java services and UI are offered by each microservice. Is there a straightforward way of doing this other than digging into the source folders of each microservice, mapping them to the Swagger documentation and wiki?

Thanks,
Craig

Josh Zamor

unread,
Jan 22, 2018, 12:14:57 PM1/22/18
to Craig Appl, OpenLMIS Dev
Hi Craig,

Have you dug into our Components page in our docs?  I doesn’t have everything you just asked for, however it does have quite a bit:
- 1-2 sentence description of each Service’s responsibilities.
- For Java services that have a DB component, there’s an ERD.
- The Reference UI links to modular UI projects (and JS docs).
- There are links to Service READMEs.  These tend to be pretty canned documents (how to build, dependancies, etc), but might be in-part where what you need is where we could make improvements.

Let us know what you think would add the most value if you can’t get to it from there.

Best,
Josh


Reply all
Reply to author
Forward
0 new messages