Wk7 - WebServers Flashcards
What is the main difference between push and pull models in IoT networking?
Pull: The client continuously asks the IoT device for data. Like visiting a website.
Push: The IoT device sends data to a server/cloud without being asked, when an event occurs. Like sending an email.
Why is a push model preferred for low-power IoT applications?
A push model conserves power because the device remains idle until it needs to send data, unlike the pull model, which requires an always-on network connection for frequent requests.
What are some of the pros of pulling data from an IoT Device?
- Quick and easy to implement.
- No third-party hosting is required.
What are some of the cons of pulling data from an IoT Device?
- It only supports a few simultaneous client connections.
- You can forget about server-side processing (e.g., PHP).
- Robust security is challenging to implement (i.e., HTTPS).
- Programs can be structured as code that emits embedded HTML to clients – a maintenance headache.
What is the significance of using Flash memory in IoT devices?
Flash memory is non-volatile, meaning data stored in the file system persists after a device restart, making it suitable for storing files like HTML, CSS, and JS in IoT applications.
How can code and HTML be separated in an IoT Webserver?
- Use some IoT Flash storage for a filesystem.
- HTML, CSS, and JS files will reside in the filesystem.
- Code & data are developed and uploaded separately.
What are some of the features of the LittleFS Filesystem?
- It is supported by the Arduino framework.
- It is an abstraction layer on Flash memory to support file storage.
- Code & files are stored in different areas of Flash memory and uploaded separately.
- The allocated space for code and files is configurable in platformIO.ini.
- It can store any file type (HTML, CSS, JS, JPEG, GIF, MP4, etc.).
What are the main limitations of using a web server on an IoT device?
Web servers on IoT devices have limited support for simultaneous client connections, lack server-side processing (like PHP), and implementing robust security (like HTTPS) is challenging.
What type of IoT applications is a pull model suitable for?
A pull model is suitable for applications that don’t require real-time updates, where occasional data requests are acceptable (e.g., querying environmental data periodically).
How does WiFi compare to other IoT wireless technologies in terms of bandwidth and power consumption?
WiFi has high bandwidth (~100 Mbits/sec) but consumes a lot of power compared to other technologies like LoRa or Bluetooth, which have lower bandwidth and are more power-efficient.
What are some libraries used for web servers on ESP8266?
Common libraries include ESP8266WiFi and ESP8266WebServer for managing WiFi connections and handling HTTP requests.
What are the two basic approaches to accessing IoT sensor data?
The two approaches are pulling data from an IoT device (client requests) and pushing data to the cloud (IoT device sends data).
What are the pros and cons of using embedded HTML in IoT applications?
Embedded HTML is quick and simple for small apps, but it becomes difficult to maintain as applications grow more complex, especially when adding CSS and JavaScript.
What are IoT hosted webservers suitable for?
Small apps with a few clients.
What is an alternative to using IoT devices with webservers?
IoT devices can push data to a remote server (e.g., cloud).