Database Idea

EQ2Emulator Development forum.

Moderator: Team Members

Post Reply
User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Database Idea

Post by Scatman » Tue Feb 28, 2012 6:11 pm

John, I know you wanted me to put the LogWrites into a queue and then have a separate thread write them to the console/file right? Well I was thinking, we can do this for database queries too? I wanted to rewrite our database interaction methods anyway so we never have to use the actual mysql C API. Do you think this would be worth doing? Whatcha guys think?

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Database Idea

Post by John Adams » Wed Feb 29, 2012 12:27 pm

Not sure I am following entirely. Assuming you are talking two different things (logging thread and world DB queries sepErate from logging entirely), yes I would definitely like the LogWrites() to be queued, since they stampeded over each other right now, the more logging I add.

As for World's database calls, I do not mind at all if you want to update stuff to be better, faster, stronger, etc. Just keep in mind that more than just EQ2World uses the dbcore stuff. If your re-write there causes Login, Patcher, Parser to need a re-write too, we might need to go delicately into it.


We also want to try and stick to our project plan, where possible... though DB reads/writes could always use optimizing, so I consider this a core necessity. With 1000's of spawns in a zone now, logging in/zoning is only getting slower and slower... so maybe this is time to fix that?

User avatar
alfa
Team Member
Posts: 550
Joined: Fri Jul 27, 2007 6:24 pm
Location: France
Contact:

Re: Database Idea

Post by alfa » Wed Feb 29, 2012 2:37 pm

John Adams wrote:With 1000's of spawns in a zone now, logging in/zoning is only getting slower and slower...
Too mutch zone entity load, on live never ever see 300+ entity loaded. Little off topic, but wait for quest text/interaction and have to move for force the client to display it is a pain too :p)
Fight with me... Or die, like the rest.
J.A. say: "I think Xinux tried to tell me this, but I ignore most things he suggests."

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: Database Idea

Post by Scatman » Wed Feb 29, 2012 9:16 pm

Well that might be because it's the raw spawns with every possible spawn loaded and not cleaned to what live should be like. Unless people have been working on it?

User avatar
Trahelion
Posts: 69
Joined: Tue Jul 05, 2011 5:28 pm
Location: The Moon.

Re: Database Idea

Post by Trahelion » Thu Mar 01, 2012 4:17 am

I Agree!

Image
From the moon, With love.

The Whole of My EQ2 Emu Experience

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Database Idea

Post by John Adams » Thu Mar 01, 2012 8:50 am

Scatman wrote:Well that might be because it's the raw spawns with every possible spawn loaded and not cleaned to what live should be like. Unless people have been working on it?
Naw, this is the TessEQ2 DB even, with hundreds of spawns regardless. Still takes a lot longer to load than it should. And like Alfa says, loading entities counting >>every<< spawn in the zone, regardless what you can see in proximity, isn't quite right.

We've lived with it up until now. And will continue to do so til it occurs to us how to do it better.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: Database Idea

Post by John Adams » Thu Mar 01, 2012 11:24 am

Back on topic, Scat and I have decided to move forward with this change.

It's major. It will require the C++ devs to re-think writing queries and reading data sets. Nothing we can't handle, but once this is implemented, anything *NEW* must comply to the new system. Over time, we can convert the existing WorldDatabase.cpp functions to the new format -- at the same time, implementing the system-specific DB.cpp's like we have done for some of the current systems.

This will get documented clearly after implementation and we have some time to experiment with how it works.

User avatar
Scatman
Retired
Posts: 1688
Joined: Wed Apr 16, 2008 5:44 am
EQ2Emu Server: Scatman's Word
Characters: Scatman
Location: New Jersey

Re: Database Idea

Post by Scatman » Thu Mar 01, 2012 12:47 pm

Dont let that post scare you either :P its super easy to use and no meed to worry about memory leaks anymore! Also you can access columns by their name as well as index.

User avatar
John Adams
Retired
Posts: 9684
Joined: Thu Jul 26, 2007 6:27 am
EQ2Emu Server: EQ2Emulator Test Center
Characters: John
Location: Arizona
Contact:

Re: DatabaseNew

Post by John Adams » Thu Mar 01, 2012 1:50 pm

Doesn't matter. No one reads what I write anyway, Scattie ;)

Post Reply

Who is online

Users browsing this forum: No registered users and 0 guests