On Thursday, 3 September 2015 at 01:27:15 UTC, j55 wrote:
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.

It's probably a stupid idea, but until someone with experience answers: what happens if you declare the memory as shared or __gshared and send a pointer to it via message passing or a pipe?


Reply via email to