acm-uiuc / twilight-old

Underglow for the Ceiling
4 stars 3 forks source link

Client-server infrastructure #15

Open wchill opened 7 years ago

wchill commented 7 years ago

Currently Twilight runs on only a single machine. It needs to be reworked to support a networked infrastructure.

How this would work:

To support the current mode of operation, this can be done by separating the frame generation code from the hardware operation code. In twilight.py, we currently write directly to the serial ports as necessary; most of the refactoring work in this issue can be completed by replacing the serial port objects with socket objects and adding logic to allow for attachment/detachment of Twilight display clients at runtime.

For the REST API, at least the following operations should be supported. Additions would be welcome:

modi95 commented 7 years ago

Need webhooks for merges to master.

modi95 commented 7 years ago

Command dispatcher for pis as well as automated code pushes to teensys.

warut-vijit commented 7 years ago

We can probably begin working on this as soon as PR #19 is merged

warut-vijit commented 7 years ago

In addition to the items provided by @wchill above, the REST API should have:

wchill commented 7 years ago

For reading which parameters can be adjusted, you can use the default parameters dictionary passed to config loader. We may also want to extend the dictionary to support specifying constraints on the input value.

wchill commented 7 years ago

Starting point for server-side Twisted code: https://github.com/acm-uiuc/twilight/blob/39401335475bd101ead269aeb4e5a20ef765dfc2/server/app.py

You can use telnet to talk to the server code directly for the time being.