0

I have an application (A) that updates some data (about 1 MB) every second. I can make this application write the data to a file of my choosing, but other than that it is out of my control.

I need to read this data (entirely) in another application (B). This application is mine so I can code it however I want.

So my question is: What is the appropriate way sharing the data between application A and B? I don't need the data to be retained in memory longer than it takes for application B to read it (on a reboot or whatever). I only need access to the fresh data if application A is running.

My current solution is: Make application A write to /dev/shm/myapplication every second. Code application B so that it reads from /dev/shm/myapplication once every second. It works, but I am still curious if this is the "proper" way of doing it. Other answers and comments have lead me to believe that "/dev/shm" is a bad place for tinkering. See these sources:

https://superuser.com/a/227714/359316

https://stackoverflow.com/a/42884337/2583765

birgersp
  • 153

0 Answers0