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

Guaranteed delivery? #76

Closed
scf4 opened this issue Jul 25, 2017 · 3 comments
Closed

Guaranteed delivery? #76

scf4 opened this issue Jul 25, 2017 · 3 comments

Comments

@scf4
Copy link

scf4 commented Jul 25, 2017

In this article it mentions delivery guarantees:

We worked with David Yahalomi to create the graphql-redis-subscriptions and graphql-mqtt-subscriptions packages, which can be easily dropped in as a replacement for the default PubSub object without making any changes to the rest of your code.

Using an external pub/sub system gives you more publication features — such as persistence, caching, delivery guarantees and other optimizations.

Does graphql-redis-subscriptions support guaranteed delivery, and how would one go about implementing it?

@davidyaha
Copy link
Owner

davidyaha commented Jul 26, 2017

Hey @scf4!
Thanks for the interest in this package.

AFAIK Redis as a pubsub broker does not provide any built in delivery guarantee mechanism out of the box.
It is possible to implement one on top of it but at times when delivery guarantee is needed, I would advise using the graphql-mqtt-subscriptions package instead (or in conjunction?)
MQTT supports QoS parameter which by using level 1 requires any mqtt client to give you publish acknowledge message as response.
If you want to learn more I would advise going here http://www.hivemq.com/blog/mqtt-essentials-part-6-mqtt-quality-of-service-levels

After making sure that you services does not loose messages, you can go over and either create an event tracking mechanism to make sure all clients have received their messages or you can create a client side MQTT transport for apollo and send the events (after graphql evaluate call) directly using QoS of at least 1.

Hope that gives some good direction to follow.

@davidyaha
Copy link
Owner

@scf4 Is it safe to close this one?

@scf4
Copy link
Author

scf4 commented Aug 8, 2017

@davidyaha yes, sorry for the late response and thank you for the great reply!

@scf4 scf4 closed this as completed Aug 8, 2017
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