The Smalltalk Object Sink provides a simple ODBMS interface to the user. So sessions may look like
cfg := SosInMemoryConfiguration database: 'test'.
...
db := SosDatabase open: cfg.
tx := db newTransaction: myUserName.
tx begin.
tx
root: 'AllEmployees'
at: 'fmueller'
put: (Employee firstName: 'Frank' lastName: 'Müller').
tx commit.
...
db close.
to store a new employee with the key fmueller at inside the AllEmployees root and
db
transaction: [:tx | (tx root: 'AllEmployees' at: 'fmueller') city: 'Oldenburg']
onError: [ ... ]
to change the city of this employee to "Oldenburg". All objects that can be reached by any root object and that are added or changed will be persisted automicly.
Exchangeable strategies allow to plug in the connection to allmost any persistency system. The strategy is responsible to persist the data, to retrieve named root objects, objects identified by an OID (object identifier) and large objects, which are identified automaticly and stored separately, and to handle the transactions. Also the garbage collection is task of the strategies.
The data to persist is analyzed by the framework inside the Smalltalk Object Sink. And the API between this framework and the strategies is defined.
Strategies
In-Memory Strategy
The in-memory strategy is a small and powerful strategy keeping the whole database inside the memory and writing it asynchronously into a simple ASCII file and the large object files. It is fast and can be used during development or for small applications with one node and databases up to 100 MB (no physical limit).
File System Strategy
The file system strategy only keeps a number of small data clusters inside the memory. Missing clusters will be loaded automaticly, if the number of clusters is too large the least used will be removed out of the memory. It is fast and can be used for small to mid-sized applications with one node and databases up to 1 GB (no physical limit).
SQLite Strategy
The SQLite strategy uses the SQLite RDBMS library as persistency backend. The data model is defined by the internal model of the Tideland SOS. This strategy is designed for mid-sized applications with single nodes and databases > 1 GB.
PostgreSQL Strategy
The PostgreSQL strategy uses the PostgreSQL RDBMS as persistency backend. The data model is again defined by the internal model. This strategy is designed for mid-sized to large applications with multiple nodes and databases > 1 GB.
