-
Notifications
You must be signed in to change notification settings - Fork 8
Pusher
Pusher is a simple hosted API for quickly, easily and securely integrating real time bi-directional functionality via WebSockets to web and mobile apps, or any other Internet connected device.
- Real Time Notifications: Alert notifications to all users connected in a certain time (e.g. when server is going to restart, to inform about something important)
- Activity streams: Be able to know how the users are interacting with the platform (e.g. when submitting or saving a specific project, request the addition of a new partner, to know the specific field that are editing, etc.)
- Webhooks: Allow the MARLO server to be notified about events that are happening with the Pusher service
- Live reports: Real time statistics reports (e.g. Percentage of completeness for each project, amount of users editing or viewing at a certain time, etc.)
Channels are a fundamental concept in Pusher. Each application has a number of channels, and each client can choose which channels it subscribes to.
- Public channels - Can be subscribed to be any user registered into the platform
- Private channels - Lets your server control access to the data you are broadcasting
- Presence channels - Let you ‘register’ user information on subscription, and let other members of the channel know who’s online
Events are the primary method of packaging messages in the Pusher system. they form the basis of all communication.
Application security is very important so Pusher provides a mechanism for authenticating a user’s access to a channel at the point of subscription.
- presence-global
- Event : client-system-reset
{
"message": "This message is to inform you that we are going to restart the server in order to apply some improvements ...",
"diffTime" : "120"
}
- Event : client-simple-notification
{
"message": "message here"
}
-
presence-{crp}-{actionName}: Subscribed in any section
-
presence-program-{crp}-{actionName}-{crpProgramID} : Subscribed to an Impact pathway section
-
presence-project-{crp}-{actionName}-{projectID} : Subscribed to a project section
-
Event: pusher:subscription_succeeded
-
(Array of Members)
-
Event: pusher:member_added
-
(Member Object)
-
Event: pusher:member_removed
-
(Member Object)
-
Event: client-section-saved
-
(Member Object)
"member" : {
"id": "{sessionID}",
"info": { "name" : "John Doe", "color" : "{sessionColor}" }
}