Open sgbaird opened 1 week ago
Hopefully, this diagram has described the workflow clearly: PyMongo is still used to read and write MongoDB data, but now it's embedded in Lambda functions. Lambda acts as an intermediate layer: it receives requests from the microcontroller or client, and then uses PyMongo to connect to MongoDB for data manipulation (e.g., reading or writing). Request flow: Client sends request to AWS API Gateway. API Gateway triggers the Lambda function. Lambda uses PyMongo to connect to MongoDB and performs the corresponding read and write operations. In this way, we have indirect access to MongoDB through Lambda, ensuring flexibility and security.
Thanks for clarifying. My understanding is that https://ac-microcourses.readthedocs.io/en/latest/courses/hello-world/1.5.1-pymongo.html is functionally the same as https://ac-microcourses.readthedocs.io/en/latest/courses/hello-world/1.5.1-aws-lambda-read.html. Is that correct?
My impression is that scripts being run on a microcontroller in a self-driving lab context wouldn't require download capabilities from the database. The most common use case for uploading data directly from a microcontroller is the logging of state variables such as temperature, pressure, humidity, gas content, small sensor data, measured flow rates, and weight data. In these cases, the microcontroller generally doesn't need to download any data, since decision making based on the data would generally happen at the orchestrator level (always running in "real" Python), at which point the native drivers can usually be used (pymongo, boto3, etc.).
Thanks for clarifying. My understanding is that https://ac-microcourses.readthedocs.io/en/latest/courses/hello-world/1.5.1-pymongo.html is functionally the same as https://ac-microcourses.readthedocs.io/en/latest/courses/hello-world/1.5.1-aws-lambda-read.html. Is that correct?
My impression is that scripts being run on a microcontroller in a self-driving lab context wouldn't require download capabilities from the database. The most common use case for uploading data directly from a microcontroller is the logging of state variables such as temperature, pressure, humidity, gas content, small sensor data, measured flow rates, and weight data. In these cases, the microcontroller generally doesn't need to download any data, since decision making based on the data would generally happen at the orchestrator level (always running in "real" Python), at which point the native drivers can usually be used (pymongo, boto3, etc.).
Yes, you're right. I put the Closed-Loop Control part in there as well. How about moving this section to “Extended Reading” (separate from the main course content)?
Sounds good!
https://ac-microcourses.readthedocs.io/en/latest/courses/hello-world/1.5-data-logging.html#reading-data-via-aws-lambda
(I.e., the notebook that has a pure PyMongo implementation)