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

Some meows can be missing from the query tier #1

Open
arnaud-lb opened this issue May 23, 2018 · 4 comments
Open

Some meows can be missing from the query tier #1

arnaud-lb opened this issue May 23, 2018 · 4 comments

Comments

@arnaud-lb
Copy link

arnaud-lb commented May 23, 2018

Hi!

Thanks for this article, and especially for this repository! Some things are talked about a lot, yet there is not much code to read.

I've found some issues in the published code: It seems that the query tier can get inconsistent quite easily: Some meows may not be available through the query tier.

For instance, here an event is published through NATS (I believe), but if something goes wrong, the query tier will never hear of this meow.

Later, in the query tier, an attempt is made to index a meow in Elasticsearch. If it fails, the neow will never be available in search.

This is quite critical, because it will happen during any of these events:

  • NATS is unreachable from meower (temporary network hickup) while trying to send a message
  • NATS is down temporarily while trying to send a message
  • query is unreachable from NATS (temporary network hickup) while trying to forward a message to it
  • query is down temporarily while trying to forward a message to it
@arnaud-lb arnaud-lb changed the title Meower seems to be unsafe, regarding consistency Some meows can be missing from the query tier May 23, 2018
@tinrab
Copy link
Owner

tinrab commented May 23, 2018

Yes, all this can happen. It could be resolved with a saga. I have a possible implementation on my To-Do list 😸

@ghost
Copy link

ghost commented May 24, 2018

Would event store pattern help ?

Example:
https://medium.com/@ivanjaros/diy-startup-simple-event-store-with-boltdb-e8146d386753

@tinrab
Copy link
Owner

tinrab commented May 24, 2018

@gedw99 Yes, if you can guarantee that events will be delivered at least once. If the event gets properly handled on the query side, then the delivery can be considered successful.

@ghost
Copy link

ghost commented May 26, 2018

Recently i started experimenting with the whole issue of co-ordination or data ( and single source of it) using CRDT and automerge. Its still not 100% solved architecturally though.

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