You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@abdera.apache.org by M Harris <md...@yahoo.com> on 2008/04/28 20:28:09 UTC

dynamic collections

How can one create dynamic collections with Abdera and create the service document?  Perhaps, a hierarchy. Instead of having a single static collection defined, the user can create their own collections.  How would one create a collection?  Should they post a collection element or atom entry?
   

       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: dynamic collections

Posted by Dan Diephouse <da...@mulesource.com>.
I agree, they seem rather oversimple to me too. If anything what I want 
to be able to do is query for collections, but even that seems a little 
far stretched.

David Primmer wrote:
> Thanks. That seems reason able to me.
>
> Sorry if I'm off topic, but what I'm asking is not about Abdera but
> about Service docs in general. I've only seen trivial examples of them
> listing a few static feeds. Are there practical limits to generating
> one in the real world?  My understanding of Service Docs is that they
> must have working links that point to the actual resources. Do servers
> that serve millions of collections generate a service doc including
> every one? It can't be the case.
>
> On Mon, Apr 28, 2008 at 3:14 PM, James M Snell <ja...@gmail.com> wrote:
>   
>> There's no reason that the getServiceDocument method couldn't be overridden
>> so that it defers to a Collection Adapter.
>>
>>     


-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com 


Re: dynamic collections

Posted by David Primmer <da...@gmail.com>.
Thanks. That seems reason able to me.

Sorry if I'm off topic, but what I'm asking is not about Abdera but
about Service docs in general. I've only seen trivial examples of them
listing a few static feeds. Are there practical limits to generating
one in the real world?  My understanding of Service Docs is that they
must have working links that point to the actual resources. Do servers
that serve millions of collections generate a service doc including
every one? It can't be the case.

On Mon, Apr 28, 2008 at 3:14 PM, James M Snell <ja...@gmail.com> wrote:
> There's no reason that the getServiceDocument method couldn't be overridden
> so that it defers to a Collection Adapter.
>
>  - James
>
>
>
>  Dan Diephouse wrote:
>
> > What about
> > 1. Let the CollectionAdapter itself write to the services document
> whatever it wants.
> > 2. Add a switch to AbstractProvider which turns the service writing on/off
> > Would that solve your problem?
> >
> > Dan
> >
> > David Primmer wrote:
> >
> > > But what about the issue of practicality of service docs for huge sets
> > > of dynamic collections?
> > >
> > > davep
> > >
> > > On Mon, Apr 28, 2008 at 1:33 PM, James M Snell <ja...@gmail.com>
> wrote:
> > >
> > >
> > > > In the Lotus Connections blogs implementation, I subclassed the
> Provider and
> > > > re-implemented the code that provided the service document.  I have a
> > > > EntityProvider implementation that writes out the service document.
> > > >
> > > >  - James
> > > >
> > > >
> > > >
> > > >  David Primmer wrote:
> > > >
> > > >
> > > >
> > > > > I also had this same issue when the collections are dynamic and
> would
> > > > > generate a practically unusable service doc.
> > > > >
> > > > > /blabla/:collection/:entry
> > > > >
> > > > > There's now way that I know of to create a service doc for this feed
> > > > > if :collection is one of a large number records in a database. Why
> > > > > would anyone use the service doc it if it was more than just a
> > > > > handful? Service docs need to contain real working links, not uri
> > > > > templates.
> > > > >
> > > > > Abdera's method of creating service docs is to call getHref for each
> > > > > adapter that is added to the workspace. However, when an adapter
> > > > > handles getHref, it is generating one url, not generating all the
> > > > > entries in a feed. It can only return one url and that's going to be
> > > > > some form of template. Does it make sense to offer another
> > > > > implementation of AbstractProvider.getServiceDocument?
> > > > >
> > > > > davep
> > > > >
> > > > > On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com>
> wrote:
> > > > >
> > > > >
> > > > >
> > > > > > How can one create dynamic collections with Abdera and create the
> > > > > >
> > > > > >
> > > > >
> > > > service document?  Perhaps, a hierarchy. Instead of having a single
> static
> > > > collection defined, the user can create their own collections.  How
> would
> > > > one create a collection?  Should they post a collection element or
> atom
> > > > entry?
> > > >
> > > >
> > > > >
> > > > > >
> > > > > >
> > > > > >  ---------------------------------
> > > > > >  Be a better friend, newshound, and know-it-all with Yahoo!
> Mobile.  Try
> > > > > >
> > > > > >
> > > > >
> > > > it now.
> > > >
> > > >
> > > > >
> > > > >
> > > >
> > >
> >
> >
> >
>

Re: dynamic collections

Posted by James M Snell <ja...@gmail.com>.
The current design is used because a Provider may use multiple 
collection adapters.  The approach that I've taken in my implementation 
is to override getServiceDocument and implement a EntityProvider to 
serialize the ServiceDocument.

- James

Dan Diephouse wrote:
> I think I'm suggesting that it makes sense to do this by default and 
> have a sensible default implementation in AbstractCollectionAdapter.
> 
> James M Snell wrote:
>> There's no reason that the getServiceDocument method couldn't be 
>> overridden so that it defers to a Collection Adapter.
>>
>> - James
>>
>> Dan Diephouse wrote:
>>> What about
>>> 1. Let the CollectionAdapter itself write to the services document 
>>> whatever it wants.
>>> 2. Add a switch to AbstractProvider which turns the service writing 
>>> on/off
>>> Would that solve your problem?
>>>
>>> Dan
>>>
>>> David Primmer wrote:
>>>> But what about the issue of practicality of service docs for huge sets
>>>> of dynamic collections?
>>>>
>>>> davep
>>>>
>>>> On Mon, Apr 28, 2008 at 1:33 PM, James M Snell <ja...@gmail.com> 
>>>> wrote:
>>>>  
>>>>> In the Lotus Connections blogs implementation, I subclassed the 
>>>>> Provider and
>>>>> re-implemented the code that provided the service document.  I have a
>>>>> EntityProvider implementation that writes out the service document.
>>>>>
>>>>>  - James
>>>>>
>>>>>
>>>>>
>>>>>  David Primmer wrote:
>>>>>
>>>>>  
>>>>>> I also had this same issue when the collections are dynamic and would
>>>>>> generate a practically unusable service doc.
>>>>>>
>>>>>> /blabla/:collection/:entry
>>>>>>
>>>>>> There's now way that I know of to create a service doc for this feed
>>>>>> if :collection is one of a large number records in a database. Why
>>>>>> would anyone use the service doc it if it was more than just a
>>>>>> handful? Service docs need to contain real working links, not uri
>>>>>> templates.
>>>>>>
>>>>>> Abdera's method of creating service docs is to call getHref for each
>>>>>> adapter that is added to the workspace. However, when an adapter
>>>>>> handles getHref, it is generating one url, not generating all the
>>>>>> entries in a feed. It can only return one url and that's going to be
>>>>>> some form of template. Does it make sense to offer another
>>>>>> implementation of AbstractProvider.getServiceDocument?
>>>>>>
>>>>>> davep
>>>>>>
>>>>>> On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com> 
>>>>>> wrote:
>>>>>>
>>>>>>    
>>>>>>> How can one create dynamic collections with Abdera and create the
>>>>>>>         
>>>>> service document?  Perhaps, a hierarchy. Instead of having a single 
>>>>> static
>>>>> collection defined, the user can create their own collections.  How 
>>>>> would
>>>>> one create a collection?  Should they post a collection element or 
>>>>> atom
>>>>> entry?
>>>>>  
>>>>>>>
>>>>>>>
>>>>>>>  ---------------------------------
>>>>>>>  Be a better friend, newshound, and know-it-all with Yahoo! 
>>>>>>> Mobile.  Try
>>>>>>>         
>>>>> it now.
>>>>>  
>>>>>>       
>>>
>>>
> 
> 

Re: dynamic collections

Posted by M Harris <md...@yahoo.com>.
Thanks, I see that it can be overwritten. Thanks.

Dan Diephouse <da...@mulesource.com> wrote:  I think I'm suggesting that it makes sense to do this by default and 
have a sensible default implementation in AbstractCollectionAdapter.

James M Snell wrote:
> There's no reason that the getServiceDocument method couldn't be 
> overridden so that it defers to a Collection Adapter.
>
> - James
>
> Dan Diephouse wrote:
>> What about
>> 1. Let the CollectionAdapter itself write to the services document 
>> whatever it wants.
>> 2. Add a switch to AbstractProvider which turns the service writing 
>> on/off
>> Would that solve your problem?
>>
>> Dan
>>
>> David Primmer wrote:
>>> But what about the issue of practicality of service docs for huge sets
>>> of dynamic collections?
>>>
>>> davep
>>>
>>> On Mon, Apr 28, 2008 at 1:33 PM, James M Snell 
>>> wrote:
>>> 
>>>> In the Lotus Connections blogs implementation, I subclassed the 
>>>> Provider and
>>>> re-implemented the code that provided the service document. I have a
>>>> EntityProvider implementation that writes out the service document.
>>>>
>>>> - James
>>>>
>>>>
>>>>
>>>> David Primmer wrote:
>>>>
>>>> 
>>>>> I also had this same issue when the collections are dynamic and would
>>>>> generate a practically unusable service doc.
>>>>>
>>>>> /blabla/:collection/:entry
>>>>>
>>>>> There's now way that I know of to create a service doc for this feed
>>>>> if :collection is one of a large number records in a database. Why
>>>>> would anyone use the service doc it if it was more than just a
>>>>> handful? Service docs need to contain real working links, not uri
>>>>> templates.
>>>>>
>>>>> Abdera's method of creating service docs is to call getHref for each
>>>>> adapter that is added to the workspace. However, when an adapter
>>>>> handles getHref, it is generating one url, not generating all the
>>>>> entries in a feed. It can only return one url and that's going to be
>>>>> some form of template. Does it make sense to offer another
>>>>> implementation of AbstractProvider.getServiceDocument?
>>>>>
>>>>> davep
>>>>>
>>>>> On Mon, Apr 28, 2008 at 11:28 AM, M Harris 
>>>>> wrote:
>>>>>
>>>>> 
>>>>>> How can one create dynamic collections with Abdera and create the
>>>>>> 
>>>> service document? Perhaps, a hierarchy. Instead of having a single 
>>>> static
>>>> collection defined, the user can create their own collections. How 
>>>> would
>>>> one create a collection? Should they post a collection element or 
>>>> atom
>>>> entry?
>>>> 
>>>>>>
>>>>>>
>>>>>> ---------------------------------
>>>>>> Be a better friend, newshound, and know-it-all with Yahoo! 
>>>>>> Mobile. Try
>>>>>> 
>>>> it now.
>>>> 
>>>>> 
>>
>>


-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com 



       
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.

Re: dynamic collections

Posted by Dan Diephouse <da...@mulesource.com>.
I think I'm suggesting that it makes sense to do this by default and 
have a sensible default implementation in AbstractCollectionAdapter.

James M Snell wrote:
> There's no reason that the getServiceDocument method couldn't be 
> overridden so that it defers to a Collection Adapter.
>
> - James
>
> Dan Diephouse wrote:
>> What about
>> 1. Let the CollectionAdapter itself write to the services document 
>> whatever it wants.
>> 2. Add a switch to AbstractProvider which turns the service writing 
>> on/off
>> Would that solve your problem?
>>
>> Dan
>>
>> David Primmer wrote:
>>> But what about the issue of practicality of service docs for huge sets
>>> of dynamic collections?
>>>
>>> davep
>>>
>>> On Mon, Apr 28, 2008 at 1:33 PM, James M Snell <ja...@gmail.com> 
>>> wrote:
>>>  
>>>> In the Lotus Connections blogs implementation, I subclassed the 
>>>> Provider and
>>>> re-implemented the code that provided the service document.  I have a
>>>> EntityProvider implementation that writes out the service document.
>>>>
>>>>  - James
>>>>
>>>>
>>>>
>>>>  David Primmer wrote:
>>>>
>>>>   
>>>>> I also had this same issue when the collections are dynamic and would
>>>>> generate a practically unusable service doc.
>>>>>
>>>>> /blabla/:collection/:entry
>>>>>
>>>>> There's now way that I know of to create a service doc for this feed
>>>>> if :collection is one of a large number records in a database. Why
>>>>> would anyone use the service doc it if it was more than just a
>>>>> handful? Service docs need to contain real working links, not uri
>>>>> templates.
>>>>>
>>>>> Abdera's method of creating service docs is to call getHref for each
>>>>> adapter that is added to the workspace. However, when an adapter
>>>>> handles getHref, it is generating one url, not generating all the
>>>>> entries in a feed. It can only return one url and that's going to be
>>>>> some form of template. Does it make sense to offer another
>>>>> implementation of AbstractProvider.getServiceDocument?
>>>>>
>>>>> davep
>>>>>
>>>>> On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com> 
>>>>> wrote:
>>>>>
>>>>>     
>>>>>> How can one create dynamic collections with Abdera and create the
>>>>>>         
>>>> service document?  Perhaps, a hierarchy. Instead of having a single 
>>>> static
>>>> collection defined, the user can create their own collections.  How 
>>>> would
>>>> one create a collection?  Should they post a collection element or 
>>>> atom
>>>> entry?
>>>>   
>>>>>>
>>>>>>
>>>>>>  ---------------------------------
>>>>>>  Be a better friend, newshound, and know-it-all with Yahoo! 
>>>>>> Mobile.  Try
>>>>>>         
>>>> it now.
>>>>   
>>>>>       
>>
>>


-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com 


Re: dynamic collections

Posted by James M Snell <ja...@gmail.com>.
There's no reason that the getServiceDocument method couldn't be 
overridden so that it defers to a Collection Adapter.

- James

Dan Diephouse wrote:
> What about
> 1. Let the CollectionAdapter itself write to the services document 
> whatever it wants.
> 2. Add a switch to AbstractProvider which turns the service writing on/off
> Would that solve your problem?
> 
> Dan
> 
> David Primmer wrote:
>> But what about the issue of practicality of service docs for huge sets
>> of dynamic collections?
>>
>> davep
>>
>> On Mon, Apr 28, 2008 at 1:33 PM, James M Snell <ja...@gmail.com> wrote:
>>  
>>> In the Lotus Connections blogs implementation, I subclassed the 
>>> Provider and
>>> re-implemented the code that provided the service document.  I have a
>>> EntityProvider implementation that writes out the service document.
>>>
>>>  - James
>>>
>>>
>>>
>>>  David Primmer wrote:
>>>
>>>    
>>>> I also had this same issue when the collections are dynamic and would
>>>> generate a practically unusable service doc.
>>>>
>>>> /blabla/:collection/:entry
>>>>
>>>> There's now way that I know of to create a service doc for this feed
>>>> if :collection is one of a large number records in a database. Why
>>>> would anyone use the service doc it if it was more than just a
>>>> handful? Service docs need to contain real working links, not uri
>>>> templates.
>>>>
>>>> Abdera's method of creating service docs is to call getHref for each
>>>> adapter that is added to the workspace. However, when an adapter
>>>> handles getHref, it is generating one url, not generating all the
>>>> entries in a feed. It can only return one url and that's going to be
>>>> some form of template. Does it make sense to offer another
>>>> implementation of AbstractProvider.getServiceDocument?
>>>>
>>>> davep
>>>>
>>>> On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com> wrote:
>>>>
>>>>      
>>>>> How can one create dynamic collections with Abdera and create the
>>>>>         
>>> service document?  Perhaps, a hierarchy. Instead of having a single 
>>> static
>>> collection defined, the user can create their own collections.  How 
>>> would
>>> one create a collection?  Should they post a collection element or atom
>>> entry?
>>>    
>>>>>
>>>>>
>>>>>  ---------------------------------
>>>>>  Be a better friend, newshound, and know-it-all with Yahoo! 
>>>>> Mobile.  Try
>>>>>         
>>> it now.
>>>    
>>>>       
> 
> 

Re: dynamic collections

Posted by Dan Diephouse <da...@mulesource.com>.
What about
1. Let the CollectionAdapter itself write to the services document 
whatever it wants.
2. Add a switch to AbstractProvider which turns the service writing on/off
Would that solve your problem?

Dan

David Primmer wrote:
> But what about the issue of practicality of service docs for huge sets
> of dynamic collections?
>
> davep
>
> On Mon, Apr 28, 2008 at 1:33 PM, James M Snell <ja...@gmail.com> wrote:
>   
>> In the Lotus Connections blogs implementation, I subclassed the Provider and
>> re-implemented the code that provided the service document.  I have a
>> EntityProvider implementation that writes out the service document.
>>
>>  - James
>>
>>
>>
>>  David Primmer wrote:
>>
>>     
>>> I also had this same issue when the collections are dynamic and would
>>> generate a practically unusable service doc.
>>>
>>> /blabla/:collection/:entry
>>>
>>> There's now way that I know of to create a service doc for this feed
>>> if :collection is one of a large number records in a database. Why
>>> would anyone use the service doc it if it was more than just a
>>> handful? Service docs need to contain real working links, not uri
>>> templates.
>>>
>>> Abdera's method of creating service docs is to call getHref for each
>>> adapter that is added to the workspace. However, when an adapter
>>> handles getHref, it is generating one url, not generating all the
>>> entries in a feed. It can only return one url and that's going to be
>>> some form of template. Does it make sense to offer another
>>> implementation of AbstractProvider.getServiceDocument?
>>>
>>> davep
>>>
>>> On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com> wrote:
>>>
>>>       
>>>> How can one create dynamic collections with Abdera and create the
>>>>         
>> service document?  Perhaps, a hierarchy. Instead of having a single static
>> collection defined, the user can create their own collections.  How would
>> one create a collection?  Should they post a collection element or atom
>> entry?
>>     
>>>>
>>>>
>>>>  ---------------------------------
>>>>  Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try
>>>>         
>> it now.
>>     
>>>       


-- 
Dan Diephouse
MuleSource
http://mulesource.com | http://netzooid.com 


Re: dynamic collections

Posted by David Primmer <da...@gmail.com>.
But what about the issue of practicality of service docs for huge sets
of dynamic collections?

davep

On Mon, Apr 28, 2008 at 1:33 PM, James M Snell <ja...@gmail.com> wrote:
> In the Lotus Connections blogs implementation, I subclassed the Provider and
> re-implemented the code that provided the service document.  I have a
> EntityProvider implementation that writes out the service document.
>
>  - James
>
>
>
>  David Primmer wrote:
>
> > I also had this same issue when the collections are dynamic and would
> > generate a practically unusable service doc.
> >
> > /blabla/:collection/:entry
> >
> > There's now way that I know of to create a service doc for this feed
> > if :collection is one of a large number records in a database. Why
> > would anyone use the service doc it if it was more than just a
> > handful? Service docs need to contain real working links, not uri
> > templates.
> >
> > Abdera's method of creating service docs is to call getHref for each
> > adapter that is added to the workspace. However, when an adapter
> > handles getHref, it is generating one url, not generating all the
> > entries in a feed. It can only return one url and that's going to be
> > some form of template. Does it make sense to offer another
> > implementation of AbstractProvider.getServiceDocument?
> >
> > davep
> >
> > On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com> wrote:
> >
> > > How can one create dynamic collections with Abdera and create the
> service document?  Perhaps, a hierarchy. Instead of having a single static
> collection defined, the user can create their own collections.  How would
> one create a collection?  Should they post a collection element or atom
> entry?
> > >
> > >
> > >
> > >
> > >  ---------------------------------
> > >  Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try
> it now.
> > >
> >
> >
>

Re: dynamic collections

Posted by James M Snell <ja...@gmail.com>.
In the Lotus Connections blogs implementation, I subclassed the Provider 
and re-implemented the code that provided the service document.  I have 
a EntityProvider implementation that writes out the service document.

- James

David Primmer wrote:
> I also had this same issue when the collections are dynamic and would
> generate a practically unusable service doc.
> 
> /blabla/:collection/:entry
> 
> There's now way that I know of to create a service doc for this feed
> if :collection is one of a large number records in a database. Why
> would anyone use the service doc it if it was more than just a
> handful? Service docs need to contain real working links, not uri
> templates.
> 
> Abdera's method of creating service docs is to call getHref for each
> adapter that is added to the workspace. However, when an adapter
> handles getHref, it is generating one url, not generating all the
> entries in a feed. It can only return one url and that's going to be
> some form of template. Does it make sense to offer another
> implementation of AbstractProvider.getServiceDocument?
> 
> davep
> 
> On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com> wrote:
>> How can one create dynamic collections with Abdera and create the service document?  Perhaps, a hierarchy. Instead of having a single static collection defined, the user can create their own collections.  How would one create a collection?  Should they post a collection element or atom entry?
>>
>>
>>
>>
>>  ---------------------------------
>>  Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.
> 

Re: dynamic collections

Posted by David Primmer <da...@gmail.com>.
I also had this same issue when the collections are dynamic and would
generate a practically unusable service doc.

/blabla/:collection/:entry

There's now way that I know of to create a service doc for this feed
if :collection is one of a large number records in a database. Why
would anyone use the service doc it if it was more than just a
handful? Service docs need to contain real working links, not uri
templates.

Abdera's method of creating service docs is to call getHref for each
adapter that is added to the workspace. However, when an adapter
handles getHref, it is generating one url, not generating all the
entries in a feed. It can only return one url and that's going to be
some form of template. Does it make sense to offer another
implementation of AbstractProvider.getServiceDocument?

davep

On Mon, Apr 28, 2008 at 11:28 AM, M Harris <md...@yahoo.com> wrote:
> How can one create dynamic collections with Abdera and create the service document?  Perhaps, a hierarchy. Instead of having a single static collection defined, the user can create their own collections.  How would one create a collection?  Should they post a collection element or atom entry?
>
>
>
>
>  ---------------------------------
>  Be a better friend, newshound, and know-it-all with Yahoo! Mobile.  Try it now.