Live data from Hacker News

The WebSocket Handbook

ably.com

61–70 of 124 posts

Re: The WebSocket Handbook

#61
post #15

Anyone know of any examples of cool cases where websockets have been used? (Maybe other than games.) I feel like in most cases I see them used the latency gained is basically added back with bloat in other parts.

Our customers use Ably across such a diverse set of use cases, but here's a few:

1. Sports events streaming live updates (see https://ausopen.com/live-scores, we are streaming live scores for the Tennis Australian Open right now). Companies like Toyota even use us to facilitate engineers tweaking the performance characteristics of their cars in realtime remotely.

2. Edtech - we have numerous customers using us to drive live classroom environments, think shared white boards, collaborative tests, presence, teacher engagement. You may have used Codewars in the past, that uses Ably under the hood for example, https://www.codewars.com/.

3. Live screen sharing and collaborative applications. You may have used the amazing Tuple.app, that uses Ably under the hood https://tuple.app/.

4. Collaborative and live web and mobile SaaS applications, where changes need to occur concurrently, notifications need to be presented, and other realtime updates are needed in the interface. You've probably heard of Hubspot, they use Ably under the hood to power their collaborative and live features, https://hubspot.com

5. Developer infrastructure and platforms that need realtime capabilities at scale. You have probably come across Split, the leading feature flag company backed by Atlassian and Microsoft. They use Ably under the hood to power billions of feature flag updates in realtime each month. https://www.split.io/

6. Financial market data - typically streaming updates to thousands or millions of subscribers with very low latency, and sometimes using features like Deltas (https://ably.com/documentation/realtime/channels/channel-par...) to keep bandwidth & latency as low as possible.

I could keep going, but I hope that gives you the idea, realtime is not just for Christmas or for Games :)

Matt, co-founder of ably.com

Re: The WebSocket Handbook

#62
post #17
post #15

Anyone know of any examples of cool cases where websockets have been used? (Maybe other than games.) I feel like in most cases I see them used the latency gained is basically added back with bloat in other parts.

I just launched this site with websockets: https://hackernews.pro Websockets used for updating Story/Comment data, and User presence

Feel free to sign up for an Ably account and we'll help support your project with a community package, we love what you're doing!

Re: The WebSocket Handbook

#63

Earlier quoted context omitted.

I'm generally reluctant to add dependencies on third-party services such as Ably in the core application, because that would add another barrier to providing an on-prem deployment option, or even allowing a customer to deploy on their own AWS infrastructure instead of ours. I'm actually contemplating this decision right now for a new product.

I am surprised to hear about on-prem deploys when the direction of travel is towards serverless/cloud solutions that don't require orchestration. Out of interest, why is on-prem so important for your use case? Separately, I'd be interested in how you'd view that decision if there was a less scalable but mostly fully functioning open source version of the third-party service you could deploy if you needed to? Matt, co…

For one of my company's products, we're already working with a security-sensitive customer on a deployment on their own AWS infrastructure (in their own VPC). This customer wouldn't be comfortable using our public cloud deployment unless we get a SOC2 certification or similar. For the product I'm developing now, some potential customers will definitely want to keep it physically located within their corporate network. That's all I can say publicly.

If there was a less scalable, but still mostly functioning open-source substitute for Ably, then I'd be way more comfortable using Ably in the main public cloud deployment.

Re: The WebSocket Handbook

#64
Mercure is an alternative to WebSocket that is especially useful for REST/GraphQL APIs. It's a protocol that builds on HTTP and Server-Sent Events thus is supported out of the box by browsers, mobile apps and IoT clients, and it doesn't suffer from most WebSocket limitations (e.g. header/cookie based authorization works):

https://mercure.rocks

Re: The WebSocket Handbook

#65

Hi HN! I'm Alex, and I've been researching and writing about WebSockets for a while now. I'm the author of the recently released WebSocket Handbook. AMA about the WebSocket tech, the realtime web, Ably or anything related to Liverpool FC.

Hi! I want to create a web app like Google docs where multiple users can collaborate in real time to edit the document together (using a special link like gdocs generate). I want to save the docs in a MySQL db (no firebase) My questions are: 1) Since multiple people are working together how does one manage conflicts, i.e. 2 people sending different edits simultaneously. 2) If one clients gets disconnected (4g) and th…

https://en.wikipedia.org/wiki/Conflict-free_replicated_data_... https://en.wikipedia.org/wiki/Operational_transformation

ofcourse u will need websocket to sync changes.

Re: The WebSocket Handbook

#66
post #27

Earlier quoted context omitted.

WSS breaking is surprisingly common for clusters of our enterprise users, to the order of 5-10%. Specifically, when business users connect through security networks like Zscaler, often their employers will MITM all connections (similar to how AdGuard works) but in a way that breaks WSS. We have rigorous monitoring for both frontend and backend, and can trace these failures with accuracy - consistently, both the front…

That's surprising to hear, we definitely don't see anywhere near the order of 5-10%, at best on order of magnitude less. Out of interest, what geography and industries are you operating in where you see such a high rate of incompatibiltiy? Matt, Ably co-founder

China and LATAM are definitely overrepresented. We deal with conglomerates and manufacturers, so it's vaguely industrial + heavy industry, but all these users are corporate folks using standard-issue BigCo laptops (almost certainly loaded with standard "security" layers from a dozen different vendors, making detailed diagnosis nearly impossible for us as a SaaS provider).

Re: The WebSocket Handbook

#67
post #66

Earlier quoted context omitted.

That's surprising to hear, we definitely don't see anywhere near the order of 5-10%, at best on order of magnitude less. Out of interest, what geography and industries are you operating in where you see such a high rate of incompatibiltiy? Matt, Ably co-founder

China and LATAM are definitely overrepresented. We deal with conglomerates and manufacturers, so it's vaguely industrial + heavy industry, but all these users are corporate folks using standard-issue BigCo laptops (almost certainly loaded with standard "security" layers from a dozen different vendors, making detailed diagnosis nearly impossible for us as a SaaS provider).

Thanks for the explanation, useful to know.

Re: The WebSocket Handbook

#68

Earlier quoted context omitted.

I'm generally reluctant to add dependencies on third-party services such as Ably in the core application, because that would add another barrier to providing an on-prem deployment option, or even allowing a customer to deploy on their own AWS infrastructure instead of ours. I'm actually contemplating this decision right now for a new product.

I am surprised to hear about on-prem deploys when the direction of travel is towards serverless/cloud solutions that don't require orchestration. Out of interest, why is on-prem so important for your use case? Separately, I'd be interested in how you'd view that decision if there was a less scalable but mostly fully functioning open source version of the third-party service you could deploy if you needed to? Matt, co…

[deleted]

Re: The WebSocket Handbook

#69
post #38
post #24

Earlier quoted context omitted.

It's the same thing as HTTP. Websocket starts off as an HTTP request with cookies, headers etc. Use those just like HTTP to authenticate, and your Websocket server should pass the user data to the websocket object

Don't have access to the headers from JS. Best solution might be to generate a short-lived one-time-use ticket and pass it in the querystring.

Cookies will be forwarded though, or..?

Re: The WebSocket Handbook

#70

Earlier quoted context omitted.

I am surprised to hear about on-prem deploys when the direction of travel is towards serverless/cloud solutions that don't require orchestration. Out of interest, why is on-prem so important for your use case? Separately, I'd be interested in how you'd view that decision if there was a less scalable but mostly fully functioning open source version of the third-party service you could deploy if you needed to? Matt, co…

For one of my company's products, we're already working with a security-sensitive customer on a deployment on their own AWS infrastructure (in their own VPC). This customer wouldn't be comfortable using our public cloud deployment unless we get a SOC2 certification or similar. For the product I'm developing now, some potential customers will definitely want to keep it physically located within their corporate network…

I understand the SOC2 requirement, which is why we're SOC2 compliant. A long and painful process, but one that has opened up opportunities like the one you said would otherwise require an on-prem installation. We have in fact also got some VPN-like links (AWS PrivateLink) with customers who are particularly sensitive to security and data leaving their network, and that coupled with SOC2 has made it possible.

> If there was a less scalable, but still mostly functioning open-source substitute for Ably, then I'd be way more comfortable using Ably in the main public cloud deployment.

Thanks for the feedback, I will pass on to the product team!

Post reply on HN