You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@roller.apache.org by Allen Gilliland <al...@sun.com> on 2006/09/14 21:29:09 UTC
Modular Planet ( was Re: Modular Roller)
I think the proposal looks good. Only 2 things I would comment on ...
1. Rather than put this in the sandbox I suggest we go ahead and start
by putting this in a more long term home where we think it should live.
I would vote for the blueprints style of project layout ...
http://java.sun.com/blueprints/code/projectconventions.html
using this layout structure i would suggest that for the Modular Planet
proposal that we start simply by creating an apps/planet directory which
holds build specifics for the planet webapp. eventually we should move
everything there (src, web, etc), but for now if its just a build script
and a few other things then that's fine.
then when we do start to get the Modular Roller work going we could add
apps/weblogger to the mix and then the various modules go under
components, like components/core. as we move along we can figure out
the semantics around what should be a component vs. an app, but that can
be done later. until then i think we can at least agree that anything
that creates a webapp should be under apps/*, so the new planet app
would go there.
SIDE NOTE: although it wouldn't need to be part of this proposal, i
would also suggest that if we agree to adopt the blueprints layout that
we update other parts of the repository to match for consistency. i.e.
or tools directory -> lib
2. I'm not sure I understand the need for static generation. Can't we
just do a jsp for pages and use the planetrss servlet? It just seems
like creating static generation code would be doing work that we already
expect to change.
It would probably be a good idea to see a small description of the url
layout for the planet app as well.
-- Allen
Dave Johnson wrote:
> On 9/11/06, Allen Gilliland <al...@sun.com> wrote:
>>
>> Dave Johnson wrote:
>> > Thanks for the detailed answer. Comments below...
> . . .
>> > On 9/8/06, Allen Gilliland <al...@sun.com> wrote:
>> >> At a slightly lower level I think that means that each component
>> should
>> >> only have code/configs that know how to run itself. Meaning that they
>> >> can't share any db tables, they can't share any config files, and they
>> >> can't share any code (aside from explicit utils/interfaces which are
>> >> meant to be shared).
>> >
>> > No, that's wrong. The Modular Roller proposal is to have a shared
>> > core that includes user management and configuration.
>> >
>> > I think what you have in mind is better characterized by the words
>> > "Modular Planet" which is not a bad idea -- it's just different from
>> the
>> > Modular Roller concept I have in mind. I'll describe what I mean by
>> > Modular Planet below.
>>
>> I see what you mean now when you say 'Modular Roller' but that wasn't
>> really clear to me based on the proposal. My idea of what you were
>> trying to do was much different.
> . . .
>> After reading this email it's clear that your plans were much more
>> complicated than what I was thinking about, so we were talking apples
>> and oranges. Now that I understand what you want to do it makes sense
>> and I think it's a very cool idea, but it will take a lot of work and
>> careful planning to do this.
>
>
> OK. Full-on Modular Roller is too much for 3.1.
>
> Instead, I've written up a new proposal called Modular Planet to
> enable us to get a Planet webapp up and running quickly and
> work towards modularity but not in a destabilizing way.
>
> http://rollerweblogger.org/wiki/Wiki.jsp?page=Proposal_Modular_Planet
>
> - Dave
Re: Modular Planet ( was Re: Modular Roller)
Posted by Dave <sn...@gmail.com>.
On 9/20/06, Allen Gilliland <al...@sun.com> wrote:
> yep, some of those need to be static, but why put the absoluteurl in the
> static config? isn't that already in the PlanetConfigData? i think
> that property should be modifyable at runtime.
Good point. That one should remain in PlanetConfigData.
- Dave
Re: Modular Planet ( was Re: Modular Roller)
Posted by Allen Gilliland <al...@sun.com>.
Dave wrote:
> On 9/20/06, Allen Gilliland <al...@sun.com> wrote:
>> quick thought here. does the planet stuff really need a static config
>> file right now? would it be possible to only use the existing
>> PlanetConfigData which is held in the db? what properties from the
>> roller config need to be migrated?
>
> I guess I could use PlanetConfigData, but I've already implemented
> PlanetConfig. It has the properties below and I think there's a
> reasonable chance that I'll come up with a couple more as I work
> through this thing.
>
> persistence.planet.classname=org.apache.roller.planet.business.hibernate.HibernatePlanetImpl
>
>
> # Absolute URL to site
> site.absoluteurl=http://localhost:8080/planet
>
> # Planet cache must exist and must be writable by Roller process
> planet.aggregator.cache.dir=/var/roller/planetcache
>
> # Number of queries allowed per day
> planet.aggregator.technorati.limit=500
yep, some of those need to be static, but why put the absoluteurl in the
static config? isn't that already in the PlanetConfigData? i think
that property should be modifyable at runtime.
-- Allen
>
>
> - Dave
Re: Modular Planet ( was Re: Modular Roller)
Posted by Dave <sn...@gmail.com>.
On 9/20/06, Allen Gilliland <al...@sun.com> wrote:
> quick thought here. does the planet stuff really need a static config
> file right now? would it be possible to only use the existing
> PlanetConfigData which is held in the db? what properties from the
> roller config need to be migrated?
I guess I could use PlanetConfigData, but I've already implemented
PlanetConfig. It has the properties below and I think there's a
reasonable chance that I'll come up with a couple more as I work
through this thing.
persistence.planet.classname=org.apache.roller.planet.business.hibernate.HibernatePlanetImpl
# Absolute URL to site
site.absoluteurl=http://localhost:8080/planet
# Planet cache must exist and must be writable by Roller process
planet.aggregator.cache.dir=/var/roller/planetcache
# Number of queries allowed per day
planet.aggregator.technorati.limit=500
- Dave
Re: Modular Planet ( was Re: Modular Roller)
Posted by Allen Gilliland <al...@sun.com>.
Dave wrote:
> I haven't gotton any other feedback on this so I'm going to assume
> it's OK to procede and start to make changes in the trunk.
>
> The idea is to do the minimum amount of refactoring under ./src so
> that the Planet manager can be separated out into it's own package
> hierarchy and used in a separate webapp.
>
> Here's what I plan on doing first:
>
> * Move the following Planet classes under org.apache.roller.planet
> o PlanetConfigData
> o PlanetGroupData
> o PlanetSubscriptionData
> o PlanetGroupSubscriptionAssoc
> o PlanetEntryData
> o PlanetManager
> o HibernatePlanetManagerImpl
> o RefreshEntriesTask
> o SyncWebsitesTask
> o TechnoratiRankingsTask
>
> * Create new class org.apache.roller.planet.config.PlanetConfig
> based on RollerConfig, which will use planet.properties. And
> modify HibernatePlanetManagerImpl to use this new Planet
> config class instead of Roller config.
quick thought here. does the planet stuff really need a static config
file right now? would it be possible to only use the existing
PlanetConfigData which is held in the db? what properties from the
roller config need to be migrated?
-- Allen
>
> * Give methods in HibernatePersistenceStrategy public access
> so they can be used from org.apache.roller.planet packages.
>
> - Dave
>
>
>
> On 9/14/06, Allen Gilliland <al...@sun.com> wrote:
>>
>>
>> Dave Johnson wrote:
>> > Comments below...
>> >
>> > On 9/14/06, Allen Gilliland <al...@sun.com> wrote:
>> >> I think the proposal looks good. Only 2 things I would comment on ...
>> >>
>> >> 1. Rather than put this in the sandbox I suggest we go ahead and start
>> >> by putting this in a more long term home where we think it should
>> live.
>> >> I would vote for the blueprints style of project layout ...
>> >>
>> >> http://java.sun.com/blueprints/code/projectconventions.html
>> >>
>> >> using this layout structure i would suggest that for the Modular
>> Planet
>> >> proposal that we start simply by creating an apps/planet directory
>> which
>> >> holds build specifics for the planet webapp. eventually we should
>> move
>> >> everything there (src, web, etc), but for now if its just a build
>> script
>> >> and a few other things then that's fine.
>> >
>> > I think that's a good layout and would not be against restructuring the
>> > directories like that, but I have a couple of concerns:
>> >
>> > - We want to get a planet app up and running quickly, so is now
>> > the time to restructure directories across the app?
>> >
>> > - I'd like to keep things relatively stable so Elias can do his tagging
>> > work in the trunk and perhaps a directory restructuring is too
>> > destabilizing.
>> >
>> > I've already started in the sandbox and I'll continue there until we
>> > find the
>> > right home for the code. I can always move later.
>>
>> I didn't mean that we have to move anything critical yet, just the stuff
>> that is used in the assembly of the webapp. So basically just an "mv
>> sandbox/planetroller apps/planet" and that's it. I don't think moving
>> that stuff would affect anything that other people are working on.
>>
>>
>> >
>> >
>> >> SIDE NOTE: although it wouldn't need to be part of this proposal, i
>> >> would also suggest that if we agree to adopt the blueprints layout
>> that
>> >> we update other parts of the repository to match for consistency.
>> i.e.
>> >> or tools directory -> lib
>> > Yes, but I don't really like lumping all jars into one directory.
>>
>> I didn't mean that all the jars go in one directory, it just means that
>> we rename 'tools' to 'lib'. there can still be subdirectories under lib
>> for various packages.
>>
>>
>> >
>> >
>> >> 2. I'm not sure I understand the need for static generation. Can't we
>> >> just do a jsp for pages and use the planetrss servlet? It just seems
>> >> like creating static generation code would be doing work that we
>> already
>> >> expect to change.
>> >
>> > I already have a Velocity/Texen static generation system that works
>> well in
>> > (see PlanetTool in the sandbox). So this is not "doing work that we
>> already
>> > expect to change," it's using code that works now so I can focus on
>> other
>> > issues (like the UI, which is not insignificant).
>> >
>> > With the static system in PlanetTool, each planet group can define a
>> > control
>> > template that in turn generates HTML, RSS, OPML or whatever else is
>> needed.
>> > By using static generation, we don't need to bring in a page
>> servlet, feed
>> > Servlet or figure out how to do caching. We just let the app server
>> > serve up
>> > the pages.
>> >
>> > Eventually (3.2 timeframe?), I'd like to have a full rendering
>> system based
>> > on the interfaces you put together in 3.0 but for now static is the
>> > quickest
>> > path to working app.
>>
>> that's fine with me. I didn't realize you had the static generation
>> stuff already done.
>>
>>
>> >
>> >
>> >> It would probably be a good idea to see a small description of the
>> url
>> >> layout for the planet app as well.
>> >
>> > Assuming the application is hosted at the root URL of a site, you'd
>> have
>> > a set of URLs for the main aggregation:
>> >
>> > http://hostname/index.html
>> > http://hostname/index.rss
>> > http://hostname/index.atom
>> > http://hostname/index.opml
>> >
>> > And then a set of URLs for each aggregation group defined:
>> >
>> > http://hostname/<group-handle>.html
>> > http://hostname/<group-handle>.rss
>> > http://hostname/<group-handle>.atom
>> > http://hostname/<group-handle>.opml
>> >
>> > But the exact file generated is determined by the control template.
>>
>> not that it's a huge deal, but i think it would be slightly better if we
>> could follow the same convention for groups as for the main aggregation
>> and then use directories for the group name. i.e.
>>
>> http://hostname/<group-handle>/index.html
>> http://hostname/<group-handle>/index.rss
>> http://hostname/<group-handle>/index.atom
>> http://hostname/<group-handle>/index.opml
>>
>> the only reason i think that's a little bit nicer is that assuming that
>> once we change to dynamic delivery then it's easier to transition to the
>> same base url structure as Roller with /<group-handle>/* being used for
>> a given group.
>>
>> -- Allen
>>
>>
>> >
>> > - Dave
>>
Re: Modular Planet ( was Re: Modular Roller)
Posted by Dave <sn...@gmail.com>.
I haven't gotton any other feedback on this so I'm going to assume
it's OK to procede and start to make changes in the trunk.
The idea is to do the minimum amount of refactoring under ./src so
that the Planet manager can be separated out into it's own package
hierarchy and used in a separate webapp.
Here's what I plan on doing first:
* Move the following Planet classes under org.apache.roller.planet
o PlanetConfigData
o PlanetGroupData
o PlanetSubscriptionData
o PlanetGroupSubscriptionAssoc
o PlanetEntryData
o PlanetManager
o HibernatePlanetManagerImpl
o RefreshEntriesTask
o SyncWebsitesTask
o TechnoratiRankingsTask
* Create new class org.apache.roller.planet.config.PlanetConfig
based on RollerConfig, which will use planet.properties. And
modify HibernatePlanetManagerImpl to use this new Planet
config class instead of Roller config.
* Give methods in HibernatePersistenceStrategy public access
so they can be used from org.apache.roller.planet packages.
- Dave
On 9/14/06, Allen Gilliland <al...@sun.com> wrote:
>
>
> Dave Johnson wrote:
> > Comments below...
> >
> > On 9/14/06, Allen Gilliland <al...@sun.com> wrote:
> >> I think the proposal looks good. Only 2 things I would comment on ...
> >>
> >> 1. Rather than put this in the sandbox I suggest we go ahead and start
> >> by putting this in a more long term home where we think it should live.
> >> I would vote for the blueprints style of project layout ...
> >>
> >> http://java.sun.com/blueprints/code/projectconventions.html
> >>
> >> using this layout structure i would suggest that for the Modular Planet
> >> proposal that we start simply by creating an apps/planet directory which
> >> holds build specifics for the planet webapp. eventually we should move
> >> everything there (src, web, etc), but for now if its just a build script
> >> and a few other things then that's fine.
> >
> > I think that's a good layout and would not be against restructuring the
> > directories like that, but I have a couple of concerns:
> >
> > - We want to get a planet app up and running quickly, so is now
> > the time to restructure directories across the app?
> >
> > - I'd like to keep things relatively stable so Elias can do his tagging
> > work in the trunk and perhaps a directory restructuring is too
> > destabilizing.
> >
> > I've already started in the sandbox and I'll continue there until we
> > find the
> > right home for the code. I can always move later.
>
> I didn't mean that we have to move anything critical yet, just the stuff
> that is used in the assembly of the webapp. So basically just an "mv
> sandbox/planetroller apps/planet" and that's it. I don't think moving
> that stuff would affect anything that other people are working on.
>
>
> >
> >
> >> SIDE NOTE: although it wouldn't need to be part of this proposal, i
> >> would also suggest that if we agree to adopt the blueprints layout that
> >> we update other parts of the repository to match for consistency. i.e.
> >> or tools directory -> lib
> > Yes, but I don't really like lumping all jars into one directory.
>
> I didn't mean that all the jars go in one directory, it just means that
> we rename 'tools' to 'lib'. there can still be subdirectories under lib
> for various packages.
>
>
> >
> >
> >> 2. I'm not sure I understand the need for static generation. Can't we
> >> just do a jsp for pages and use the planetrss servlet? It just seems
> >> like creating static generation code would be doing work that we already
> >> expect to change.
> >
> > I already have a Velocity/Texen static generation system that works well in
> > (see PlanetTool in the sandbox). So this is not "doing work that we already
> > expect to change," it's using code that works now so I can focus on other
> > issues (like the UI, which is not insignificant).
> >
> > With the static system in PlanetTool, each planet group can define a
> > control
> > template that in turn generates HTML, RSS, OPML or whatever else is needed.
> > By using static generation, we don't need to bring in a page servlet, feed
> > Servlet or figure out how to do caching. We just let the app server
> > serve up
> > the pages.
> >
> > Eventually (3.2 timeframe?), I'd like to have a full rendering system based
> > on the interfaces you put together in 3.0 but for now static is the
> > quickest
> > path to working app.
>
> that's fine with me. I didn't realize you had the static generation
> stuff already done.
>
>
> >
> >
> >> It would probably be a good idea to see a small description of the url
> >> layout for the planet app as well.
> >
> > Assuming the application is hosted at the root URL of a site, you'd have
> > a set of URLs for the main aggregation:
> >
> > http://hostname/index.html
> > http://hostname/index.rss
> > http://hostname/index.atom
> > http://hostname/index.opml
> >
> > And then a set of URLs for each aggregation group defined:
> >
> > http://hostname/<group-handle>.html
> > http://hostname/<group-handle>.rss
> > http://hostname/<group-handle>.atom
> > http://hostname/<group-handle>.opml
> >
> > But the exact file generated is determined by the control template.
>
> not that it's a huge deal, but i think it would be slightly better if we
> could follow the same convention for groups as for the main aggregation
> and then use directories for the group name. i.e.
>
> http://hostname/<group-handle>/index.html
> http://hostname/<group-handle>/index.rss
> http://hostname/<group-handle>/index.atom
> http://hostname/<group-handle>/index.opml
>
> the only reason i think that's a little bit nicer is that assuming that
> once we change to dynamic delivery then it's easier to transition to the
> same base url structure as Roller with /<group-handle>/* being used for
> a given group.
>
> -- Allen
>
>
> >
> > - Dave
>
Re: Modular Planet ( was Re: Modular Roller)
Posted by Allen Gilliland <al...@sun.com>.
Dave Johnson wrote:
> Comments below...
>
> On 9/14/06, Allen Gilliland <al...@sun.com> wrote:
>> I think the proposal looks good. Only 2 things I would comment on ...
>>
>> 1. Rather than put this in the sandbox I suggest we go ahead and start
>> by putting this in a more long term home where we think it should live.
>> I would vote for the blueprints style of project layout ...
>>
>> http://java.sun.com/blueprints/code/projectconventions.html
>>
>> using this layout structure i would suggest that for the Modular Planet
>> proposal that we start simply by creating an apps/planet directory which
>> holds build specifics for the planet webapp. eventually we should move
>> everything there (src, web, etc), but for now if its just a build script
>> and a few other things then that's fine.
>
> I think that's a good layout and would not be against restructuring the
> directories like that, but I have a couple of concerns:
>
> - We want to get a planet app up and running quickly, so is now
> the time to restructure directories across the app?
>
> - I'd like to keep things relatively stable so Elias can do his tagging
> work in the trunk and perhaps a directory restructuring is too
> destabilizing.
>
> I've already started in the sandbox and I'll continue there until we
> find the
> right home for the code. I can always move later.
I didn't mean that we have to move anything critical yet, just the stuff
that is used in the assembly of the webapp. So basically just an "mv
sandbox/planetroller apps/planet" and that's it. I don't think moving
that stuff would affect anything that other people are working on.
>
>
>> SIDE NOTE: although it wouldn't need to be part of this proposal, i
>> would also suggest that if we agree to adopt the blueprints layout that
>> we update other parts of the repository to match for consistency. i.e.
>> or tools directory -> lib
> Yes, but I don't really like lumping all jars into one directory.
I didn't mean that all the jars go in one directory, it just means that
we rename 'tools' to 'lib'. there can still be subdirectories under lib
for various packages.
>
>
>> 2. I'm not sure I understand the need for static generation. Can't we
>> just do a jsp for pages and use the planetrss servlet? It just seems
>> like creating static generation code would be doing work that we already
>> expect to change.
>
> I already have a Velocity/Texen static generation system that works well in
> (see PlanetTool in the sandbox). So this is not "doing work that we already
> expect to change," it's using code that works now so I can focus on other
> issues (like the UI, which is not insignificant).
>
> With the static system in PlanetTool, each planet group can define a
> control
> template that in turn generates HTML, RSS, OPML or whatever else is needed.
> By using static generation, we don't need to bring in a page servlet, feed
> Servlet or figure out how to do caching. We just let the app server
> serve up
> the pages.
>
> Eventually (3.2 timeframe?), I'd like to have a full rendering system based
> on the interfaces you put together in 3.0 but for now static is the
> quickest
> path to working app.
that's fine with me. I didn't realize you had the static generation
stuff already done.
>
>
>> It would probably be a good idea to see a small description of the url
>> layout for the planet app as well.
>
> Assuming the application is hosted at the root URL of a site, you'd have
> a set of URLs for the main aggregation:
>
> http://hostname/index.html
> http://hostname/index.rss
> http://hostname/index.atom
> http://hostname/index.opml
>
> And then a set of URLs for each aggregation group defined:
>
> http://hostname/<group-handle>.html
> http://hostname/<group-handle>.rss
> http://hostname/<group-handle>.atom
> http://hostname/<group-handle>.opml
>
> But the exact file generated is determined by the control template.
not that it's a huge deal, but i think it would be slightly better if we
could follow the same convention for groups as for the main aggregation
and then use directories for the group name. i.e.
http://hostname/<group-handle>/index.html
http://hostname/<group-handle>/index.rss
http://hostname/<group-handle>/index.atom
http://hostname/<group-handle>/index.opml
the only reason i think that's a little bit nicer is that assuming that
once we change to dynamic delivery then it's easier to transition to the
same base url structure as Roller with /<group-handle>/* being used for
a given group.
-- Allen
>
> - Dave
Re: Modular Planet ( was Re: Modular Roller)
Posted by Dave Johnson <sn...@gmail.com>.
Comments below...
On 9/14/06, Allen Gilliland <al...@sun.com> wrote:
> I think the proposal looks good. Only 2 things I would comment on ...
>
> 1. Rather than put this in the sandbox I suggest we go ahead and start
> by putting this in a more long term home where we think it should live.
> I would vote for the blueprints style of project layout ...
>
> http://java.sun.com/blueprints/code/projectconventions.html
>
> using this layout structure i would suggest that for the Modular Planet
> proposal that we start simply by creating an apps/planet directory which
> holds build specifics for the planet webapp. eventually we should move
> everything there (src, web, etc), but for now if its just a build script
> and a few other things then that's fine.
I think that's a good layout and would not be against restructuring the
directories like that, but I have a couple of concerns:
- We want to get a planet app up and running quickly, so is now
the time to restructure directories across the app?
- I'd like to keep things relatively stable so Elias can do his tagging
work in the trunk and perhaps a directory restructuring is too destabilizing.
I've already started in the sandbox and I'll continue there until we find the
right home for the code. I can always move later.
> SIDE NOTE: although it wouldn't need to be part of this proposal, i
> would also suggest that if we agree to adopt the blueprints layout that
> we update other parts of the repository to match for consistency. i.e.
> or tools directory -> lib
Yes, but I don't really like lumping all jars into one directory.
> 2. I'm not sure I understand the need for static generation. Can't we
> just do a jsp for pages and use the planetrss servlet? It just seems
> like creating static generation code would be doing work that we already
> expect to change.
I already have a Velocity/Texen static generation system that works well in
(see PlanetTool in the sandbox). So this is not "doing work that we already
expect to change," it's using code that works now so I can focus on other
issues (like the UI, which is not insignificant).
With the static system in PlanetTool, each planet group can define a control
template that in turn generates HTML, RSS, OPML or whatever else is needed.
By using static generation, we don't need to bring in a page servlet, feed
Servlet or figure out how to do caching. We just let the app server serve up
the pages.
Eventually (3.2 timeframe?), I'd like to have a full rendering system based
on the interfaces you put together in 3.0 but for now static is the quickest
path to working app.
> It would probably be a good idea to see a small description of the url
> layout for the planet app as well.
Assuming the application is hosted at the root URL of a site, you'd have
a set of URLs for the main aggregation:
http://hostname/index.html
http://hostname/index.rss
http://hostname/index.atom
http://hostname/index.opml
And then a set of URLs for each aggregation group defined:
http://hostname/<group-handle>.html
http://hostname/<group-handle>.rss
http://hostname/<group-handle>.atom
http://hostname/<group-handle>.opml
But the exact file generated is determined by the control template.
- Dave