AccelerationConsortium / ac-microcourses

Microcourses hosted by the Acceleration Consortium for self-driving lab topics.
https://ac-microcourses.readthedocs.io/
MIT License
23 stars 3 forks source link

Issue on page /courses/hello-world/1.5-data-logging.html maybe supposed to be to different nb? #88

Open sgbaird opened 1 week ago

sgbaird commented 1 week ago

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)

SissiFeng commented 1 week ago
aws_api

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.

sgbaird commented 1 week ago

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.).

SissiFeng commented 1 week ago

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)?

sgbaird commented 1 week ago

Sounds good!