[logback-dev] What is the most efficient way - preferrably platform agnostic - to submit events from "the outside"?

Joern Huxhorn jhuxhorn at googlemail.com
Tue Mar 3 23:42:56 CET 2009


Hey guys,
I've implemented protobuf Serializer/Deserializer for Lilith and have  
done some more benchmarks:

http://apps.sourceforge.net/trac/lilith/wiki/SerializationPerformance

protobuf is really, really fast and creates the smallest data of all  
tested mechanisms!! Uncompressed protobuf is only slightly larger than  
compressed java serialization!
I'll definitely use it for both my appender and the file format in the  
next Lilith version...

The benchmark code can be found here:
http://apps.sourceforge.net/trac/lilith/browser/trunk/lilith/src/test/java/de/huxhorn/lilith/PerformanceTest.java

It's using the same LoggingEvents all the time so it has a corpus as  
suggested below, right? The only problematic bit is that it's using  
Lilith events and not Logback events but they should be comparable, I  
think.
Feel free to bash me if you know a better way to benchmark this :)

The proto file can be found here:
http://apps.sourceforge.net/trac/lilith/browser/trunk/lilith-data/logging-protobuf/src/main/protobuf/LoggingProto.proto

and all protobuf related code is here:
http://apps.sourceforge.net/trac/lilith/browser/trunk/lilith-data/logging-protobuf/src/main/java/de/huxhorn/lilith/data/logging/protobuf/

I've also added streamingSerializationWrite and  
streamingSerializationRead which mimics the way Logbacks  
SocketAppender is currently serializing. This method has the downside  
that it's not possible to send separate events to multiple recipients  
- which I do with my multiplexers -  without serializing multiple times.

Joern.


More information about the logback-dev mailing list