Hi Christian I did try to write my ideas, but landed at reading what is REST and what not - and run out of time.
So here is draft of some of ideas - unfortunately without clear proposal for next action, but someone will probably take it over and move on.
Jan
JAX-RX and BaseX
- Aim - Summarize ideas and requests regarding JAX-RX interface of BaseX database - Topics - Mixing commands and queries in one request - Get and relevant post implementation without breaking compatibility - Are we REST like and do we need it? - What processing context we need - Typical Use Cases - Add document(s) and optimize - why -
Want to be sure, that indexes will be updated after collection has been modified and no one will have a chance to run a query on not optimized collection - Updating query and optimize - why -
Want to be sure, that indexes will be updated after collection has been modified and no one will have a chance to run a query on not optimized collection - Query with client defined timeout - why -
It is better to quit too long query then risking that one too expensive query would endanger overall server performance
There is no need to get query results too late, when our http connection already timed out - Set of independent simple expression queries - Mix updating and simple expression queries - Set of independent commands - why - Needing to run a batch of tasks, which cannot be interrupted by other clients - Ideas - add timeout parameter to each request - check, what other timeout-like parameters we may need - introduce new request element for POST, mixing queries and commands - Possible problems - compatibility with existing design - wish to pass query result into next command/query
2011/2/24 Christian Grün christian.gruen@gmail.com
OK, I understand, that REST allows to perform the (SET) command, but to
use
it with a query, I have to send the query in another, following, request. Will this second request keep enough context at the server side to know,
it
shall use that timeout?
Just recently, I've thought about extending the JAX-RX Interface to allow more than a single query or command, or to allow both commands and queries; regarding the syntax, this could be easily realized for the GET method:
http://localhost:8984/basex/jax-rx/factbook?query=1&query=2
http://localhost:8984/basex/jax-rx/factbook?command=set+timeout+1&query=...
On the other hand, I haven't decided yet how to best realize it for the POST method without giving up compatibility. One solution could be to introduce alternative "request" root elements:
<request xmlns="http://jax-rx.sourceforge.net"> <command> <text>set timeout 1</text> </command> <query> <text>//name</text> <parameter name="count" value="5"/> </query> </request>
What does everyone think? Christian _______________________________________________ BaseX-Talk mailing list BaseX-Talk@mailman.uni-konstanz.de https://mailman.uni-konstanz.de/mailman/listinfo/basex-talk