Personal tools
You are here: Home Valentine Blog Authors vincic

Sasha Vinčić

Proof of concept - enabling SSI on Plone 3 portlets

by Sasha Vinčić — last modified Jan 31, 2008 12:36 AM
Categorized with

Snowsprint 2008 is over for this year and many thanks to Lovely Systems and all participants.

Since Lovely Systems has deployed some fast sites I was eager to see if I could reuse some of it with Plone. One of the products was lovely.remoteinclude which enables viewlets to be accessed through own unique urls and therefore cached separately. With nginx you can then use SSI (server side include) to assemble the page instead of doing it all in Plone. The lovely.remoteinclude hooks up adapters for all IIncludableViews if they send the event zope.contentprovider.interfaces.IBeforeUpdateEvent. The adapter then checks if the view is called from within a page or directly. If it is called within a page the render method is changed so it renders the url to the view, and when called directly, no changes are made.

My task was to try to make Plone portlets accessible through urls. This was little bit harder then just marking the PortletManager and PortletRender with IIncludableView since they where not normal viewlets or viewlet mangers and there was no acquisition in portlets. Anyway after some pair programming with Tom Gross we managed to create a package valentine.remoteinclude (we didn't dare to name it plone.remoteinclude). This package is a proof of concept that lovely.remoteinclude can be used on Zope2 and Plone. It will provide urls for portlets that are available on the plone root. While we were learning the plone portlet machinery we found the namespace ++contextportlets++ which we reused to generate urls for our portlets. We also added a namespace for portlets since the ++viewlet++ didn't work for plone portlets. An url to a default calendar portlet will look like:

<!--#include virtual="/++contextportlets++plone.rightcolumn/++portlet++calendar" -->

Together with Whit Morriss and help from Tim Terlegård(who made lovely.remoteinclude work with Grok viewlets) we set up a buildout that will build a nginx and a varnish prepared for SSI and lovely.remoteinclude. The templates were made from a configuration provided by Lovely Systems. With this buildout and the valentine.remoteinclude enabled on a plone trunk builout we where enable to render a normal plone page where nginx assembled the calendar portlet with the rest of the page.

Tom and I couldn't figure out how to get the information from a portlet from which context the "mapping" (portlet storage) and then the portlet was fetched we where not able to generate urls for context specific portlets other then the root. This information seems to be hidden by the PortletFetcher in Plone. Ideas on how this could be solved are welcome.

With your help I think we can create a good SSI solution for Plone which would enable us to include structure and content in the page from different servers and have it assembled before sent to the user. This would be one step in the direction of using the right tool for the job and not put everything in Plone.

Technorati Tags: , , , ,

Indexing in Plone got twice as fast

by Sasha Vinčić — last modified Nov 02, 2007 10:43 AM
Categorized with

First day of Perfomance sprint in Copenhagen has passed and it really feels like we all have gotten productive from the start. 10 of us are seating at Symbion where Headnet is located and we have two remote sprinters.


Me and and Matt Hamilton started to work on improving the speed of cataloging while you move/rename a tree of objects. Matt had already an idea about using md5 hash on ZCTextIndex which in a quick test gave 30% speed improvement when you edit a document but don't change the body. But when we renamed objects we didn't get this improvement because the object got unindexed and then indexed on the new path so we tried do some magic in ObjectWillBeMovedEvent which would move the index in catalog for this object to the new path instead of unindexing and then get reindexed on ObjectMovedEvent instead of clean index. This way we could benefit from our speed improvement with md5 since the body isn't changed.


This was quickly done and the profiling after this indicated that object_provides indexing is taking way too long. We found out that the calls to zope.component.interface.interfaceToName was to be blamed for this. We tried some simple caching on it with plone.memoize and yeah! We slashed the indexing time by half on rename on a site with 300 random content objects! We let Martijn Pieters take a look at the method and why it was so slow just for an interface name. He found out that Plone really shouldn't use this for object_provides since it was there for a specific use case (I hope Martijn can comment on which) .


Martijn commited the fix, so current plone trunk has an indexing that is twice as fast as yesterday. This commit does not include the magic on ObjectWillBeMovedEvent and md5 so expect more speedups :)


NB! This fix is for trunk (plone 3.x) but me and others have the object_provides index in older Plones so please check the diff (see also) and fix your indexes to get some speed.


Thanks to Nate at Jazkarta for sponsoring, we got a nice sushi delux meal for dinner yesterday.

So many good speakers at the Plone Conference 2007 and so little time

by Sasha Vinčić — last modified Oct 07, 2007 03:40 PM
Categorized with

Time for the annual Plone Conference and I must say I am very happy to see how the preparations are done. Looks like we will have a great conference and probably the largest one. Two days before the trip I looked through the agenda and as always it's hard to choose. First day we have Joel Burton's Building a humane CMS for Plone: updated tutorial and Martin Aspeli's Extending and Customising Plone 3 that are colliding. I am really interested to hear what Alexander Limi has learned at Google, so Simple and effective techniques for better usability is booked. If I choose Joel's talk I'll probably visit Geir Bækholt's Portlets in Plone 3. On the second day I can recommend the talk about the foundation by Paul Everitt but I am also very interested in Duco Dokter's Plone for the enterprise market: technical musing on caching, Clustering and Single Sign-On since this is the knowledge we need for big sites with Plone.

I'll probably end up changing my mind several times during the days and one or two regrets missing some talks but I hope it will be a nice time like all other conferences and a chance to meet friends.

Oh one more thing don't forget board nominations if you know anyone that should be on the board, even your self. Last day tomorrow Monday.

See you at the conference.

/Sasha

Valentine Web Systems - a fresh start

by Sasha Vinčić — last modified Sep 27, 2007 08:54 AM
Categorized with

Around two years ago Lovely Systems was founded. Jodok, Manfred,Michael and I shaked hands at the Plone conference in Vienna. When we founded Lovely Systems we had two companies one in Austria and one in Sweden, Lovely Systems Sweden.

We have seen a great success story been developed in Austria. It is unbelievable how great Zope is and what the guys in Austria do with it. I really wish I could have been there with them, but due personal reasons I can't and to not hold them back in their success we have decided that lovely sweden will change its name. I really wish them good luck and look forward working with them in the future.

From now on I am Mr Valentine working at Valentine Web Systems.

/Sasha Vincic