SendProcessMessage for many applications

Do not post support requests, bug reports or feature requests. Discuss CEF here. Non-CEF related discussion goes in General Discussion!

SendProcessMessage for many applications

Postby ThinkingMan » Sat Apr 15, 2017 11:45 pm

I think the idea of SendProcessMessage() should be pulled out of CEF even as a separate project to make a general purpose IPC system for all apps?

It would be very handy to have a way to just send a message to any exe/elf program in a general purpose way, just by pulling in a library that let's me sendprocessmessage..

There may already be some libraries out there that do this, but possibly cef's simple implementation would be a good idea to pull out and use generally, rather than just being a cef ipc mechanism?

Right now I have an idea that I want to create several Exe's/elf's to communicate with a html/javascript CEF program, and send a message to not just one exe programmed in one language, but several exe's in different languages. So being able to SendProcessMessage to many exe's would be really handy, in a general purpose way.

Not sure how much effort this would take to make it general purpose, is the sendprocessmessage function deeply tied to cef related code, or could be pulled out? I'll have a look at the sources when I get a chance later - but likely you know the code best.

Of course, each receiving exe has to have a receiver code in it too, to obtain the message.
ThinkingMan
Techie
 
Posts: 10
Joined: Wed Mar 01, 2017 11:52 am

Re: SendProcessMessage for many applications

Postby Czarek » Tue Apr 18, 2017 1:47 pm

I guess there are many libraries for IPC messaging out there. CEF uses Chromium's IPC library. There are lots of functionality that could be taken from Chromium/CEF and released as standalone libraries, but that's not the purpose of this project. CEF has hundreds of issues in the tracker and its focus and priority should be on that and on new features. Marshall is doing great job on that.
Maintainer of the CEF Python, PHP Desktop and CEF C API projects. My LinkedIn.
User avatar
Czarek
Virtuoso
 
Posts: 1927
Joined: Sun Nov 06, 2011 2:12 am

Re: SendProcessMessage for many applications

Postby ThinkingMan » Mon May 01, 2017 2:34 am

Just realized (searched) that this idea was previously discussed by some other smart folk here:
"Adding your own process to the IPC bus"

http://stackoverflow.com/questions/2883 ... her-binary
And
http://www.magpcss.org/ceforum/viewtopi ... =6&t=12715

Quote from stackoverflow:
"To use Chromium IPC with SendProcessMessage the process must be spawned by CEF itself (which happens for example when a new Renderer is needed). I don't think you can arbitrarily create processes and send messages to them."


Alternatives are ZeroMQ (0mq) and other ipc systems.
I will still take a look at CEF/chromium sources to see how hard coded the IPC mechanism is into chromium itself. I was hoping just an integer would be needed to send a message to identify a process; that is extremely wishful naive optimistic thinking ;-)
Possibly reinventing the windows api SendMessage() or PostMessage() feature, but cross platform.
ThinkingMan
Techie
 
Posts: 10
Joined: Wed Mar 01, 2017 11:52 am


Return to CEF Discussion

Who is online

Users browsing this forum: No registered users and 24 guests