File datatype
Hi !
The transfer of files with data is rather typical task and maybe Ice can provide more help,
e.g. by extending the Slice language with new built-in type 'File' :
interface Transceiver {
File get();
void put(File bs);
};
The semantic of 'File' can be similar to 'sequence<byte>' (i.e. Unix model of files) but implementation can be done via memory mapping ('mmap'), i.e. without the 1MB limit.
Of course, this approach immediatly rises another question: binary vs text files.
Nevertheless, what do you think ?
--
Cheers, Nikolai
The transfer of files with data is rather typical task and maybe Ice can provide more help,
e.g. by extending the Slice language with new built-in type 'File' :
interface Transceiver {
File get();
void put(File bs);
};
The semantic of 'File' can be similar to 'sequence<byte>' (i.e. Unix model of files) but implementation can be done via memory mapping ('mmap'), i.e. without the 1MB limit.
Of course, this approach immediatly rises another question: binary vs text files.
Nevertheless, what do you think ?
--
Cheers, Nikolai
0
Comments
Have a look at how IcePatch is implemented, and how it transfers files in small chunks, all represented as a sequence of bytes.
Note that the 1MB request size limit is not a hard limit. You can set it to any value you like by setting Ice.MessageSizeMax.
This requires some coding because I need to maintain a session-id, and the support from
Ice could be useful.
No, if File was a built-in type, Ice could take care to correctly and efficiently transfer the file
by small chunks.
--
Cheers, Nikolai
I'm afraid it's not that easy. Without going into detail, this would require extensive changes to the Ice protocol and marshaling engine. The result would be a much more complex Ice core, only for the benefit of one special-purpose use-case, which can also be handled at the application level.