3 ms·
Wouldn’t writing/reading to/from Kafka sort of be orthogonal to micro services? I say this not to argue one way of another for services, just to say that I thi
by asimpletune 3y ago
Wouldn’t writing/reading to/from Kafka sort of be orthogonal to micro services?
I say this not to argue one way of another for services, just to say that I think your example is just Kafka, or more generally event driven architecture. One thing that defines services is a request/response messaging pattern. In other words a service makes a request and then they wait for a response, like http. What you’re talking about resembles a service because the producer/consumer are separate processes, but they don’t really have much else in common with services, due to a different messaging pattern.
- pravus 3y agoNo? Why are micro-services only defined by synchronous/socket communication? Even monolithic threaded apps rely on asynchronous workflows. The fact that a 3rd party is used to relay the request doesn't really matter. My point was that I can build a monolith or micro service around Kafka and they end up being equivalent but the multi process approach works better for my needs. The original question was asking what advantages a separate process would have. I gave one.
- asimpletune 3y ago> Why are micro-services only defined by synchronous/socket communication? In the name is the word "service", which means a process that waits and responds to a client's request. This act of request followed by response is fundamentally synchronous.
- pravus 3y agoThat very much depends on your definition of service. OASIS defines a service as "a mechanism to enable access to one or more capabilities, where the access is provided using a prescribed interface and is exercised consistent with constraints and policies as specified by the service description". [0] I see nothing that requires synchronous communication only. Virtually every large micro-service architecture I have ever seen communicates through queues asynchronously. [0] https://en.wikipedia.org/wiki/Service_(systems_architecture) https://en.wikipedia.org/wiki/Service_(systems_architecture)