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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Notes
- 1.
Internet of Things.
- 2.
Not to be confused with the “Windows Apache MySQL PHP” stack that was popular during the pre-AJAX web.
- 3.
Binaries are listed on the project page: https://github.com/mhammond/pywin32 .
- 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
Rights and permissions
Copyright information
© 2019 Mark Williams, Cory Benfield, Brian Warner, Moshe Zadka, Dustin Mitchell, Kevin Samuel, Pierre Tardy
About this chapter
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
DOI: https://doi.org/10.1007/978-1-4842-3742-7_8
Published:
Publisher Name: Apress, Berkeley, CA
Print ISBN: 978-1-4842-3741-0
Online ISBN: 978-1-4842-3742-7
eBook Packages: Professional and Applied ComputingApress Access BooksProfessional and Applied Computing (R0)