-
Notifications
You must be signed in to change notification settings - Fork 134
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
Feature Request: Implement long polling using web workers #113
Comments
Yes I have spend a fair amount of time thinking about this, I am not On Fri, Jun 3, 2016 at 2:04 AM, Sal Scotto [email protected] wrote:
|
i did a version of the code locally but im not sure its a 100% solid yet |
cool let me know if you have a version you want reviewed On Thu, Jun 9, 2016 at 11:19 PM, Sal Scotto [email protected]
|
https://gist.github.com/washu/5a5c7e7eea829149ad37c5e3a80b747b Here is a implmentation of the message bus worker. the core bus itself, (i made lots of local chanegs for my specifc app callback needs) just needs hook |
and the message bus itself, it may not be 100% in sync with latest but its from my production system https://gist.github.com/washu/f12d943c0d17244e4e7f54cbcf2303e5 |
i did make a callback hook but i dont like it yet. it just adds an option that is default $.noop to let them assign the activityCallback which is just called in the worker message processor and the progresshandler callback |
I also did a backend using mongodb and tailable cursors but performance is terrible just for anyone thinking about using a tailable cursor.. its works, just all the db overhead for insert a doc and tail out is slow. |
@SamSaffron web workers, with a little around the edges cleanup can ensure -> outbound queuing I added a route on my end as a patch the middleware to accept a publish call form the client for round trip messaging and made it reliable with basic queuing on the client side when coordinated with local storage. i did find, however zbyterange by score performance with > 100 clients became slow. so my end recieves client requests in a blpoprpush/lpush with processing queuing and improved response time processing signifignatly in the middle ware. backlog requests were taking way too long under high speed as well as oddly enough massive network traffic (100 clients were generating 1GB traffic to redis + 2s calls to zbyterangebyscore, and since i dont care about backlog in my use case (i use the bus to synchronize data to the client and send alerts for active users only) so you may want to revisit the zrangebyscore for backlog processing when you have 24 clients with 25 subscriptions each and 100+ web subscribers for a single channel |
It would be nice to run the polling via a web worker a further improvement its supported all modern browsers. would also open up the queuing processing to sub workers.
The text was updated successfully, but these errors were encountered: