Midgard and style's attachments

24 November 2005

1 minute read

Arttu was exploring the advantages and disadvantages of the different ways of serving images and other remote files connected to a Midgard CMS layout. At first he switched from the legacy Aegir attachment server to the MidCOM attachment server:

After learning this I have been adapting the knowledge to multiple sites and they run a bit faster. It is not only that pictures are loaded, but MidCOM attachement services use also MidCOM cache engine. So, no more excessive loading of every picture and no more pictures left into binary space.

For even higher performance, the obvious solution would be to get the whole image serving out of Midgard and PHP space, and into regular Apache Document Root:

This of course makes it more diffucult - in a sense - to update CSS. But when a site is in production, there usually shouldn’t be need to update these elements constantly.

The main advantages are

doesn’t instantiate MidCOM every time an image or CSS file is loaded

can be over 20 times per hit to a single page, depending on the amount of pictures and CSS files

is browser cacheable

of course MidCOM cache also works nicely, but it still needed to be instantiated.

Piotras replied to this with the idea of using Midgard’s built-in feature of serving files attached to pages very efficiently:

And I wonder what is faster ( I mean someone’s work and page request time ) and easier?

The latter solution of using pages as the attachment server certainly sounds appealing for all style-related file serving needs. Now it is obviously quite difficult, but the upcoming page-based MidCOM will make it easier. Still, to make it work, the following would need to happen:

The new Style Editor Tarjei is working on should provide pages (site root page?) as the default storage location for style’s attachments

We must ensure the page-based attachment server sends all the correct caching headers

Continue reading

Midgard CMS switched to a synchronized release model this summer, and the first fruit of it is Midgard 8.09 Ragnaroek, a Long-Term Supported release launched last week: Ragnaroek LTS is a Long Term Support version of Midgard for which bug fixes and minor feature improvements will be supplied by the Midgard community for several years. It is recommended that all...

Yesterday Arttu Manninen posted notes on how to use git for MidCOM 3 development. In addition to the repo.org.cz usage he described, the other way to work on the next generation PHP framework for Midgard is using the GitHub service.
Rails on the Run has quite good tutorial.
Technorati Tags: midcom, midgard, git, github

About Midgard

Midgard2 is a content repository library that can be used in both web and desktop applications. It is built as by Midgard Project, an international free software community. I've been an active part of the group since its beginnings in late 90s.

Thanks to GObject Introspection, the Midgard2 content repository can be used from almost any programming language, including PHP, Python, and JavaScript.