MUD-Dev
mailing list archive
[ Other Periods
| Other mailing lists
| Search
]
Date:
[ Previous
| Next
]
Thread:
[ Previous
| Next
]
Index:
[ Author
| Date
| Thread
]
Re: [MUD-Dev] Persistant storage.... My current idea.
On 28 Mar 98 at 21:53, Ben Greear wrote:
> *********************
>
> I'm currently planning on using one file, with certain blocks
> allocated within it for objects. It will basically be a linked
> list represented as a file.
>
> I'll have headers that point the the seek position of the next and
> previous element in the file. It will also keep track of the used and
> total space allocated for that element.
>
> If I need to update, and it's too big, it will be moved to the end
> of the file, and the previous element will get it's space. (I'll deal
> with boundary cases, sufice it to say.)
>
> Now, this reeks of inneficiency when trying to look up an object based on
> some key (object number in my case, probably 8 bytes ).
>
> However, I'm going to create a hash table at boot time to link an object
> id with the seek position of that object in the file. I believe this
> should give me as quick access as I can expect.
>
> *************************
Why not put your headers (pointers to the seek pos)
into a separate file, an index file.
Then you'd be very similar to an xDBM or ISAM. :)
> Some other things: I'll have objects unique across the universe, even
> different servers. (Each server will be assigned an ID, and each object
> within that server will have a unique ID. So, given both ID's, I can
> guarantee uniqueness.)
>
Very much like COOL..
struct ObjID {
short serverid;
int objectid;
}
--
--/*\ Jon A. Lambert - TychoMUD Internet:jlsysinc#ix,netcom.com /*\--
--/*\ Mud Server Developer's Page <http://www.netcom.com/~jlsysinc> /*\--
--/*\ "Everything that deceives may be said to enchant" - Plato /*\--
- Thread context:
- Re: [MUD-Dev]: smoothing,
J C Lawrence claw#under,engr.sgi.com, Tue 31 Mar 1998, 23:59 GMT
- UML & CORBA,
Greg Munt greg#uni-corn,demon.co.uk, Mon 30 Mar 1998, 21:53 GMT
- Persistant storage.... My current idea.,
Ben Greear greear#cyberhighway,net, Sun 29 Mar 1998, 05:34 GMT
- Re: (rec.games.mud.admin) Roleplaying (fwd),
Nathan F Yospe yospe#hawaii,edu, Fri 27 Mar 1998, 20:37 GMT
- META: New Mail server and ISP,
J C Lawrence claw#under,engr.sgi.com, Fri 27 Mar 1998, 18:23 GMT
- Predicting future motion intelligently,
J C Lawrence claw#under,engr.sgi.com, Thu 26 Mar 1998, 23:04 GMT
[ Other Periods
| Other mailing lists
| Search
]