Transform DDP publications into Socket.io publications


#1

Hi, I recently used the simple:rest package that can transform DDP methods into HTTP endpoints. It would be nice to have something that can do the same for publications but convert them into Socket.io publications.
This way, I can use my Meteor backend with an already built client that uses Rest endpoints and Socket.io.

I’m not looking at alternative (like asteroid) to modify the client, I just want to make my backend compatible with every clients (Meteor clients and non Meteor).

Does something like this exists ? if not, how would you implement it ?

Thanks !


#2

I would expect you can use socket.io npm package, but I dont see why you would use meteor for it. I would look for other ways how to integrate it.

I would still use something like sailsjs/express to connect client to it and for example use DDP from that nodejs server to access meteor instance.


#3

But this would require to have a complete server that acts only as an interface between Meteor and the client.

I was more thinking of something that would apply and do the same logic as a meteor publication (auth for example) and sends the same data. There’s already the same thing for methods or publications in HTTP (http publish) but something with socket.io would be nice too.

Thanks for your answer.