You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@logging.apache.org by "Sluis, Minto van der" <Mi...@isc.politie.nl> on 2004/12/27 11:26:03 UTC

Standardized wire protocol for SocketAppender

Hi,
 
As I understand is it curently not possible to exchange log message
between log4j and log4cxx using the SocketAppender. Also it seems
like XMLSocketAppender can do the trick. However XML is not very
efficient (performance wise) for getting data across.
 
I was wondering if anyone is investigation the possibility of using
ASN.1 for this purpose. Apache also has project to this aid
http://incubator.apache.org/directory/subprojects/snickers/
<http://incubator.apache.org/directory/subprojects/snickers/>  
In short ASN.1 is sort of a binary XML. ASN compilers exists
for various languages. I think it would make a good candidate
for an efficient log message transfer between the various 
languages being used.
 
regards,
 
Minto van der Sluis

Re: Standardized wire protocol for SocketAppender

Posted by Ceki Gülcü <ce...@qos.ch>.
Hello Minto,


A better optimized protocol for transferring LoggingEvent object over
the wire is one of the important goals for 1.3. The LoggingEvent is
not as extensible as some would like it to be. This apparent rigidity
should allow us to come up with an efficient wire protocol without too
much effort.

ASN.1 deserves some consideration. However, I think LoggingEvent is so
simple that one could devise efficient serialization protocol without
too much trouble. Today, the LoggingEvent object as transferred over
the wire only contains values of primitives types, Strings and a
single hashtable. I expect custom encoding LoggingEvents in Java to be
fairly straightforward. However, making the protocol compatible with
C++ or C# will take a little effort.

As there are no values of type Object or its derivatives, except
String and HashTable, that cross the wire, the task can be broken to 3
parts:

1) Encoding primitive types in way compatible with by Java, C++ and
C#.

2) Encoding String values in way compatible with Java, C++ and C#.

3) Efficiently encoding hashtables containing keys and values of type
String in way compatible with Java, C++ and C#.

Given that successive LoggingEvents usually contain tons of redundant
data, a little compression will go a long way in increasing the data
throughput of the protocol but we can leave that for a subsequent iteration.

If you are proficient in any of the above languages, then maybe you
should give it a try.


At 11:26 AM 12/27/2004, Sluis, Minto van der wrote:
>Hi,
>
>As I understand is it curently not possible to exchange log message
>between log4j and log4cxx using the SocketAppender. Also it seems
>like XMLSocketAppender can do the trick. However XML is not very
>efficient (performance wise) for getting data across.
>
>I was wondering if anyone is investigation the possibility of using
>ASN.1 for this purpose. Apache also has project to this aid
><http://incubator.apache.org/directory/subprojects/snickers/>http://incubator.apache.org/directory/subprojects/snickers/ 
>
>In short ASN.1 is sort of a binary XML. ASN compilers exists
>for various languages. I think it would make a good candidate
>for an efficient log message transfer between the various
>languages being used.
>
>regards,
>
>Minto van der Sluis

-- 
Ceki Gülcü

   The complete log4j manual: http://www.qos.ch/log4j/



Re: Standardized wire protocol for SocketAppender

Posted by Curt Arnold <ca...@apache.org>.
There have been discussions but little action and ASN.1 has not been 
considered.  Having log4j dependent on an incubator project isn't 
acceptable, so that project isn't much help.    I'd speculate  that 
custom Java serialization can be used to get a log4j wire format that 
is stable, efficient and could be supported by other languages with a 
lot less effort than introducing ASN.1 and lack of effort has been the 
primary reason that the SocketAppender's are not compatible.


On Dec 27, 2004, at 4:26 AM, Sluis, Minto van der wrote:


> Hi,
>
> As I understand is it curently not possible to exchange log message
> between log4j and log4cxx using the SocketAppender. Also it seems
> like XMLSocketAppender can do the trick. However XML is not very
> efficient (performance wise) for getting data across.
>
> I was wondering if anyone is investigation the possibility of using
> ASN.1 for this purpose. Apache also has project to this aid
> http://incubator.apache.org/directory/subprojects/snickers/
> In short ASN.1 is sort of a binary XML. ASN compilers exists
> for various languages. I think it would make a good candidate
> for an efficient log message transfer between the various
> languages being used.
>
> regards,
>
> Minto van der Sluis