Since many applications of Freenet take quite a bit of time (adding to a
key-index, sending messages using think-cash etc). Fortunately most of
these are not time-critical, however the problem is that current clients
to do this tend to block, so you have to leave the client running for
quite a while (up to an hour) after an operation to allow it to
complete.
A better solution would be to have a server-side mechanism by which
clients could request a server to do something, but not wait until the
task is completed.
To do this, we would need to identify the basic time-consuming
operations common to such clients, such as [find the latest entry in a
list of keys of the form "key-1" "key-2" "key-3" etc], or the equivalent
search operation, and provide some form of server language which will
allow clients to request that a server do this.
This would have the additional benefit that it would allow clients to
outsource common operations. These could be enhanced with facilities
such as exponential searching, and using a DBR as an offset (perhaps
combined with a "average submissions per hour" to guess a good starting
place) to further reduce search time.
This *could* be provided as an extension of FCP and the XML-RPC
interface.
In these examples, a "stack" is a list of keys in Freenet, so a stack
called "freenet:KSK at xyz" would consist of the keys "freenet:KSK at xyz-1",
"freenet:KSK at xyz-2" etc. This stack may have a DBR offest placed in
"freenet:KSK at xyz-offset".
Example operations (expressed as Java methods) would be:
/** Gets Nth item in stack and places it in resultHolder **/
void fetch(String stack, int n, String resultHolder)
/** Gets last item in stack and places it in resultHolder **/
void fetchlast(String stack, String resultHolder)
/** Get a result **/
String getResult(String resultHolder)
/** Append a value to a stack **/
void append(String stack, String docToAppend)
/** Get the size of a stack (this value should be cached where
possible **/
void length(String stack, String resultHolder)
/** Request a callback when a resultHolder changes, the server will
connect to the requested host and port (may be a security issue?), and
send the name of the resultHolder, followed by a CR, followed by the
data in the resultHolder **/
void requestCallback(String resultHolder, String host, int port)
Thoughts?
Ian.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 232 bytes
Desc: not available
URL:
<https://emu.freenetproject.org/pipermail/devl/attachments/20010419/6b8d77ba/attachment.pgp>