Ricordisamoa, we could do this, but it is a little more difficult in EventStreams than RCStream, because the service (intentionally) doesn't know anything about the structure of the events it is serving. So, if we were to offer server side filtering, we'd need to do it in a generic way, so that pretty much any event field could be used for filtering.
We'd like to hear about your (and other) use cases where a simple client side filter isn't good enough. E.g.
eventSource.onmessage = function(event) {
// event.data will be a JSON string containing the message event.
var event = JSON.parse(event.data));
// only print eswiki events
if (event.wiki == 'eswiki') {
console.log(event);
}
};
Before we embark on implementing arbitrary event field server side filtering (which will open us up to API bikeshedding, feature set bikeshedding, and possible server side scaling implications), we'd like to know for sure if server side filtering is really needed. Maybe there are tools out there that really really only want to know about very small wikis. In that case, without server side filtering, they'll have to consume way more data than they use. If something like that is really common, we'll prioritize all those bikeshed discussions.