RunUO Community

This is a sample guest message. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, as well as connect with other members through your own private inbox!

Data Storage

W

Wasted

Guest
Data Storage

How will the Data Storage Model be? SQL? Plaintext? XML?
 

krrios

Administrator
The world file is saved in a binary format. Accounts are currently also binary, however I am looking to move them to an XML format.
 

Mike_McBrien

Wanderer
XML format would be greatly appreciated on the webdesigners point of view... easily being able to integrate current users setting using XML from a website seems almost a needed thing.

Keep up the great work guys!
 
R

Rainman

Guest
I agree mike, it would be great to have the feature of having an entire account center built into the project for easy registration\edit\information.
 
W

Wasted

Guest
hummmm.... =(

I think SQL would be great....

what are the pros and cons between binary and sql?
 
L

Lost User

Guest
Well an XML save format would be a good way to make the saves take up a helluva lot more HD space. I would personally go for a binary save, or SQL if SQL compresses it's data (I have 0 experience with SQL).
 

Falkarma

Wanderer
Can't be sure, but : Datas of the save are surely all taken to memory on load of the files, or most of it. If that the case, you don't want to have an SQL server (or whatever) running on your server computer taking processor and memory.

That a guess.
 
C

Chaos

Guest
mySQL uses very minute amounts of processor/ram usage.

Krrios, possibly make it to where we can have data files saved to either a local DB, remote DB, or standard binary.

That way people with LANs could have a dedicated DB server using EITHER linux or Windows and just have a windows box actually serving the shard.

Of course make this optional, everyone doesnt have a LAN and a second PC.

just a thought.
 

Ryan

RunUO Founder
Staff member
Using databases wouldnt be difficult at all. The true problem for this would be the design/structure of the database. Also imagine trying to shove a world save through an ODBC connection... (thinks UDL)... still though... thats a lot to do....

Got any SQL Server/MySQL genious' out there that would care to comment on the idea?
 

seank

Wanderer
As krrios knows, I did some benchmarking of XML last week. Saving the accounts in XML isn't a problem, but no way for world saves.

Saving 10,000 items in XML took 30 seconds on a 350mhz machine. Sure the machine is slow and underpowered, but the process was only saving XML.. it wasn't handling other server things at the same time.

Just an FYI.
 
H

Hotdog

Guest
XML makes your data file size alot larger ecause of the tags and formatting needed. SQL will also have a major impact on load and save times. SQL is really designed for more then one user working on the same data at once. So personally I think the load and save times are more important then what format the data is stored in.
 

Ryan

RunUO Founder
Staff member
Actually done properly there could be a minimal hit for any format. Provided you have enough RAM :)

I personally love the binary format we have. Our save times rock... :)
 
C

Chaos

Guest
I agree with Ryan, I think we should have binary saves standard, and maybe someone can make a world file editor (something that puts that binary into something people can read).

No matter how good the server is, at one point or another, youll need to access those world files manually!

I still think itd be great to use ODBC connections! Itd mix it up a bit!
 

ArconX

Wanderer
Chaos said:
I agree with Ryan, I think we should have binary saves standard, and maybe someone can make a world file editor (something that puts that binary into something people can read).

No matter how good the server is, at one point or another, youll need to access those world files manually!

I dont even think you need a binarie world file editor ... maybe later on, but the more inportand thing is just a binarie repair program, and thats it ...

Hell, if the binarie system is build like a SQL database, then you can access the binarie's themself widout a problem with a ODBC connection, and then there is no real need for a binarie editor ...
 
C

Chaos

Guest
Well, either way, just something to repair world files, cause with my experiences with this in the past, a world will get trashed at least once.
 

Zippy

Razor Creator
On databases:

As far as I know, MySQL would not handle a world file save very well either... Where sql is useful is a place like accounts, you could then easily make some account tools in php to use the same tables as the server uses...

But, there no time for this now, there's too much other core work to be done to be worrying about database pipe dreams :)

Although I think I could export mysql++ to a dll that runuo might be able to use.... I'll have to look into how hard it would be to get runUO to use a C++ dll :)
 
W

Wasted

Guest
Why don`t use a data layer .dll, so user can choose between Binary data storage and SQL, by changing something like this in the .cfg file:

[code:1]
// Data Storage
// 0 = Binary
// 1 = SQL
DataStorageModel=1
[/code:1]

?
 
I

Ivel

Guest
Couple points here. First, if done correctly, a XML storage system, or a SQL2k storage system would work perfectly for any and all data storage.

For the argument that XML would take up loads of HD space, I'm sure it would if you wrote long sloppy XML.

As for SQL not handling bulk transactions for things like a worldsave very well, I have to totally disagree with that statment. Especially using .net, there is zero reason for not using SQL server. With things like updategrams and diffgrams at your disposal, coupled with FOR XML clauses and TRANSACTION statements, there is zero reason why SQL server could not be used. And that brings up another point. If you use transactions, you would never need to worry about shard warps. well, i guess for that to be true, you would have to be writing to the SQL server in realtime. I'm sure that could be done as well too, but that would take some thought.

Well, figured i'd pop in and lay a few things out, but due to conflict of intrests, i can't really be of much help. Feel free to post questions here and i will give them my best answer when i have time to read this thread. I'm a SQL guy at heart, so topics like this really interest me.
 
Top