|
|
EAF DBLog
Here the EAF DBLog is taken as example of
the sub-systems. The DBLog application is used to implement
one-way communication from L2 to DB, like inserting, updating or even
deleting records. The purpose of this application is to keep the
logical separation of the L2 system from the DB, so that the Level 2
can still run smoothly even when the database is down or the
connection between Level 2 and database is broken.
As illustrated in Figure 1, DBLog performs all the inserts, updates
and deletes made from the L2. Each Level 2 application that may need
to perform any of these operations builds a request object and inserts
it in a shared queue object, and then sends a message to DBLog, which
takes this request and tries to perform it. In case the database is
down, the network connection to the DB server is broken or any error
in the request at SQL level, DBLog inserts a line in each related log
files. Then removes the request from the queue and continues with the
next requests, until all of them are performed.

Figure 1:
Functionality of Level 2 DBLog, with relationship with others
In the Figure 1, the Msg1 is a message used to communicate with
L2Monitor and other Level 2 applications, while Msg2 handles DB
related requests. Two shared memory areas are assigned to store
requests from other applications (queue1) and DB related requests
(queue2). Two Dynamically Linked Libraries, DLL1 and DLL2, are used to
communicate with MMFs and Database, respectively.
The connection to the DB is implemented using either ODBC or ADO
technology. In this writing the ODBC technology was chosen because of
the speed and reliance of its connections, plus its easy
configurations.
DBLog represents the link between Level 2 and DB, so all the tables
that may be affected by the Level 2 are really accessed with DBLog.
DBLog does not directly affect any of the HMI screens.
|