help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Passing variables between octave processes on the same machine


From: Sergei Steshenko
Subject: Re: Passing variables between octave processes on the same machine
Date: Sun, 20 Jan 2019 17:42:40 +0000 (UTC)



On Sunday, January 20, 2019, 7:36:25 PM GMT+2, Pavel Hofman <address@hidden> wrote:


Hi,

Please does anyone have any experience with passing complete variables
between two independent octave processes (not parent/child via popen)?

The transport channel is easy - sockets, zeromq etc. I assume for
serialization I could use the 'save' function:

bitstream = save('-', 'variable')


But I was not able to find a simple way to deserialize contents of the
'bitstream' variable back to 'variable'. The 'load' function does not
accept input from a variable (as far as I understand the documentation),
only from a real file.

Actually, I would love to use a sequence of plain files but several
messages must be sent every second and SSD drives do not like this
constant create/delete file load. Creating a RAM drive would work but I
need a multiplatform solution (linux, windows) and creating the
platform-specific RAM drive would overcomplicate the project deployment.

Thank you in advance for any suggestions, experience, etc.

Best regards,

Pavel.

================================================

Start from named pipes "Introduction to Named Pipes" - Introduction to Named Pipes | Linux Journal


.

Using named pipes you can save Octave variables using 'save' in one process and load Octave variables in another process using 'load'. And/or maybe 'fwrite' and 'fread' preceded by 'fopen'.

Named pipes also exist in Windows.

--Sergei.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]