wiki:SERVER_DATABASE_PERSISTENCE

Version 2 (modified by meddle, 15 years ago) (diff)

--

Error: Macro BackLinksMenu(None) failed
compressed data is corrupt

Error: Macro TicketQuery(summary=SERVER_DATABASE_PERSISTENCE, format=table, col=summary|owner|status|type|component|priority|effort|importance, rows=description|analysis_owners|analysis_reviewers|analysis_score|design_owners|design_reviewers|design_score|implementation_owners|implementation_reviewers|implementation_score|test_owners|test_reviewers|test_score|) failed
current transaction is aborted, commands ignored until end of transaction block

Analysis

Overview

The Server have to keep it's resource data in a flexible and extend-able database. The information should be stored and loaded when the Server is restarted, the current functionality should continue to work.

Task requirements

  • Choose an appropriate database for storing.
  • Create a good database schema for storing the resources and the history
  • Store in the database the resources and the history
    • Should be able to pick a resource data at a specified revision
    • Should be able delete and create a resource in the database
    • Should be able to store the changes of an resource in the database.
  • Create an API that communicates with the database using JDBC.
    • Create a JDBC template to query easy the DB
    • Think of a way to manage the DB connection
      • Connecting to the DB should be treadsafe.
  • Make the facade and the web use the database
  • Preserve the current functionality - collaboration, skipping changes, web upload/download/browse/delete
  • Make a mock server from the old implementation of accessing resources in the server memory (optional)

Task result

Source code and tests.

Implementation idea

  • Use H2 database for the database.
  • Use ThreadLocal connection variables for the ThreadSafe connections.
  • Create special WebResourceAccess to replace the current mem accesses in the web, but to preserve working with helpers.
  • Use the current Persistence API to store the immutables in the DB.

No related tickets for now...

How to demo

  • Show the working web and collaboration in Sophie but with the DB implementation
    • Web interface
      • Upload a book through the web interface
      • Browse the books in the web interface
      • Download and delete the book.
    • Collaboration
      • Save a book on the server
      • Make some changes from different Sophie clients
      • Undo the change, redo them
      • See the actions in all the clients

Design

(Describe your design here.)

Implementation

(Describe and link the implementation results here (from the wiki or the repository).)

Testing

(Place the testing results here.)

Comments

(Write comments for this or later revisions here.)

Attachments