[Opensim-dev] Some new code for your review and possible acceptance
AlexRa
info at adeptsql.com
Mon May 17 11:00:15 UTC 2010
Hello,
I've been playing around with the database access layer of the code, especially the AssetData plugins
for all 3 supported databases (Sqlite, MySql, and MS SQL) and the underlying classes, and also made
a few other changes:
git at github.com:AlexRa/opensim-mods-Alex.git
I'd like to invite the developers of the OpenSim team to review the proposed changes
and integrate whatever looks useful into the official repository.
This repository contains the following branches that can be of interest:
The *"master"* contains all my the changes. It is branched off
r/127730 (and with the recent flow of commits I find it difficult to
continue rebasing it to keep up). There is quite a lot of stuff there,
some of it more useful than the other, so if anybody wants to look at
it I'd appreciate that, but that may be too much to ask.
I've been trying to separate particular features and put them into separate
branches. So far, the following branches are fairly independent from
the rest of the stuff and should be easy to integrate into the primary
repo if the team decides to do so:
* The "asset-loader" branch contains a rewrite of the AssetLoader that
uses a timestamped asset to determine which of the asset files must
be loaded. This prevents the lengthy (and unnecessary) re-loading of
all predefined assets on each server start-up, but does load any
newly added assets. Status: NOT TESTED (but the logic is quite
simple, shouldn't have much problems with it(?))
* The "Migrations" branch is a rewrite of the Migrations.cs to support
single-file migration histories. This way, all those endless
0xx_StoreName.sql are replaced with a single StoreName.migrations
file which is more readable and easier to maintain. The new
migration code supports stored procedures for both MySql and MS SQL.
It is also fully backward-compatible (does read the old-style
migration files as well).
This also includes update of MySql.Data.dll to 6.2.3.0, to avoi a
known problem with defining stored procs/funcs in earlier versions.
Status: TESTED and works in all modes.
* The "NUnit-update" touches a lot of test-related code to make it compatible
with NUnit 2.5.5+. The main advantage is that test classes can be
made generic and parameterized. This (and the BasicDataServiceTest
class included in this branch) allows to build DBMS-independent data
tests. Some samples of such tests are available in my "master"
branch. The idea is to keep he connection strings for the test
databases in a single INI file (rather than in each test unit), and
to keep all data tests in OpenSim.Data.Tests, totally eliminating
Data.{MySql/MSSQL/SQLite}.Tests. Test sets for a specific DB are
produced just by adding another [TestFixture(...)] attribute before
the test class.
The other new stuff that is present in the "master" branch:
* Added Assets.CreatorID support for all dbs;
* A way to keep Asset.AccessTime updated (on MySql, a similar way
would work on MS SQL) entirely on the SQL server side, without the
performance costs of a separate UPDATE statement;
* refactored DB-access classes (more code moved to a base class, less stuff is DBMS-specific);
* configurable "keep alive" connection mode (for MySQL/MSSQL) - avoid
re-creating conn, keep stmts prepared (2x performance gain for MS SQL);
* performance tests for Assets;
* (other changes)
Best regards,
Alex Rytov (aka AlexRa)
More information about the Opensim-dev
mailing list