http-events

Who should care about this project?

Anyone with a web-server who needs to keep their site up-to-date with data on a external site (subscribers); and anyone who publishes data that other web-servers frequently check for updates (publishers).

I use a blacklist on my blog/wiki. Does this mean me?

Yes! Most emphatically! This exact use-case motivated the creation of the http-events project, and is its main initial focus.


What is HttpEvents?

HttpEvents is a REST-ful HTTP-based mechanism for publish/subscribe services with low latency and low overhead. It allows a subscriber to keep a local copy of a publication that lags behind the original by seconds, not minutes or hours, yet no network traffic is produced when there are no updates, keeping the publisher's server load low. In contrast, polling must trade overhead against latency, creating bandwidth problems for popular publishers that may shut the service down. (For more, see RestWiki:HttpEvents.)


What is http-events?

An open-source library of PHP headers and scripts implementing HttpEvents. Specifically, there is a header implementing general HttpEvents functions (the HTTP calls required by the specification), and two scripts implementing publish and subscribe for a specific subscription format: blacklists.

As the primary aim of this project is the creation of a peer-to-peer anti-spam network, http-events can be used out-of-the-box with little configuration to subscribe to (or host) a HttpEvents-published blacklist. This lets your wiki/blog become immune to new spam as fast as the publisher can send an update to your server, without swamping them with HTTP traffic. The hardest part is configuring your site to block the spam; this will require tinkering with the engine you are using.

How far advanced is this project?

We are still in very early days. The current goal is simply the dissemination of the beta http-events library (see the download page) amongst several wikis, testing how easy the setup is and how well the network handles. Future development will be in the hands of the wiki community!


What will I need?

The essential ingredient is PHP, and a server with outgoing HTTP connections allowed by your firewall. MySQL, PostgreSQL, or plaintext flatfile databases can be used for persistence; both PHP and Perl libraries are provided for connecting your wiki/blog engine to the blacklist.

You will also need a blacklist published with HttpEvents. Be sure to pick a publisher you trust, as an evil publisher can temporary disable all public interaction with your site if you don't set up precautions in your code.

Are there any sample publishers to test my setup against?

Yes, try MeatballWiki's list of spam patterns. Hopefully, more white-hats will begin to publish their lists with HttpEvents; they will be listed here as we learn of them.


Who maintains this project?

Currently, the project admin is myself, Chris Purcell. I am looking for a co-admin, so please do contact me if you are interested. Anyone interested in submitting modifications and improvements can also do so via the Patches pages.