BlitzMax IPC: How to make it efficient?

BlitzMax Forums/BlitzMax Programming/BlitzMax IPC: How to make it efficient?

SystemError51(Posted 2013) [#1]
Hey everynyan,

I know that IPC with BlitzMax exists, I have found quite some interesting examples that prove that it is not too hard to implement. In essence, there is a listener in the main loop that evaluates "signals" being sent into a pipe and then does something with it.

In the examples, it was done with something like if-string-equals-soandso-then-do-this-in-maxgui-window.

Now what I want to know, is, if you can have something like a server, to which other external programs can "connect" to and then run normal BlitzMax code - but then send objects instead of strings or something into the parent app?

Say you construct an object in a child app, and now you send the finished constructed object somehow through the pipe into the parent app.

Is this possible to do? And if so, can you provide an example?

----

Here are the examples I found:
http://www.blitzbasic.com/Community/posts.php?topic=76905
http://www.blitzbasic.com/Community/posts.php?topic=65705#734079 (Seems to be Windows only)


Brucey(Posted 2013) [#2]
There's all kinds of way to do it - pipes, tcp/udp, shared memory, etc.

It depends what you need, I suppose.

There is also a cross-platform module (BaH.Interprocess) which sits on top of Boost Interprocess.

With it, you can create and share memory between processes (applications) on the same machine.
Useful if you are into that kind of thing.


SystemError51(Posted 2013) [#3]
Hey Brucey,

thanks for your insight (: For the moment I'm going down the tcp/udp route - and see what I can accomplish. If this doesn't yield want I need, I'll have to try that module of yours. I couldn't find it anywhere.


xlsior(Posted 2013) [#4]
One thing to keep in mind when using TCP/UDP: If people have a software firewall on their computer (like e.g. zonealarm) , it's possible that the communication between the processes will be blocked until they explicitly allow it to connect to each other.


SystemError51(Posted 2013) [#5]
One thing to keep in mind when using TCP/UDP: If people have a software firewall on their computer (like e.g. zonealarm) , it's possible that the communication between the processes will be blocked until they explicitly allow it to connect to each other.


Very true... for the moment I'm exploring this to see if this is gonna do what I want at all. Thanks for reminding me (: