Skip to contentSkip to conversation

Mechanism for external event notification

DISCUSSION Deepak Kodihalli 1 participant 1 message Sep 15, 2017

lore
Share & tools
lore
#0 lore raw

Hello,

I have a proposal on the mechanism be able to do external event notification from the BMC. With this, the BMC would be able to push event notifications to interested clients that have a connection established, without having the clients to do a poll.

I was primarily looking at websockets [1] and the gevent-websocket project [2]. The idea is to enhance OpenBMC's phosphor-rest-server implementation to be able to handle websockets. The existing rest server implementation uses the Bottle framework, and it is easily possible to handle a websocket route via Bottle. Once a websocket has been created, there are various possibilities - a client can subscribe to specific events and push data to the server, the server can push data to the client, and the client should still be able to use the regular http routes.

I hacked up a quick prototype [3] via which I can notify connected clients about d-bus paths being created on the BMC.

Thoughts or questions about the proposal?

[1] https://www.fullstackpython.com/websockets.html
[2] https://gitlab.com/noppo/gevent-websocket
[3] https://gerrit.openbmc-project.xyz/#/c/6679/

Regards,
Deepak