Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/manpages/erlongpoll
lightweight and scalable http push notification thingie written in erlang and javascript
https://github.com/manpages/erlongpoll
Last synced: 24 days ago
JSON representation
lightweight and scalable http push notification thingie written in erlang and javascript
- Host: GitHub
- URL: https://github.com/manpages/erlongpoll
- Owner: manpages
- Created: 2011-10-15T06:38:09.000Z (about 13 years ago)
- Default Branch: master
- Last Pushed: 2011-10-19T18:59:34.000Z (about 13 years ago)
- Last Synced: 2023-03-12T06:04:23.388Z (over 1 year ago)
- Homepage:
- Size: 113 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
README
CLIENT
DESCRIPTION
The thing is not even a library to do push notifications over http.
On the client side it initializes connection with server that terminates after the data is received
afterwards the connection is re-established. There is a way to stop the connection.
My implementation of the client-side Poll function relies on jQuery. If you don't want to use
jQuery, you will have to rewrite it (it's rather small anyways).To utilize the Poll() function I use a handler function and event-rising. I'll link the longpoll
file uploader I have wrote rather soon.SERVER
DESCRIPTION
Pollbox is the heart of the library. You start it and it registers under poll_manager atom and
routes data received from modules that want to do a push notifications to the notification sender
process loop whose PID is looked up by its poll descriptor. So basically the process of work with
push notifications looks something like that:```
|-(Desc)---> Logic module
Client | `--> Pollbox -.
|<-______ (getting PID from Descriptor)
\_ ____________/
` Http_push <-/```
The http_push relies on YAWS. You may rewrite it using whatever http server you like though.
For more details, read the example code that'll commit rather soon.LICENSE
MIT. Do whatever.