I was asking myself this question for some time now: Should I go with Moqui or Spring Boot as the base framework for my applications?
Moqui has some really cool enterprise features, like the ready made USL and UDM layers, a full blown interface, a ready made ecomm store… Basically a full blown ERP. There is simply NO way I am going to start from scratch implementing all of the ERP functions myself for my business clients. I already implemented a small scale ERP, which took a couple years, and it doesn’t even come close to having this many features.
On the other hand I like Spring Boot because it’s so easy to work with it. The development, testing and deployment work out of the box, it has a big community, a lot of documentation and a rich ecosystem. Basically you can find Boot starters for almost anything, so prototyping a new application is really fast and easy.
So then I looked at my use case, because I need features from both. Since most of my clients are small businesses I need the ready made ERP features, but I also need fast prototyping and testing of unfamiliar frameworks and libraries, because the requirements are a bit different for each company. So fast implementation is more important than latency or efficiency. And it’s a lot easier to fire up a Boot starter than figure out how to wire up the library in Moqui.
So should I choose Moqui or Spring Boot?
And I realized the answer is yes. I don’t need to choose, I can use them both. Since each client could use a different set of components and I need the components to integrate/communicate with eachother, then I cannot wire them up using REST api’s. But there is a simple solution for creating loosely coupled components/microservices: Kafka. Basically the producer sends messages to a certain Kafka topic when some event happens, and any other component can consume data from that topic, so the producer doesn’t care which components listen. The drawback is that this only works for async communication, but I guess that sync is kinda not loosely coupled anyway.
This solves one way communication, but what about 2-way, where the producer also expects an answer? Well, use another topic for replies, where the producer would listen, or just simply use REST. Also Apache Camel or Assimbly could be used for smart runtime routing.
So my answer was to use both Moqui and Spring Boot and integrate them using Kafka. I wonder if anybody else has some integration stories to share.