Refactoring Database Access in Marauroa: Difference between revisions

From Arianne
Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
first version of page
imported>Hendrik Brummermann
included design image
Line 13: Line 13:
* an ''small'' abstraction layer to support different databases beside mysql (small as in "not hibernate")
* an ''small'' abstraction layer to support different databases beside mysql (small as in "not hibernate")
* no extra dependencies on new libraries
* no extra dependencies on new libraries
* easier way to include variables into sql statements

== Design ==

[[Image:Marauroa.server.game.db.png]]

Revision as of 11:39, 13 June 2009

At the moment database access in marauroa is designed for a single thread application. While this does work most of the time in turn based games (yes, Stendhal is turned based internally), it prevents doing non time critical stuff in another thread. In Stendhal we have the problem that any update or delete operation to the gameEvents table that takes more than a couple of seconds kills the server.

Requirements

Hard Requirements

  • multi thread support
  • parallel transactions in different threads

Would be nice

  • a package of small classes instead of huge JDBCDatabase / StendhalPlayerDatabase
  • an small abstraction layer to support different databases beside mysql (small as in "not hibernate")
  • no extra dependencies on new libraries
  • easier way to include variables into sql statements

Design