Hacker News new | past | comments | ask | show | jobs | submit login

Why use a websocket on CP systems where consistency is important? Request/Response seems better?

Even though they CAN be used for CP I always thought Web Sockets were targeted more for AP systems where Availability/Speed was what's more important and if the connection broke and state was lost it wasn't a big deal.




A websocket doesn’t have much import on CP vs AP. Request/Response is still done over unreliable connections that can’t guarantee exactly once request or response delivery without further application-level mechanisms (retries with idempotency keys, etc.). They’re also used mostly with web clients, and it’s pretty rare that we consider systems where web client partition is allowed to reduce availability for the system as a whole, even if it is CP.


Ah that makes sense. Maybe I need to read the article again but it was talking about lost state in the web client due to the web socket which means they're trying to treat the web client as a stateful partition?

So I guess my instinct was why even have state in the browser.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: