Tim Cooke wrote:The system I'm referring to was a pretty serious financial trading engine so not trivial at all. It used jpa and messaging, although Tibco FTL rather than RabbitMQ, and was a decent size codebase. My point here is that serious "enterprise" grade systems work just fine without a fancy framework.
I suppose the only way for you to be sure if spring adds any significant overhead is to compare and measure it. Then do a cost benefit analysis to decide what to do. Cost in this context being memory usage primarily.
Tim Cooke wrote:If each of your services really are micro in size, then would you consider forgetting about spring boot altogether and just using Java? I worked on a system a few years back where performance was of critical importance and we did not use any such framework, just straight up Java. We got along just fine with it.
Ron McLeod wrote:The tech stack I've used for number of recent microservice based solutions is:
- Quarkus framework using microprofile APIs for applications
- GraalVM to perform AoT compilation and produce a Linux native binaries (often reduces RAM footprint to around 25% of JVM requirements, and startup times in the few tens of milliseconds)
- Buildah to create container images (often using Redhat UBIs for base images)
- Podman to run and manage containers (daemonless, SELinux aware, and has good support rootless, supports Pods)
- GRPC (protobuf over HTTP/2) RPC operations or pipelining using streams
or
- RabbitMQ Broker for for pub/sub realtime communications (MQTT/AMQP) or Streams for Kafka-like functionality
- Separate (typically NoSQL like MongoDB) datastores for each microservice
and/or
- Data respository microservices (still using NoSQL datastores) when shared state is required to support multiple instances of the same service running in either a loadsharing or active/standby configuration
- Linux platforms for execution (typically Oracle Linux using RHEK)
If you not are fixed on Spring and Docker, maybe look at Quarkus and Podman.
Tim Cooke wrote:
I don't think micro services is the right term for what we're discussing here. You have an infrastructure platform management problem. How to host multiple docker based applications on a single host, or more specifically how can I reduce the system resource requirements of each docket based application so you can host more of them on a single host.
Does that sound about right?
Liutauras Vilda wrote:Design diagram would speak a lot, whether those services talk to each other and to which degree. Understandable if those could not be shared.
Tim Cooke wrote:I've been working on the assumption so far that what you're describing is a single software system decomposed into many components, each running as a "micro service". But would I be right in saying that what you are really describing is multiple separate and completely unrelated software systems? All that need to be hosted on a single VM?
Tim Cooke wrote:
[cut]
For me one of the motivations of micro services is environment and/or platform independence, which you don't seem to be able to avail of with the one big VM you have.
...
[cut]
The primary cost of micro services is messaging. You must now design and manage communication between services, which is a non trivial task. What if a message doesn't arrive? What if it arrives more than once? What if it takes a long time to arrive? What if a service goes down? What happens to messages sent to it now? What happens to the message it was processing when it went down? And since you're doing all this inside a single VM, what happens to the state of the system when the VM goes down? How do you recover from that?
It's a difficult exercise.
Liutauras Vilda wrote:
And this is where it becomes a bit tricky ...
Liutauras Vilda wrote:
Claude Moore wrote:Micro services are of course not mandatory, but we're going to develop a number of services which must be run independently each other
Out of interest, what's the plan about the database? Shared for all those aforementioned micro services or one per service?
Tim Cooke wrote:The target environment is a single physical server? What's the motivation for micro services?
Tim Holloway wrote: ...just as container security does for JEE.