<?xml version="1.0" encoding="utf-8" ?>
<?xml-stylesheet href="" type="text/css"?>

<Channel xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
         xmlns:dc="http://purl.org/dc/elements/1.1/"
         xmlns:dcterms="http://purl.org/dc/terms/"
         xmlns="http://purl.org/net/rss1.1#"
         xmlns:p="http://purl.org/net/rss1.1/payload#"
         rdf:about="http://valentinewebsystems.com">

    <title>Valentine Blog</title>
    <link>http://valentinewebsystems.com</link>

    

    <image rdf:parseType="Resource">
        <title>Valentine Blog</title>
        <url>http://valentinewebsystems.com/logo.png</url>
    </image>

    <items rdf:parseType="Collection">
        
        <item rdf:about="http://valentinewebsystems.com/2008/02/19/plone-repoze-and-buildout">
            <title>How to add repoze to your plone buildout</title>
            <link>http://valentinewebsystems.com/2008/02/19/plone-repoze-and-buildout</link>
            
            <p:payload xmlns="http://www.w3.org/1999/xhtml"
                       rdf:parseType="Literal"><p>There is no straightforward way to run plone, repoze and buildout yet, atleast not if you want to use a plone/zope version other than the one repoze.plone ships with. <a href="http://dev.plone.org/plone/ticket/7825">Chris McDonough has this ticket</a> assigned to him, so there will hopefully be an official and easy way soon. Until then this is how I got it to work.</p>

<p>
Buildout.cfg:

<pre>
[buildout]
parts = plone repoze zope2 instance addpath
eggs =
find-links = http://dist.repoze.org

[plone]
recipe = plone.recipe.plone

[zope2]
recipe = plone.recipe.zope2install
url = ${plone:zope2-url}

[repoze]
recipe = zc.recipe.egg
eggs =
     PasteScript
     WSGIUtils
     repoze.zope2
     deliverance
     ${plone:eggs}

[instance]
recipe = plone.recipe.zope2instance
zope2-location = ${zope2:location}
user = admin:admin
http-port = 8080
debug-mode = on
verbose-security = on
eggs =
    ${buildout:eggs}
    ${plone:eggs}
products =
    ${plone:products}

[addpath]
recipe = z3c.recipe.runscript
update-script = addpath.py:main
install-script = addpath.py:main
</pre>
</p>

<p>This is not that different from a normal plone buildout. What's new is [repoze] which installs paste, deliverance and repoze eggs and scripts to enable wsgi.</p>

<p>When you want to start the instance you can either start it the old way without enabling repoze or wsgi::
<pre>
  $ bin/instance fg
</pre>

or you can start with repoze and wsgi enabled::
<pre>
  $ bin/paster serve paste.ini
</pre>
</p>

<p>You need do add the paste.ini file to your buildout. The file says where it can find zope.conf, what server should run and what middleware should be in the wsgi pipeline.</p>

<p>Last in buildout.cfg there's an 'addpath' section, which is a little hack to come around the fact that repoze has a dependency on zopelib which is an egg with all of zope2. But here I want to use the version of zope that is officially supported for the current plone version instead of the version that comes with repoze. So addpath runs a script that adds 'parts/instance/lib/python' to the top of the egg listing in bin/paster. The result is that the compiled zope will be used instead of repoze's zopelib.</p>

<p>You can find a buildout with all necessary files in <a href="http://dev.plone.org/collective/browser/experimental.plonerepozebuildout">collective trac</a> or <a href="http://svn.plone.org/svn/collective/experimental.plonerepozebuildout">collective svn</a>.</p>

<p>
To make repoze/wsgi easier with buildout I think we would need to make a repozpe.zope2-like package without the plone and zope dependencies that repoze.zope2 currently has. Then you could pass 'extra_paths = ${zope2:location}/lib/python' to zc.recipe.egg and the compiled zope2 would be found. That would make [addpath] obsolete. This would be a first step to ease the use of repoze in buildout.
</p></p:payload>
            <dc:date>2008-02-19T15:41:12+01:00</dc:date>
            <dcterms:modified>2008-02-18T20:12:16+01:00</dcterms:modified>
            <dc:creator>terlegard</dc:creator>
            
            
            <dc:subject>zope</dc:subject>
            
            
            <dc:subject>repoze</dc:subject>
            
            
            <dc:subject>wsgi</dc:subject>
            
            
            <dc:subject>plone</dc:subject>
            
        </item>
        
        
        <item rdf:about="http://valentinewebsystems.com/2008/01/31/viewlets-in-grok">
            <title>Viewlets in Grok</title>
            <link>http://valentinewebsystems.com/2008/01/31/viewlets-in-grok</link>
            
            <p:payload xmlns="http://www.w3.org/1999/xhtml"
                       rdf:parseType="Literal"><p>I had a great time at the snow sprint. I paired with Martijn Faasen and Robert Marianski and we implemented viewlets for Grok. It's nearly finished. It is working, but it needs a few more tests before it will be merged to trunk.</p>

<p>This is what your viewlet code could look like:</p>

<pre>
class PortalHeader(grok.ViewletManager):
    grok.name('header')

class Logo(grok.Viewlet):
    grok.viewletmanager(PortalHeader)
    grok.template('logo')

    def update(self):
        self.willBeAvailableInTemplate = 8
</pre>

<p>A template that wants to render the 'header' viewlet would include this:</p>

<pre>&lt;div tal:content="structure provider:header" /&gt;</pre>

<p>I wrote a sample grok application, <a href="https://svn.valentinewebsystems.se/public/grokremoteinclude/">grokremoteinclude</a> , to make sure the grok viewlets were compatible with other zope3 packages dealing with viewlets. It's a buildout, running it will install the grok app, nginx and varnish. Read the README.txt for instructions how to get going. The application uses SSI which allows viewlets to be either cached or retrieved from another server. The same technique can be used in Plone which was <a href="http://valentinewebsystems.se/proof-of-concept-enabling-ssi-on-plone-3-portlets/weblogentry_view">recently reported</a> by Sasha Vincic.</p>

Viewlets in Grok are really nice - no zcml and no macros. The viewlets are in a seperate <a href="http://svn.zope.org/grok/branches/snowsprint-viewlets2">branch</a> if you want to try them out.</p:payload>
            <dc:date>2008-01-31T16:17:10+01:00</dc:date>
            <dcterms:modified>2008-01-31T13:42:09+01:00</dcterms:modified>
            <dc:creator>terlegard</dc:creator>
            
            
            <dc:subject>grok</dc:subject>
            
            
            <dc:subject>cache</dc:subject>
            
            
            <dc:subject>ssi</dc:subject>
            
            
            <dc:subject>zope</dc:subject>
            
            
            <dc:subject>plone</dc:subject>
            
            
            <dc:subject>snowsprint</dc:subject>
            
        </item>
        
        
        <item rdf:about="http://valentinewebsystems.com/2008/01/31/proof-of-concept-enabling-ssi-on-plone-3-portlets">
            <title>Proof of concept - enabling SSI on Plone 3 portlets</title>
            <link>http://valentinewebsystems.com/2008/01/31/proof-of-concept-enabling-ssi-on-plone-3-portlets</link>
            
            <p:payload xmlns="http://www.w3.org/1999/xhtml"
                       rdf:parseType="Literal"><p>Snowsprint 2008 is over for this year and many thanks to Lovely Systems and all participants.</p>
<p>
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 <a href="http://svn.zope.org/lovely.remoteinclude/">lovely.remoteinclude</a> which enables viewlets to be accessed through own unique urls and therefore cached separately. With nginx you can then use <a href="http://en.wikipedia.org/wiki/Server_Side_Includes">SSI</a>
(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.</p>
<p>
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 <a href="https://svn.valentinewebsystems.se/public/valentine.remoteinclude/">valentine.remoteinclude</a>
(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:</p>
<pre>&lt;!--#include virtual="/++contextportlets++plone.rightcolumn/++portlet++calendar" --&gt;</pre>
<p>
Together with Whit Morriss and help from Tim Terlegård(who made lovely.remoteinclude work with <a class="external-link" href="http://grok.zope.org/">Grok</a> viewlets) we set up a <a href="http://anacrusis.googlecode.com/">buildout</a>
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.</p>
<p>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.</p>
<p>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.</p>
<p align="right">Technorati Tags: <a class="performancingtags" href="http://technorati.com/tag/plone" rel="tag">plone</a>, <a class="performancingtags" href="http://technorati.com/tag/zope" rel="tag">zope</a>, <a class="performancingtags" href="http://technorati.com/tag/nginx" rel="tag">nginx</a>, <a class="performancingtags" href="http://technorati.com/tag/ssi" rel="tag">ssi</a>, <a class="performancingtags" href="http://technorati.com/tag/snowsprint" rel="tag">snowsprint</a></p>
</p:payload>
            <dc:date>2008-01-31T00:39:21+01:00</dc:date>
            <dcterms:modified>2008-01-31T00:36:47+01:00</dcterms:modified>
            <dc:creator>Sasha Vinčić</dc:creator>
            
            
            <dc:subject>cache</dc:subject>
            
            
            <dc:subject>ssi</dc:subject>
            
            
            <dc:subject>zope</dc:subject>
            
            
            <dc:subject>lovely</dc:subject>
            
            
            <dc:subject>plone</dc:subject>
            
            
            <dc:subject>snowsprint</dc:subject>
            
        </item>
        
        
        <item rdf:about="http://valentinewebsystems.com/2007/11/02/indexing-in-plone-got-twice-as-fast">
            <title>Indexing in Plone got twice as fast</title>
            <link>http://valentinewebsystems.com/2007/11/02/indexing-in-plone-got-twice-as-fast</link>
            
            <p:payload xmlns="http://www.w3.org/1999/xhtml"
                       rdf:parseType="Literal">
<p>First day of <a href="http://www.openplans.org/projects/plone-performance-sprint-2007">Perfomance sprint in Copenhagen</a> 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.</p>
<p><br />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 <a href="http://lists.plone.org/pipermail/sprints/2007-October/000326.html">md5 hash on ZCTextIndex</a> 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.</p>
<p><br />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) .</p>
<p><br />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 :)</p>
<p><br />NB! This fix is for trunk (plone 3.x) but me and others have the object_provides index in older Plones so please check<a href="http://dev.plone.org/plone/changeset/17779"> the diff</a> (<a href="http://dev.plone.org/plone/changeset/17778">see also</a>) and fix your indexes to get some speed.</p>
<p><br />Thanks to Nate at Jazkarta for sponsoring, we got a nice sushi delux meal for dinner yesterday.</p></p:payload>
            <dc:date>2007-11-02T10:43:29+01:00</dc:date>
            <dcterms:modified>2007-12-05T14:56:12+01:00</dcterms:modified>
            <dc:creator>Sasha Vinčić</dc:creator>
            
            
            <dc:subject>zope</dc:subject>
            
            
            <dc:subject>plone</dc:subject>
            
        </item>
        
        
        <item rdf:about="http://valentinewebsystems.com/2007/10/08/lovely-remotetask-available-for-zope-2-9-2.10">
            <title>lovely.remotetask available for Zope 2.9/2.10</title>
            <link>http://valentinewebsystems.com/2007/10/08/lovely-remotetask-available-for-zope-2-9-2.10</link>
            
            <p:payload xmlns="http://www.w3.org/1999/xhtml"
                       rdf:parseType="Literal">
<p>lovely.remotetask is a zope3 package for running asynchronous tasks. A service is running as a separate thread (not using any of zope's own threads). You define a class that performs a task. The task can be executed by adding it to the service (which adds it to its queue). It can look like this:</p>

<pre>   &gt;&gt;&gt; service = getUtility(ITaskService, name='LongRunningJob')<br />   &gt;&gt;&gt; service.add(u'exampletask', 'input to the task')</pre>

<p>The service will execute the task as soon as the other tasks in the queue are completed. The service and the task are registered as named utilities in zcml.</p>
<p>
lovely.remotetask is ported to Zope 2.9 and works on 2.10 as well. It depends on zc.queue which runs on 2.9/2.10 without modification. The code is found in <a href="http://svn.zope.org/lovely.remotetask/branches/port-for-zope29/">zope svn</a></p>

<p>The zmi (managing services and tasks) is not ported, but there is an example in svn that tells how to do it programmatically. Removing tasks can already be done in zmi as the utilities are added to the utilities folder in the site root.</p>

<p><a href="http://headnet.dk/">Headnet</a> sponsored this work.</p></p:payload>
            <dc:date>2007-10-08T17:20:17+02:00</dc:date>
            <dcterms:modified>2007-10-08T17:26:47+02:00</dcterms:modified>
            <dc:creator>terlegard</dc:creator>
            
            
            <dc:subject>zope</dc:subject>
            
            
            <dc:subject>plone</dc:subject>
            
        </item>
        
        
        <item rdf:about="http://valentinewebsystems.com/2007/10/07/so-many-good-speaker-at-the-plone-conference-2007">
            <title>So many good speakers at the Plone Conference 2007 and so little time</title>
            <link>http://valentinewebsystems.com/2007/10/07/so-many-good-speaker-at-the-plone-conference-2007</link>
            
            <p:payload xmlns="http://www.w3.org/1999/xhtml"
                       rdf:parseType="Literal">
<p><a href="http://plone.org/events/conferences/2007-naples"><img class="image-right" src="http://valentinewebsystems.se/images/logo-plone-conference.jpg/image_mini" alt="" /></a>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 <a href="http://plone.org/events/conferences/2007-naples/agenda/agenda">agenda</a> and as always it's hard to choose. First day we have Joel Burton's <em>Building  a humane CMS for Plone: updated tutorial</em> and Martin Aspeli's <em>Extending  and Customising Plone 3</em> that are colliding. I am really interested to hear what Alexander Limi has learned at Google, so <em>Simple and  effective techniques for better usability</em> is booked. If I choose Joel's talk I'll probably visit Geir Bækholt's <em>Portlets  in Plone 3</em>. On the second day I can recommend the talk <a href="http://plone.org/events/conferences/2007-naples/speakers-1/sessions/community-and-foundation-plones-past-present-future">about the foundation by Paul Everitt</a> but I am also very interested in Duco Dokter's <em>Plone for the enterprise market: technical musing on caching, Clustering and Single Sign-On</em> since this is the knowledge we need for big sites with Plone.</p>
<p>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.<br /><br />Oh one more thing don't forget <a href="http://plone.org/foundation/meetings/membership/2007/nominations/nomination-directions">board nominations</a> if you know anyone that should be on the board, even your self. Last day tomorrow Monday.<br /><br />See you at the conference.</p>
<p>/Sasha</p>
</p:payload>
            <dc:date>2007-10-07T16:33:45+02:00</dc:date>
            <dcterms:modified>2007-10-08T10:23:44+02:00</dcterms:modified>
            <dc:creator>Sasha Vinčić</dc:creator>
            
            
            <dc:subject>plone</dc:subject>
            
        </item>
        
        
        <item rdf:about="http://valentinewebsystems.com/2007/07/18/valentine-web-system-a-fresh-start">
            <title>Valentine Web Systems - a fresh start</title>
            <link>http://valentinewebsystems.com/2007/07/18/valentine-web-system-a-fresh-start</link>
            
            <p:payload xmlns="http://www.w3.org/1999/xhtml"
                       rdf:parseType="Literal">
<div><br />Around two years ago <a href="http://www.lovelysystems.com/">Lovely Systems</a> 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. <br /><br />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. <br /><br />From now on I am Mr Valentine working at Valentine Web Systems.<br /><br />/Sasha Vincic<br /><br /></div>
</p:payload>
            <dc:date>2007-07-18T23:19:45+02:00</dc:date>
            <dcterms:modified>2007-09-27T11:09:48+02:00</dcterms:modified>
            <dc:creator>Sasha Vinčić</dc:creator>
            
            
            <dc:subject>zope</dc:subject>
            
            
            <dc:subject>lovely</dc:subject>
            
            
            <dc:subject>plone</dc:subject>
            
            
            <dc:subject>valentine</dc:subject>
            
        </item>
        
    </items>
</Channel>

