Skip to content

Streaming Server-side State Changes #1060

Answered by richard-to
adamocarolli asked this question in Q&A
Discussion options

You must be logged in to vote

Until we can integrate push support with our experimental Web Sockets integration, you'll have to define the push interfaces outside of the Mesop app.

Basically create FastAPI server (See https://google.github.io/mesop/guides/server-integration/). FastAPI has web socket support (https://fastapi.tiangolo.com/advanced/websockets/) so that may be the easiest integration path. I haven't used MQTT yet, so but if you can make a web socket connection directly, then you could skip the Fast API server part.

Now your custom Web Component will serve as the mediator between your Web Socket server and Mesop App. The Web Component will initialize the web socket connection. For Web Component tutorial, see

Replies: 3 comments 3 replies

Comment options

You must be logged in to vote
1 reply
@adamocarolli
Comment options

Comment options

You must be logged in to vote
1 reply
@adamocarolli
Comment options

Comment options

You must be logged in to vote
1 reply
@richard-to
Comment options

Answer selected by adamocarolli
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants