Last modified 16 years ago
Last modified on 12/05/08 11:43:41
Analysis
Overview
The goal of this task is to research and decide which technologies we will use for deploying and running the Sophie server. They should be demonstrated.
Task requirements
- Decide which database we will use (i.e. HSQLDB, MySql, SqlLite, PostGre, Apache Derby)
- Talk to Milo what is the best decision.
- Deploy simple configuration of the chosen database.
- Decide which servlet container we will use (It is jetty. See S2S_CORE_DEPLOYMENT_R0)
- Decide if we will use JSPs for the web pages. Deploy them and give examples.
- Decide which technologies we will use for web services (i.e. SOAP web services(xfire, axis), rest services)
Task result
- Sophie 2 basic server which runs and use the chosen database and basic web user interface.
Implementation idea
- Compare the technologies - the pros and cons of each
- read its documentation - http://db.apache.org/derby/, http://hsqldb.org/, http://www.sqlite.org/, http://www.postgresql.org/
- see the license of the listed databases - it must not be GPL.
- MySql has GPL license, that's why we can't use it.
- use maven-jspc-plugin to compile the JSPs. We should have two-three JSPs showing the implemented logic.
Related
S2S_CORE_DEPLOYMENT_R0
S2S_WEB_COMMONS_R0
How to demo
- Show the running server and its web interface, consisting of JSPs and servlets.
- Demonstrate the communication with the chosen database - use SQuirreL to show the database and its fields.
Design
Here is the common deployment diagram:
- Server Core - UserService, GroupService classes (org.sophie2.server.service package)
- Persistence Layer - DatabaseManager, GroupDao, UserDao, AbstractEntity, Group, User (in org.sophie2.server.persistence.dao and org.sophie2.server.persistence.entity packages)
- The server should use Jetty as web / web service server.
- The data should be persisted by API which uses Derby ( JavaDB ) to an embedded database.
- The user should log to it from the client using the web services (REST or SOAP, for now we can't say which of the two will be the services, we should define them in the next revision of the task), or from the browser using the servlets, JSP pages or applets embedded in html pages.
- May be in the future we should use a protocol of our own for the communication between the client's connector and the server in some cases.
Implementation
- server core implementation is in service package
- Jetty is embedded - you can start the server using server.FakeServerMain launch configuration(the TrueServerMain does not deploy jsps for now). See S2S_CORE_DEPLOYMENT_R0
- JavaDB is embedded and used in org.sophie2.server.persistence module. There is "test" database created. Interfaces and classes for communication with the database are implemented.
See trunk/sophie2-platform/modules/org.sophie2.server.persistence and S2S_PERSISTENCE_COMMONS_R0 task.
- When the user is persisted in the database he/she can log and see the about Sophie page(this is the only server page for now), otherwise he/she can't log the the server. You can start the server, go to localhost:8003 and try by yourself. Now we have one user in the database with username: astea and password: astea1(since there is no registration option for now). The login and about pages are JSPs. - 615 and 623
Testing
Comments
(Write comments for this or later revisions here.)