Dear Monks,
In order to have faster access to perlmonks, I have an idea to reduce the number of hits to the server, serving dynamic pages.

We have static pages at ThePen. Now when browsing perlmonks, we can make it be possible that whenever a node exists on 'thepen' site, we can link there if there are no threads updated recently for that node.

Similary whenever a request is made for a node at 'thepen' it could be check if that node is updated and the perlmonks.com page can be served.

Settings for alternative linking can be set in preferences. When you are interested in other nodelets on the page contineously, you can turn off this feature.

The idea is to get the latest content for items what you want to see, no matter how it is served.

artist

Replies are listed 'Best First'.
Re: Perlmonks Faster Access
by perrin (Chancellor) on Feb 21, 2003 at 18:06 UTC
    If we were going to cache the pages, it would be far simpler to do it without involving the pen. They could either be generated to disk regularly or cached with something like Cache::FileCache. However, I think you're forgetting about all the interactivity: nodelets, for example.

    You might want to look back at previous discussions about caching nodes and see what has been said before about it. It's certainly not the first time this has been suggested.

      Sorry, but couldn't find previous discussion on caching nodes perrin.

      Your stuff made it extremely easy. Once the user has selected the 'plain' mode, all the other nodelets can be turned off and the page served is what is cached at perlmonks, if that page has not changed. If that page has changed from the cached version, (timestamp comparison only) the new page from database get cached and is served. User can select 'full' mode to see all the nodelets and have full interactivity.

      The reason is that I think, lot of processing may be required to display the nodelets per user settings and that could be eliminiated in the case where user doesn't require them.

      artist

        There are other interactive bits; nodelets were just one obvious example. Read this thread for more discussion.

        What you're describing is basically what the software already does. It caches the data for nodes and checks to see if they have changed. That check requires querying the database. Remember, this system runs on a cluster, not a single machine.

Re: Perlmonks Faster Access
by LAI (Hermit) on Feb 21, 2003 at 16:13 UTC

    Kind of a neat idea, but I'd wonder about the added overhead of checking for new nodes. It would slow down access to pages with new nodes, and might not significantly increase speed on pages without.

    Update: I would very much like to see some benchmark numbers, because this could be a great idea.

    LAI
    :eof

      Benchmarking can tell the precision of the picture. In my opinion comparing timestamps would take much lesser time compared to generating the entire page from database.

      Also if that becomes an issue,

    • 'Thepen' nodes can be served with 'latest'-link which will point to the same node on perlmonks.
    • 'perlmonks' nodes can be linked to 'thepen' if 'live' setting is off.
      Now the live-feature turn on/off may be put on every page at the top instead of 'user settings' for easy accessibility. So user can choose the mode while visiting perlmonks. 'Live Off' mode will help to reduce the server load.

      The benefit this scheme will provide is to link static pages from the dynamic site, which we all log-on to. Also whenever any interactivity required (voting, polling) we can easily swith to 'live mode'.

      I can see that this idea has some similarity with 'emacs modes'.

      artist