Home Help Center

Sample to communicate between a c++ applications and a web application

nextgenMLnextgenML Member Chandan DattaOrganization: IRML,UAEUProject: Facebots
What are the various ways I can achieve communication (like function calls) from a web application to a c++ application? Is there a sample example in ICE? I've developed the c++ application to do image processing and want to display and transmit the result in real time to a web-page displayed on a browser.

Comments

  • OrNotOrNot Member Bin.LiOrganization: GE HealthcareProject: Enterprise solution
    Hi, Chandan,

    It seems I once had the very similar task as yours.

    ICE protocol is compact and more efficient than HTTP but it only makes sense in ICE domain. You need a browser extension to support it.

    In my opinion, it may be one solution to use ActiveX if your browser is IE or XPCOM if in Mozilla.

    Maybe there are some kinds of other options, but I prefer to above. :)


    OrNot
  • xdmxdm La Coruña, SpainAdministrators, ZeroC Staff Jose Gutierrez de la ConchaOrganization: ZeroC, Inc.Project: Ice Developer ZeroC Staff
    Hi, Chandan,

    If you have a web application, and want to made calls to an Ice server from there (the application running in the web server), it will be simple, the web application could use Ice API to communicate with the Ice server, and then use HTTP to send the reply to the client.

    For example you could use IcePHP to access your C++ image server and send the image to the web using HTTP and PHP.

    If you are trying to call Ice directly from the web browser, you have two options, you could do that with a Java applet, there is a Ice applet demo in java/demo/Ice/applet.

    Other options to call Ice servers from the web browser, is Ice for Silverlight

    I suggest you take a look to our Chat Demo http://www.zeroc.com/chat/index.html it provide PHP, Silverlight and Java Applet clients that will be interesting to you.

    > In my opinion, it may be one solution to use ActiveX if your browser is IE or > XPCOM if in Mozilla.

    I think that using Java Applets or Ice Silverlight will be better, because the same application works with any modern browser, almost any browser has support for Java Applet and Silverlight, and it also avoids the installation of new browser extensions, having to install an extension isn't really nice for web applications.

    Cheers,
    José
  • OrNotOrNot Member Bin.LiOrganization: GE HealthcareProject: Enterprise solution
    Hi, xdm ,
    Yes, both java applet and silverlight are good solutions. I think here one issue can not be neglected: the overhead to download the jvm or something like that.At least in IE, jvm is not installed in default since the ie4 ( or 5?). From point of view of development, yes, no doubt it is more convenient to use applet and silverlight when cross-browser and cross platform are the requirements.


    Cheers
    OrNot
Sign In or Register to comment.