Difference between revisions of "Version Migration"

From Developer Documents
Jump to navigation Jump to search
Line 21: Line 21:
 
'''unversioned URI''' where version information is omitted e.g.  <nowiki>http://www.simantics.org/Layer0/ConsistsOf</nowiki>
 
'''unversioned URI''' where version information is omitted e.g.  <nowiki>http://www.simantics.org/Layer0/ConsistsOf</nowiki>
  
Ontologies are deployed as OSGi bundles. Declarations in Simantics software may use the unversioned URI to refer to concepts in the ''latest'' version on an ontology (or the version found from OSGi dependencies).
+
Ontologies are deployed as OSGi bundles. Declarations in Simantics software may use the unversioned URI to refer to concepts in the ''latest'' version on an ontology (or the version found from OSGi dependencies). We define
 +
 
 +
'''working ontology''' as an ontology bundle which is under development
 +
 
 +
'''released ontology''' as an ontology bundle which is frozen and never again changed
  
 
The following simple rules for ontology development are defined to enable version migration
 
The following simple rules for ontology development are defined to enable version migration
  
===Rules===
+
===Modelling rules===
  
 
# All ontology versions shall be completely self-contained. All concepts are declared in all versions of an ontology.
 
# All ontology versions shall be completely self-contained. All concepts are declared in all versions of an ontology.
Line 31: Line 35:
 
# The '''Bundle-Name''' of an ontology shall be the unversioned URI of the ontology
 
# The '''Bundle-Name''' of an ontology shall be the unversioned URI of the ontology
 
# The '''Bundle-Version''' of an ontology shall be the ontology version as specified in the ontology URI
 
# The '''Bundle-Version''' of an ontology shall be the ontology version as specified in the ontology URI
 +
# The '''Bundle-SymbolicName''' (bundle id) of a working ontology is unchanged when versions grow (e.g. org.simantics.layer0.ontology)
 +
# The '''Bundle-SymbolicName''' (bundle id) of a frozen ontology is a version-dependent derivative of the id from the working ontology (e.g. org.simantics.layer0.ontology-1.1)
 +
  
 
==Model Migration==
 
==Model Migration==
Line 42: Line 49:
 
The user can browse the old and new models contained in the database and perform model migration at will.
 
The user can browse the old and new models contained in the database and perform model migration at will.
  
==Release process==
+
==Making software releases==
  
 
A released Simantics feature uses a set of ontologies with specified version numbers. All models associated with a specific software version need access to these ontology versions even after the ontologies have evolved. Thus it is necessary to release and freeze all versions of used ontologies whenever a software is released. Thus the procedure for making a software release includes
 
A released Simantics feature uses a set of ontologies with specified version numbers. All models associated with a specific software version need access to these ontology versions even after the ontologies have evolved. Thus it is necessary to release and freeze all versions of used ontologies whenever a software is released. Thus the procedure for making a software release includes
  
# Making copies of all  
+
===The release process===
 +
 
 +
# -- Before the build --
 +
# Make copies of all referenced ''working ontology'' bundles in Subversion with frozen ids.
 +
# Change the OSGi dependencies to refer to frozen ontologies accordingly.
 +
# -- After the build --
 +
# Move back into working ontologies as things change. Increase the version number.
 +
# Increment the software version number of models
  
  
 
[[Category: Ontology Development]]
 
[[Category: Ontology Development]]
 
[[Category: Database Development]]
 
[[Category: Database Development]]

Revision as of 05:51, 18 October 2011

This document addresses the issue how simantics application migrates from one version to the next. The scope includes software and ontology development.

Ontology Migration

An ontology is a compilation of shared concepts (=types, relations and instances).

   http://www.simantics.org/Layer0-1.0 
       http://www.simantics.org/Layer0-1.0/ConsistOf
       http://www.simantics.org/Layer0-1.0/Library

Ontologies are versioned according to the following scheme

   <Ontology URI>-<major version>.<minor version> 

For example

   http://www.simantics.org/Layer0-1.0 

All shared concepts contained in the ontology are accordingly versioned along with the ontology and the version number is visible in the URI. For ontological concepts we define

versioned URI as the proper URI of the resource e.g. http://www.simantics.org/Layer0-1.0/ConsistsOf

unversioned URI where version information is omitted e.g. http://www.simantics.org/Layer0/ConsistsOf

Ontologies are deployed as OSGi bundles. Declarations in Simantics software may use the unversioned URI to refer to concepts in the latest version on an ontology (or the version found from OSGi dependencies). We define

working ontology as an ontology bundle which is under development

released ontology as an ontology bundle which is frozen and never again changed

The following simple rules for ontology development are defined to enable version migration

Modelling rules

  1. All ontology versions shall be completely self-contained. All concepts are declared in all versions of an ontology.
  2. There shall be exactly one ontology in each ontology bundle.
  3. The Bundle-Name of an ontology shall be the unversioned URI of the ontology
  4. The Bundle-Version of an ontology shall be the ontology version as specified in the ontology URI
  5. The Bundle-SymbolicName (bundle id) of a working ontology is unchanged when versions grow (e.g. org.simantics.layer0.ontology)
  6. The Bundle-SymbolicName (bundle id) of a frozen ontology is a version-dependent derivative of the id from the working ontology (e.g. org.simantics.layer0.ontology-1.1)


Model Migration

A project in a database contains models of different versions created with different versions of software features.

The database can host multiple versions of ontologies which enables old models to exist and to be imported in the database. A typical software feature can only manipulate models defined with the latest versions of some ontologies.

Software features can make model migration from models created with previous versions of the software. Each model is associated in the database with a single software feature version, which then can be used to determine the actions needed for migrating models to the latest ontological definitions.

The user can browse the old and new models contained in the database and perform model migration at will.

Making software releases

A released Simantics feature uses a set of ontologies with specified version numbers. All models associated with a specific software version need access to these ontology versions even after the ontologies have evolved. Thus it is necessary to release and freeze all versions of used ontologies whenever a software is released. Thus the procedure for making a software release includes

The release process

  1. -- Before the build --
  2. Make copies of all referenced working ontology bundles in Subversion with frozen ids.
  3. Change the OSGi dependencies to refer to frozen ontologies accordingly.
  4. -- After the build --
  5. Move back into working ontologies as things change. Increase the version number.
  6. Increment the software version number of models