-
-
Notifications
You must be signed in to change notification settings - Fork 13
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
Documentation for Usage #18
Comments
hi @apersaud! Oh, you're jogging my memory here :). I made this when @flovilmart was working on The use case that @flovilmart was interested in was distributing workload for push notifications across a cluster of machines which if I recall correctly, is what I tested. I am not currently using it in production just because we don't do large pushes so I don't need it...yet. As far as documentation goes, I suggest taking a look at: https://github.com/parse-community/parse-server-sqs-mq-adapter/blob/master/spec/SQSEventEmitterMQ.spec.js which is the unit test. Note that one unit test is x'd out: https://github.com/parse-community/parse-server-sqs-mq-adapter/blob/master/spec/SQSEventEmitterMQ.spec.js which shows how to use in production. While I am not currently using, I'd love to help you use it if you think it's a fit and would be glad to do code reviews and/or try to help out if you're having an issue. |
We’re using something similar now with Google Cloud Pub/Sub + Google Cloud Functions to send the pushes from the functions instead of the server to prevent impacting our front end instances |
You can very well imagine the same setup with AWS lambdas (where you would run the push worker) and SQS as the message queue to communicate with the lambdas from parse server. I’ll write a blog post about it soon :) |
@acinader @flovilmart how |
Yes, that was the idea. The lambda would then fire up a parse-server instance to handle the push. |
@acinader will the aforesaid lambda function use Parse sdk to fire up push notifications? |
You can't send pushes with the SDK. You need the parse-server in the lambda. |
@acinader Yes. That's what I meant. The lambda function will use Parse sdk to send notifications. Is that right? |
We use SDK to denote the various parse-server clients, like the JS, IOS, and PHP sdk's. So what I mean is: an instance of parse-server will run in lambda, not the JS sdk. Pretty sure we are understanding each other and saying the same thing, but making sure :). |
@acinader you mean by importing the module |
yup |
@acinader what is supposed to be the payload passed by |
ha. I am not exactly sure, and I don't think we even really need to know. Here you can see how the push queue is configured: https://github.com/parse-community/parse-server/blob/master/src/Push/PushQueue.js#L19 Here you can see a test that shows how the queue is used https://github.com/parse-community/parse-server-sqs-mq-adapter/blob/master/spec/SQSEventEmitterMQ.spec.js The use case that it was designed for did not include lambda, but assumed dedicated servers that would the queue would empty into. So I am not exactly sure how to put lambda in the middle. We'd want to add a 'lambda consumer' i think. Probably the best first step would be to get a test setup using two servers, one to create the pushes and put them in the sqs and a second one to process the queue. Once that's working, then we'd look at how to lambda consumer that could be configured into the lambda parse-server instance. Or you could just not use lambda and have dedicated ec2 instances (or beanstalk, or ecs, or however you're doing it) for sending pushes. The labmda solution would be a nice cost effective way to handle the load without affecting realtime users of your parse-server, but dedicating instances could be a first step? |
Hi everyone,
This module looks interesting, however I was having a hard time finding documentation on "what are the use cases this solves" or the benefits of configuring Parse Server to use this feature. Is this for background job processing, distributed query performance, or is this regarding the live query server? Any additional info would be useful.
The text was updated successfully, but these errors were encountered: