My take on a ToDo list app. It showcases an extremely basic gRPC implementation with a client
and a server
. The server stores data in MongoDB and reports changes to a rendering server
(via a regular HTTP calls for now) running on a raspberry pi equipped with an e-paper display.
Probably no one besides me, I started working on this because I wanted to learn more about Ansible, gRPC and Docker. I also had a Raspberry pi Zero W and an e-paper display module just gathering dust, so why not?
The whole application is split into 4 components:
client
: Handle user input and display ToDosserver
: Manage datarendering server
: Receive rendering requestsrenderer
: Render ToDos to the display
It exposes a simple Server Side rendered form (that uses at least one web component). It receives a data stream from the server
with any changes made to the ToDo list, and reports any client side updates.
Exposes a method to add ToDos and a method that streams them down. It uses MongoDB to store data an reports changes to the rendering server
via an HTTP POST call.
It's a simple Python server using Flask (Why python here? well, the e-paper display library comes in C and Python versions only). It exposes a single endpoint to receive data changes. When the endpoint is queried, it invokes the Python renderer
handler.
It's a simple library(?) that implements the Waveshare e-paper display official library and renders the ToDo list.
Currently all the components communicate without any kind of security implementation.
- Improve the existing Ansible playbook (rendering side) to pull the server code and create "daemonize" it automatically.
- Create a playbook to run start
client
andserver
viadocker-compose
.
Make it look better.