interprocess communication and sharing memory

j55 via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Wed Sep 2 18:27:14 PDT 2015


This is my first attempt at a project in D, so pardon me if I'm 
overlooking something obvious:

I'm using libasync to create an eventloop, to set up something 
like a server/daemon process.  This part works very well.  We'll 
call this Server A.

Now I'd like to write another process (running on the same 
computer), we'll call Client B, and pass signals in to Server A.  
I want to be able to create the process independently from Server 
A, I don't want to have to spawn the process from the server.  
I'd also like to avoid creating a pipe process just to pass 
information from/to Server A and Client B.

What would be a good way to have Client B identify and pass 
signals and information to Server A (and back)? I would prefer to 
choose the fastest solution, as I hope to expand this to 
relatively large data sets.

After I get simple signal passing working, I'd like to attempt 
passing shared memory of c-style arrays with Plain Old Data types.

I've read many posts about shared memory and interprocess 
communication in D, but I didn't see any conclusive information 
about whether this type of interprocess memory sharing will be 
convenient or practical in D.  If it doesn't work out, I have 
some prototype already working in c++ with boost interprocess, 
but I'd prefer to use a native D solution if possible.




More information about the Digitalmars-d-learn mailing list