Re: [Zope] Zope Alternative

2006-11-13 Thread Jean-Marc Orliaguet



Hafeliel wrote:


If you could, please take a moment to surf on over to
http://zopereplacement.wikidot.com/




to understand the design choices made in zope, one could summarize its 
evolution as:


- a genuinely great idea that allowed to publish python objects on the 
web in a completely transparent way. That was revolutionary at the time 
compared to CGI programming.


then starting from here, the rest is mostly about fixing the original 
design in order to allow for:


- defining an automatic mapping between objects (and their methods) and 
published URLs


- protecting potentially hundreds of python objects from being accessed 
anonymously


- persisting the changes done on these objects

- finding objects in an object space that knows nothing about unique 
ids, indexation, and other query languages


- presenting these objects in a browser

ZODB, acquisition, DTML, ZPT, views, the 5 or 10 different security 
models, even zope3, are all attempts at solving these issues in one way 
or the other, each layer adding more complexity to the original stack.


Zope developers who have been there since the beginning know about of 
all the stacks, other programmers will probably stumble on some 
documentation about acquisition or ZClasses, some bobobase or principia 
archaisms... and will fail to make sense of it.


/JM











___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: database conflict errors

2006-06-29 Thread Jean-Marc Orliaguet

Tres Seaver wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Jonathan wrote:
  

- Original Message - From: "Tres Seaver" <[EMAIL PROTECTED]>


Jonathan wrote:
  

During recent load testing of a new application 3.1% to 7.6% of all
http requests resulted in conflict errors
(3.1% with 10 simultaneous users; 7.6% with 50 simultaneous users).

The conflict error occurs when the application attempts to write a
small image object into a temporary folder, and each conflict error
generates the same traceback:

ConflictError: database conflict error (oid 0x07, class
Products.TemporaryFolder.TemporaryFolder.SimpleTemporaryContainer)



I am running Zope 2.9.2 on CentOS 4.3 (linux).

Does anyone have any ideas as to what I could do to reduce/eliminate
these conflict errors?


First, make sure that your application is not trying to overwrite the
*same* image in each request.  If it needs to do that, then the
conflicts are unavoidable.

Next, making simultaneous writes into any naive container is going to
cause conflicts.  You need to think carefully about how you want those
writes to work, and plan to minimize conflicts:

 - Use a BTreeFolder, rather than a normal OFS.Folder (or derivative).

 - Arrange for the IDs of your images to be substantially different,
   typically by mangling in a random number (or, for instance, the
   microseconds value of the current timestamp).
  

The ids are assigned sequentially, so they never collide, but should id
be 'substantially different' to improve BTreeFolder2 performance?



Sequential IDs can be problematic:  they lead to many more bucket splits
(and therefore conflicts) in the BTree.  Adding some "entropy" (like a
random number or the milliseconds of the time) *earlier* in the key than
any sequence number, will help keep splits down to a minimum.

  


that's interesting. I did a test once to see what effect it would have 
to add objects with a completely random id to a BTree folder (OOBTree in 
that case) instead of using the object's type nam and add a number at 
the end - and the result was the opposite in term of read performance. 
Looking up keys was much faster if the ids followed a pattern like:


- something-1
- something-2
...

I will try again.

/JM

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: filter messages at startup

2006-06-13 Thread Jean-Marc Orliaguet

Florent Guillaume wrote:

thomas desvenain wrote:
i mean i would like to filter warning/error messages that appears in 
console

when starting zope server or debugger
in order to ignore those i'm not interested with for the moment

for instance :

[EMAIL PROTECTED] tests]# /zope/test/bin/zopectl debug
Starting debugger (the name "app" is bound to the top-level Zope object)
2006-06-13 13:48:34 WARNING Init Class
Products.CMFCore.PortalContent.PortalContent has a security 
declaration for

nonexistent method 'manage_FTPget'
2006-06-13 13:48:34 WARNING Init Class
Products.CMFCore.PortalContent.PortalContent has a security 
declaration for

nonexistent method 'manage_FTPget'
etc


Not out of the box.

But these warnings are symptoms of a problem: you should really 
upgrade CMF though, which fixes those.


Florent




I get these messages on fields too, under Five for zope3 classes:

2006-06-13 17:49:52 WARNING Init Class cpsskins.standard.ds.html.HTML 
has a security declaration for nonexistent method 'html'


with:

class IHTML(Interface):
   """Plain HTML
   """
   html = TextLine(
   title=_(u"HTML"),
   description=_(u"Plain HTML content."),
   required=False,
   )

class HTML(object):
   """Plain HTML content
   """
   implements(IHTML)


it seems that zope2 believes that these are methods.

/JM


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Leave the ivory tower now!

2006-01-08 Thread Jean-Marc Orliaguet

Greg Fischer wrote:

Yes, we need hype!  And a "hot" looking site, WITH Web 2.0 features. 

Many of these frameworks are providing AJAX capabilities, simple 
graphics and data/object access without page reloads.  (like I am 
using with Dojo right now)  What does Zope not provide these features 
"built-in"?


And yes, about the central docs.  A ton of info is available right on 
Zope.org , but I always find more on individual blogs 
or other google searches.  Zope.org  could use a more 
intuitive help finder maybe.  Actually, how aboot a Zopedigg?  Diggs 
on just Zope articles and such, with comments?  That would be hot!  
Better and easier than a wiki, IMHO.  The one thing I would say is, 
from my perspective, when I have info to share on Zope work I have 
done, I like to post on my blog or site, not Zope's. Because I like to 
provide a demo or maybe include things *my* way.  Having a ZopeDigg 
would allow us to post our work in a central repository, and look a 
little flashy too.


The video tutorial should be made.  Like RoR and Symfony-project 
have.  It shows beginners how easy something is to do.  And they will 
download it.  I did. 

Also, I know this will get some people flaming probably, but Zope 
needs more hype for DTML. I KNOW!  99% of you hate it.  But every time 
I show someone how to do it, their eyes light up.  It's very simple 
coming from ASP or PHP, once you see it in action.  ZPT is just plain 
confusing to me.  I hate to say this too, but I am doing much more in 
PHP these days, partly due to the fact that there exists a large "dtml 
sucks" attitude in the community.  And even though it has been said 
that DTML is not going away, if there is no hype about it, then it 
might.  And I don't want to keep using Zope without it. Yes, yes, I 
know DTML has many disadvantages, but it also has many advantages.  I 
wish there were more hype about it. 

So, here's a big "wish" of mine too.  What if Zope was a *complete* 
framework, including a web based IDE?  I dont mean the ZMI, which is 
hot in itself, but a full featured AJAX-ish IDE, built upon Zope. Drag 
and drop widgets and properties even. It would also have full database 
access built in. Mysql, Mssql, Oracle, Postgresql, all ready to go, 
without needing to purchase and configure a database adapter.  This 
would provide a web based, development framework like .NET using 
Visual Studio.  Only this would work on Zope, and therefore would run 
on Linux OR Windows!  It doesnt have to be so comprehensive like VS, 
but simple form editor with properties and XMLHTTPRequest capability 
would be great.  I think we would have a KILLER APP!


Well, maybe I am dreamin?  Just thought I'd give my 2 cents.



Hi! concerning the web based IDE I'm currently working on something like 
what you describe for Zope3.


You should get on the z3lab-list.  You can also get a blog on z3lab.org 
and post flash animations:

http://www.z3lab.org/
http://lists.nuxeo.com/mailman/listinfo/z3lab

Regards
/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Java vs Zope

2006-01-06 Thread Jean-Marc Orliaguet


Here is a document that explains why scripting languages are better than 
"system programming languages" (like C, C++, Java) for creating large 
scale applications, for gluing components together,  thanks to weak typing:


http://home.pacbell.net/ouster/scripting.html

this too might be interesting to look at.
http://www.ferg.org/projects/python_java_side-by-side.html

PS: there's nothing "negative" in the term "scripting language".

/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Javascript obfuscator and Zope

2006-01-04 Thread Jean-Marc Orliaguet

Peter Bengtsson wrote:


It's not a Zope product but at least it's python.
http://www.issuetrackerproduct.com/Download#slimmer

It's basically a javascript whitespace optimiser
Compare
http://real.issuetrackerproduct.com/tw-sack.js
with the original:
http://www.issuetrackerproduct.com/tw-sack.js

More work can be done of course but I wanted to keep it relatively CPU fast.
It works on CSS and HTML too:
http://www.peterbe.com/stylesheet.css

 



there is "minjs" written in C too: 
http://www.crockford.com/javascript/jsmin.html


this is a one-way process though, and this should also be compared with 
the effect of compressing files while serving them.


/JM


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Human validation in zope/python

2005-12-07 Thread Jean-Marc Orliaguet

Robert Boyd wrote:


On 12/7/05, Ed Colmar <[EMAIL PROTECTED]> wrote:
 


Hey All

I'm wondering if anyone has a module that will generate the randomized
images that are so common these days in registration forms to verify
that the user is a human.  Or, alternativly, other strategies to block
spamming of registration forms by bots or other automated methods.
   



Search the list - this came up before. I recall pycaptcha
http://sourceforge.net/projects/pycaptcha
http://freshmeat.net/projects/pycaptcha/

IIRC, when I downloaded it I ran into some problems running it.
Indeed, the demo site for it has an ImportError.

Rob
 



I'd use Python Imaging Library or PythonMagick to create some random 
text and apply some filters on it.


http://www.pythonware.com/products/pil/
http://starship.python.net/crew/zack/pymagick/

/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Python Classes and Zope.

2005-12-06 Thread Jean-Marc Orliaguet

Dario Lopez-Kästen wrote:


Florent Guillaume wrote:


Paul Winkler wrote:


On Fri, Dec 02, 2005 at 04:12:01PM +0100, Jean-Marc Orliaguet wrote:

does zope2 do an access control based on acquisition for public 
methods, that would be a waste of resources since the answer is 
always "yes, granted" ?



Well, the thing is, the declaration that makes the method public
*has no effect* unless your class participates in acquisition.




That's not true. The objects of this class will be perfectly 
accessible to a restricted user:


  from AccessControl import ClassSecurityInfo
  class MyStuff(object):
  security = ClassSecurityInfo()
  security.declareObjectPublic()
  security.setDefaultAccess('allow')
  def foo(self):
  return 'bar'
  InitializeClass(MyStuff)



In Zope 2.7.8 I get a segmentation fault when I try to do the above; I 
also have the following code that manages this for any class (to avoid 
having to do that for every single class):


def _ZopifyClass(a_class):
a_class.security = ClassSecurityInfo()
a_class.security.declareObjectPublic() # Segmentation fault
security.setDefaultAccess('allow')
InitializeClass(a_class)

I cannot swithc to Zope 2.8 because my code runs in PLone 2.05 and it 
does not work with Zope 2.8.


The segmentation fault occurs in the declareObjectPublic() statement.

Is there a fix for the Zope 2.7 to this problem?

Thanks.

/dario




that's because it does not seem to work with new-style python classes in 
zope2.7


it works with:

class MyStuff:

  instead of:

class MyStuff(object):

This is what you would have got:

 File "/opt/Zope-2.7/lib/python/AccessControl/SecurityInfo.py", line 
165, in apply

   dict['%s__roles__' % name] = access
TypeError: object does not support item assignment

if you'd run it without the extra call.

now, the question is if it's worth the extra effort.

/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: Python Classes and Zope.

2005-12-06 Thread Jean-Marc Orliaguet

Dario Lopez-Kästen wrote:


Florent Guillaume wrote:


Paul Winkler wrote:


On Fri, Dec 02, 2005 at 04:12:01PM +0100, Jean-Marc Orliaguet wrote:

does zope2 do an access control based on acquisition for public 
methods, that would be a waste of resources since the answer is 
always "yes, granted" ?



Well, the thing is, the declaration that makes the method public
*has no effect* unless your class participates in acquisition.




That's not true. The objects of this class will be perfectly 
accessible to a restricted user:


  from AccessControl import ClassSecurityInfo
  class MyStuff(object):
  security = ClassSecurityInfo()
  security.declareObjectPublic()
  security.setDefaultAccess('allow')
  def foo(self):
  return 'bar'
  InitializeClass(MyStuff)



In Zope 2.7.8 I get a segmentation fault when I try to do the above; I 
also have the following code that manages this for any class (to avoid 
having to do that for every single class):


def _ZopifyClass(a_class):
a_class.security = ClassSecurityInfo()
a_class.security.declareObjectPublic() # Segmentation fault
security.setDefaultAccess('allow')
InitializeClass(a_class)

I cannot swithc to Zope 2.8 because my code runs in PLone 2.05 and it 
does not work with Zope 2.8.


The segmentation fault occurs in the declareObjectPublic() statement.

Is there a fix for the Zope 2.7 to this problem?

Thanks.

/dario



is it a typo, or did you mean:

a_class.security.setDefaultAccess('allow')

?
/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Python Classes and Zope.

2005-12-02 Thread Jean-Marc Orliaguet

Paul Winkler wrote:


On Thu, Dec 01, 2005 at 09:04:11PM +0100, Jean-Marc Orliaguet wrote:
 


You need to call InitializeClass on your object, and that's it.

cf http://www.upfrontsystems.co.za/courses/zope/ch04.html

under "Zopifying our Python classes"
   



initializeClass() only helps if the class you feed it
inherits from Acquisition.Implicit or Acquisition.Explicit,
and has some security declarations in it.

 



for protected methods, but what if your methods are public?

http://www.zope.org/Wikis/DevSite/Projects/DeclarativeSecurity/ZopeSecurityForDevelopers/wikipage_view


- It is important to note what can and cannot be protected using the 
|SecurityInfo| interface. First, the security policy relies on 
/Acquisition/ to aggregate access control information, so any class that 
needs to work in the security policy must have either 
|Acquisition.Implicit| or |Acquisition.Explicit| in its base class 
hierarchy.


- if the object has a security assertion that it is /public/ then access 
will be granted



does zope2 do an access control based on acquisition for public methods, 
that would be a waste of resources since the answer is always "yes, 
granted" ?


/JM


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Python Classes and Zope.

2005-12-01 Thread Jean-Marc Orliaguet

Dario Lopez-Kästen wrote:


Andreas Jung wrote:




--On 1. Dezember 2005 13:46:55 -0200 Fernando Lujan 
<[EMAIL PROTECTED]> wrote:



There's a way to use a Python class inside zope?

For instance, if I create the class:

class MyClass:
 "A simple example class"
 i = 12345
 def f(self):
 return 'hello world'

Can I invoke the following code inside a Python Script?

x = MyClass()
x.f()



PythonScripts are for *scripting* not for implementing complex
logic and for programming tasks that require classes. PythonScripts 
don't provide full Python functionality that why were are talking of 
*Restriced Python*. Consider writing your functionality as Python 
product.



all moral lessons aside, there are several use cases where access to 
*objects*, passed to zope2 from external packages and modules, is 
desirable.


Most, if not all examples, out there assume that the external 
packages/modules/classes can freely be converted to Zope-classes.


Now, assuming that I have not missed something fundamental, the 
problem the way I see it, is that when my Product recieves an object 
from the non-zope code, the object does not know anything about Zope, 
it is just a happy Python-object.


But in order to even display it in a zpt I must transmogrify it into a 
special zope-object, and *that* is not so easy as I have discovered.


In my case I am not so interested in importing the moduels or classes 
into a Script(Python) - I have allready passed the objects in question 
thtough my product, but still I get some "Zope Does Not Allow That" 
error.


So far I have not had any success with anything else than writing 
special methods in my Classes that converts the objects to 
dictionaries before passing them to the zpt or Script(Python) in 
question.


But that feels like a very awkward way of doing things, and it makeas 
it *very* difficult for Zope to be a nice player with non-zope objects.


My 2 €-cents worth.

/dario



You need to call InitializeClass on your object, and that's it.

cf http://www.upfrontsystems.co.za/courses/zope/ch04.html

under "Zopifying our Python classes"

/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
http://mail.zope.org/mailman/listinfo/zope-announce

http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] passing the parameters to zsql method

2005-10-27 Thread Jean-Marc Orliaguet
Dario Lopez-Kästen wrote:

> Jean-Marc Orliaguet wrote:
>
>> Dario Lopez-Kästen wrote:
>>
>>  
>>
>>> Denis V. Gudtsov wrote:
>>>
>>>   
>>>
>>>> DLK> use an intermediary Script (Python), ie:
>>>> [..skipped..]
>>>>
>>>> Thank you. But, can i do this without using python? From zpt -> to
>>>> zsql?
>>>>
>>>>
>>>>
>>>> 
>>>
>>
>>
>> Just curious too: isn't there an easier way of doing this using schemas
>> / widgets / SQL adapters?
>>
>> or are the zsql scripts so very specific that they do more than simple
>> schema mappings?
>>
>>  
>>
> all of this sound way more complex that 1 script, 1 zpt and 1 zsql...
>

sure, but I meant to avoid duplicating code. The 1 script, 1 zpt and 1
zsql guys are really one-trick ponies.

/JM

___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] Re: CPSSkins perfs

2005-09-23 Thread Jean-Marc Orliaguet
N.Davis wrote:

> Jean-Marc Orliaguet wrote:
>
>>
>> Hi!
>>
>> I usually don't read the posts on zope-list,  but I found this one:
>> http://mail.zope.org/pipermail/zope/2005-September/161330.html
>>
>> sorry this is a bit old, but ...
>>
>> M. Davis, what are your benchmark figures based on?
>>
>> I just ran a quick benchmark on Plone's front page and found:
>>
>> siege -v -r 10 -c 1 http://localhost:8080/plone
>> ** siege 2.61
>> ** Preparing 1 concurrent users for battle.
>> The server is now under siege...
>
> Jean-Marc,
>   Hello. To be honest I didn't actually benchmark this scientifically.
> So very sorry if I did a bad thing and made a statement against the
> performance of CPSSkins that is not actually true.


Hi Nick!

Again I think that you are assuming things...

>
>   I liked the look of CPSSkins, but looked into it a bit and thought,
> this does too much , its too clever. That means the rendering is more
> complex which will hit performance. Also a sophisticated product is
> possibly more likely to break doing a migration such as to Plone 2.1. 


the support for plone2.1 will be available soon, when I get the time to
do a release. The actual changes to support plone2.1 are trivial,
basically small API changes and a new template for the preference panel.
They are summarized here:
http://svn.nuxeo.org/trac/pub/changeset/24294

So If plone2.1 was to cause CPSSkins to break it would also break the
hundreds of thousands of sites that have customized the plone skins.

> Its a more complicated product to maintain perhaps. Thats not entirely
> scientific either because something well-written by good programmers
> who understand Plone well may be more "migration-proof" than a simpler
> but sloppier-written Product. But I take an attitude that while
> Zope/Plone is great, a certain amount is still bleeding edge and
> brittle, so don't try to be too clever. My colleague got burnt by
> pushing the limits of a bleeding edge version of Archetypes (1.2.5).
> We're still struggling to migrate to 1.3.4. On the other hand some
> people need to push the limits in order that advanced features get
> their bugs found and fixed.

I think that I usually spend about 1 hour a month on the Plone version
of CPSSkins, keeping up with the changes in Plone. CPSSkins works on
CMF, CPS, plone so 95% of the code is completely independent of Plone.
The only part that needs to be updated are the skins located in 
http://svn.nuxeo.org/trac/pub/browser/CPSSkins/trunk/skins/cpsskins_plone2/

>   Plone performance tuning is something I need to learn more about
> when I get time. If a Product can perform well with tuning thats great
> but it can be an issue if its default behaviour is a performance hit
> and it therefore imposes a performance tuning requirement. (Not
> implying that this is true of CPSSkins).


the biggest performance hit in plone comes from the fact that the
product relies too much on zope page templates, which 1) where not
designed to be cached by fragments 2) they use methods located in user
space (python scripts, etc) and 3) the page template architecture needs
to get  all the parts rendered before the entire page can be displayed,
so if one little portlet on the page takes 2 seconds to be render, it is
the entire page will take 2 seconds to render. It is very difficult to
isolate the slowest parts of the rendering chains.

>   I guess what you're saying is you do not believe there are
> performance issues with CPSSkins, and you have evidence of a least one
> situation to back this up.
>   So, I don't mean to cast aspersions, and I would still consider
> looking into using CPSSkins in the future.  :-)
> Regards
> Nick


by design, the performance issues are tackled completely differently,
since there are possibilities to cache page fragments. But again the
Plone version of CPSSkins is one year behind the CPS version because the
portlet caching architecture is missing in Plone. I don't know about
PlonePortlets, but last time I tried they worked in CPSSkins.

best
/JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


Re: [Zope] JSON for Ajax applications

2005-09-23 Thread Jean-Marc Orliaguet
Max M wrote:

> I don't know how many has seen this, but it's pretty cool.
>
> JSON (JavaScript Object Notation) is a lightweight data-interchange
> format.
>
> http://www.crockford.com/JSON/index.html
>
> It is used for Ajax applications to transfer data instead of xml. It
> uses repr() versions of standard python objects like dicts, lists,
> string, numbers etc. to transfer data.
>
> It is really simple to generate for Python programmers, so it is very
> simple to use in Zope too.
>
>

this is used at 100% and more in cpsskins for Zope3 (cf. z3lab.org). You
might also have a look at Jim Washington's 'jsonserver' for Zope3 and
its implementation for Zope2 http://zif.hill-street.net/jsonserver

/JM


___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )


[Zope] CPSSkins perfs

2005-09-21 Thread Jean-Marc Orliaguet


Hi!

I usually don't read the posts on zope-list,  but I found this one:
http://mail.zope.org/pipermail/zope/2005-September/161330.html

sorry this is a bit old, but ...

M. Davis, what are your benchmark figures based on?

I just ran a quick benchmark on Plone's front page and found:

siege -v -r 10 -c 1 http://localhost:8080/plone
** siege 2.61
** Preparing 1 concurrent users for battle.
The server is now under siege...
...

done. 

Transactions:  10 hits
Availability: 100.00 %
Elapsed time:   2.43 secs
Data transferred: 258630 bytes
Response time:  0.24 secs
Transaction rate:   4.12 trans/sec
Throughput:106432.10 bytes/sec
Concurrency:1.00
Successful transactions:  10
Failed transactions:   0
Longest transaction:0.29  <
Shortest transaction:   0.23 <



then installed CPSSkins, replaced the calendar portlet with a calendar
templet and placed it in the cache and I got:

siege -v -r 10 -c 1 http://localhost:8080/plone
** siege 2.61
** Preparing 1 concurrent users for battle.
The server is now under siege...
...
done. 

Transactions:  10 hits
Availability: 100.00 %
Elapsed time:   2.00 secs
Data transferred: 247360 bytes
Response time:  0.20 secs
Transaction rate:   5.00 trans/sec
Throughput:123680.00 bytes/sec
Concurrency:1.00
Successful transactions:  10
Failed transactions:   0
Longest transaction:0.23   <-
Shortest transaction:   0.19  <--


which makes Plone with CPSSkins faster than Plone without CPSSkins by
caching just one portlet. And this is still far above the figures you
can get by caching all portlets (cf. CPSPortlets), in that case a
request will not take more than 0.1 seconds to complete.

Also, putting most of the page content in the RAM cache has made it
possible on sites with a lot of access to minimize the zope-2.7 read
conflict errors which has now be solved in zope-2.8.

regards /JM
___
Zope maillist  -  Zope@zope.org
http://mail.zope.org/mailman/listinfo/zope
**   No cross posts or HTML encoding!  **
(Related lists - 
 http://mail.zope.org/mailman/listinfo/zope-announce
 http://mail.zope.org/mailman/listinfo/zope-dev )