Skip to main content

Push Data to Browsers and Micro-services with WebSocket

  • Chapter
  • First Online:
Book cover Expert Twisted

Abstract

WebSocket started as a competitor of HTTP AJAX requests. When we needed real-time communication from the browser or data push from the server, they came out as a nice alternative to legacy solutions such as long polling or comet. Because they were using a persistent connection and no headers, they were the fastest and lightest option if you had a lot of small messages to exchange.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Notes

  1. 1.

    Internet of Things.

  2. 2.

    Not to be confused with the “Windows Apache MySQL PHP” stack that was popular during the pre-AJAX web.

  3. 3.

    Binaries are listed on the project page: https://github.com/mhammond/pywin32 .

  4. 4.

    If you can’t or don’t want to install a crossbar instance, you can find one for demo purpose listed on https://crossbar.io/docs/Demo-Instance/ . In that case, you can use it instead of “ws://127.0.0.1:8080/ws”. But you’ll still need to pip install pyopenssl service_identity to use it.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2019 Mark Williams, Cory Benfield, Brian Warner, Moshe Zadka, Dustin Mitchell, Kevin Samuel, Pierre Tardy

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Williams, M. et al. (2019). Push Data to Browsers and Micro-services with WebSocket. In: Expert Twisted. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-3742-7_8

Download citation

Publish with us

Policies and ethics