GloServer
|
What would be global objects if several instances or clients could not access them simultaneously. The program GloServer.exe
is available for this purpose.
The GlobalObjectsServer is a typical console application.
The GlobalObjectsServer after the first start:
To enable the GlobalObjectsServer to work, some settings must be communicated to it via an INI file. If no INI file is passed, a DB.ini in the same directory of the GlobalObjectsServer is expected as default. This INI file has the following structure:
The GlobalObjectsServer as well as the client applications must communicate via a common Port with a common TcpPackageSize.
With the setting in BasePath the complete path where the GlobalObjects schemas are located is specified.
The GlobalObjectsServer considers only the databases listed under KnownBases. The individual names are separated with a '|'.
The value under TimeOutSec specifies the seconds a client waits for a response. If the time is up, the waiting for a response is aborted and an error is generated. A value of 0 lets the client wait theoretically infinitely, which is advantageous e.g. for 'debugging' the application.
The GlobalObjectsServer can be controlled conditionally with some commands.
The manageable input options are displayed with the [?] key or the command word 'help'.
With the command words 'cls' or 'clear' the screen is cleared.
Pressing the key [q] or the command words 'quit' or 'exit' will exit the GlobalObjectsServer. If there are still clients connected to the GlobalObjectsServer, it must be confirm again.
With the key [i] or the command word 'info' the GloServer settings are displayed.
The command word 'sl' shows the display status. This is simply entered as a number.
For example, to activate the display status '2' -> shows read/write table-actions and '4' -> shows order-actions, the status 2 and 4 are added to 6 and entered.
No action is displayed.
It is displayed when a client logs on or off the GlobalObjectsServer.
It is displayed when a client reads something from the database or writes something to the database.
This display results from the following code snippet:
RE >: ClientID=2 ClientName=TestClient Schema=MyFirstGloBase Action=eOPENALLSET ClassID=2 Err=0
A request is made for a specific client (RE >) to open an AllSet of the class with ID 2...
RE <: ClientID=2 ClientName=TestClient Schema=MyFirstGloBase Action=eOPENALLSET ClassID=2 Err=0
that was opened without error (RE <).
RE >: ClientID=2 ClientName=TestClient Schema=MyFirstGloBase Action=eGET_OBJID_WITH_OBJECT_FROM_ALLSET ObjID=2.0.27 Err=0
A request for an object ID and the corresponding object was initiated. The object ID has been found before.
RDR -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/MyTestClass ObjID=2.0.27 Err=0
From the table 'MyTestClass' the partial data set of object 2.0.27 was read.
RDR -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/FirstGloBase ObjID=2.0.27 Err=0
From the table 'FirstGloBase' the partial data set of object 2.0.27 was read.
RDR -> Ext.File: 4.1.4/4.0.28 Err=0
The external file '4.0.28' in subdirectory '4.1' was read. This is the data of an attribute of the next object to be delivered in order to insert it into the data set still to be read.
RDR -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/EmbeddedClass ObjID=4.0.28 Err=0
From the table 'EmbeddedClass' the partial data set of object 4.0.28 was read (the object with object ID 2.0.27 has this as an embedded object).
RDR -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/FirstGloBase ObjID=4.0.28 Err=0
From the table 'FirstGloBase' the partial data set of object 4.0.28 was read.
RE <: ClientID=2 ClientName=TestClient Schema=MyFirstGloBase Action=eGET_OBJID_WITH_OBJECT_FROM_ALLSET ObjID=2.0.27 Err=0
This indicate that an object ID 2.2.1 and the associated object were read without errors.
RE !: ClientID=2 ClientName=TestClient Schema=MyFirstGloBase Action=eGET_OBJID_WITH_OBJECT_FROM_ALLSET ObjID=0.0.0 Err=-13032
indicate that another request for an object ID has failed (the AllSet of the class with class ID 2 has only one object in this example).
RE >: ClientID=2 ClientName=TestClient Schema=SchemaExample Action=eCLOSEALLSET ClassID=2 Err=0
RE <: ClientID=2 ClientName=TestClient Schema=SchemaExample Action=eCLOSEALLSET ClassID=2 Err=0
The AllSet was successfully closed.
Another example from the following code snippet:
MyTestClass has as attribute an embedded object of the type EmbeddedClass. EmbeddedClass has an attribute of type std::string which is not restricted in length. In this example the string is long enough to be written to an external file.
TRX [: ClientID=1 ClientName=TestClient Schema=MyFirstGloBase Action=eSTORE Err=0
Storing an object takes place in a transaction. This is the beginning of the transaction (TRX [).
WR >: ClientID=1 ClientName=TestClient Schema=MyFirstGloBase Action=ePROCESSTRANSACTION ObjID=2.0.27 Err=0
For the client with the ID 1, storing the object with the object ID 2.0.27 is started (WR >). Since objects are distributed over several files, the storing of each individual object takes place in an internal transaction (Action=ePROCESSTRANSACTION).
WRI -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/FirstGloBase ObjID=2.0.27 Err=0
The partial data from the object with ID 2.0.27 was written to the table 'FirstGloBase'.
WRI -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/MyTestClass ObjID=2.0.27 Err=0
The partial data from the object with ID 2.0.27 was written to the table 'MyTestClass'.
WR <: ClientID=1 ClientName=TestClient Schema=MyFirstGloBase Action=ePROCESSTRANSACTION ObjID=2.0.27 Err=0
Storing the object as such was successfully completed in the inner transaction without errors.
Jetzt fehlt noch das eingebettete Objekt (4.0.28):
WR >: ClientID=1 ClientName=TestClient Schema=MyFirstGloBase Action=ePROCESSTRANSACTION ObjID=4.0.28 Err=0
Storing the embedded object with the object ID 4.0.28 again takes place in an internal transaction.
WRI -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/FirstGloBase ObjID=4.0.28 Err=0
The partial data from the object with ID 4.0.28 was written to the table 'FirstGloBase'.
WRI -> Ext.File: 4.1/4.0.28 Err=0
Furthermore, the data from the string attribute of the object with the object ID 4.0.28 was written to the external file '4.0.28' in the subdirectory '4.1'.
WRI -> Table: D:/Projects/GlobalObjects xx.xx/GloExamples/Bases/MyFirstGloBase/EmbeddedClass ObjID=4.0.28 Err=0
The partial data from the object with ID 4.0.28 was written to the table 'EmbeddedClass'.
WR <: ClientID=1 ClientName=TestClient Schema=MyFirstGloBase Action=ePROCESSTRANSACTION ObjID=4.0.28 Err=0
Storing the object as such was successfully completed in the inner transaction without errors.
TRX ]: ClientID=1 ClientName=TestClient Schema=MyFirstGloBase Action=eSTORE Err=0
Since no errors occurred, the storage transaction was completed, everything is stored.
It shows which requests a client sends to the GlobalObjectsServer.
This display results from the following code snippet:
It is displayed when a database is reindexed.
It is displayed when a database is opened and the index is read.
It is displayed when a database is closed and the index is stored.