<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Hi to all,<br>
<br>
I'm thinking about a safe way of implement a camera client and a
camera server that could be compatible with both, old style Image
interface and new style one and get into a end road. It is not
possible to achieve it with current slice definition..<br>
<br>
Looking arround the problem I found this:<br>
<br>
<a href="https://doc.zeroc.com/display/Ice/The+Versioning+Problem">https://doc.zeroc.com/display/Ice/The+Versioning+Problem</a><br>
<br>
There is two ways to make applications backwards compatible: facets
and addition.<br>
<br>
Right now I think that facets are not necessary, but I think that
implement addition compatibility is a good idea, but it requires
modification of actual Image interface because slice doesn't support
overloaded operations.<br>
<br>
The old operation "getImageData" doesn't have any parameter and now
"getImageData" accepts image format as parameter.<br>
<br>
If slice would support overloading then we would maintain both
operations:<br>
<br>
<br>
<blockquote>
<pre><font color="#000099"> ["amd"] idempotent ImageData getImageData(string format)
throws DataNotExistException, HardwareFailedException;
["amd"] idempotent ImageData getImageData()
throws DataNotExistException, HardwareFailedException;
</font></pre>
</blockquote>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<pre>
</pre>
<br>
But it doesn't support overloading operations, so I would refactor
the actual slice to:<br>
<br>
<blockquote>
<pre><font color="#000099"> ["amd"] idempotent ImageData getImageData<font color="#ff0000">WithFormat</font>(string format)
throws DataNotExistException, HardwareFailedException;
["amd"] idempotent ImageData getImageData()
throws DataNotExistException, HardwareFailedException;
</font></pre>
</blockquote>
<br>
<br>
So old and new clients and servers still being compatible:<br>
<br>
* A new server could serve new operation "with format" X and old
operation with predefined format).<br>
* A new client could ask for available formats (getImageFormat) and
if slice throws an not existent operation
(OperationNotExistException
<meta http-equiv="content-type" content="text/html; charset=utf-8">
) then assume that server only supports one format: <a
href="https://doc.zeroc.com/display/Ice36/Ice-OperationNotExistException">https://doc.zeroc.com/display/Ice36/Ice-OperationNotExistException</a><br>
<br>
Another change could be rename "getImageFormat" to
"getImageFormats", "enumImageFormats", ect. Maybe "getImageFormat"
could be misinterpreted as something like "tell me about current
image format used in server" or something similar, and not "list
image formats supported by server".<br>
<br>
Opinions, ideas, suggestions are welcome.<br>
<br>
I could code and send a pull request with all the necessary changes
in slice definitions and current client/server implementations.<br>
<br>
Best regards,<br>
</body>
</html>