Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Building IoT Visualizations using Grafana

You're reading from  Building IoT Visualizations using Grafana

Product type Book
Published in Jul 2022
Publisher Packt
ISBN-13 9781803236124
Pages 360 pages
Edition 1st Edition
Languages
Author (1):
Rodrigo Juan Hernández Rodrigo Juan Hernández
Profile icon Rodrigo Juan Hernández

Table of Contents (21) Chapters

Preface 1. Part 1: Meeting Grafana
2. Chapter 1: Getting Started with Grafana 3. Chapter 2: Exploring Grafana 4. Part 2: Collecting Data from IoT Devices
5. Chapter 3: Connecting IoT Devices 6. Chapter 4: Data Sources for Grafana 7. Chapter 5: Using Time Series Databases 8. Part 3: Connecting Data Sources and Building Dashboards
9. Chapter 6: Getting Data and Building Dashboards 10. Chapter 7: Managing Plugins 11. Chapter 8: Organizing and Managing Dashboards 12. Part 4: Performing Analytics and Notifications
13. Chapter 9: Performing Analytics in Grafana 14. Chapter 10: Alerting and Notifications in Grafana 15. Part 5: Integrating Grafana with Other Platforms
16. Chapter 11: Using Grafana with Prometheus 17. Chapter 12: Using Grafana with OpenSearch 18. Chapter 13: Showing Data from LibreNMS in Grafana 19. Chapter 14: Integrations for Grafana Cloud 20. Other Books You May Enjoy

What about WebSocket?

WebSocket takes the best of both worlds: HTTP and persistent connections.

It uses a handshake to establish communication.

The connection starts with an HTTP GET from the client. In the request, the client specifies an upgrade to WebSocket. You can see this in the following example:

GET /chat HTTP/1.1
Host: server.example.com
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Key: dGhlIHNhbXBsZSBub25jZQ==
Origin: http://example.com
Sec-WebSocket-Protocol: chat, superchat
Sec-WebSocket-Version: 13

After the request from the client, the server can accept it, as follows:

HTTP/1.1 101 Switching Protocols
Upgrade: websocket
Connection: Upgrade
Sec-WebSocket-Accept: s3pPLMBiTxaQ9kYGzzhZRbK+xOo=
Sec-WebSocket-Protocol: chat

Then, the client and the server can start to exchange data until one of them decides to close the connection.

As you can see, unlike HTTP, WebSocket allows exchanging data without the need to...

lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €14.99/month. Cancel anytime}