What is Midas in Delphi in the end? And what about his components? MIDAS (multitiered Distributed Application Services) multi-tier Distributed Application Service
Delphi proposed the multi-tier structure is the original Two-tier foreground application Dbexpress,ado,bde,sql link,datamoule, to get another NT Server (is called the application server), and the foreground program is left with a
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 the MIDAS.DLL to the system directory.
(1) The foreground program makes a request by invoking the method (interface) provided by the application server
The application server responds to the request by sending a corresponding SQL command to the backend database, which returns the dataset that executed 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 via intermediate software (Dbexpress,ado,bde,sql Link).
When an application server wants to transmit a read dataset to the foreground, it must take advantage of the DCOM mechanism. Delphi provides a tdatasetprovider component that compresses and splits the dataset into a section of packets
Pass DCOM or TCP/IP to the foreground.
Note: Delphi provides a remotedatamodule wizard to help you generate the structure of your COM program.
Because Delphi program has the special mechanism of transmitting DataSet, Delphi also implements an interface called Iprovider (ie Tdatasetprovider) to help the COM program on the application server to send DataSet data.
(3) The front-end program and the NT Server COM program is through the mechanism of DCOM to communicate with each other
Front-Office applications are communicated to each other through MIDAS.DLL and application servers, and the foreground MIDAS.DLL sends the received application server packets back to the dataset and throws them to the TClientDataSet component in the foreground program.
Note: The foreground program must provide the appropriate Tclientdata component to correspond to each iprovider (i.e. Tdatasetprovider) on the application server. When the user modifies the foreground data, the cache is only modified (cached) in the foreground dataset, and finally
The Tclientdata.applyupdate method is used to write the data of the foreground changes back to the background database.