Object pool and JITA in COM +

Source: Internet
Author: User

Object pool(Object pooling) And instant activation (Just In Time Activation) Is two different instance management mechanisms provided by COM +. It seems that many people do not know much about the object pool and JITA design ideas in COM +, or even have some misunderstandings. Let's just say a few words here.

Pooling is a common design concept.Think, the pool is the buffer, and the object pool is the buffer of the COM + object (which must be pooled. I generally think that the so-called pooled buffer is used to optimize the memory access efficiency.Further improvements are needed: Pooled buffering is used to control the cost of creating pooled objects and improve the Reuse Rate of objects to optimize access efficiency. In other words,The pooled buffer mechanism is most effective for Object Management with extremely high costs. It is proposed to avoid the creation of expensive objects from being repeatedly created.,The optimized parameters can be intuitively defined as: Number of reuse of objects/number of object creation times. The larger the value, the more obvious the optimization effect. Experienced users can contact the database connection pool and callLevel thread pool and other pooled application instances.

Many people do not understand the design idea of instant activation (JITA. JITA indicates that the client maintains a proxy reference for the COM + Object Server and does not know whether the server is in the instantiated state. When it references the COM + server, COM + will instantly activate a Server Object (that is, to generate a new instance of the Object Server). After the client references it, the server object will be immediately Deactivation by COM + ), and then destroy it. The JITA mechanism is the extreme opposite of pooled buffer, that is,JITA is used to control the instantiation (exclusive) time of scarce resources and improve the Reuse Rate of objects.The optimization parameter can be defined as: the number of utilization of scarce resources/the average monopoly time of scarce resources. The larger the value, the more obvious the optimization effect.The JITA mechanism is suitable for application scenarios where object creation is not expensive, but its exclusive resources are extremely limited..

Finally, let me give you a specific example. In a Distributed Information Processing System (such as a banking system) with high universal requirements (pervasive), there may be many types of clients to support, there are both B/S-based thin client (such as online banking customer service) and C/S-based rich client (such as a banking business unit ), in this application environment, pooled buffering can be used to improve the access efficiency of a large number of thin clients to the backend COM + server/database. client browser requests are generally submitted online for a short period of time, therefore, it is not dedicated to server resources, but has high reusability. for a limited number of banking terminal terminals, The JITA mechanism should be used to optimize the backend access efficiency, the impact of long-term online business terminal occupancy on scarce resources on the entire system cannot be ignored. In a specific application, pooled buffering and JITA are not mutually exclusive. They can be combined completely. For example, if an object is inactive, it is not completely destroyed, but is placed in a buffer pool, to achieve higher resource utilization and access efficiency.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.