-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Transactional Transport #4
Comments
A thought to add – child transports may well also have other uses in future. For example, a transport which supports large data blobs. Similar to Postgres' TOAST system, this transport could move large blobs to an external data store before handing off to the child transport (e.g. the redis transport) The more I think about this the more it sounds like these 'parent' transports are not transports at all, but more like middleware. So perhaps renaming these to TransportMiddleware could be more accurate. I am hesitant to complicate matters through adding new concepts, but in this case it may be justified. |
Lightbus includes an experimental (and undocumented) transactional transport. This was an experiment into implementing Reliable Messaging Without Distributed Transactions.
This transport needs rewriting/refatoring.
Learnings are:
1 & 2 can probably be solved together. Perhaps by passing a
connection_factory
to.listen()
.3 & 7 may get solved together
Allowing transports/plugins to add sub commands to the
lightbus
CLI would help with 66 & 7 may get solved together. Perhaps an api config can take a list of transports. Or perhaps transports take a
decorators
/middleware
config option.Alternative approach
An alternative approach would be to create a database-backed event transport, separate from the Redis transports. This could be db-specific such as a
PostgresEventTransport
, but with core logic abstracted to aSqlEventTransport
to allow for simple implementations for other RDMS.Get hold of the transaction will still be a faff though.
The text was updated successfully, but these errors were encountered: