[DS-1696] DSpace REST API built in JERSEY #323
I have built a REST-API for DSpace, built using JAX-RS1 (JERSEY).
It has support for endpoints:
It gives responses in JSON, XML, and for a rare-few HTML. (Set your Accept header accordingly)
What are the surprises?
This is all in [dspace-source]/dspace-rest.
As this is still code that is being improved from time-to-time, feel free to review, give feedback, or fix it yourself.
Just fixed it to pass the tests (license header, and then a non-existent dspace-rest.jar was being requested...).
For manual testing, I am using the Play! app I wrote, customized for this flavor of the API. Its essentially a mock-UI that gets all of its data solely via REST.
Once I figure out where I can host this JERSEY-REST-API, then I'll put up both this API, and the Play! app.
Also, Chrome Extension "Advanced Rest Client" has been useful in testing endpoints and response types.
I have setup an Amazon EC2 instance to host this PR for testing.
See the REST endpoint at: http://ec2-75-101-213-28.compute-1.amazonaws.com:8080/rest/
For kicking the tires, I have modified the Play! app to work as a client to the API, and have pushed that to Heroku.
Lastly, the "Advanced Rest Client" Chrome extension is: https://chrome.google.com/webstore/detail/advanced-rest-client/hgmloofddffdnphfgcellkdfbfbjeloo?hl=en-US
A good endpoint to start with is:
I have load-tested the JERSEY REST API with JMETER, 5 threads (concurrent users) and forever loop against each endpoint concurrently/continuously. It had zero errors, and isn't spewing postgres errors in the logs. You can see the gist of my jmeter file: https://gist.github.com/peterdietz/7091412
Performance with only one thread per endpoint (hitting 7 endpoints at same time) is pretty good, with a throughput of:
Endpoints in test were: COMMUNITIES, COMMUNITIES/1, COLLECTIONS, COLLECTIONS/1, ITEMS/1, BITSTREAMS/5, BITSTREAMS/5/RETRIEVE
I'm satisfied with this testing, and am ready to merge this in.