 |
This page captures a message exchange on the SLEE Interest list between Andreas Nilsson and David Page. Feel free to add, comment or modify if you found better ways to address the problem.
Question: How to write a scalable service, which intercepts JCC call requests
- The Service MUST be scalable
- It should be really easy to attach new services
The basic idea is that I should have a main-service receiving/sending calls via a JCC resource adaptor. This service checks with a database if the calling or receiving part of the call has any service connected to it. If there’s no service connected to the call, the call is just forwarded but if there’s a service connected to the call the main-service should fire a custom event that invokes the appropriate service and delivers the call to that service.
Using this model I’ll minimize the database lookups because this I a really bottleneck. If I have let say 15 services on the SLEE and all services directly talks to the JCC adaptor every call generates 15 database lookups. If I do as I mentioned I could minimize this to 2 lookups, first the main-service and then the service that contains the business logic.
The model also makes it rally easy to install new services to the SLEE.
All that have to be done is to deploy a service that has the custom event as an initial event.
Now to the problems with this model...
- To make it really easy to attach new services all services has the custom event as initial event.
This implies that the main-service invokes ALL other services and the service it self must check with the event if it is the correct service. This is causing an unnecessary load to the SLEE. It would be neat if it was possible to configure the main-service to fire different custom events for each service. But I just can’t figure out a smart way of doing this via profiles. The initial event should then not be deployed with the main-service but with the service that includes the business logic, all to do the service as module based and disconnected as possible.
- I would like that the main-service handles all communication with the JCC adaptor but how do I send an event from a service to the main-service? I need to do this in order to forward the call.
I would really appreciate some ideas and tips.
Regards
Andreas
Answer: Use Address Profile Tables and the AddressProfile identifier initial-event-select variable
Have a look at section 10.13.2 for a description of AddressProfileTable and section 8.5.2 (page 112) and section 8.5.3 (page 114) of the SLEE specification for the role of AddressProfiles in calculation of the convergence name. You will also see an example deployment descriptor fragment on page 108.
If you follow this approach, then you may create AddressProfiles per service for each Address that should cause the service to be triggered. There would be no need to talk to an external database at all.
You could also adopt this approach in concert with 'main-service'. Create an AddressProfile for each service with a single address that 'identifies'
the service. Main-service could fire its custom event with an address that corresponds to the service to activate for the call.
D
-- Main.ivelin - 19 Mar 2005
|