Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I admire Martin Fowler as well but he is so wrong here.

Microservices should be designed, developed and deployed as 100% autonomous entities. The whole point of them is that you can reuse individual services for new applications or integrate them with third party (e.g. different team in your company) services without affecting other applications. Otherwise what is the point of doing this ?

Using git submodules absolutely violates this and is a bad idea. I would have separate repos and deploy scripts and then set the version number of each service to the build number which guarantees traceability and makes it easier for change management.



The whole git submodule thing is solely a manifest of all the git refs for compliant microservices. Lets just pretend that it is a text file, and call it the service manifest (why the submodule hate!) :)

The microservices are indeed "deployed" independently, based on the version (ref) as indicated in the service manifest.

> I would have separate repos and deploy scripts and then set the version number of each service to the build number which guarantees traceability and makes it easier for change management.

They have seperate repos, they have seperate "versions" (we use the git ref, which is constant).

As for why I use submodules, this is (in pseudo-bash) what a service deployment looks like:

  git pull
  git submodule update SERVICE_NAME
  cd SERVICE_NAME
  ./start.sh


I beg to differ.

Microservices that depend on other microservices obviously are not entirely autonomous. You have to version large API changes and integration-test the whole chain of dependent services on every change.

It's not unlike libraries, just linked via network.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: