Alex,

Standard approach would be reference pages not by comment id but by a
page number.

Something like:
/comments?p=1
/comments?p=2

In this case you have stable urls set and pages will be added when new
comments are coming.
Also content of pages will be changed what is good for SEO as far as I
know.

Your problem as I understand is how we translate page numbers to id's
range.

For AppEngine I would recommend to store all comment ids in a text
field.

When request coming you load it to array and find min/max id's to
show.

I myself ended up with storing latest comments for an article/post in
a text field of the article entry and as seprate "Comments" entries as
well.

Another option I see is to organize paging by date - this will result
in permalink urls for paging. Like this:

/comments/2008-12-23/

Of course this works if you do no expect huge spike in comments and OK
to show variable number of comments per time period.
LiveJournal is using this approach for old post entries - as I
remember they support paging for about 5-10 pages back.
--
Alex
http://sharp-developer.net/

On Dec 23, 12:19 am, Alexander Kojevnikov <[email protected]>
wrote:
> > I think you'll find that any good search engine will be able to cope
> > just fine with that.
>
> > The best solution, though, is to implement a permalink-like setup, and
> > encourage people to use permalinks when they link to your
> > application's content.
>
> Thanks Dave!
>
> Unfortunately search engines don't cope with that very well.
> Permalinks would work great, but what exactly is a permalink for paged
> content? That's right, the page number! And it's something that's
> currently impossible to implement on appengine.
>
> I think I didn't explain the problem very well, here's an example to
> make it easier to understand:
>
> Let's say we want to page through blog comments, ordered by the
> comment_id DESC. If we have 10 comments with ids ranging from 1 to 10
> and want to show 5 comments per page, we end up with two pages:
>
> Page 1:
>   Comment 10
>   ...
>   Comment 6
>   Next page link: /comments?next=6
>
> Page 2:
>   Comment 5
>   ...
>   Comment 1
>
> Page 2 will take the "next" parameter and use a query like this for
> fetch the comments:
>
>   SELECT * FROM Comment WHERE comment_id < :id ORDER BY comment_id
> DESC LIMIT 5
>
> At this point, search engines will index two pages:
>   /comments
>   /comments?next=6
>
> OK, now the user adds a comment with id 11, the pages now will look
> like this:
>
> Page 1:
>   Comment 11
>   ...
>   Comment 7
>   Next page link: /comments?next=7
>
> Page 2:
>   Comment 6
>   ...
>   Comment 2
>
>   Next page link: /comments?next=2
>
> Page 3:
>   Comment 1
>
> Do you see the problem? For each comment added, search engines will
> pick up a new URL. Eventually there will be as many URLs in the index
> as there are comments (more or less, depending on how fast the users
> post comments and how often search engines crawl the website).
>
> In theory, those phantom URLs should be eliminated by search engines
> because they are orphans, that is no other pages on the website link
> to them. But in practice it takes awhile for search engines to remove
> such pages from the index. And while they wait, they can become non-
> orphans again (e.g. after each 5 comments posted).
>
> Does anyone have a solution for this?
>
> Thanks!
> Alex
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Google App Engine" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/google-appengine?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to