Google.org created Alert Hub to aggregate all data feeds with emergency information in one location. By pushing alerts and other kinds of emergency information here, publishers can make it easy for developers around the world to ingest and distribute relevant data to users.
Alert Hub implements PubSubHubbub, a simple, open, server-to-server publish and subscribe protocol. Publishers send their alert feeds to Alert Hub, and it will push the updates in that feed to subscribers.
This hub is supported and run by Google.org's Crisis Response team as a free service.
How to publish
You start with an Atom or RSS feed of alerts. Don't have Atom or RSS? We're open to other formats. Ask us.
Every time you issue a new alert, tell the hub. Code is available in PHP, Java, C#, Python, Perl, Ruby, and more. Don't want to write code? Ask us. We can periodically poll your feed for new alerts.
You'll also want to include a link in your feed to tell your users that they can subscribe to Alert Hub and get updates pushed to them instead of polling your feed. This reduces traffic to your servers and pushes alerts to your subscribers faster.
<link rel="hub" href="//alert-hub.appspot.com"/>
<atom:link rel="hub" href="//alert-hub.appspot.com"/>
You can view stats on your feed using the publish page.
How to subscribe
You subscribe to Alert Hub by providing 2 URLs:
- Topic: The URL of the feed to which you'd like to subscribe
- Callback: A URL on your server to send updates to that feed
Here is an example. Let's say
had a feed of alerts at
. A subscriber at
wants to subcribe to this feed. He writes some code that uses the PubSubHubbub protocol and exposes it at
. Then he subscribes by passing
Alert Hub will ping the callback URL to confirm the subscription, then send every new alert from
to that same callback URL.
If you don't want to start from scratch, a number of frameworks and content management systems already support the PubSubHubbub protocol. See the full list. Client code is also available in PHP, Java, C#, Python, Ruby, and more. See the specification for full details.
You can use the subscribe page to view stats and debug your subscription.
- Why has Google.org created Alert Hub?
We would like to help to aggregate all data feeds with emergency information in one location. We also think the publish/subscribe model is a nice delivery method for alertable information.
- Can I sign up for email updates from Alert Hub?
No. PubSubHubbub uses feeds to exchange information, usually between servers. It does not send emails. However, Google Reader and other feed readers do understand the PubSubHubbub protocol.
- Is there a format you want the information in?
We strongly encourage using the Common Alerting Protocol (CAP). To help with this, we have released a code library and web-based validator for working with CAP messages. Though we prefer CAP, we want all alertable feeds to find their way to Alert Hub.
- Who is currently using Alert Hub?
We'll start to populate this list as we add trusted publishers of alert feeds. To add yourself to the list, fill out this form. Subscribers will include Google Crisis Response and other third-party developers of emergency-response and alerting applications.
- Do I have to add myself to the list above to post to the hub?
Nope. Feel free to play with the hub anonymously until you're ready!
- Are you ever planning to charge for this?
No. We will not charge for this service.
- I have feedback. Where do I send it?
Questions? Comments? Complaints? Send them all to email@example.com
- Where can I go to find out more news?
Join our CAP community at firstname.lastname@example.org