How to implement Bi-directional communication in Pusher with Node.js?

How to trigger events from client and receive it in server node.js / express.js?

After reading through the docs of pusher there is information only about one way communication that is from server to client , here server is triggering an event in a particular channel and client is binding to that particular event after subscribing. But i need whole process other way around .

Start a personal dev blog on your domain for free and grow your readership.

3.4K+ developers have started their personal blogs on Hashnode in the last one month.

Write in Markdown 路 Publish articles on custom domain 路 Gain readership on day zero 路 Automatic GitHub backup and more

Comments (6)

Hipkiss's photo

Don't use pusher :P. Setup a server and run it all yourself.

You could just setup a pub / sub on both sides.
Either that or use a different method of communication channel between entities. What's the use case?

Show +3 replies
Hipkiss's photo

shubham urolagin If you're building a crpytocurrency trading application you should be using deepstream - you need the extra configuration and you dont want the imposed rate limit and limit on the size of messages with pusher. Deepstream was built by people who were / are traders for trading. Only other option would be to build a different one from the ground up.

I know this because I started building a crypto trading platform a couple years back using deepstream. I understand you don't wish to manage the infrastructure but I strongly advise you reconsider given the purpose.

Happy to chat further / help where I can in messages or discord if you need. Hope your project goes well either way :).

shubham urolagin's photo

Hipkiss Thank you very much. Will definitely look into this. Will get in touch for more clarifications in chat, thank you for your time! :)