You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@gora.apache.org by Lewis John Mcgibbney <le...@gmail.com> on 2012/01/21 19:13:44 UTC

Difference between Avro SpecificCompiler & GoraCompiler

Hi Guys,

Been messing around with the compiler today and got curious about some
things.

1) As this thread states, what is the specific difference between our own
compiler [1] implementation and the Avro SpecificCompiler [2] we have a
choice of using via bin/gora specificcompiler?
2) I was going to suggest that we upgrade to Avro version 1.6.1 (most
recently tagged stable), as the project seems to be more matured, there has
also been some code refactoring going on.
3) I've attached a link [3] to the current SpecificCompiler class within
the recent 1.6.1 release, even this class has increased in lines of code by
around 50%, therefore I think there is more functionality to be had from
upgrading.

The reason I'm asking is that I've been working on GORA-27, however I
wonder if it is better to work towards an implementation for Avro, and we
could then rely on that implementation rather than writing one solely for
Gora which can only be used here? This story, however falls through if
there is a strong case for us maintaining our own compiler implementation.

What do you guys think?

[1]
http://svn.apache.org/viewvc/incubator/gora/trunk/gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java?view=markup
[2]
http://svn.apache.org/viewvc/avro/tags/release-1.3.3/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java?view=markup
[3]
http://svn.apache.org/viewvc/avro/tags/release-1.6.1/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java?view=markup
-- 
*Lewis*

Re: Difference between Avro SpecificCompiler & GoraCompiler

Posted by Lewis John Mcgibbney <le...@gmail.com>.
OK Enis, thanks for explaining this. I'll get to work when I can.

Thanks

On Mon, Jan 23, 2012 at 6:04 PM, Enis Söztutar <en...@gmail.com> wrote:

> Hi,
>
> GoraCompiler is the class which adds gora specific class methods and fields
> to the compiled classes, so that they implement the Persistent interface,
> etc. At the time of developing for the first version of Gora, the
> SpecificCompiler class was not extendable and we did not want to deal with
> patching Avro, so we just fetched the code for the Specific compiler, and
> changed it, which I admit, is a huge hack. Now that Avro's specific
> compiler seems to have changed to use Velocity, it might be more
> extensible, but I doubt that, we can just extend it without needing to
> change the code. So, I am +1 for updating the code for Avro, but the we
> might need to update GoraCompiler as well.
>
> Thanks,
> Enis
>
> On Sat, Jan 21, 2012 at 10:13 AM, Lewis John Mcgibbney <
> lewis.mcgibbney@gmail.com> wrote:
>
> > Hi Guys,
> >
> > Been messing around with the compiler today and got curious about some
> > things.
> >
> > 1) As this thread states, what is the specific difference between our own
> > compiler [1] implementation and the Avro SpecificCompiler [2] we have a
> > choice of using via bin/gora specificcompiler?
> > 2) I was going to suggest that we upgrade to Avro version 1.6.1 (most
> > recently tagged stable), as the project seems to be more matured, there
> has
> > also been some code refactoring going on.
> > 3) I've attached a link [3] to the current SpecificCompiler class within
> > the recent 1.6.1 release, even this class has increased in lines of code
> by
> > around 50%, therefore I think there is more functionality to be had from
> > upgrading.
> >
> > The reason I'm asking is that I've been working on GORA-27, however I
> > wonder if it is better to work towards an implementation for Avro, and we
> > could then rely on that implementation rather than writing one solely for
> > Gora which can only be used here? This story, however falls through if
> > there is a strong case for us maintaining our own compiler
> implementation.
> >
> > What do you guys think?
> >
> > [1]
> >
> >
> http://svn.apache.org/viewvc/incubator/gora/trunk/gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java?view=markup
> > [2]
> >
> >
> http://svn.apache.org/viewvc/avro/tags/release-1.3.3/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java?view=markup
> > [3]
> >
> >
> http://svn.apache.org/viewvc/avro/tags/release-1.6.1/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java?view=markup
> > --
> > *Lewis*
> >
>



-- 
*Lewis*

Re: Difference between Avro SpecificCompiler & GoraCompiler

Posted by Enis Söztutar <en...@gmail.com>.
Hi,

GoraCompiler is the class which adds gora specific class methods and fields
to the compiled classes, so that they implement the Persistent interface,
etc. At the time of developing for the first version of Gora, the
SpecificCompiler class was not extendable and we did not want to deal with
patching Avro, so we just fetched the code for the Specific compiler, and
changed it, which I admit, is a huge hack. Now that Avro's specific
compiler seems to have changed to use Velocity, it might be more
extensible, but I doubt that, we can just extend it without needing to
change the code. So, I am +1 for updating the code for Avro, but the we
might need to update GoraCompiler as well.

Thanks,
Enis

On Sat, Jan 21, 2012 at 10:13 AM, Lewis John Mcgibbney <
lewis.mcgibbney@gmail.com> wrote:

> Hi Guys,
>
> Been messing around with the compiler today and got curious about some
> things.
>
> 1) As this thread states, what is the specific difference between our own
> compiler [1] implementation and the Avro SpecificCompiler [2] we have a
> choice of using via bin/gora specificcompiler?
> 2) I was going to suggest that we upgrade to Avro version 1.6.1 (most
> recently tagged stable), as the project seems to be more matured, there has
> also been some code refactoring going on.
> 3) I've attached a link [3] to the current SpecificCompiler class within
> the recent 1.6.1 release, even this class has increased in lines of code by
> around 50%, therefore I think there is more functionality to be had from
> upgrading.
>
> The reason I'm asking is that I've been working on GORA-27, however I
> wonder if it is better to work towards an implementation for Avro, and we
> could then rely on that implementation rather than writing one solely for
> Gora which can only be used here? This story, however falls through if
> there is a strong case for us maintaining our own compiler implementation.
>
> What do you guys think?
>
> [1]
>
> http://svn.apache.org/viewvc/incubator/gora/trunk/gora-core/src/main/java/org/apache/gora/compiler/GoraCompiler.java?view=markup
> [2]
>
> http://svn.apache.org/viewvc/avro/tags/release-1.3.3/lang/java/src/java/org/apache/avro/specific/SpecificCompiler.java?view=markup
> [3]
>
> http://svn.apache.org/viewvc/avro/tags/release-1.6.1/lang/java/compiler/src/main/java/org/apache/avro/compiler/specific/SpecificCompiler.java?view=markup
> --
> *Lewis*
>