Types of instantiation model of MIDAS application COM server in Delphi
(1)Internal Instance
Create an In-PRocess COM program, namely the DLL server.
(2)Single Instance
If each client program runs an instance of the server program, this model is used. That is, each foreground program connected to the online will have a corresponding application server running on the server. Therefore, the query sent by each foreground will be sent. Have their own
The independent Process application handles it, and there is no need to queue up at all. However, it will occupy system resources and affect the overall operation efficiency of the server.
(3) Multiple Instance
If the client program shares the server program, this model is used. It means that an application server can handle the links of several foreground programs at the same time. From a technical perspective, all foreground programs can share a single Process application service.
The biggest advantage of this mode is that it is faster to activate and run, does not consume too much system resources on the server, and is more convenient to manage. However, it hides a problem that does not have multitasking, if a front desk The user sent a query
Request, and how many MB of the result may be generated by this query requirement? At this time, the query requirements issued by other online front-end users must wait for the previous query requirements to be completed and obtained corresponding before they can continue to run. This may consume a lot of time,
Moreover, if an error occurs in a query of a foreground program, other query requests queued behind will die.
Note: So which mode is used to create an application server? The answer is: it depends on the system requirements. Simply put, you can create two sets of application servers, one group adopts the Multiple Instance mode, and the other group adopts Single
Instance mode, you must divide the types of programs into two types: one is a write operation with a small or less important query data volume, and the other is a write operation with a large or important query data volume. This way, your front desk program can be placed
Two TDCOMConections are connected to two application servers of different modes to perform work of different natures.