Monday, October 15, 2007

Profiling Groovy Meta-layer

I'm planning to profile the meta-layer of Groovy. What I'm looking for in this profiling is a number of arguments needed by methods of general applications.

Currently, ScriptByteCodeAdapter#invoke* alway use Object[] as a wrapper of a target method's arguments when dispatching it, and it's difficult for my JIT compiler to replace it with a new call, as suggested by Charles Nutter that my dataflow analysis may be time-consuming. So I came up with the idea of profiling.

There are invoke*0 and invoke*N in ScriptByteCodeAdapter class, and I think there would be invoke*1, invoke*2 ... invoke*K, where K is a threshold number found by the profiler. Then the class ASMClassGen would be patched to generate these newly added methods.

Monday, September 10, 2007

How does Groovy AOP relate to GIT?

GIT is the name of Groovy just-in-time compiler, which is being developed. I'm using it as an underlying layer for Groovy AOP.

MetaClassImpl, the default meta-class of Groovy, picks a call for each invocation, which is a joinpoint in AOP theory.

GIT is trying to optimise this invocation process by checking the change of a MetaClass of each class. It replaces the meta-call with the real call, which is returned by the MetaClass. Weaving process in Groovy AOP will take the similar approach. But when MetaClass picks a real call, it would return "WovenMetaMethod" that contains also "before", "after", and "around" information. The runtime weaver then uses this information to generate an equivalent list of bytecode instructions and use them to replace the meta-call.

This is how GIT relates to Groovy AOP.

Saturday, September 08, 2007

An ERP built with Grails

I've setup the project called Geogia at Google Code for developing an ERP system using Grails. All domain classes are being re-written based on UML diagrams of project Neogia. Gentleware AG kindly sponsored Poseidon UML CE edition for this project. Thank you :).

This project is being developed using version 0.6 of Grails.

Friday, September 07, 2007

Xfire plugin for Grails 0.6 released

Nothing's fancy. I've just released my latest Xfire plugin for Grails 0.6.
It's now available from Grails plugins repository.

This command:

$ grails install-plugin xfire


is enough to give it a go.

A few note here, it uses Xerces 2.8.1, where Grails ships with 2.6.2. Just in case for any incompatibility.