Skip to main content

Problem:

What are the effects of the gatekeeper cache to connect to multi-profiles server

Resolution:

Product Name: Visibroker for Java
Product Version: All including Visibroker 8 Tier 1 & 2 release
Product Component: Gatekeeper
Platform/OS version: All
JDK: All


Introduction

When a corba client needs to invoke a corba object provided by the server, the middleware has to create a stub object in the local memory before connecting to the remote object. Similarly, gatekeeper has to create a proxy object before connecting to the server.

Gatekeeper has provided the vbroker.gatekeeper.cache.size property to configure the usage of the cache within the gatekeeper.

Besides the potential performance improvement or degradation, the use of gatekeeper cache has an impact on the behaviour of the gatekeeper in connecting to a multi-profiles server.

Proxy Object is cached

If the proxy object is cached in the gatekeeper cache, the gatekeeper will retrieve the proxy object and connect to the server. If the proxy object belongs to the 2nd profile of the server, the gatekeeper will connect to it instead of to the 1st profile. This behaviour is applicable regardless whether the 1st profile of the server is up or not.

Proxy Object is not cached

When the gatekeeper cache is disabled, the gatekeeper will create the proxy object based on the IOR passed by the client for each request. The gatekeeper will always try to connect to the 1st profile of the server. If the gatekeeper is unable to connect to the 1st profile, the gatekeeper will try to establish connection to the next profile of the server. Once the 1st profile of the server is up, the gatekeeper will connect to the 1st profile. This behaviour is applicable on all requests for both new and existing corba objects.

Possible usage scenarios of gatekeeper cache

There are 3 scenarios how an application will make use of the gatekeeper cache

  1. Default – The gatekeeper will cache a maximum of 64 proxy objects.

    If a bank manager needs to retrieve 100 accounts, the 1st 64 account proxy object will be cached. The remaining 36 accounts will not be cached.

  2. Unlimited – The gatekeeper will cache unlimited no of proxy objects. You need to set a value of 0 for vbroker.gatekeeper.cache.size

    All 100 account proxy objects will be created and stored in the cache. You need to cater for the potential OutOfMemoryException thrown by the gatekeeper

  3. Disabled – The gatekeeper will not cache any proxy object. You need to set a value of -1 for vbroker.gatekeeper.cache.size

    All 100 account proxy objects will be created dynamically and discarded.

Author: Matthew Ong

Old KB# 26769

#VisiBroker
#Security