[MUD-Dev] Persistent Worlds
Ryan Rhodes
ryanshaerhodes at hotmail.com
Fri Feb 23 03:06:06 CET 2001
Jon Lambert wrote:
> The object manager simply hasn't a clue what the function of any
> given class is. It only knows how frequently it is accessed. If I
> did make it aware of the role of an object, I would likely have to
> reintroduce strong coupling to the other pieces of my application.
> I suppose if I wanted to I could add a bias flag to the interface to
> allow requestors to indicate to the object manager that the object
> requested should be treated differently.
No, theres no real reason to treat the objects on a per class basis.
I was just trying to get the logic down because I hadn't ever really
thought of it in this generalized fashion. Player seemed a good
example.
>> Of course I'm asking myself now why I'm even talking about a memory
>> caching system in java, because with the garbage collection I can't
>> even really deallocate the memory to take an object out of the
>> cache anyway can I?
> I bet caching has its uses in Java. The cache would just hold the
> last reference to an object after you are done with it. That object
> will not be destructed and garbage collected. Therefore you need
> not have to ask your database for it, and construct it.
> So the cache could be just a collection of Objects. All you need is
> a routine(thread) to manage that cache. That routine would limit
> the size of the cache and delete unused items out of it.
Thats true. With the garbage collection java has had up until now,
I've always taken the philosphy that if you are going to create an
object, try and make it be one your not gonna destroy right
away... trying to avoid a big shutdown when the garbage collector
comes along and frees everything at once. To me, that sounds like
just hell on a mud. It sounds like the newer JVM's have alot better
garbage collection, so maybe I can change my primitive thinking :)
Ok. I couldn't understand why the need to abstract the object model
into your Object Manager sort of design, at first, but I'm starting to
warm up to it. For it to be really decoupled from the game though,
you would need a way to count the object accesses in a generic
fashion. I've never really understood this about "write your own"
caching. Is there some generic, low-level way to "Trap" an object
access? I can probably figure it out in java with a description in C
or some other language...
Ryan Rhodes
_______________________________________________
MUD-Dev mailing list
MUD-Dev at kanga.nu
https://www.kanga.nu/lists/listinfo/mud-dev
More information about the mud-dev-archive
mailing list