concurency testing in thick client using more than 100 threads

Can you help me out in concurrency testing in thick client using more than 100 threads.My domain is stock market.
[127 byte] By [wantedsria] at [2007-11-27 3:52:28]
# 1
Hi all, Here actually what I want is how to perform the button event in 100 threads at a time to check the concurrency.Thanks in advance
wantedsria at 2007-7-12 8:56:31 > top of Java-index,Core,Core APIs...
# 2
Sorry dude ,just be more elaborate as its not clear what you are trying to do.Is that button in t application is accessed by 100 threads or you want to fire 100 threads,or you want to update several things running in separate threads.
khangharotha at 2007-7-12 8:56:31 > top of Java-index,Core,Core APIs...
# 3

Hi,

Thanks for giving response.

My domain is Stock Market and using thick client.

I am saving one record in to the database in my application by clicking on Register button. If I were click on Register button in 100 machines at a time, then the record should save through only one system in the remaining machines i need to get exception.

But I can't check it using 100 machines, So do we have any approach to check this scenario in my system i.e. only in one system.

Thanks.

wantedsria at 2007-7-12 8:56:31 > top of Java-index,Core,Core APIs...
# 4

This is an interesting problem.

Basically as far as implementation is concerned ,you must have done something like version ID ,and than checks if some other request with lower version ID is not trying to update.

For testing depending on your application ,you can have multiple instances open and than you try to simulate this process.

I think if you can maintain concurrency in 2-3 systems while testing than it should not be a problem with even 100.

please do post ,if you find some new innovative solution :)

khangharotha at 2007-7-12 8:56:31 > top of Java-index,Core,Core APIs...
# 5

Hm interesting problem ,

one way i think of doing this is

1) decide at what time you want to fire the actions . for example you want to fire after 9000 millisecond (9 seconds)

2) write the main as

class mainclass {

static long timetofire=0;

main() {

timetofire = system.currentmillisec..() + 9000 ;

//spawn 100 threads

}

}

run of the thread will be like this

run () {

sleep ( timetofire - system.currentmillisec())

//firetheAction

}

Even though the thread scheduling will delay few milli seconds . but if you try this with multiple process i think you will get the same result as you ar expecting .

Vijay

bhvijaya at 2007-7-12 8:56:31 > top of Java-index,Core,Core APIs...
# 6

thank you khangharoth,

I have already tried it with 15 systems. Its working properly with 25 systems. but my client wants to check it in more than 100 systems as he got some exception when he tried with 30 systems.

thank you vijay,

i ll try with your solution, but can we say that those 100 thread will perform the same action at a time in this.

wantedsria at 2007-7-12 8:56:31 > top of Java-index,Core,Core APIs...
# 7
yes , except minor delays for thread scheduling this should work . Try with multiple process by fixing the time to some constant time (like say to execute at 2:30 PM )
bhvijaya at 2007-7-12 8:56:31 > top of Java-index,Core,Core APIs...