Database Management for Smalltalk

Mon 19th Oct 2009   05:10 PM
posted by John Clapperton

New in this release, 3.150.04 allows snapshot shadow hot backup of all connected virtual spaces without the need to take an application offline. On menu click from the control panel, or by program message send, the flow of transaction commits pauses for just a few seconds whilst the snapshot shadows are created, and then continues normal service whilst the shadow copies are backed up to a specified location.

Together with concurrent background garbage collection, this allows 24×7 operation of applications managing multi-gigabyte databases of objects in virtual spaces distributed over a Microsoft Windows Network Filesystem.

Download VOSS 3.150.04 here


Join the forum discussion on this post
Mon 28th Sep 2009   06:09 PM
posted by John Clapperton

Version 3.150.03 fixes an initialization fault in 3.150.02.

Download 3.150.03 here.


Thu 3rd Sep 2009   10:09 PM
posted by John Clapperton

Version 3.150 improves administrative integrity safeguards; in particular, each most recent transaction commit timestamp is now stored in new header records in each of the files which comprise a virtual space (.vs1, .vs2, .tsq, .tlb), in addition to the existing .vot header record. Log-on is blocked if these do not match, safeguarding the virtual space against accidental mixups with the files.

The new header records are automatically added to existing virtual space files, (.vs1 or .vs2) and .tsq on the first garbage collector flip, (.vs2 or .vs1) on the second flip. The transaction log archive (which never needs garbage-collection, as nothing is ever deleted from it) is ‘converted’ when it is next replaced by a new empty one prior to routine backup (the transaction log must know the timestamp of the backup which it may be called upon to roll forward in crash recovery).

Note that virtual spaces which have been flipped at least once by version 3.150 cannot thereafter be used with any earlier version of VOSS, as earlier versions do not expect the header records to be there. Similarly, virtual spaces created by version 3.150 cannot be used with any earlier release of VOSS for the same reason.

There is a bug fix in VOSortedDictionary>>forKeyMatches: (which matches String keys with wild * and # characters) replacing the erroneous case-sensitive #= comparison by #voEQ: which looks at the VOSSRoot>>caseSensitiveKeys global variable to decide what to do.

In this area, it has been suggested that it would be useful to give each instance of VOSortedDictionary (and therefore its subclass VirtualDictionary, and by extension, the VOAutoDictionary components of VirtualDictionarySet etc) its own #caseSensitiveKeys attribute. If you have views on this please let me know.

VOSS 3.150.02 is available for download here.



Thu 19th Mar 2009   01:03 PM
posted by John Clapperton

VirtualDictionarySet (a virtualized subclass of DictionarySet) is the workhorse collection class to use for aggregation of objects in a VOSS database. Typically, all the objects in a DictionarySet will be of the same class (e.g. Employee, Department, Project, Order, Invoice etc), but not necessarily.

DictionarySet allows its elements to be indexed by any number of single-valued and/or multi-valued key-selector unary messages (e.g. #employeeNumber (single-valued), #lastName (multi-valued), #deptNumber (a foreign key in Employees), #deptNumber (primary key in Departments) etc), as required by the application.

Complex queries are built by sending messages such as <#for: #lastName equals: ‘Smith’>  to the DictionarySet, to which the DictionarySet returns a set of its elements meeting that criterion. There is an example of a complex query here.

The tip here, in the interests of efficiency,  is not to “change the class” of the returned partial query sets (e.g. #asOrderedCollection) until after all the intersections and/or unions of partial query sets have been done to build the complex query - and even then there is rarely any need to do this.

VirtualDictionarySet>>for:equals: etc return a VOLogicalOrderedIdentitySet of virtual objects, which compares logical identity of the virtual objects it contains (and is adding) by comparing the object’s #voManager identity and its integer object #id, both of which are in the object’s proxy VORef (which is what is actually in the set), and therefore no #= message need be expensively forwarded to the instantiated object in the cache in the voManager. 
Moreover, VOLogicalOrderedIdentitySet is hashed (on #id in the VORef), and needs to compare identity only when probing hash collisions. Therefore it executes #includes: much faster than OrderedCollection or other non-hashed collections, which must compare equality for each of the entire collection when looking for an absent object, and, on average, half the collection for each present object, forwarding #= to the instantiated object each time.

It is therefore very much faster when constructing complex queries to do all union and intersection of the partial query sets using the VOLogicalOrderedIdentitySets as returned by the partial query components.

Join the forum discussion on this post


Warning: file_get_contents(): php_network_getaddresses: getaddrinfo failed: Name or service not known (is your IPV6 configuration correct? If this error happens all the time, try reconfiguring PHP using --disable-ipv6 option to configure) in /vhost/vhost6/l/o/g/ : runtime-created function(61) : eval()'d code on line 215

Warning: file_get_contents( failed to open stream: Success in /vhost/vhost6/l/o/g/ : runtime-created function(61) : eval()'d code on line 215