Hello Oliver, Thanks for your special interest in XRPC! On Sun, Feb 25, 2007 at 05:32:50PM +0100, oliver oli wrote:
Hello,
good to know that it would be possible.
I just wonder why the protocol is so overly complicated.
You might need some time to get used to the protocol, but it is not extremely complicated. It might help if you keep this pattern in mind: call -> sequence -> sequence-item We have chosen this protocol, because we want to support the following features: 1. Loop-lifted RPC calls, ie. all RPC calls in a for-loop to the same destination are wrapped in *one* request message. Hence, we need a <call> tag to separate each iteration. This is the most important feature of XRPC. 2. Since a function can have multiple parameters, needless to say, we need something to separate the parameters, that is the <sequence> tag. We chose the name "sequence" because every value can be a sequence in XQuery. 3. We want to have full support of the XQuery language, which means that it should be possible to call functions that have sequence parameters. Thus we separate each item in a sequence with its type as tag name. This way, we also preserve the type information. If you have suggestions to improve the protocol, I will be very glad to hear!
For simple queries the overhead seems huge.
I agree that for simple queries, the space taken by the overhead can be larger than the space used to carry the parameters. But I'm actually not worried about this, because I think this phenomenon is common to all network protocols. The overhead is about 500Bytes, plus the overhead of a conventional HTTP header, there is still some place left for the parameters of simple queries, so that all these things will fit in one packet.
Would it be possible to use a RESTful style for xrpc?
Currently, the only item on the agenda, that is REST-style-alike, is retrieving an XML document stored in the DB using a special URL. For example, the following URL returns you "hello.xml" which has been shredded into your MonetDB/XQuery DB earlier: http://your.xrpcserver.host/xrpc/hello.xml The '/xrpc' redirect the request to a special handler which retrieves the document from the DB instead of from the FS. (Full) support of REST style at the server side will not be a short term issue. But I think a REST style request can be easily implemented at the client side, for example, by using JavaScript. It should be easy for JavaScript to trap the following request: http://your.xrpcserver.host/xrpc/person.xml/name and generate the desired XRPC request message. Regards, Jennie
Ying Zhang wrote:
Hello Oliver,
Thanks for your interesting in MonetDB/XQuery!
I think it would be possible to use XRPC as an alternative of Mapi. The only restriction is that built-in and in-line functions are not supported. The work around is just declaring those functions in an XQuery module.
Regards,
Jennie
------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ MonetDB-users mailing list MonetDB-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/monetdb-users