What exactly is MIDAS in Delphi? What are its related components? MIDAS (Multitiered Distributed Application Services) multi-layer distributed application service
The Multi-Tier structure proposed by Delphi is to get the dbExPRess, ADO, BDE, SQL Link, DataMoule in the original Two-Tier front-end application to another NT server (the so-called application server), and the front-end application Only one left
executable files and MIDAS.DLL, and the DataMoule moved to the NT server becomes a COM program (Remote DataModule).
Note: The front desk must publish MIDAS.DLL to the system directory.
(1) The foreground program will make a request by calling the method (interface) provided by the application server.
The application server will respond to this request and send a corresponding SQL command to the background database, and the backend database will return the DataSet generated by executing the SQL command to the application server.
Note: Delphi provides the Type Library to help the application server define COM methods (interfaces)
(2) The COM program on the NT server transmits SQL to the background database through intermediate software (dbExpress, ADO, BDE, SQL Link).
When the application server wants to transmit the read DataSet to the foreground, it must use the DCOM mechanism to perform it. The TDataSetProvider component provided by Delphi will compress and divide the read DataSet into segments of data packets,
Pass to the front desk via DCOM or TCP/ip.
Note: Delphi provides the RemoteDataModule wizard to help you generate the structure of the COM program.
Since Delphi's program has a special mechanism to transmit DataSets, Delphi also implements an interface called IProvider (i.e. TDataSetProvider), to help COM programs on the application server send DataSet data.
(3) The front desk program and the COM program on the NT server communicate with each other through the DCOM mechanism
The foreground application communicates with the application server through MIDAS.DLL. The foreground MIDAS.DLL will restore the received data packets sent by the application server into DataSet and throw them to the TClientDataSet component in the foreground program.
Note: The foreground program must provide the corresponding TClientData component to correspond to each IProvider (i.e., TDataSetProvider) on the application server. When the user modifys the foreground data, the only thing that is modified is the Dataset of the Cache (cache) in the foreground. Finally,
You must use the TClientData.ApplyUpdate method to write the data of the foreground change back to the background database.