Any pattern to handle v. high freq. requests?

Hi,

A CORBA client sends us (CORBA Server) a request and we (the Server) is expected to return back a sucess/failure. This we are doing by validating the request thru DB.

Problem: The frequency of requests are around 100 req./sec. Total volume: 1 million/day. We are expected to almost immediately respond back with "answer" as soon as we receive them!

Any of you, could you please help me out here? Having tough time coming up with a highly optimized design pattern here. Note: The data involved in processing is of a high volume and calculations are also high -- maybe here, I could use the Stored Proc. of Oracle, however putting all this in memory may not be feasible.

Thanks for all the help beforehand,

Regards,

Baivab

[775 byte] By [baivab] at [2007-9-27 1:59:13]
# 1

Not exactly a pattern but maybe a few items to tick off

Architecture

=========

Numer of server processes that may process requests.

CORBA thread settings which can be configured per process.

Pooling of DB connections per process for use by incoming requests.

Any other resources which could be pooled ?

What locking criteria do you require for the data. If the requests do not modify the same data then caching of data is an option otherwise your dealing with synchronisation of requests.

If the choice is between stored procs and in memory data caches then the latter would be my choice. Of course if you go the stored proc route you sacrifice db vendor independence.

Analysis

=======

Profile the request within a process to determine where time is spent.

If possible profile the machine the process is running on to see CPU, io, activity.

Could the DB could be better configured across its disks.

Profile DB activity to determine optimum indexes.

Apologies if this is stating the obvious.

Cheers,

mairt

mairt at 2007-7-4 20:43:32 > top of Java-index,Other Topics,Patterns & OO Design...
# 2

Hi all,

A few additional points. Am using VisiBroker, client-side - also. Thread settings thru Visi, guess possible and can only be done in Server side, as we have no control on the client, i.e. C++ appln. Thus, point 1: Servicing the requests thru a pool of server objects - considered, DB Connection - thru pool and finally threading the activity and "common variables" - making thread safe also considering.

What I am looking at is a pattern, which above all this will help. i.e. a pattern which is generally used when a high volume of method calls are made on a server and the frequency of the calls are also high. The response to such calls should be as much optimized as possible.

Of course, there could be Visi's special features or ORB features which may additionally help. If anything on that, also would be grateful. Not much knowledge on these ORB/CORBA/VisiBroker stuff - unfortunately!!

Thanks gurus here .. a due I guess in advance :)

Regards,

Baivab

baivab at 2007-7-4 20:43:32 > top of Java-index,Other Topics,Patterns & OO Design...
# 3
Check out the patterns here http://www.javaperformancetuning.com/tips/patterns.shtmlI haven't looked at them in detail.Cheers,mairt
mairt at 2007-7-4 20:43:32 > top of Java-index,Other Topics,Patterns & OO Design...
# 4

baivab, I don't think you are looking for a pattern here, I think you are looking for a product group. You need an orb, database and platform capable of doing parallel processing within a cluster. The problem you set is one faced by many existing OTLP systems. You can come up with techniques(patterns) to optimise the processing path of a request, its Existencetime, but ultimately to achieve high Throughput you need to address Concurrency issues.T=C/E and unfortunately in many(most) systems increases in C have negative impact on E (it also increases) due to resource utilisation (queuing theory), this is an inherent weakness in SMP systems and is the major benefit of genuine share-nothing clustered solutions.

Moore

MooreEwing at 2007-7-4 20:43:32 > top of Java-index,Other Topics,Patterns & OO Design...