History | Log In     View a printable version of the current page. Get help!  
Issue Details [XML]

Key: SES-311
Type: Sub-task Sub-task
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Jeen Broekstra
Reporter: Leo Sauermann
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Sesame
Implement HTTPSail (SES-205)

Merge HTTPSail from dfki to aduna

Created: 06/Oct/06 02:49 PM   Updated: 22/Jan/07 11:38 PM
Component/s: Sail API, HTTP Server
Affects Version/s: None
Fix Version/s: 2.0-alpha-4

Environment: Development


 Description   
Merge the HTTPSail implementation, and the changes to SAIL interface, back to Sesame2 main branch.
Currently, the HTTPSail is not fully functional (many methods miss), but at least half of it is testable and works somehow. If we wait longer with the merge, the codebases will be even more different.

The goal of this move is to have the current HACK at the DFKI repository to the main branch in Sesame.
We freeze the Http sail at changeset 1883 at DFKI:
https://gnowsis.opendfki.de/changeset/1883

the two projects from DFKI that have to be moved back to aduna are here:
https://gnowsis.opendfki.de/browser/sesame2?rev=1883
https://gnowsis.opendfki.de/browser/sesame2/HTTPSail?rev=1883
https://gnowsis.opendfki.de/browser/sesame2/Sesame2Testing?rev=1883

Explanation:
== HTTPSail ==
is a copy of the Sesame2 source. The initial import was on 09/11/06, (what a date) and is a current copy from back then of Sesame2, SVN. We did not remember to write down revision number, though.

We can also not separate it completly, because we first got the SVN, then began hacking (making changes) and then made the first commit. So the first commit contains a changed sesame2 already:
https://gnowsis.opendfki.de/changeset/1816

The core classes that are most important are in the org.openrdf.sesame.sailimpl.http package and its subpackages:
https://gnowsis.opendfki.de/browser/sesame2/HTTPSail/src/org/openrdf/sesame/sailimpl/http

The corresponding test case is here:
https://gnowsis.opendfki.de/browser/sesame2/HTTPSail/test/org/openrdf/sesame/sailimpl/http

To achieve the HTTP Sail, we had to make sensible changes to some interfaces.
* we change the TRIX Parser by adding one method to expose the parser
(which is the core idea we had to keep the overall code to a nice minimum).

* Second problem was the Sail interface missing the Query-Evaluation method
needed to evaluate queries by string. The SAIL gets passed only a parsed representaiton of the query, and it was impossible for us to change the parsed representation so that we could sneak in the query language and query string. Because the parsed tree gets generated by automatically generated code (or complicated code) inside the SparqlParser or SERQL Parser.

Therefore we changed the Sail interface to work on QUERY objects and we Extended the QUERY object with two more properties: query-string and query-language. We also changed the QueryHandler. All these changes can be seen here:
https://gnowsis.opendfki.de/changeset/1880

DFKI thought long about these chirurgical changes to Sesame2, and we would appreciate you review them and accept most of them.

The most important tests were done in another java project:
=== Sesame2Testing ===
This project tests http Sail using a HTTP server (Jetty) that is started directly from JUnit for each Setup and Teardown of a Testcase. By using this embedded HTTP server, we have complete separation from any outside dependency and can focus on testing HTTP Sail.

Because this involves a lot of hacks (namely starting Jetty inside JUnit) and is not of concern to the main Sesame project, we put it into a separate project. We would recommend to leave it like this: create a new project and copy/paste the contents of Sesame2Testing, possibly renaming the project to something like "HTTPServerTesting"

== Merging these back to sesame ==
to merge this back, we would say that the Testing project should be copied 1:1.

For Sesame2, we suggest to copy the HTTPSail packages completly.
Then, for the changes within Sesame, these changelogs should show what needs touching. They show a diff between revision 1883 and 1816 at the needed branch:
https://gnowsis.opendfki.de/changeset?new=sesame2%2FHTTPSail%401882&old=sesame2%2FHTTPSail%401816

That should be the list of classes that need care. You easily see what we did on the other Sesame classes by clicking on the links of above page.

greetings
Leo

 All   Comments   Change History      Sort Order:
Comment by Leo Sauermann [06/Oct/06 03:58 PM]
===================================
ATTENTION

on all links above, replace HTTPS with HTTP
then it works

Comment by Jeen Broekstra [09/Oct/06 04:50 PM]
OK, integrated version of HTTPSail checked in in Sesame 2 SVN. It compiles, initial tests indicate it runs properly. Needs more rigorous testing but in principle available for alpha-4 release.