You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tapestry.apache.org by Christian Riedel <cr...@googlemail.com> on 2012/01/03 01:12:33 UTC

Re: T5.3.1 mongodb?

A ValueEncoder that supports any mapper might be quite hard to accomplish. It's not like there's some standard API on top of the driver, like JPA that we could rely on.
Although the integration of morphia and mongo-jackson-mapper is very similar I could bet that other mappers might take a completely different approach.

Let's compare with the SQL-world: there are two modules, tapestry-jpa and tapestry-hibernate (-core) for the integration. With JPA you may integrate any persistence provider.
With mongodb you've just got the driver as a common base. 

Let's take the integration of ValueEncoder as an example:

1. you need a class that maps to an entity a.k.a. document
2. you need to know how the id field is called within the mapped entity class
3. morphia and mongo-jackson-mapper provide collections for classes so you can query for documents by id and cast to the entity (just like the ValueEncoder for hibernate)

I would be able to come up with an API that could work for these two mappers but with every new mapper, don't you think it would become hard to support a mapper agnostic API?
Don't know how far you got with your integrations so far but I could create a project on github with just the mongodb integration that I've got at the moment.

Cheers
Christian



Am 02.01.2012 um 20:59 schrieb Igor Drobiazko:

> I think it's still open. First, I'd like to concentrate on providing basic
> integration. Maybe we can come up with a simple interface comparable to
> ValueEncoder and the user would implement it using any mapper library. I
> think this is a topic for the developer's list.
> 
> On Thu, Dec 29, 2011 at 3:00 PM, Christian Riedel
> <cr...@googlemail.com>wrote:
> 
>> Hi Igor,
>> 
>> what mapper are you planning to integrate?
>> There are several mappers out there. After using morphia[1] for some time
>> I'm now with mongo-jackson-mapper[2] from vz.net.
>> 
>> Cheers
>> Christian
>> 
>> 
>> [1] http://code.google.com/p/morphia/
>> [2] http://github.com/vznet/mongo-jackson-mapper
>> 
>> 
>> Am 29.12.2011 um 11:39 schrieb Igor Drobiazko:
>> 
>>> Spring Data - MongoDB is great, but I'm going to add a native
>>> MongoDB/Tapestry integration in 5.4. I have already an internal API which
>>> needs to be generalized before committing to Apache's SVN.
>>> 
>>> On Thu, Dec 29, 2011 at 4:24 AM, angelochen <angelochen960@yahoo.com.hk
>>> wrote:
>>> 
>>>> Hi,
>>>> 
>>>> hibernate and t5 really goes very well, now got a need to use mongodb,
>>>> seems
>>>> no mongodb native support for t5, found one in Spring: SPRING DATA -
>>>> MONGODB, anybody have tried this? thanks.
>>>> 
>>>> Angelo
>>>> 
>>>> --
>>>> View this message in context:
>>>> 
>> http://tapestry.1045711.n5.nabble.com/T5-3-1-mongodb-tp5106689p5106689.html
>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Best regards,
>>> 
>>> Igor Drobiazko
>>> http://tapestry5.de
>>> http://twitter.com/drobiazko
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> Best regards,
> 
> Igor Drobiazko
> http://tapestry5.de
> http://twitter.com/drobiazko


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5.3.1 mongodb?

Posted by Christian Riedel <cr...@googlemail.com>.
Sorry, went too much into details already :)

With Spring-like Converter you mean something like a custom TypeCoercer?

Ok, hope I don't miss your commits! (is there any JIRA I could watch?)


Am 03.01.2012 um 09:16 schrieb Igor Drobiazko:

> Chris,
> 
> hold on. First I'd like to concentrate on improving of my internal
> integration in terms of testability, configurability and extensibility. For
> example, I managed to run MongoDB-based tests without relying on local
> MongoDB installation. Once we have a more or less stable basic API, we can
> think about mappers.
> 
> My internal MongoDB integration works without mappers. I'm quite satisfied
> with Spring-like Converter interface that converts a DBObject into another
> object. For Tapestry's native integration we will probably need to think
> about mappers but, as I said, we will talk about it a bit later.
> 
> Feel free to observe the commits and discuss the implementation ideas.
> 
> On Tue, Jan 3, 2012 at 1:12 AM, Christian Riedel <cr...@googlemail.com>wrote:
> 
>> A ValueEncoder that supports any mapper might be quite hard to accomplish.
>> It's not like there's some standard API on top of the driver, like JPA that
>> we could rely on.
>> Although the integration of morphia and mongo-jackson-mapper is very
>> similar I could bet that other mappers might take a completely different
>> approach.
>> 
>> Let's compare with the SQL-world: there are two modules, tapestry-jpa and
>> tapestry-hibernate (-core) for the integration. With JPA you may integrate
>> any persistence provider.
>> With mongodb you've just got the driver as a common base.
>> 
>> Let's take the integration of ValueEncoder as an example:
>> 
>> 1. you need a class that maps to an entity a.k.a. document
>> 2. you need to know how the id field is called within the mapped entity
>> class
>> 3. morphia and mongo-jackson-mapper provide collections for classes so you
>> can query for documents by id and cast to the entity (just like the
>> ValueEncoder for hibernate)
>> 
>> I would be able to come up with an API that could work for these two
>> mappers but with every new mapper, don't you think it would become hard to
>> support a mapper agnostic API?
>> Don't know how far you got with your integrations so far but I could
>> create a project on github with just the mongodb integration that I've got
>> at the moment.
>> 
>> Cheers
>> Christian
>> 
>> 
>> 
>> Am 02.01.2012 um 20:59 schrieb Igor Drobiazko:
>> 
>>> I think it's still open. First, I'd like to concentrate on providing
>> basic
>>> integration. Maybe we can come up with a simple interface comparable to
>>> ValueEncoder and the user would implement it using any mapper library. I
>>> think this is a topic for the developer's list.
>>> 
>>> On Thu, Dec 29, 2011 at 3:00 PM, Christian Riedel
>>> <cr...@googlemail.com>wrote:
>>> 
>>>> Hi Igor,
>>>> 
>>>> what mapper are you planning to integrate?
>>>> There are several mappers out there. After using morphia[1] for some
>> time
>>>> I'm now with mongo-jackson-mapper[2] from vz.net.
>>>> 
>>>> Cheers
>>>> Christian
>>>> 
>>>> 
>>>> [1] http://code.google.com/p/morphia/
>>>> [2] http://github.com/vznet/mongo-jackson-mapper
>>>> 
>>>> 
>>>> Am 29.12.2011 um 11:39 schrieb Igor Drobiazko:
>>>> 
>>>>> Spring Data - MongoDB is great, but I'm going to add a native
>>>>> MongoDB/Tapestry integration in 5.4. I have already an internal API
>> which
>>>>> needs to be generalized before committing to Apache's SVN.
>>>>> 
>>>>> On Thu, Dec 29, 2011 at 4:24 AM, angelochen <
>> angelochen960@yahoo.com.hk
>>>>> wrote:
>>>>> 
>>>>>> Hi,
>>>>>> 
>>>>>> hibernate and t5 really goes very well, now got a need to use mongodb,
>>>>>> seems
>>>>>> no mongodb native support for t5, found one in Spring: SPRING DATA -
>>>>>> MONGODB, anybody have tried this? thanks.
>>>>>> 
>>>>>> Angelo
>>>>>> 
>>>>>> --
>>>>>> View this message in context:
>>>>>> 
>>>> 
>> http://tapestry.1045711.n5.nabble.com/T5-3-1-mongodb-tp5106689p5106689.html
>>>>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
>>>>>> 
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>>>> 
>>>>>> 
>>>>> 
>>>>> 
>>>>> --
>>>>> Best regards,
>>>>> 
>>>>> Igor Drobiazko
>>>>> http://tapestry5.de
>>>>> http://twitter.com/drobiazko
>>>> 
>>>> 
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>> 
>>>> 
>>> 
>>> 
>>> --
>>> Best regards,
>>> 
>>> Igor Drobiazko
>>> http://tapestry5.de
>>> http://twitter.com/drobiazko
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: dev-help@tapestry.apache.org
>> 
>> 
> 
> 
> -- 
> Best regards,
> 
> Igor Drobiazko
> http://tapestry5.de
> http://twitter.com/drobiazko


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Re: T5.3.1 mongodb?

Posted by Igor Drobiazko <ig...@gmail.com>.
Chris,

hold on. First I'd like to concentrate on improving of my internal
integration in terms of testability, configurability and extensibility. For
example, I managed to run MongoDB-based tests without relying on local
MongoDB installation. Once we have a more or less stable basic API, we can
think about mappers.

My internal MongoDB integration works without mappers. I'm quite satisfied
with Spring-like Converter interface that converts a DBObject into another
object. For Tapestry's native integration we will probably need to think
about mappers but, as I said, we will talk about it a bit later.

Feel free to observe the commits and discuss the implementation ideas.

On Tue, Jan 3, 2012 at 1:12 AM, Christian Riedel <cr...@googlemail.com>wrote:

> A ValueEncoder that supports any mapper might be quite hard to accomplish.
> It's not like there's some standard API on top of the driver, like JPA that
> we could rely on.
> Although the integration of morphia and mongo-jackson-mapper is very
> similar I could bet that other mappers might take a completely different
> approach.
>
> Let's compare with the SQL-world: there are two modules, tapestry-jpa and
> tapestry-hibernate (-core) for the integration. With JPA you may integrate
> any persistence provider.
> With mongodb you've just got the driver as a common base.
>
> Let's take the integration of ValueEncoder as an example:
>
> 1. you need a class that maps to an entity a.k.a. document
> 2. you need to know how the id field is called within the mapped entity
> class
> 3. morphia and mongo-jackson-mapper provide collections for classes so you
> can query for documents by id and cast to the entity (just like the
> ValueEncoder for hibernate)
>
> I would be able to come up with an API that could work for these two
> mappers but with every new mapper, don't you think it would become hard to
> support a mapper agnostic API?
> Don't know how far you got with your integrations so far but I could
> create a project on github with just the mongodb integration that I've got
> at the moment.
>
> Cheers
> Christian
>
>
>
> Am 02.01.2012 um 20:59 schrieb Igor Drobiazko:
>
> > I think it's still open. First, I'd like to concentrate on providing
> basic
> > integration. Maybe we can come up with a simple interface comparable to
> > ValueEncoder and the user would implement it using any mapper library. I
> > think this is a topic for the developer's list.
> >
> > On Thu, Dec 29, 2011 at 3:00 PM, Christian Riedel
> > <cr...@googlemail.com>wrote:
> >
> >> Hi Igor,
> >>
> >> what mapper are you planning to integrate?
> >> There are several mappers out there. After using morphia[1] for some
> time
> >> I'm now with mongo-jackson-mapper[2] from vz.net.
> >>
> >> Cheers
> >> Christian
> >>
> >>
> >> [1] http://code.google.com/p/morphia/
> >> [2] http://github.com/vznet/mongo-jackson-mapper
> >>
> >>
> >> Am 29.12.2011 um 11:39 schrieb Igor Drobiazko:
> >>
> >>> Spring Data - MongoDB is great, but I'm going to add a native
> >>> MongoDB/Tapestry integration in 5.4. I have already an internal API
> which
> >>> needs to be generalized before committing to Apache's SVN.
> >>>
> >>> On Thu, Dec 29, 2011 at 4:24 AM, angelochen <
> angelochen960@yahoo.com.hk
> >>> wrote:
> >>>
> >>>> Hi,
> >>>>
> >>>> hibernate and t5 really goes very well, now got a need to use mongodb,
> >>>> seems
> >>>> no mongodb native support for t5, found one in Spring: SPRING DATA -
> >>>> MONGODB, anybody have tried this? thanks.
> >>>>
> >>>> Angelo
> >>>>
> >>>> --
> >>>> View this message in context:
> >>>>
> >>
> http://tapestry.1045711.n5.nabble.com/T5-3-1-mongodb-tp5106689p5106689.html
> >>>> Sent from the Tapestry - User mailing list archive at Nabble.com.
> >>>>
> >>>> ---------------------------------------------------------------------
> >>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >>>> For additional commands, e-mail: users-help@tapestry.apache.org
> >>>>
> >>>>
> >>>
> >>>
> >>> --
> >>> Best regards,
> >>>
> >>> Igor Drobiazko
> >>> http://tapestry5.de
> >>> http://twitter.com/drobiazko
> >>
> >>
> >> ---------------------------------------------------------------------
> >> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> >> For additional commands, e-mail: users-help@tapestry.apache.org
> >>
> >>
> >
> >
> > --
> > Best regards,
> >
> > Igor Drobiazko
> > http://tapestry5.de
> > http://twitter.com/drobiazko
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: dev-help@tapestry.apache.org
>
>


-- 
Best regards,

Igor Drobiazko
http://tapestry5.de
http://twitter.com/drobiazko