Question

What is more efficient for multi container communication?

Posted January 2, 2020 618 views
Docker

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.

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.

×
1 answer

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

Submit an Answer