Basic architecture / IPC understanding help

Having problems with building or using CEF's C/C++ APIs? This forum is here to help. Please do not post bug reports or feature requests here.

Basic architecture / IPC understanding help

Postby hyzerfool » Mon May 18, 2015 9:51 am

We're transitioning our app from using embedded IE to CEF and I have a basic architecture question I'd like help understanding. I'll have 2 processes running:

Main Process
Render Process

We need to have our browser call C++ functions. I have that working in my test code. My understanding is that those calls always go to the Render Process (they do in my test code).

I need those C++ functions to get data from our app, which is in the Main Process. I see that CEF has some Inter-process Communication support, and it appears to me that it is entirely asynchronous.

Does that mean that my calls from javascript to C++ will have to be async, with the results coming in a callback, rather than a return value? I get the feeling that's the preferred method, in general, for web development (of which I've done very little), but it feels odd for simple functions doing data access.

Thanks!
hyzerfool
Techie
 
Posts: 23
Joined: Wed May 13, 2015 2:37 pm

Re: Basic architecture / IPC understanding help

Postby magreenblatt » Mon May 18, 2015 11:26 am

hyzerfool wrote:Does that mean that my calls from javascript to C++ will have to be async, with the results coming in a callback, rather than a return value?

Correct.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm

Re: Basic architecture / IPC understanding help

Postby hyzerfool » Mon May 18, 2015 11:38 am

Thanks for the quick response. Are you aware of any IPC examples to be found? So far I haven't found any, and am having a tough time figuring out how to wire IPC into my test app.
hyzerfool
Techie
 
Posts: 23
Joined: Wed May 13, 2015 2:37 pm

Re: Basic architecture / IPC understanding help

Postby magreenblatt » Mon May 18, 2015 11:49 am

See the Tests > Other Tests > JavaScript Binding example in cefclient.
magreenblatt
Site Admin
 
Posts: 12409
Joined: Fri May 29, 2009 6:57 pm


Return to Support Forum

Who is online

Users browsing this forum: Google [Bot] and 101 guests