I have two containers in my application running on a Raspberry pi. One container is a python container that takes sporadic input from I/0 devices. The other container is running Electron JS. My question is what is the best way to push the data received by the python container from the I/O devices to the Electron JS app? I’m in between writing to a shared volume and using a websocket to communicate between the two containers, but don’t know which way is better, and why.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
Hi there!
I would take my response with a grain of salt as I am unfamiliar with a lot of the components of your application as well as raspberry pi hardware. This also may depend on your version of raspberry Pi as it looks like they have different networking adapter capabilities.
That being said, I would fathom that a shared volume locally would be faster than a network based interface between the two applications. Pi networking is USB based and it looks like that also may be hampered by the USB ports speeds. FOr these kinds of reasons I would guess that local shared volume would be faster.
Regards,
John Kwiatkoski Senior Developer Support Engineer - Kubernetes
Get paid to write technical tutorials and select a tech-focused charity to receive a matching donation.
Full documentation for every DigitalOcean product.
The Wave has everything you need to know about building a business, from raising funding to marketing your product.
Stay up to date by signing up for DigitalOcean’s Infrastructure as a Newsletter.
New accounts only. By submitting your email you agree to our Privacy Policy
Scale up as you grow — whether you're running one virtual machine or ten thousand.
Sign up and get $200 in credit for your first 60 days with DigitalOcean.*
*This promotional offer applies to new accounts only.