abdera-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vasu Nori" <vasun...@gmail.com>
Subject Re: FeedServer Review
Date Wed, 16 Jan 2008 19:27:06 GMT
I looked at JcrCollectionProvider.java.
Dan is right - CollectionProvider is **like** Adapter - with a few
differences.

1. In the Adapter code, AdapterManager looks at the <feed>.properties file
to figure  out which adapter class to load to serve the given feed.  In the
usecases that we have encountered, we cannot assume that the server always
knows about ALL the feeds it needs to serve. Datasources can be dynamically
added which provide new feeds - and when the server receives a request with
a new feedname in it, it needs to load the corresponding datasource adapter
(connector or collectionprovider - whatever you want to call it).

2. properties file also includes certain other properties for feeds such as
title, author, database sqlmap file name(if required) etc. I don't like
hardcoding of any configurable attributes in java files.

3. CollectionProvider(or, whatever we want to call it) only needs to have
code that deals with accessing data from datasource. Any other code that
DOES NOT deal with data from/to datassource - I would rather put it in a
different class. Thats what we did by separating code into
FeedServerProvider.java and Adapter(s).java.

4. Can people write their own "collectionProviders"? sure. but why do that
when we can make it easier by shipping a whole bunch of "adapters" (or
collectionprovders) for most common datasources - all types of databases,
filesystem etc. It was one of your stated goals that we should make writing
a server easier.

5. CollectionProvider can't be the one serving "service document".
especially, since the server dynamically can expand the set of feeds it is
serving (see point#1 above). we thought FeedserverProvider.java could be the
place to have that code.

The more I think about it, the more convinced I am that Dan's code is not
that far away from our code. things can tweaked a little here or little
there - but I would have happier if we agree on the concepts first..hope
that makes sense.

thanks

On Jan 16, 2008 6:51 AM, Dan Diephouse <dan.diephouse@mulesource.com> wrote:

>
> David Primmer wrote:
> > I'll let Jun and Vasu respond in more detail later, but my general
> > impression of your comments is that they are not valuing the use case
> > that we were considering; namely that we wanted to make it easier to
> > produce an Atom interface to existing data sources that probably have
> > their own interface and accompanying local human administrative
> > expertise. We wanted to take the specifics of the Atom protocol out of
> > way of the dev in the same way that a high-level ORM can hide the
> > implementer from having to do SQL. That way, the user of the library
> > can focus on adapting the data sources and providing a read-write rest
> > web service.
> >
> >
> Great, I think this is a very valuable use case.
>
> What I'm confused about is why we need a new mechanism to do this. I
> already went through and provided an example of how the
> CollectionProvider can support both your needs and general developer
> requirements.
>
> Can you please provide some concrete examples of why the CP code cannot
> be used or why the Adapter approach is easier to use? I roughly
> understand what you're saying about how you're trying to focus on
> adapting data sources, but I still don't see why this can't be done with
> the CP code and why we need a completely new implementation/paradigm to
> do it.
>
> Would you be opposed to writing a AbstractDataSourceCollectionProvider?
> (I don't really care that much about naming, but hopefully its clear
> what I mean from the context). This would work with the existing
> ServiceProvider, reuse the existing approach and provide you with the
> interface you want.
> >  If you're coding
> > the whole thing from scratch and agnostic to back-end storage format,
> > Adapter seems like a dumb name.
> >
> I never said it sounded dumb. I said it just wasn't consistent. I too am
> not a huge fan of the *Provider naming, but thats a rabbit hole that we
> can revisit later as its really not as important as the interfaces for
> interacting with the system.
>
> - Dan
>
> --
> Dan Diephouse
> MuleSource
> http://mulesource.com | http://netzooid.com/blog
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message