Skip to content

Latest commit

 

History

History
17 lines (13 loc) · 2.87 KB

websockets.md

File metadata and controls

17 lines (13 loc) · 2.87 KB

Websockets

As explained above, WebSocket is a computer communications protocol standardized by the IETF in 2011 and providing full-duplex communication channels over a single TCP connection. WebSocket is distinct from HTTP but is designed to work over HTTP by using a handshake that uses an HTTP Upgrade header to change from the HTTP protocol to the WebSocket protocol using TCP.

Elements

  • HTTP - WebSockets’ relationship with the HTTP protocol makes it something that compliments RESTful APIs with a higher volume, speed, and real-time alternative, helping shift APIs into a higher gear to deliver what consumers demand.
  • TCP - When API consumption requires a much higher volume of real-time connections, it makes sense to switch from HTTP to TCP, providing a much more industrial-grade pipe for moving digital resources where they are needed and responding faster to events.
  • Asynchronous - WebSockets provide the ability to publish and subscribe to digital resources in real time, allowing consumers to publish and subscribe to messages in real time by requesting and waiting for a response to get what they need.
  • Real Time - nteractions with WebSocket APIs occur in real-time, allowing consumers to publish and then subscribe to events as they are happening, providing faster access to a firehose of information they need to support applications.
  • Event-Driven - WebSocket APIs do not require consumers to consciously make requests when they want information. They can just subscribe to events that are already occurring across operations, making the API experience more impactful.
  • Ad Hoc - It is common for WebSocket APIs to be used as a catch-all for whatever schema you might need across the enterprise, making for a pretty ad hoc and sometimes chaotic mix of schema from many applications and integrations.
  • Volume - WebSocket APIs are definitely designed for noisier APIs, working well for financial, market-related, and other real-time data scenarios. They provide a set of garden hoses or fire hoses consumers can publish and subscribe to for their work.
  • Scale - This API pattern is something you can use to scale some of your higher- volume API channels, augmenting other patterns in your API toolbox. You can use it for a more precise set of applications to meet the needs of a precise set of consumers.

A WebSocket API provide an effective way for you to stand up a private, partner, or public API that handles a significant volume of specialized or ad hoc API traffic. But most WebSocket implementations lack schema normalization, management, and observability, making them prime targets for standardization before they become a sprawling landscape of schema noise. You will find WebSockets in the financial sector, but their use is rapidly expanding across other industries, adding a publish and subscribe layer on top of the ongoing enterprise chaos.