TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Simple pub/sub using WebSockets in Node.js

13 pointsby durkesover 2 years ago
I built this pubsub module because I wanted a simple solution that uses only node.<p>Why did I want pubsub? I wanted to build a complex app but segregate it into microservices that work together through event messages. I also wanted to use this method instead of node&#x27;s built-in clustering for multiple instances. I&#x27;ve been running it for a few weeks now with several messages per second bugfree. I plan to use this setup for future apps as it reduces complexity of the code and allows me to restart&#x2F;update one part of the app without interrupting the other parts.<p>I would love to receive feedback and suggestions on the code and features, and hope it can be useful to you also!

2 comments

omniscient_oceover 2 years ago
I&#x27;d say one of the important ones for me is what are the mechanisms for retries under network loss or lack of connectivity in general. What is the behaviour&#x2F;semantics of that? Can I buffer messages that then get backfilled when a recipient reconnects or do I need to do that in my code &#x2F; application layer.
评论 #34023547 未加载
MuffinFlavoredover 2 years ago
Not being mean but:<p><a href="https:&#x2F;&#x2F;www.google.com&#x2F;search?q=postgres+pub+sub" rel="nofollow">https:&#x2F;&#x2F;www.google.com&#x2F;search?q=postgres+pub+sub</a><p><a href="https:&#x2F;&#x2F;redis.io&#x2F;docs&#x2F;manual&#x2F;pubsub&#x2F;" rel="nofollow">https:&#x2F;&#x2F;redis.io&#x2F;docs&#x2F;manual&#x2F;pubsub&#x2F;</a><p><a href="https:&#x2F;&#x2F;www.rabbitmq.com&#x2F;web-stomp.html" rel="nofollow">https:&#x2F;&#x2F;www.rabbitmq.com&#x2F;web-stomp.html</a>
评论 #34023426 未加载