GlobalObjects
|
GlobalObjects is a C++ object-oriented database (OODB, ODBMS, NoSQL) for maintaining C++ objects persistence. Single and multi-user operation via a server is possible.
C++ objects can be saved, loaded and deleted easily. This can also be done in transactions, which can be confirmed (actions are executed) or cancelled (actions are not executed). The ACID principle is consistently adhered to.
GlobalObjects understands C++ class declarations with support for encapsulation, inheritance, polymorphism, object identity, and object references.
There is an extensive locking mechanism to protect stored objects.
In order to "notice" changes to the object inventory, a simple notification system, implemented by passing a callback function, can be used.
The main focus is on the easy saving and loading of even complex C++ objects with their references and the updating of loaded objects in memory when they are changed in the database.
The name GlobalObjects was chosen because it helps the developer to automatically synchronize objects across multiple clients. The application developed with GlobalObjects still works without any changes in single-user operation.
GlobalObjects is therefore not a speed-optimized database. Each class has its table (a simple text file) with at least one object ID index. Objects of a class with many superclasses are "assembled" by reading in the respective data records or "broken down" when saved. Complex objects with references to other objects that must also be saved or deleted can therefore have a negative impact on the timing. Indexes are read from the file system into objects of the type std::map<T> or written back to the file system when the application is closed.
Microsoft Visual Studio (from version 2010) and MinGW (from version 5.3.0) are currently supported on Windows and gcc (from version 4.8.3) and Clang (from version 6.0.0) on Linux. For example, you can install a GloServer on a supported operating system and access it from all supported operating systems with a client application.
To be able to persistently store C++ objects from the memory of the computer, there are roughly three possibilities:
GlobalObjects goes the way, that the C++ objects are stored like in an object database, but the storage is done in the file system of a disk. In a later stage it is planned to store the objects in a SQL database such as SQLite.
A database design does not have to be made for GlobalObjects.
Here a short outline of the possibilities of GlobalObjects:
With GlobalObjects a direct saving, loading and deleting of C++ objects in an object database is possible. Both single and multiple inheritance of C++ is supported. An AllSet (the set of all stored objects of the class) is available for each class. When loading an object from an AllSet the real object is instantiated, which may be derived if necessary (loading an object from the AllSet of the "Animals" instantiates the respective objects e.g. of the type "Fish" and "Bird" etc.).
It can be set whether referenced objects should be loaded, saved or deleted with.
Example:
References such as pointers, also in containers, to other objects in the object database are offered for reference navigation. You can specify whether the referenced objects are loaded (instantiated) with the object or only when they are accessed (see also glo::TOndemand, glo::TOndemandList and glo::TOndemandSet). You can also set a dependency (dependent) so that referenced objects are saved or deleted at the same time. More...
To ensure multi-user access, a locking mechanism is implemented down to the object level. Both sets of objects and individual objects can be locked in many ways. More...
In order to guarantee that several object database actions can be carried out in a closed manner, transactions are made available. Nested transactions are supported. More...
An easy-to-use notification system is provided so that changes to objects in the object database can be noticed by an application, e.g. to keep the objects in memory consistent. More...
To find objects using attribute values, it is possible to index objects using their attributes. It is possible to index objects using your own attributes, attributes of superclasses, and attributes of referenced or embedded classes. You can combine attributes such as "last name" and "first name" as one index attribute. More...
Most standard types are supported as embedded attributes. Currently, these data types are provided for persistent objects.
In order to better classify any errors that occur, they are organized by areas.
Error range = -10001 bis -10200
For the socket errors (all from -10004 to -11004) descriptions can be found on the Internet.
For Windows Sockets e.g. under: https://msdn.microsoft.com/de-de/library/windows/desktop/ms740668%28v=vs.85%29.aspx
or generally also under: https://gist.github.com/gabrielfalcao/4216897
This list is not complete!
Error range = -13001 bis -13200
Error range = -14201 bis -14300
Error range = -15001 bis -15100
Error range = -15501 bis -15600