[omniORB] Compression for OmniORB

Duncan Grisby duncan@grisby.org
Wed Mar 26 16:18:01 2003


On Wednesday 26 March, Malge Nishant wrote:

> 	I am in a process of adding compression support for omniORB.

OK.

> I intend to do this as below..	
> 	1. Add two more Message Types to GIOP - RequestCompressed &
> ReplyCompressed
> 	2. Compress the marshaled data and send it across.
> 	3. Other party will uncompress->unmarshal

I don't recommend doing it that way, for several reasons. The
marshalling code that deals with cdr streams is at a different layer
to the code that deals with requests and replies. To implement
compression with new GIOP message types would imply propagating call
progress information down to lower layers, which is not a good thing
to do. omniORB does not buffer up complete messages before sending
them -- instead it streams data through fairly small buffers, or
directly from application buffers.

Also, new message types are, of course, non-standard, and there is no
clear way to mark them as such within messages. This means that there
would be no clean way to be certain a server supported the compressed
message types.

Finally, largely as a result of the other things, I think it is very
unlikely that I would accept a patch that provided compression in this
way for inclusion into the omniORB distribution.

A far better way to do compression is to add a new transport, along
the lines of the SSL or Unix domain transports, that does the
compression at the transport level. That will be easier to do, and
much neater. It's also a clean stand-alone unit, so can easily be
included in the omniORB distribution.

If you want to discuss implementation details further, I would suggest
moving the discussion to the omniORB-dev list.

Cheers,

Duncan.

-- 
 -- Duncan Grisby         --
  -- duncan@grisby.org     --
   -- http://www.grisby.org --