• 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

Is it ok to create large numbers of javabeans and objects?

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi everyone,
I am just wondering about how javabeans (and objects I really) are typically used. Lets say, as a hypothetical scenario I have a computer program that deals with lots of logged in users. Would it be appropriate to hold loads of user javabean objects in some form of collection?
Basically what I am wondering is whether you are supposed to use classes and javabeans to create large numbers of objects held in memory. How many simple objects can a modern computer handle easily.
I'm just wondeirng if there is a different model. Maybe you're not really supposed to use a bugger load of objects or java beans. But then how else do you store representations in memory?
A big ol fankoo to anyone who cares to share any advice.
Kindest Regards
Simon Harvey
 
Ranch Hand
Posts: 35
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
At first. Everything is Object in Java.
Collections are used to store data in memory. But if you have LOTS of users to be logged, there are two cases:
  • users aren't online at the same time
    So there's no need for storing all of them in memory (in the collection). Use disk space.
  • lots of users are online at the same time
    They want to work. If they could not work, they would not be there. So if the system is ready for serving so many users, it will be ready for logging them. Use super hardware, eventualy (surely) some kind of extra optimalization.

  • [ July 13, 2003: Message edited by: Marilyn de Queiroz ]
     
    Simon Harvey
    Ranch Hand
    Posts: 79
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    Thank you Pavel.
    I'm going to take it from your answer that I shouldnt worry to much about making javabeans and storing them (although of course I wouldnt store something in RAM unless I needed to)
    If thats ok then thanks for your answer, if not then perhaps someone could post back quickly.
    Many thanks pavel
    Simon
     
    (instanceof Sidekick)
    Posts: 8791
    • Mark post as helpful
    • send pies
      Number of slices to send:
      Optional 'thank-you' note:
    • Quote
    • Report post to moderator
    I work with a Java client application that caches gobs of data to avoid time-consuming trips to the server. I'm sure we cache thousands of objects. You just have to keep an eye on your memory usage and make sure you can share the computer with whatever else is going on at the same time.
     
    Have you no shame? Have you no decency? Have you no tiny ad?
    a bit of art, as a gift, that will fit in a stocking
    https://gardener-gift.com
    reply
      Bookmark Topic Watch Topic
    • New Topic