Archived

This forum has been archived. Please start a new discussion on GitHub.

server CORBA and ICE in a same file

Hi all,

I have a Client on a part using CORBA and another Client using Ice. I would like to do a communication between the two clients and I thought that I could write the two servers (one for Ice and the other for Corba) in a unic file. It is possible and if yes do you have a simple example.
If no, how can communicate the two servers if they are in different files ? (Do you have an example ?)

In fact, for example, I would miss a message via the Ice Client and receive it via the Corba Client.

if you could help me, I thank you very much !
Sylvain

Comments

  • marc
    marc Florida
    In general, there is no reason why you should not be able to write a server that uses both Ice and CORBA at the same time. In practice, there might be some problems, such as incompatible header files or libraries, but it shouldn't be too difficult to work around such problems. It also depends of course on what CORBA product you are using.

    We do not have any sample code that we could send you. If you have a commercial need for such a mixed Ice/CORBA server, we can help you with the integration as consulting services. In this case, please contact us at info@zeroc.com.
  • Hi marc and thank you for your quick reply
    marc wrote:
    In general, there is no reason why you should not be able to write a server that uses both Ice and CORBA at the same time. In practice, there might be some problems, such as incompatible header files or libraries, but it shouldn't be too difficult to work around such problems. It also depends of course on what CORBA product you are using.

    In fact, the principal problem that I encountered is the fact that is I would initialize the two servers in a same file, first I won't do have to instance (because for example, I initialize Ice server and then, he waits invocation from the clients, also the CORBA server can't start ...), second, I can't do 2 extensions (one to Ice.Application and other for helloPOA) and also use Ice and Corba in the same file.
    Also, I have doing 2 servers which functions independently but I would to know how can I do to exchange the informations between this two servers. Do you have any ideas which can help me ?
    marc wrote:
    We do not have any sample code that we could send you. If you have a commercial need for such a mixed Ice/CORBA server, we can help you with the integration as consulting services. In this case, please contact us at info@zeroc.com.

    Next, it's not a commercial need, but just a request to success in my task.

    Thank you very much if you have any ideas that I could use.
    Sylvain
  • marc
    marc Florida
    Sorry, but I'm afraid this is out of the scope of the free support that we can give here in these forums. In order to give any meaningful answer, we would have to write a test case with Ice and whatever CORBA product you are using. Unfortunately, we do not have enough time to spare to do so.
  • Ok ok, thanks for your answers,
    Sylvain
  • matthew
    matthew NL, Canada
    Your post isn't exactly clear, but I suspect that you are not sure how to deal with the blocking calls to run the server event loops. Namely, the call to communicator->waitForShutdown() and the call to orb->run().

    With Ice you do not need to call waitForShutdown() in order to run the method dispatch loop. As soon as you have activated the Object Adapter requests can be dispatched.

    Of course, if you do not call waitForShutdown() then to shutdown your server you will have to take other measures... but I suspect that is the least of your worries at this point :)

    Regards, Matthew
  • Indeed Mathiew, I didn't think that the call waitForShutDown was using just to shutdown the server but I thought that I must call this methods to wait the requests from the clients ...
    Well, in fact for the moment I want just to said an "hello world" via an Ice servant and get it via the Corba servant. It's not very easy to me lol.
    Thanks for your answers
    Sylvain
  • matthew
    matthew NL, Canada
    vydge wrote:
    Indeed Mathiew, I didn't think that the call waitForShutDown was using just to shutdown the server

    waitForShutdown isn't to shutdown the server. It waits until shutdown is called on the communicator. See the ice manual for more details.
    but I thought that I must call this methods to wait the requests from the clients ...
    Well, in fact for the moment I want just to said an "hello world" via an Ice servant and get it via the Corba servant. It's not very easy to me lol.
    Thanks for your answers
    Sylvain

    Great!

    Regards, Matthew