• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Create multiple Servants/objects

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
INSTRUCTIONS:

The first POA-based server you need to develop is the “simple server”. This server should perform the following tasks: 1. Start a timer. 2. Create 1,000 Count objects with names “My Count1” ... “My Count1000”, and activate each object at the time of its creation.
3. Stop the timer and print out the average time to create and activate each counter 4. Register each Count object with the Naming Service (you do not need to time how long this operation takes) 5. Wait for client requests
Note that this server does not use a servant manager.
The client for Server 1 should behave in the following way:
1. Create an array of 1,000 Count object references, binding to each one in the Naming Service 2. Start a timer 3. Invoke 1,000,000 increment calls on randomly selected counters from the set of 1,000 available counters. This means you make 1,000,000 TOTAL increments during each client run, with the 1,000,000 increments being randomly distributed among the 1,000 available objects. 4. Stop the timer and print out the average time to perform each increment operation 5. After the calls to increment, calculate the average sum value of all the 1,000 counters and print out the value.

So Far I was able to make it work with 1 servant, having trouble following instructions to get it to work with 1000 servants and have it work for the client. Please help!

Working code for 1 servant:
Forum is not allowing me to Attach the count.IDL, but here is what is in it



SERVER



CLIENT


SERVANT

 
reply
    Bookmark Topic Watch Topic
  • New Topic