Issue 304 in simal: Database can't be reused across Simal instances

2 views
Skip to first unread message

si...@googlecode.com

unread,
Jun 23, 2010, 6:12:30 AM6/23/10
to simal-con...@googlegroups.com
Status: Accepted
Owner: sander.v...@oucs.ox.ac.uk
Labels: Type-Defect Priority-High Milestone-0.3 Component-Core

New issue 304 by sander.v...@oucs.ox.ac.uk: Database can't be reused across
Simal instances
http://code.google.com/p/simal/issues/detail?id=304

The way the simalID has been set up prevents the reuse of the database.

simalIDs are of the form <instance ID> + "-" + <entity ID> (as implemented
in AbstractSimalRepository.getUniqueSimalID(String)).

The <entity ID> is used by the REST API, eg. for querying a '/person' or
a '/project'.

The full simalID is used for storing projects, persons and categories. This
means that when a entity ID is converted to a full simalID, the instance ID
must be the same as the one by which the entity has been stored.

This makes it impossible to reuse the database with a different instance.
It is also not possible to backup a database and restore it to another
instance.

si...@googlecode.com

unread,
Jun 23, 2010, 6:19:48 AM6/23/10
to simal-con...@googlegroups.com

Comment #1 on issue 304 by ross.gardler: Database can't be reused across
Simal instances
http://code.google.com/p/simal/issues/detail?id=304

Before changing this you need to review the issues that led to this design
choice, e.g.

Issue 190

I have no problem with this being revisited, as long as the resean for this
design decision is fully understood. In other words, I'm not saying the
design is good, just that there is logiv in the madness.

si...@googlecode.com

unread,
Jul 20, 2010, 10:33:26 AM7/20/10
to simal-con...@googlegroups.com

Comment #3 on issue 304 by ross.gardler: Database can't be reused across
Simal instances
http://code.google.com/p/simal/issues/detail?id=304

I'm tempted to move this to milestone 0.6 ad priority Low (or even mark it
as won't fix) as it only affects reuse of the data across instances as this
is not intended to be the case.

Each instance is intended to keep its own data. If instance foo wants to
know about project bar then it is supposed to seek out as much data as it
can and collect it. Foo would first ask all other known instances of Simal
what they know and then would, optionally seek new sources.

It is not intended to move data from one instance to another.

si...@googlecode.com

unread,
Jul 20, 2010, 11:20:07 AM7/20/10
to simal-con...@googlegroups.com

Comment #4 on issue 304 by sander.v...@oucs.ox.ac.uk: Database can't be

I created this issue because the following use cases are currently not
possible without nasty tweaks:

- Restore a database
- Migrate a database to a newer Simal version

The ultimate effect being that we need to recreate the whole database from
external sources when we migrate a running Simal instance. This heavily
effects using Simal in practice because all changes that are made through
the UI, eg. adding people, reviews or assigning categories, are lost when
we migrate to a new Simal version.

I think the best solution to this is to make the Simal ID consistent across
migrations.

So to make sure it's clear: this issue is NOT aimed at making two running
instances of Simal share data.

si...@googlecode.com

unread,
Jul 21, 2010, 7:01:21 AM7/21/10
to simal-con...@googlegroups.com

Comment #5 on issue 304 by ross.gardler: Database can't be reused across
Simal instances
http://code.google.com/p/simal/issues/detail?id=304

OK, I agree the restoring a database is a critical use case.

I did do some work some time ago on a data backup mechanism, but I don't
think there is a restore yet. See Issue 157 and Issue 260

si...@googlecode.com

unread,
Jul 21, 2010, 7:05:33 AM7/21/10
to simal-con...@googlegroups.com

Comment #6 on issue 304 by ross.gardler: Database can't be reused across
Simal instances
http://code.google.com/p/simal/issues/detail?id=304

The code that writes the backup is:

FileWriter writer = new FileWriter(backupFile);
getRepository().writeBackup(writer);
writer.close();
logger.info("Backup file written to " +
backupFile.getAbsolutePath());


si...@googlecode.com

unread,
Mar 14, 2011, 10:09:50 AM3/14/11
to simal-con...@googlegroups.com
Updates:
Owner: ---
Labels: -Priority-High -Milestone-0.3 Priority-Medium Milestone-0.6

Comment #7 on issue 304 by ross.gardler: Database can't be reused across
Simal instances
http://code.google.com/p/simal/issues/detail?id=304

Note there is a script for backup that works nicely as a workaround for the
backup/restore issue.See
http://code.google.com/p/simal/source/browse/trunk/uk.ac.osswatch.simal.web/src/main/python/backupAllProjects.py

Moving to 0.6 and dropping priority

si...@googlecode.com

unread,
Mar 14, 2011, 10:13:51 AM3/14/11
to simal-con...@googlegroups.com

Comment #8 on issue 304 by ross.gardler: Database can't be reused across
Simal instances
http://code.google.com/p/simal/issues/detail?id=304

Issue 410 has been merged into this issue.

Reply all
Reply to author
Forward
0 new messages