Page MenuHomePhabricator

Upgrade RCStream backend to use socket.io 1.0 protocol
Closed, DeclinedPublic

Description

When using socket.io.js from 1.0.x, no connection can be established.

The client is trying to make connections to

http://stream.wikimedia.org/socket.io/?EIO=2&transport=polling&t=1402016180378-0

Which are all 404. So I guess this is part of the new protocol that is not compatible. I don't know whether 1.0.x intends to be incompatible with the old protocol, or whether it is failing the to the CORS error (which makes it impossible for it to see that it is a 404).


Version: wmf-deployment
Severity: enhancement
URL: https://github.com/abourget/gevent-socketio/issues/192

Details

Reference
bz66232

Related Objects

StatusSubtypeAssignedTask
DeclinedXqt
DeclinedNone
DeclinedNone
ResolvedKrinkle
DeclinedKrinkle
ResolvedOttomata
DuplicatePchelolo
ResolvedPchelolo
ResolvedOttomata
ResolvedNuria
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
DeclinedOttomata
DeclinedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedHalfak
ResolvedJAllemandou
DeclinedNone
ResolvedOttomata
OpenNone
ResolvedOttomata
Resolvedmforns
ResolvedOttomata
ResolvedXqt
DuplicateNone
ResolvedCmjohnson
ResolvedXqt
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
ResolvedOttomata
DeclinedOttomata
DeclinedOttomata
ResolvedOttomata

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:19 AM
bzimport added a project: EventStreams.
bzimport set Reference to bz66232.

v1.0 changes the protocol substantially. Apart from bragging rights about using the latest and greatest, I don't see major gains to be had. 0.9 is well-tested. IMO, we should upgrade in lock-step with what is available in Debian Testing.

(Not to mention: we want to give the popular client libraries time to upgrade, too.)

Lowering priority since there's no expectation that RCStream will work with any protocol version. socket.io has multiple protocol versions and generally a server should only support one.

The v0.9 protocol is by far the most popular at the moment, though that is slowly changing now that at least the reference implementation (socket.io-client) has a v1.0 release. However you can't use that yet. And installing the "latest" version of something isn't a good practice anyway. The correct version is now documented https://wikitech.wikimedia.org/wiki/RCStream#JavaScript. The majority of changes between v0.9 and v1.0 is in the backend. The API surface is largely the same and shouldn't block any particular features.

I do however very much want RCStream to be ahead of the curve and encouraging new software to be written in current versions of socket.io and not old ones. RCStream is currently implemented in Python and uses the gevent-socketio package. That package has not yet implemented support for the socket.io v1.0 protocol, so there's no upgrade available. It's been raised upstream (https://github.com/abourget/gevent-socketio/issues/192) however it seems the project is no longer seeing active maintenance.

Considering RCStream is a fairly small library, I'd recommend taking this opportunity to rewrite it in Node.js using the official socket.io server implementation (which is written in node) in favour of using a port.

Krinkle renamed this task from RCStream: Upgrade backend to use protocol that works with socket.io 1.0.x to Upgrade RCStream backend to use socket.io 1.0 protocol.Jan 14 2015, 7:18 PM
Krinkle lowered the priority of this task from High to Medium.
Krinkle set Security to None.
Krinkle added subscribers: Mitar, Aklapper.

Note there is a Python rewrite which provides socket.io 1.0 : https://github.com/shuoli84/gevent_socketio2 . However: no commits since November 28, 2014

A better Python option : https://github.com/miguelgrinberg/python-socketio

Krinkle changed the task status from Open to Stalled.Dec 17 2015, 12:23 AM
Krinkle removed Krinkle as the assignee of this task.

Can this be re-evaluated and prioritized? socket.io has been 1.0+ for over a year and a half; it's no longer "new". All official client libraries supplied by socket.io only support 1.0+ now.

I'm closing this task and T91393 since it's unlikely this will happen. Rather than upgrading RCSteam to Socket.IO v1.0 (which would be a breaking change for existing RCStream consumers), I'll instead help push forward T130651: EventStreams.