Send message from server to client

Hi guys,

I had developed a notification module using Redis database, now I have to send a message from Meteor server to Meteor client.

I’m using a websocket client and websocket server, client makes a connection to server and I created a redis client inside server .

Now I sent a response from server websocket to client webSocket (both inside Meteor server), but I can’t send a message from websocket client to Meteor client to show message to user.

How can implements this without Meteor publish/subscribe?

Thanks a lot.

Cheers

Francesco.

So, I really have to ask why would you want to do it like this?

Meteor has an inbuilt websocket protocol, all wired up and ready to go with all the Meteor magic to make use of it. So, why not pub/sub?

1 Like

Thanks for your answer:).

My owner doesn’t want to use Meteor pub/sub, to not depend from this meteor system (ps I agree with you).
Infact I’m using redis db and server to build a notification system, then I could use meteor pub/sub directly to developed this.

Only to my knowledge, there is another way to do this?

Thanks again.

Cheers.

Francesco

Well, I honestly don’t know the answer the answer to your original question.

However, I still think it’s bizarre to use Meteor, but not use Meteor. This is a key piece of Meteor’s functionality. Why risk creating a brittle app by trying to replace something that just works? :confused:

1 Like

I could agree with someone trying to decouple his app from the framework, but pub/sub ? Why does he use Meteor in the first place ?
Couldn’t you encapsulate the calls to mini-mongo ?