logoalt Hacker News

socketclusteryesterday at 10:55 PM1 replyview on HN

I started building something pretty obscure about 14 years ago; https://socketcluster.io/ an open source, WebSocket-based RPC + pub/sub library with a focus on in-order async stream-processing with backpressure monitoring.

It didn't start out like that. Initially, it was just another WebSocket library with a focus on making it easier to scale to multiple processes.

It's kind of mind-bending to me though that it still feels like it's "too early." You'd think that the ability to efficiently process RPCs and pub/sub messages from clients whilst maintaining ordering would be critical... Yet if you look around the industry; callback-based event handlers are still the norm for most application logic and people are still not using queues where they should be. People think of queues as some expensive/bulky system with overhead which requires additional architecture (e.g. RabbitMQ, Kafka, STOMP, NSQ) and always requires exactly-once delivery, they have not tried to make the idea a core part of their application logic. Software today is FULL of race conditions because of this blind-spot. Yet I still cannot communicate my message. It's too difficult to explain the benefits.


Replies

hitchdevtoday at 1:14 AM

I had a similar issue. The blind spot was unit tests.

I think the issue is just that it's incredibly hard to sell an abstract idea and incredibly hard to convince people to abandon ingrained habit.

I created a testing framework where you wrote half a test in YAML and the framework filled in the rest based on program output.

It made writing tests quick, easy and even kinda fun.

Moreover if you added a bit of explanation prose to the YAML and used a slightly nicer example scenario it would generate you guaranteed up-to-date readable markdown how to docs. For free.

But, these things are culturally chorey and there's a shame culture built around them.