Forum OpenACS Development: Unknown ad_proc

Collapse
Posted by Iuri Sampaio on
In the ad_proc site_node::get_url_from_object_id i have the following command

if { [nsv_exists site_node_url_by_object_id $object_id] } {
return [nsv_get site_node_url_by_object_id $object_id]
} else {
return [list]
}

what is nsv_exists and nsv_get?

There is no reference about them on API doc?

Collapse
2: Re: Unknown ad_proc (response to 1)
Posted by Claudio Pasolini on
Hi Iuri,

nsv_* are a set of Aolserver API. See http://www.aolserver.com/docs/devel/tcl/nsv-commands.html

Collapse
3: Re: Unknown ad_proc (response to 2)
Posted by Iuri Sampaio on
That was my thought at first.
But i didn't find anything on the aolserver API docs
http://www.aolserver.com/docs/devel/tcl/api/

Thanks a lot for the link Claudio

Collapse
4: Re: Unknown ad_proc (response to 2)
Posted by Iuri Sampaio on
Btw,

why does it use aolserver APIs instead?
I was expecting something like another ad_proc or even SQL queries.

Collapse
5: Re: Unknown ad_proc (response to 4)
Posted by Andrew Piskorski on
Iuri, since you've been using OpenACS since 2005, you must know that OpenACS uses and depends on AOLserver.  So just what are you trying to ask here?

The AOLserver nsv_* inter-thread communication commands are extraordinarily useful, one of the prime examples of what makes AOLserver (and multi-threaded Tcl in general) such a nice programming environment.  Good stuff.

Collapse
6: Re: Unknown ad_proc (response to 1)
Posted by Torben Brosten on
heh, I've been using openacs since.. well ACS 4, but still don't get the dynamics surrounding them. Yeah, it's been a problem when dealing with forms.

I found http://philip.greenspun.com/doc/README-NSV.txt

I assume it's an alternate way to pass data between pages instead of using the db.

Is there any other documentation available about their usage?

These function globally, right?

Collapse
7: Re: Unknown ad_proc (response to 1)
Posted by Torben Brosten on
Collapse
8: Re: Unknown ad_proc (response to 1)
Posted by Torben Brosten on
I remember why I don't program with them.

The nsv_* are temporary (are erased with server restart) and are not shared between clustered aolservers.

These are perfect for openacs internals, such as subsite parameters, but not recommended for ecommerce and other data that one wants to keep private and/or available even if the site goes down for a minute.