Philosophy on Map Files
Posted: Fri Aug 07, 2009 11:25 am
by Craig Shearer >> Wed, 20 Jun 2001 21:27:01 GMT
Hi All
I'm interested in getting consensus on how people use map files, and in particular, how people make decisions about what classes go in what map files, how many are needed, performance implications etc.
Map files are used to store class instances, and are maintained separately from class definitions (in the Class Maps Browser). Each class is assigned a map file, and instances of that class are physically stored in that map file (with the exception of exclusive collection classes - instances of which are stored in the same map file as their parent class).
In previous versions, JADE had a limit of 2GB on map file size, which made it possible to realistically exceed this limit with classes which had a large numbers of potential instances, or whose objects were large, or both. However, in the current version of JADE, the limit is 2^64 -1 bytes, effectively making map file size a non-issue (at least in my lifetime), provided you have a physical disk large enough to contain the map file.
So, how do you determine what map files are required? My approach is to clump classes together into related areas and define a map file for each area. Database reorganisations take place on a "per map file" basis so it's a good idea to put large-map-file-producing classes in their own map file to minimize reorg time. But apart from this, is there any performance penalty to having only a handful of map files, or conversely, one map file per class?
I've also been told that it's a good idea to have your Global and Application subclasses in a separate map file from all other classes. The reason is that you can then delete all your persistent objects by using the dbutil utility to delete the map files - something which is infinitely quicker than writing a script to get JADE to delete instances on a per object, or per class basis. If you don't have Global and Application subclasses in their own mapfile, then JADE has to handle recreating them for you when you start up the development environment (for each schema).
Comments?
Craig Shearer
--
Chief Architect
Helix Software Limited
http://www.helix.co.nz
craig.shearer@helix.co.nz
Phone: 025 936 334
Hi All
I'm interested in getting consensus on how people use map files, and in particular, how people make decisions about what classes go in what map files, how many are needed, performance implications etc.
Map files are used to store class instances, and are maintained separately from class definitions (in the Class Maps Browser). Each class is assigned a map file, and instances of that class are physically stored in that map file (with the exception of exclusive collection classes - instances of which are stored in the same map file as their parent class).
In previous versions, JADE had a limit of 2GB on map file size, which made it possible to realistically exceed this limit with classes which had a large numbers of potential instances, or whose objects were large, or both. However, in the current version of JADE, the limit is 2^64 -1 bytes, effectively making map file size a non-issue (at least in my lifetime), provided you have a physical disk large enough to contain the map file.
So, how do you determine what map files are required? My approach is to clump classes together into related areas and define a map file for each area. Database reorganisations take place on a "per map file" basis so it's a good idea to put large-map-file-producing classes in their own map file to minimize reorg time. But apart from this, is there any performance penalty to having only a handful of map files, or conversely, one map file per class?
I've also been told that it's a good idea to have your Global and Application subclasses in a separate map file from all other classes. The reason is that you can then delete all your persistent objects by using the dbutil utility to delete the map files - something which is infinitely quicker than writing a script to get JADE to delete instances on a per object, or per class basis. If you don't have Global and Application subclasses in their own mapfile, then JADE has to handle recreating them for you when you start up the development environment (for each schema).
Comments?
Craig Shearer
--
Chief Architect
Helix Software Limited
http://www.helix.co.nz
craig.shearer@helix.co.nz
Phone: 025 936 334