centiservice / mats3

Mats3: Message-based Asynchronous Transactional Staged Stateless Services
https://mats3.io/
Other
63 stars 7 forks source link

New MatsImpl: "Consume - Process - Produce in single DB transaction, with async move of messages, w/dedup" #15

Open stolsvik opened 6 years ago

stolsvik commented 6 years ago

Need an acronym, or a name, for such a style..!

As suggested by and discussed with @tsoiland and @ksaua, the idea is effectively as such: The StageProcessor will read messages from an incoming message DB table, and write to an outgoing DB table. The main point is that these tables will reside in the same DB as in which the stage-lambda executes, so that the DB transaction will literally span the entire operation-set consume-process-produce, and they will literally all be done, or none be done.

So, how does the incoming messages appear, and how are the outgoing messages being passed on?

There are several ways to accomplish this - but the logic is that there is two (or more) separate processing making sure this happens.

One interesting (obvious?) candidate for communicating between nodes is ZeroMQ, and the Java-variant JeroMQ. I am not certain how the nodes would find each other, tho.

stolsvik commented 5 years ago

Another project to check out wrt. messaging is Aeron: https://github.com/real-logic/aeron

stolsvik commented 5 years ago

Wrt. acknowledging messages - and multiple nodes per endpoint:

stolsvik commented 5 years ago

The "outbox pattern" (#77) is pretty much half of this solution.