Skip to content
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

Rework Eventing System #44

Open
OliverWich opened this issue Jan 31, 2022 · 4 comments
Open

Rework Eventing System #44

OliverWich opened this issue Jan 31, 2022 · 4 comments

Comments

@OliverWich
Copy link
Collaborator

OliverWich commented Jan 31, 2022

Currently we consume all events instantly, maybe delay them to try to get the order right. This is ugly and hacky.

Possible Solution:

  1. Reveive an event
  2. Check if it belongs to us
  3. Save it in a repo
  4. Build the dependency tree for this event (i.e. "neighbours" needs "trading" or "movement"; "bank_created" needs "player_status" after registration.)
  5. Somehow tell the System Services when all Dependencies for one Event were consumed
  6. Then start executing the actions caused by the events
@JannikAlx
Copy link
Collaborator

For 5: maybe some form of counter that decreases with each consumed event (only relevant ones ofc)?

@JannikAlx
Copy link
Collaborator

Maybe some type of semaphore? Not sure if this is applicable, but using each individual event as a condition this might work.
Link.

@JannikAlx
Copy link
Collaborator

JannikAlx commented Jan 31, 2022

Actually: Kafka Streams

Edit: nvm, deosnt seem to solve our problem. This might be because the problem itself goes against kafka philosophy

@OliverWich
Copy link
Collaborator Author

OliverWich commented Jan 31, 2022

Actually: Kafka Streams

Edit: nvm, deosnt seem to solve our problem. This might be because the problem itself goes against kafka philosophy

Yup, Kafka does not guarantee event order across multiple topics by design ¯\(ツ)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants