I'm new to the application architecture world. I walked through Docker's sample voting app, and see that basically everything that can be made into a modular piece, is made into one.
I'd really like to work through an example and feel that I've come up with a reasonable solution. Please correct everything in the nit-pickiest manner; I just want to improve my understanding all over on this.
We want an API which accepts pictures of written text, does OCR on them, looks up stuff using Google Knowledge Graph about the written words, then returns a filtered version of what we got from knowledge graph.
Some modular components might be:
- Receiving the request & sending back results.
- Storing received images in a database.
- Grabbing images from the DB & performing OCR on them, then committing the result to another DB table.
- Grabbing OCR results from the results table, querying knowledge graph, & storing that data in a final table.
- Sending the knowledge graph data to the caller.
Should we worry about messaging among the microservices? Probably.
I think this is called an aggregator microservice design pattern. The receive & send microservice will pass data to the image saver. The image saver will send a message to the OCR microservice. This, in turn, tells the KG microservice to fire. Finally, we get data back to the caller.
Thoughts & Questions
Ok. I have a lot of problems with this. To my untrained eyes, it seems like a dumb idea to have microservices here: each service needs to tell the next in the chain to fire, and none can parallelize, or fire out of order. This may as well be a monolithic API, right?
I want my thinking about this problem corrected. I'm open to any and all comments, tips, or ridicule. :)