Reader small image

You're reading from  Full Stack Web Development with Remix

Product typeBook
Published inNov 2023
Reading LevelIntermediate
PublisherPackt
ISBN-139781801075299
Edition1st Edition
Languages
Tools
Right arrow
Author (1)
Andre Landgraf
Andre Landgraf
author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf

Right arrow

Summary

In this chapter, you learned about real-time technologies and techniques and how to use them in Remix.

First, we discussed polling, SSE, and the WebSocket API and compared their advantages and disadvantages. Polling is the easiest to set up. A simple polling implementation does not require changes on the server. SSE provides a one-way communication line using the HTTP protocol, while WebSocket connections use TCP and are bi-directional.

Second, you learned about server requirements for SSE and WebSocket. You now understand that SSE requires support for streaming responses, while WebSocket servers can only run on long-running servers.

Finally, we implemented a real-time UI in BeeRich by utilizing SEE. We implemented a new endpoint and associated React hook using the EventSource API. Since Remix’s loader functions return HTTP Response objects, we can implement the server-sent event endpoint in Remix using a resource route.

In the next chapter, we will learn...

lock icon
The rest of the page is locked
Previous PageNext Page
You have been reading a chapter from
Full Stack Web Development with Remix
Published in: Nov 2023Publisher: PacktISBN-13: 9781801075299

Author (1)

author image
Andre Landgraf

Andre is a full stack developer from Germany. He graduated with an MS in Information Systems from the Technical University of Munich and was also awarded an MS in Computer Science from Sofia University in Palo Alto. Andre currently lives in Cupertino, California, and he works as a Software Engineer at LinkedIn. Andre loves learning, writing, and speaking about all things web. In his free time, he tutors aspiring developers and builds for the web.
Read more about Andre Landgraf