Home | July 2010 >> | Conferences & TechTalks Calendar | Legal Notice | Google+ Profile | Twitter Page | My Profile Page

Lycia Benchmark

on Windows and Linux

Hey readers,

today I want to show some interesting results from benchmarking Lycia. The most interesting isn't want it shows by the first look at the chart, I mean we all should know Java on Linux performs out Java on Windows. What was so impressive to me is: for some reason (maybe the internal design of Lycia) using reflection at generation of runtime parsers isn't much slower than to create them by using bytecode production.

Both systems run on latest Java 1.6.0_20 so both are using the latest HotSpot compiler. The next days I will retry the benchmark on some more JVMs and especially on some 1.5 versions to see if it is the new HotSpot or if it is the internal design of Lycia which makes that minimal difference between both generation strategies.

To explain what I was expecting:
For me it was totally clear that bytecode generation would be  more expensive in at creation but must perform out the reflection at runtime what is obviously not the fact.

For bytecode generation Lycia creates a complete new class at runtime which is compiled and loaded like any other precompiled class. This means, after some time, the HotSpot compiler make the bytecode into native cpu instructions.
For reflection, by contrast, a proxy class is instanced and the parser method is called by introspection of itself every time.

So there are 4 possibilities why the result is so "wrong" for me:
* Im wrong with my expectations
* Lycia's internal design thwarts bytecode generation from performing
* The HotSpot compiler in newer Java versions can optimize reflection calls
* The benchmark is just wrong (for example cause of using a constant expression for being parsed)

I attach both, the results as PDF and the benchmark class for being reviewed. It would be fine if someone could give informations and optinions about the benchmarking. Microbenchmarks are always hard to do.

BenchmarkReflectiveBytecodeTestCase.java (5.62KB / JAVA-Class)
benchmark.pdf (102.04KB / PDF)

Related Posts
There are no related posts for this blog entry


Categories : Lycia, Java, Projects

Lycia went threadsafe

Today Lycia went on to be fully threadsafe by implementing a threadsafe version of ParserContext.

Now you're able to use one instance of Lycia in as many threads as you like to, which can be very good for runtime behavior of webapplications to not initialize Lycia for every request.

Related Posts
There are no related posts for this blog entry


Categories : Lycia, Java, Projects

Where we are

the life of a code

Hey guys 'n girls,

let's have a look into where we are. Let's have an overview about what projects I'm into and what is planned for the near future.

So first have a look about what is going on.

Lycia (formerly known as Java XmlParser):
Lycia is an event-based parser framework for structured data from any kind of datasources. Actually this is (in Java XmlParser 1.0.x) only XML but in branch 2.0 which is already renamed to Lycia it will feature a generic interface set to implement reader and writer from and to whatever data-format. There will be no limit where data are actually saved at, no matter if the data lie in database, XML-, CSV-, CSS files. Everything structured is possible.
The development is done in 1.9.x versions and the next step will be to implement the generic interfaces and to move existing code for XML parsing in a standalone set of interface implementations.
https://code.google.com/p/lycia/

Pannonia:
Pannonia will be a POJO-based event system for Java. It'll give you the possibility to register annotated methods for react on / handling events. These events can be defined by your own and can contain any kind of data you need to supply to the handler methods.
At the moment Pannonia is in planning phase. I collect ideas about what's the best way to use the system to make it easy but flexible. I'm glad about your opinions and comments
https://code.google.com/p/pannonia/wiki/MindMap
https://code.google.com/p/pannonia/

CastellCore:
CastellCore is the actuall project that made me starting above two projects. CastellCore is basically a framework for building MMORPG (Massive Multiplayer Roleplaying Games) gameservers. It'll supply basic handling of internal event-, character, and questhandling beside many other basics every gameserver needs. It features dependency injection, annotation-based configurations, clean and easy interfaces to implement or extend and a lot of more things developers know and expect of todays typically frameworks like Spring.
The project is still active but development is sleeping since the base projects is splitted in smaller, more maintainable projects as Lycia and Pannonia are. CastellCore will use these projects at a later point in development and will offer a clean integration in additional features.
http://www.castellcore.org

chromebackspaceonlinux:
A complete different point in development and basically a small project I started for myself went into the most popular one. This is an extension for Google Chrome on Linux to readd the possibility to use backspace shortcuts (<BACKSPACE> and <SHIFT+BACKSPACE>) to navigate in the browser-tab's history object. At some point Google decided to remove it in Linux-builds since the standard on Linux is to not offer this possibility. Until there's no option to activate / deactivate it this extension is widely used by about 1500 people out there and nearly everyday new people start using it.
At the moment there isn't actual development but bugfixing if people find websites which make problems.
https://code.google.com/p/chromebackspaceonlinux/

 

That's what is in 'active' development, so move on to what is planned at the moment:
There are plans to splitt up more projects from CastellCore's core implementation code into their own projects.

Epirus:
At the moment there are plans for the annotation-based object query parser based on JoSQL (http://josql.sourceforge.net/) which offers capability of using SQL-like syntax queries to analyse lists of POJOs. In CastellCore there's an option to use annotations to make named queries very similar to the way you can use them in Hibernate.
The functionallity is already implemented and will be moved over to a project called Epirus (https://code.google.com/p/epirus/) in near future.

Gallia:
And from CastellCore another project will be excluded. Gallia (https://code.google.com/p/gallia/) is an annotation-based access-control-system written in Java. It offers an AOP styled way of adding security to webapplications and any other type of Java application. To secure a method use a predefined annotation or implement you're own annotations and SecurityHandlers which are connected together to implement securitychecks.

 

For now there are no other projects or plans but some more ideas I don't want to talk about at this point but some more things are still going on. The next days my Scala book will arrive and I'll start to implement basic unittests in Scala and maybe at a later time Scala bindings will follow to make it easier to use above libs in Scala but for now Scala seems to be very attractive in POJO usage. Additionally I'm about to read some books (actually three of them) about Android development so I'm start to go in development for Android-based handys but no explicit ideas for now, maybe some small apps to start getting into.

 

At the moment I'll end this here and give you more informations at a later point.

 

Related Posts
There are no related posts for this blog entry


Categories : Projects