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/
