Archived
This forum has been archived. Please start a new discussion on GitHub.
How to efficient send large data over multiple points
in Help Center
Hi Everyone,
I'm new in a project, which uses ICE for almost everything
.
While trying to start the developing, i stumbled uppon a small, maybe big problem.
Let me discribe what i want to do, so you better understand my question:
We got 3 ICE Applications {A,B,C}
A is holding data, B works with some data, and C controls everything by sending commands.
Connection between these 3 Applications is A<->C<->B, so no direct communication between A and B.
What i do is:
a user presses a "LoadFile" button in C.
C asks A for the file and reads the file in its memory.
After succesfull reading, C sends the file to B for further processing.
What i WANT to do is:
a user presses a "LoadFile" button in C.
C asks A for the file and reads a "ice-object-reference" of the data.
C sends the "ice-object-reference" to B.
B open/use/map/whatever the "ice-object-reference" and receives the file directly from A.
Question:
Is it possible to implement this in ice in a simple way? So that i can pass the file data from A to B without transfering all data over C, and without opening a connection between A and B by myself.
Is there a way for this to let ice handle the communication all by itself, so me as a programmer does not need to open a connection between the two points?
i hope there is a way to do this in ice.
Greetings and thx for your (hopefully) manymany answer
Hugie
System Informations:
* Ice version (Ice 3.4.1)
* Compiler version (Visual Studio 2008)
* Languages (C++, python)
* Operating system (at the moment Windows only)
I'm new in a project, which uses ICE for almost everything

While trying to start the developing, i stumbled uppon a small, maybe big problem.
Let me discribe what i want to do, so you better understand my question:
We got 3 ICE Applications {A,B,C}
A is holding data, B works with some data, and C controls everything by sending commands.
Connection between these 3 Applications is A<->C<->B, so no direct communication between A and B.
What i do is:
a user presses a "LoadFile" button in C.
C asks A for the file and reads the file in its memory.
After succesfull reading, C sends the file to B for further processing.
What i WANT to do is:
a user presses a "LoadFile" button in C.
C asks A for the file and reads a "ice-object-reference" of the data.
C sends the "ice-object-reference" to B.
B open/use/map/whatever the "ice-object-reference" and receives the file directly from A.
Question:
Is it possible to implement this in ice in a simple way? So that i can pass the file data from A to B without transfering all data over C, and without opening a connection between A and B by myself.
Is there a way for this to let ice handle the communication all by itself, so me as a programmer does not need to open a connection between the two points?
i hope there is a way to do this in ice.
Greetings and thx for your (hopefully) manymany answer

Hugie
System Informations:
* Ice version (Ice 3.4.1)
* Compiler version (Visual Studio 2008)
* Languages (C++, python)
* Operating system (at the moment Windows only)
0
Comments
-
Hi Hugie,
Welcome to our forums!
As an Ice programmer, you usually let Ice take care of connection management for you: the first time you use a proxy, Ice transparently establishes the connection to the target server, and if this connection is ever closed, Ice will re-establish it automatically.
For a detailed look at connection management in Ice, please refer to http://www.zeroc.com/newsletter/issue24.pdf. You may also want to read the article about proxies in http://www.zeroc.com/newsletter/issue23.pdf.
In your scenario, you just want to pass around a proxy to an object in A (the object holding the data). This proxy will contain addressing information to the Ice object adapter in A that hosts this object/servant, e.g.:
dataHolder:tcp -h dataserver -p 10000
You can pass this proxy between all your applications. Passing around a proxy does not establish any connection--it's only when you use a proxy to send a remote call that the connection is opened.
So, your B application will get this proxy from C, and when you use this proxy in B, Ice will transparently open a TCP connection directly between B and A.
Hope this is clearer now!
Best regards,
Bernard0 -
Perfect.
Thank you very much. Very Clear and a very good system.
As soon as i'm at work again, i will use the way how you explained it
Have a nice weekend
Hugie0