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 2007/01/08 20:13:22 UTC
Quick Proposal: new FUTURE_PUBLISHED weblog entry status
This is a short and quick proposal so I'm just going to do this on the
list. I want to change the way that our current process for publishing
entries to the future works so that it becomes both 1) easier to manage,
2) less likely to cause problems, and 3) improves performance.
So what I want to change is to add a new weblog entry status option for
FUTURE_PUBLISHED which will be applied to entries which are "published"
but their publish date was manually set to some time in the future.
This is a fairly trivial change to make and won't require any database
changes, but the effects will be quite nice ...
1. future published entries become easier to manage because it's very
easy to determine which entries are scheduled for future publication.
currently Roller finds these entries using date based queries, namely,
select * from weblogentry where pubtime > now(), but that is both slow
and unnecessary.
using this new status field it will be very simple and clear that *all*
entries marked with the status PUBLISHED are publicly available on that
blog, and entries will all other statuses are in some form of non-public
state.
2. this will reduce problems caused with the current way we deal with
future published entries. Because the current process requires the code
to constantly be smart enough to be using date ranges there is greater
potential for errors, such as how the calendar was including future
published entries. using this new status field will make it far less
likely for these kinds of errors to crop up.
3. this will also improve performance :) the performance improvement
comes from the fact that we can now remove the "pubtime > now()" portion
of queries for weblog entries, which is currently required on basically
all weblog entry queries. this additional query criteria makes the
query noticeably slower when you have a large weblogentry table, so this
is also a nice benefit.
The work that needs to be done can be outlined in pseudo code ...
1. add the new FUTURE_PUBLISHED status option to the weblog entry class.
2. update the entry publishing struts action to check if an entry is
published to future and mark it with the proper status if so.
3. update manager methods that query for entries to remove the use of a
endDate when it's not needed.
everyone cool with that? anyone object to doing this?
-- Allen
Re: Quick Proposal: new FUTURE_PUBLISHED weblog entry status
Posted by Dave <sn...@gmail.com>.
+1. Good idea.
- Dave
On 1/8/07, Allen Gilliland <al...@sun.com> wrote:
> This is a short and quick proposal so I'm just going to do this on the
> list. I want to change the way that our current process for publishing
> entries to the future works so that it becomes both 1) easier to manage,
> 2) less likely to cause problems, and 3) improves performance.
>
> So what I want to change is to add a new weblog entry status option for
> FUTURE_PUBLISHED which will be applied to entries which are "published"
> but their publish date was manually set to some time in the future.
> This is a fairly trivial change to make and won't require any database
> changes, but the effects will be quite nice ...
>
> 1. future published entries become easier to manage because it's very
> easy to determine which entries are scheduled for future publication.
> currently Roller finds these entries using date based queries, namely,
> select * from weblogentry where pubtime > now(), but that is both slow
> and unnecessary.
>
> using this new status field it will be very simple and clear that *all*
> entries marked with the status PUBLISHED are publicly available on that
> blog, and entries will all other statuses are in some form of non-public
> state.
>
> 2. this will reduce problems caused with the current way we deal with
> future published entries. Because the current process requires the code
> to constantly be smart enough to be using date ranges there is greater
> potential for errors, such as how the calendar was including future
> published entries. using this new status field will make it far less
> likely for these kinds of errors to crop up.
>
> 3. this will also improve performance :) the performance improvement
> comes from the fact that we can now remove the "pubtime > now()" portion
> of queries for weblog entries, which is currently required on basically
> all weblog entry queries. this additional query criteria makes the
> query noticeably slower when you have a large weblogentry table, so this
> is also a nice benefit.
>
> The work that needs to be done can be outlined in pseudo code ...
>
> 1. add the new FUTURE_PUBLISHED status option to the weblog entry class.
> 2. update the entry publishing struts action to check if an entry is
> published to future and mark it with the proper status if so.
> 3. update manager methods that query for entries to remove the use of a
> endDate when it's not needed.
>
> everyone cool with that? anyone object to doing this?
>
> -- Allen
>
>