Keninishna
Member
Hi all, I'm learning c# and decided this would be a good project to do it. Right now analyzing the code, ServUO uses a very complex serialization system to save and load the world states.
At first I was thinking of using a object oriented database like db4o:
https://en.wikipedia.org/wiki/Db4o#One-line-of-code_database
Only problem is its no longer maintained but I might try to implement it anyways if its faster. What I'll do instead is write the code to store everything in a SQL database so people can manage their own dbs plus its probably more newb friendly (plus I'm already a sql dba).
I was thinking about something like cassandra because its more scale-able, although I doubt any one shard is going to be that huge. Another thing I want to achieve is no waiting for the world to save so its just continually persistent.
I've written some simple classes to save the world to a database which doesn't seem too hard its just world.items world.mobiles etc... although I haven't compiled it and tested it out yet because I'm noticing everything has a serialize and deserialize class to it. Like every monster, npc, its coded in everywhere and I'm not sure if I can direct the flow of code to avoid it maybe by changing the base serialize class but at that point I might as well rewrite like a large chunk of ServUO. I'm watching Alan's (aka itwouldbewise) videos on youtube and saw him some on twitch and its really helpful but maybe some other devs around here know some things and could give me an idea on how much work would be needed to just wrap in a sql driver and get it saving to that. I figure without the server having to serialize everything it should save a lot faster and if I just want to eventually get a persistent world state I could use the delta ticks and maybe some compression and just load the delta into a memory queue and send it off to the db (it looks like the code already does some of this.) If I ever get this done I'll upload it to git and submit a pull request or fork it or code it to convert the serialized dbs to the sql db. Thanks for any feedback.
At first I was thinking of using a object oriented database like db4o:
https://en.wikipedia.org/wiki/Db4o#One-line-of-code_database
Only problem is its no longer maintained but I might try to implement it anyways if its faster. What I'll do instead is write the code to store everything in a SQL database so people can manage their own dbs plus its probably more newb friendly (plus I'm already a sql dba).
I was thinking about something like cassandra because its more scale-able, although I doubt any one shard is going to be that huge. Another thing I want to achieve is no waiting for the world to save so its just continually persistent.
I've written some simple classes to save the world to a database which doesn't seem too hard its just world.items world.mobiles etc... although I haven't compiled it and tested it out yet because I'm noticing everything has a serialize and deserialize class to it. Like every monster, npc, its coded in everywhere and I'm not sure if I can direct the flow of code to avoid it maybe by changing the base serialize class but at that point I might as well rewrite like a large chunk of ServUO. I'm watching Alan's (aka itwouldbewise) videos on youtube and saw him some on twitch and its really helpful but maybe some other devs around here know some things and could give me an idea on how much work would be needed to just wrap in a sql driver and get it saving to that. I figure without the server having to serialize everything it should save a lot faster and if I just want to eventually get a persistent world state I could use the delta ticks and maybe some compression and just load the delta into a memory queue and send it off to the db (it looks like the code already does some of this.) If I ever get this done I'll upload it to git and submit a pull request or fork it or code it to convert the serialized dbs to the sql db. Thanks for any feedback.