Report this

What is the reason for this report?

What is more efficient for multi container communication?

Posted on January 2, 2020

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!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

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

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.