[Mnet-devel] Re: Mnet and Cp2pc
Myers Carpenter
myers at maski.org
Wed May 5 07:05:00 BST 2004
Ihor Kuz wrote (way back on 2003-10-19 21:26):
> Could you send me a quick summary of which cp2pc interfaces you've
> implemented for mnet and also if you made any changes and/or if you have
> any comments/criticisms about the Cp2pc interfaces?
Hey,
I've recently moved and been very busy at work and am only now coming
out of net hibernation. Sorry to take so long to respond.
I don't know if your still working on this project but I do have
comments, questions and ideas for CP2PC and Tristero.
Mnet does have some CP2PC calls and I'm adding more now. We plan on
having verison 0.7 out with a GUI that talks to the backend via xmlrpc
using the cp2pc spec.
Right now we have
int cp2pc.asyncPutFile(string fileURI, bool immediate, bool allow_cb)
int cp2pc.asyncGet(string fileURI, bool allow_cb)
Stuff we had to extend on:
# cp2pc.stat is not an call defined in the cp2pc spec, but the specs are
# not at all clear how statPutFile / statGet are supposed to work
struct cp2pc.stat(int asyncOpId)
This struct looks like (python syntax):
{
'type': 'get',
'filename': 'somefile.txt',
'description': 'Got 5 of 15 blocks',
'progressFraction': '0.15',
'progressBytes': '10',
'uri': 'mnet:xxxxxxxxxxxxxxxx',
}
description should be 'progressDescription' to be more in line with specs.
We really should rename what we call 'cp2pc.stat' to 'mnet.stat'.
I'm adding a simple triple based search engine, and thus I'm getting
into the tristero stuff now.
Also I have some questions/wishlist items:
* some defined way for a p2p backend to say what types of URI it can
handle. It maybe a list of statement in the "cp2pc:configuration" or
other database. This would allow clients that are connected to a bunch
of backends to route user request for a URI to the right backend.
* We want to expose stuff like: what is the software running this
backend, what version is it, what types of URI could I get/put, etc.
Where do you suggest putting that info? I thought "cp2pc:configuration"
is probably the best database to put it in, but it would be nice to have
the docs back that up.
* A backend autodiscovery protocol would be nice. I want to fire up
my CP2PC gui and have it find my mnet, freenet, and mldonkey p2p
backends and start getting status from them with no problems, and no
configuration. We do this by having mnet start on localhost:7080, and
if that's taken 7081, 7082 and so on. Our command line clients can
detect them all.
* You should point out in your docs that the best way to autheticate
users who should be allowed access to the backend will be via http auth.
Not some screwed up XMLRPC nightmare.
* a API call that can shutdown the backend.
* It should made clear when changes to the "cp2pc:configuration"
database are to go into effect, right away (so make a group of changes
with tristero.replaceAll(string uri, list oldList, list newList) ), or
after some other call is made.
* There should be a standard XMLRPC fault code for functions that
change the database in some way to say "you tried to change a readonly
value". Maybe there is some HTTP error code that says the same thing
and we could copy that?
* There are a lot of places in the spec where you seem to confuse C
structs with XMLRPC structs. E.G.:
> struct {
> boolean completed;
> /* fileURI */ string result;
> } statGet (operationID opid);
I would use a list here, where the first element of the list is a
boolean and the second a string.
* You need to exploit the power of hypertext in your docs. They could
increase the accessablity of these docs.
I'm looking forward to the world where other apps can access p2p
backends in a simple, unified way. I'm ready to get out and push to
make it happen.
Thanks,
myers
More information about the Mnet-devel
mailing list