Skip to content

Notification service

alexschomb edited this page Feb 16, 2012 · 12 revisions

Notification Service

SparkleShare uses a small script that handles update notifications between clients. By default it uses the one running on notifications.sparkleshare.org. The only information sent to this service is a hash of a folder identifier and a hash of the current revision. The service then tells the other connected clients that are subscribed to a folder that they can pull new changes from wherever your repository is hosted. This allows SparkleShare clients to sync new changes instantly, instead of polling with potentially long delays (up to 3 minutes).

Running your own

Having a centralised service to handle notifications is needed for a pleasant user experience. If you do feel uncomfortable with this you are able to run your own. Just run https://github.com/hbons/fanout.node.js or SparkleShare Dashboard on your own server and edit the SparkleShare configuration (in ~/.config/SparkleShare/config.xml) to point to it:

<sparkleshare>
  // Use your personally notification service globally...
  <announcements_url>tcp://your-server:1234</announcements_url>
  
  // ...or for a single folder
  <folder>
    <name>Stuff</name>
    <announcements_url>tcp://your-server:1234</announcements_url>
  </folder>
</sparkleshare>

Running your own private notification server on Ubuntu 10.04 server

Private Notification Server on Ubuntu 10.04 howto

Git hook

There's a git hook that allows you to do manual pushes to the repo, and the SparkleShare clients will still pick it up: https://github.com/hbons/SparkleShare/blob/master/data/git-hooks/post-update