Forum OpenACS Q&A: Re: Res: Re: Res: Re: Lazy site node caching

Collapse
Posted by Malte Sussdorff on
package_id_from_package_key makes a round trip to the site node cache to figure out the package_id. Not sure why, but thats how it is. You can easily circumwent this by changing the way xotcl requests the package_id or by running site_node::update_cache with the node_id of the object = package_id from the request processor on initialization of the request processor.

I dont have a checkout of LORSM from 5.2, but in HEAD I could not find anything which could cause this behaviour. If you could specify the error a little bit larger (not only this message but the whole text from the error log) then i might be able to help more.

In general there should be no direct nsv call to the site node. In HEAD it is done using site_node::get_url_from_object_id and this should work just fine (at least the procedure should be unable to fail), but maybe you have a culprit there.

Hi Malte!

We are working in our production cluster with your code
with some small mods. The speed are very increased.
Thanks!

We have since 400 concurrent connections.
If anybody want to know how is our system:

http://aulavirtual.uv.es/ficheros/view/imagenes%5C/CLUSTER_AulaVirtual_pub.gif

NOTES:

Another patch (line 360, site-nodes-procs.tcl):
db_foreach $query_name {} {
if {$parent_id eq ""} {
# url of root node
set url "/"
} else {
# append directory to url of parent node
if { [info exists url_by_node_id($parent_id)] } {
set url $url_by_node_id($parent_id)
} else {
set url [db_string snid {select site_node__url(:parent_id)} -default ""]
}
append url $name
if { $directory_p eq "t" } { append url "/" }
}

Regards,
Agustin

THis is excellent news Agustin. If you have the time maybe you can patch the file in CVS HEAD directly and upload it? This would be great.

.LRN Honchos. Is it okay to include the patch above in 5.3 or should I only commit this to the HEAD version of .LRN?

Collapse
Posted by Gustaf Neumann on
changed lookup of package_id from package key such it does not need the site nodes in xotcl-core (cvs HEAD).