darcys22 / godbledger

Accounting Software with GRPC endpoints and SQL Backends
https://www.godbledger.com/
GNU General Public License v3.0
488 stars 56 forks source link

Integrate Message broker for events monitoring #165

Closed mingsterism closed 3 years ago

mingsterism commented 3 years ago

A message broker like NATS or Kafka will allow any other system to listen to events happening on GoDbLedger. This allow for other systems to integrate cleanly with the system without having any tight coupling. Possible Event Schema topics 1) transaction.created 2) transaction.deleted

The event schema needs to be designed well before Keen to hear thoughts on what the topics could be

Other systems can subscribe to specific topics like transaction.created or use wildcards like transaction.* to listen to all the transactions.

darcys22 commented 3 years ago

I've also heard of accounting systems using a messaging system like this to drive the double entry transactions! For example the RPC message comes through to the log system, then the system picks up the events to create the transactions.

its probably an area I don't have a lot of experience in but definitely interested in exploring!

mingsterism commented 3 years ago

got it. which file / folder would be a good place to start to integrate the message broker within the system?

darcys22 commented 3 years ago

Likely a subfolder under the godbledger executable folder.

https://github.com/darcys22/godbledger/tree/master/godbledger

if you look at how node is implemented it spins up via a service interface that can be started and stopped. Something similar to it so that the messaging can be run in its own service

mingsterism commented 3 years ago

noted. thanks for the clarification