We’d like to use socketio to get real-time messaging directly into our client and then call into our “python” code to handle updates
Someone asked this last year… with no repsonses
I’m was testing out whether or not I could have a socketio client running on a webpage to recieve messages from a python socketio server. Basically I want to push some messages/data to the client rather than have the client poll for new messages periodically.
I uploaded socket.io.js as an asset and I’m using some custom html for the web page. I have a socketio server written in python running on localhost:5000 on my computer and I’m using the anvil docker image to run my app locally. The app ru…
Anyone else managed something like this?
hugetim
November 3, 2023, 11:19am
2
There are a couple of related suggestions pointed to in this thread (both the MQTT and also FireBase and related options in the post above the one I’m linking to):
You could also try to use MQTT with anvil. There are Demo Codes availabe like
here: MQTT sample code
and
here: MQTT Made Simple [Websocket]
for testing purpose you can use the public mqtt broker : broker.emqx.io
It is just an idea to use mqtt which also might be a good fit for a chat application.
Good luck!
As suggested by @hugetim , I’ve implemented both MQTT and Firebase, finding Firebase to be the easiest solution.
Especially with the work @mark.breuss has done.
Good Afternoon!
I’m happy to announce that we are giving back to the anvil community by building an Anvil Firebase Integration.
If you want to build live synced, lightning fast apps without even the need for a server call, or javascript code, this will get you started.
Thanks @meredydd for helping with the third party dependency by the way!
Happy to hear what you guys are building with it.
Klick here for up to date documentation
Disclaimer:
Attention V0 is not Production Ready and in an …
1 Like