Hello (sorry if my doubts are kind of basic but i'm just starting).
I want to start a new project related to sending data from a sensor to an SQL-Server. I've been looking for information trying to understand how it works and I see that some users make HTTP REQUESTS (most of cases POST request) to their servers, then this request is processed with PHP and finally stored in an MySQL database. If I could do a diagram I would do something like this:
Code: Select all
[SENSOR] --> [MICRO-CONTROLLER] ---> [HTTP REQUEST] ----> [SERVER] ----> [PHP] ----> [DATABASE]
But is there a way to link the micro-controller with my database without using an HTTP request and PHP? Something like this for having a faster communication between my micro-controller (ESP32) and my database.
Code: Select all
[SENSOR] --> [MICRO-CONTROLLER] ---> [UNKNOWN REQUEST] ----> [DATABASE SERVER]
I ask this because for example if my sensor sample rate is about 400 HZ, I need to make an HTTP request every 1/400 seconds and it sounds kind of inefficient. I guess a solution is making a 400 size buffer and sending it, for example, every second, but I'm not sure if it is the best solution. Is this possible with the ESP32 or I need to change to something more powerful like a RaspberryPi?
Thank you for your time