• Skip to main content
  • Skip to primary sidebar

RNTLab.com

The Ultimate Shortcut to Learn Electronics and Programming with Open Source Hardware and Software

  • Courses
  • Forum
    • Forum
    • Ask Question
  • Shop
  • Account
  • Blog
  • Login

Difference between Async and SSE webserver

Q&A Forum › Difference between Async and SSE webserver
0 Vote Up Vote Down
Ellard Postma asked 3 years ago

I am playing around with both types of webserver.

Looking into the code it is not clear to me what part of the code is the cause for the difference between both. As far I can see they are both the same.

To be more clear in both loops there is the timed transmission of the data. SSE is supposed to display the updated data on change of data.

 

5 Answers
0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi.
Can you provide more details about your question?
Are you comparing two different projects? And which projects?
An asyncwebserver is a type of webserver. SSE (server-sent events) is a type of communication protocol.
Regards,
Sara

0 Vote Up Vote Down
Ellard Postma answered 3 years ago

This tutorial shows how to use Server-Sent Events (SSE) in an ESP8266 NodeMCU Web Server programmed with Arduino IDE. SSE allows the browser to receive automatic updates from a server via HTTP connection. This is useful to send updated sensor readings to the browser, for example. Whenever a new reading is available, the ESP8266 sends it to the client and the web page can be updated automatically without the need to make additional requests.
In this tutorial you’ll learn how to build an asynchronous web server with the ESP8266 NodeMCU board to control its outputs. The board will be programmed using Arduino IDE, and we’ll use the ESPAsyncWebServer library.
Those are the two different projects. Both are webservers.
I do not see how the SSE mechanism is implemented.
 

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Yes, the projects are different and both are web servers.
Both projects use the AsyncWebServer library. One project deals with sensor readings and the other deals with controlling outputs.

The project with the sensor readings uses SSE (server-sent events) to send information (sensor readings) to the client (the web browser).
What exactly you don’t understand about SSE? It is explained in the tutorial the parts of code that deal with SSE and how it works. Can you be a little more specific?

The other project controls the outputs via HTTP requests. When you click on a certain button, it sends a request on a different URL to the server. Accordingly to the message received, it controls the outputs accordingly.

 

The code is different for each project.

See here: https://randomnerdtutorials.com/esp8266-nodemcu-async-web-server-espasyncwebserver-library/

This project doesn’t use SSE on the loop().

 

And this one uses SSE: https://randomnerdtutorials.com/esp8266-nodemcu-web-server-sent-events-sse/

Regards,
Sara

0 Vote Up Vote Down
Ellard Postma answered 3 years ago

Hey Sara
Thanks for your effort.
I think I mixed up things terribly.
I do apologise.
Ellard

0 Vote Up Vote Down
Sara Santos Staff answered 3 years ago

Hi again.
Let me know if everything is clear now or if you need further clarification.
Regards,
Sara

Primary Sidebar

Login to Ask or Answer Questions

This Forum is private and it’s only available for members enrolled in our Courses.

Login »

Latest Course Updates

  • [New Edition] Build ESP32-CAM Projects eBook – 2nd Edition April 16, 2025
  • [eBook Updated] Learn ESP32 with Arduino IDE eBook – Version 3.2 April 16, 2025

You must be logged in to view this content.

Contact Support - Refunds - Privacy - Terms - MakerAdvisor.com - Member Login

Copyright © 2013-2025 · RandomNerdTutorials.com · All Rights Reserved

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.