Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Peter Duncanson 430 posts 1360 karma points c-trib
    Nov 15, 2011 @ 22:51
    Peter Duncanson
    0

    Umbraco as a data store not templating engine

    We are working toward a project at the minute where we are hoping to use Umbraco as the CMS but run it with our own MVC templating framework (Razor this time).

    The content is nested like so:

    Country 1
      L Region 1
        L Resort 1
          L Hotel 1
          L Hotel 2
          L Hotel 3

        L Resort 2
          L Hotel 4
          L Hotel 5
      L Region 2
        L Resort 3
          L Hotel 6

    etc.

    There is a lot already thought out to do with Caching and robustness, we can't rely on the CMS server being up for instance so we'll be caching the data to disk as well as memory. I wanted to keep each content item as separate document (XML/JSON) which we write to disk and then deserialise into a MVC Model object stored in memory.

    Here are the three options I've come up with so far:

    • Wire up to the on publish event to ping each server telling it new content is available. Each server can then request the new content at their leisure. 
    • Copy over the whole umbraco XML content file every 15 minutes or so to both servers, reload the content on each server when the file changes
    • Have a look into Umbraco's sync goodies which are built for just this but I assume the need Umbraco installed on each server which might not be an option.
    Anyone have any ideas on the best way to go, anyone done anything similiar?

     

  • Bo Damgaard Mortensen 719 posts 1207 karma points
    Dec 03, 2011 @ 17:44
    Bo Damgaard Mortensen
    0

    Hi Peter,

    I think this comes down to performance and workflow in Umbraco :-) Personally I would prefer to hook up to the events needed and then simply pass the node id to the servers. However, if the content is edited often and members are created/edited/deleted, access is being set up on nodes etc. etc., that makes for a whole lot of events. A complete overview of Umbraco events can be found here:

    http://our.umbraco.org/wiki/reference/api-cheatsheet/using-applicationbase-to-register-events/overview-of-all-events

    As for copying the whole XML content every 15 minutes, this could potentially cause some traffic if the content tree is large. I've done this for the members section with 500+ members once a day without any problems though :-)

    So, personally I would prefer of the event system to notify the servers about changes, if the content structure isn't that complex. I think performance would be better by using events because the servers only get pinged whenever the content is edited. Another plus is that you can be sure to display the new/right data.

    Hope this helps any, and feel free to correct me if I'm wrong in any of my statements!

    - Bo

Please Sign in or register to post replies

Write your reply to:

Draft