-3

I've seen multi-module Spring projects, ie, a project build composed of multiple modules. Are these a foundation for building microservices. That is, is it usual to have microservices written as separate modules in one multi-module project? Or are microservices usually written in individual source repositories?

In sum, is multi-moduling in a project, a stepping stone to writing microservices? Or is it absolutely different things?

Nikhil Silveira
  • 504
  • 4
  • 14
  • Not sure why this was downvoted. It's a valid doubt going from single repository projects, to multi-module projects and throwing microservices into the mix. – Nikhil Silveira Jul 04 '20 at 15:05

2 Answers2

1

I would say microservices and multi-module projects are orthogonal. You can have microservices without multi-module project and have a monolith with multi-module project.

To have a clue what microservices are: microservices have independent deployment cycle. And consequently, they can be developed by independent teams, using different languages, different tools and so on. So taking into consideration said above: microservices most likely wouldn't be a multi-module project, but rather just independent projects.

Max Farsikov
  • 2,451
  • 19
  • 25
  • Is it about many rest APIs for single client || many clients for 1 rest api? And is it 1 Rest Api for 2+ databases and servers? If microservices is about independent parts of project, why GoLang called "language for microservices" if its not about one language? –  Sep 08 '19 at 22:14
  • So many questions :) and it is because the topic is too broad. Rest APIs are not characteristic of microservices, because there are technics for having single API and several APIs in MS. Databases: yes, each MS should have it's own DB rather than sharing common one, but if you have two services with own DBs it does not mean that you have MS. I cannot say why Go is a language of MS, in my preference it isn't. And again: if your system consists of several services (applications) and you can deploy them independently - this means you have MS – Max Farsikov Sep 09 '19 at 05:01
0

I've seen at least one example of a multi-module project where individual modules were all microservices. prototype example from Claus Ibsen's 'Camel in Action, 2nd Ed'. While this may be a pedagogical example, as @max-farsikov answers, you may have microservices in a multi-module project where each module is a microservice, or you may write each microservice as a separate project within its own repository.

Here's another Stackoverflow user following the same pattern. And another.

Nikhil Silveira
  • 504
  • 4
  • 14