Archived
This forum has been archived. Please start a new discussion on GitHub.
New streaming API comments
1/ How to reset an Out/InputStream ?
There is a promising method BasicStream.reset() that allow stream recycling, but no clear equivalent in the user defined interfaces.
What is the behavior of the stream created by Ice.Util.createXXXStream(..) after a call to finish? Can it be reused for a new message?
2/ Useless code?
The BasicOutputStream is written as:
Rewritting it as:
The BasicOutputStream class can be entirely removed without breaking any client.
There is a promising method BasicStream.reset() that allow stream recycling, but no clear equivalent in the user defined interfaces.
What is the behavior of the stream created by Ice.Util.createXXXStream(..) after a call to finish? Can it be reused for a new message?
2/ Useless code?
The BasicOutputStream is written as:
public class BasicOutputStream extends BasicStream { public BasicOutputStream(Instance instance, Ice.OutputStream out) { super(instance); _out = out; } public Ice.OutputStream _out; }The _out argument is not used, and the only code that creates BasicOutputStream is in the OutputStreamI implementation:
public class OutputStreamI implements OutputStream { public OutputStreamI(Communicator communicator) { _communicator = communicator; _os = new IceInternal.BasicOutputStream(Util.getInstance(communicator), this); }The second (this) argument is used nowhere and adds no functionality.
Rewritting it as:
public class OutputStreamI implements OutputStream { public OutputStreamI(Communicator communicator) { _communicator = communicator; _os = new IceInternal.BasicStream(Util.getInstance(communicator)); }have the same effect.
The BasicOutputStream class can be entirely removed without breaking any client.
0
Comments
-
annekat wrote:1/ How to reset an Out/InputStream ?
There is a promising method BasicStream.reset() that allow stream recycling, but no clear equivalent in the user defined interfaces.
What is the behavior of the stream created by Ice.Util.createXXXStream(..) after a call to finish? Can it be reused for a new message?The BasicOutputStream class can be entirely removed without breaking any client.
- Mark0 -
mes wrote:This class is definitely necessary, but the reason is complex.
Can you provide some background?
And you can add this question to the shoplist:
Why the BasicStream is a kind of input/output mixin class?
(Usually, input and output related funtionnalities are provided by separate interfaces, eventually collapsed into one "full duplex" at some time in the stream type hierarchy.)
Thanks0 -
annekat wrote:I really am interested in to discover the rational behind this design.
Can you provide some background?Why the BasicStream is a kind of input/output mixin class?
- Mark0 -
BasicStream is both an input and output stream because this simplifies Ice internals. Other than that I cannot provide more information, as discussing Ice internal design details (BasicStream is an internal class, i.e., the Ice application developer must not use it) is out of the scope of the support we can give here on this message board.0
-
marc wrote:discussing Ice internal design details ... is out of the scope of the support we can give here on this message board.
This is not a support request (thus i use this 'comments' newsgroup), just user feedback.
The streaming API is new, its documentation minimalistic and of great interest for us. It just appears that its structure is slightly different of what we are accustomed to see in other streaming libraries, and we are looking for the best way to adapt ourselves.
I understand you provide the best support for your product and you need to get time to develop it and make some business with it.
Regards.0