0

With all this rumbling about microservices, I started to look alternatives ways to decouple modules, because of the network communication difficulties.

In my search for more lightweight and easier methods, I can across several ideas communication solutions:

  1. Cross-Context in web containers, interesting solution but not all containers support it
  2. Good old Sockets and UNIX Domain Sockets, truly lightweight but comes with a cost of complexity
  3. Big ball of mud with modules and importing spring contexts
  4. SOA, microservices or just services ... watherver, http communication
  5. Middleware messaging communication such as JMS or AMQP
  6. Files, slow and not even remotely easy to manage
  7. Communication through database
  8. Pipes and named pipes, actually a neat solution but does not scale
  9. OSGi looks like something I am looking for

The question is, did I miss something? I need a scalable solution, that keeps modules decoupled and allows for easy adoption. Preferably without network overhead. Is there a way to use the same interface in Java between modules, and invoke hidden implementation behind and endpoint, locally, without exposing it as a tight dependency?

And please do not tell me that a good project architecture can keep things separated, without a mandatory separation with time and growth projects will become tightly coupled and fragile.

Also, maybe I am missing the picture, maybe there are other places decoupling can take place?

Rofgar
  • 318
  • 3
  • 12
  • what about dependency injection ? – Sharon Ben Asher Sep 21 '16 at 13:03
  • You see, the problem with it is that you still have all your classes coupled into one classpath. They still can import and use Models, Dtos, etc ... And when you take it to the next level, when the project is big. It just doesn't work because Spring Context was not build to manage multiple modules. It does not have namespace or other bean name conflict resolutions, except for conditional and primary bean annotations, but they are not mean to be used as a tool to provide context separation. – Rofgar Sep 21 '16 at 13:17

0 Answers0