Should I set up a RAM disk, or is there a more direct way for the data to make its journey?
In this context RAM disks have been superseded by tmpfs, which is simpler to use and probably already existent on whatever OS you are using, presuming it is a GNU/Linux variant. To check:
mount | grep "^tmpfs"
Chances are it includes /run
, which is world readable, so you can create a writable directory in there with ownership and permissions appropriate to the process. Remember, obviously that doesn't persist across boots, and it will require superuser privileges to create the directory regardless of who is then allowed to use it. Hence, doing it via init is sensible; if the directory isn't used it doesn't matter.
/tmp
is commonly also a tmpfs filesystem, but it is not on Raspbian.
You can find the maximum size and current usage stats via df
. Beware the max size is probably a considerable potential chunk (e.g., on Raspbian it looks like /run
has ~250 MB), meaning you have plenty of space but if you get out of control, that's RAM you're using. It sounds like you do not need much.