I'm developing a software that contain many modules/Daemon running in parallel manner, what i'm looking for is how to implement that, i cannot use Thread because some of those modules/Daemon are perhaps implemented in other languages (C,java,C#...).
For example I'm using C for Hooking Messages exchanged between Windows kernel and top level applications, Java/C# to use some free library to simply parse XML(for example) or to accept and execute commands over the network..this can be done by C Language but just to improve productivity... Finally for GUI I'm using Ultimate++ (c++) that is like the main process that call and monitor(activate/deactivate/get state) of all other modules/Daemon through an interface.
I admit that the development of each module/Daemon in a separate language greatly facilitates maintenance, but especially I am obliged to do that.. What is the best practice way to do that ?
All helps will be appreciated.
-
In all fairness, C++ could easily replace C for almost all tasks, and certainly in Win32. Parsing XML is indeed easier in C# than in C, but again C++ is a good candidate. I.e. you could write the whole thing in just C++. Some people are overlooking that C++ is far more than "C with classes"MSalters– MSalters2012年09月10日 12:56:06 +00:00Commented Sep 10, 2012 at 12:56
-
'i cannot use Thread because some of those modules/Daemon are perhaps implemented in other languages (C,java,C#...)'?? A thread is a OS unit of execution. No thread, no execution. If you cannot call something from a thread, you cannot call it at all.Martin James– Martin James2015年05月27日 18:24:13 +00:00Commented May 27, 2015 at 18:24
1 Answer 1
Message passing is probably a good option. On UNIX pipes and sockets would be a standard way to accomplish that. (Windows has similar concepts.) In fact this even simplifies concurrency because you don't share any memory.
-
I think there are MPI C libraries available for most OS's? en.wikipedia.org/wiki/Message_Passing_InterfaceJosh Petitt– Josh Petitt2012年09月13日 18:23:15 +00:00Commented Sep 13, 2012 at 18:23