Categories

Makahiya, Week 10.5

Hi,

During the beginning of this week, I worked on the server. We want to be able to forward some commands (like setting a Led’s color) to the plant. We could have the plant polling, but it seems better to use a websocket. I managed to have a websocket working with the websockets library for python, but it didn’t work on Heroku. Indeed, I had one thread running the server and another one opening and running the websocket on another port, but Heroku doesn’t let you open ports.

So I searched a solution to this problem and decided to use gunicorn. It allows handling request asynchronously and it runs a websocket without opening a new port when I test it locally. But unfortunately I didn’t manage to test it on Heroku as I can’t find how to deploy a server with pyramid and gunicorn there.

During the rest of this week, I will continue working on the server.

Tanguy

Leave a Reply