A4xrbj1:streamy — Meteor 3.0 fork of yuukan:streamy, now slimmed down (v2.1.0)

We’ve been using yuukan:streamy in production for years to push real-time messages from our backend to client apps over DDP. Since the original package hasn’t been updated for
Meteor 3.x, we forked it as a4xrbj1:streamy and have been modernizing it in two releases:

v2.0.0 — Meteor 3.0 compatibility

  • Updated api.versionsFrom(‘3.0’)
  • Removed underscore dependency — all _.each, _.filter, _.isArray replaced with native JS
  • Removed unused mongo dependency
  • Converted all var to const/let

v2.1.0 — Dead code removal
After auditing our actual usage across four Meteor apps, we stripped out everything that was never called:

  • Removed the broadcasts module (Streamy.broadcast, BroadCasts.allow) — we send targeted messages via Streamy.sockets(sid) + Streamy.emit() instead
  • Removed the direct messages module (Streamy.sessions, Streamy.sessionsForUsers, DirectMessages.allow) — same reason
  • Removed reactive-var dependency and all Streamy.userId() / Streamy.user() helpers — our apps track user-to-session mapping externally
  • Removed Streamy.socketsForUsers(), Streamy.close(), and the Accounts.onLogin integration
  • Deleted the bundled examples/chat/ app

The package is now ~250 lines of focused code with two dependencies (check only). What remains:

  • Streamy.on() / Streamy.off() / Streamy.emit() — core messaging
  • Streamy.sockets(sid) — server-side socket lookup
  • Streamy.id(socket) — connection ID accessor
  • Streamy.onConnect() / Streamy.onDisconnect() — lifecycle hooks
  • Streamy.Connection(ddpConnection) — cross-server DDP streaming

Install: meteor add a4xrbj1:streamy
Source: GitHub - a4xrbj1/streamy: Use meteor underlying sockets for realtime communications · GitHub

If you’re still on yuukan:streamy and upgrading to Meteor 3.x, this should be a drop-in replacement (the wire protocol is identical). If you use broadcasts or direct messages,
stay on v2.0.0 — those modules were removed in v2.1.0.

Happy to hear feedback or take PRs.

3 Likes