Jump to content

ODBC in MaNGOS


Recommended Posts

Posted

i'm thinking that MaNGOS can be extended for using with other databases with ODBC

but then goes the question: Is a good solution ODBC or it will clutter up the code and the already db-handling code that is in the core is just too good to try ODBC?

for those who don't know what is ODBC

Posted

Well, ODBC is good but you get another layer of code which slows things down... We want MaNGOS to be compatible only with MySQL and PostgreSQL so there is no chance for ODBC to be implemented :)

Posted

infact most problem in sql queries compatibiltiy. Currently we use some std. SQL subset compatible with mySQL and PostgreSQL + small compatibiltiy fixes at code compile for some specific cases. If ODBC compatibel with its then why not, but i not think that mangos devs will intrested implementation by self...

Posted
i'm thinking that MaNGOS can be extended for using with other databases with ODBC
It's all about tradeoff between generality and performance. ODBC was originally created with 'buy bigger hardware' scalability in mind, so we'll lose ability to fine-tune settings such as locking policy in SQLite. And there are performance issues with Mangos already.
Posted
And there are performance issues with Mangos already.

why don't make a full audit of the source with a profiler to find all the mleaks and find places where the code can be optimized? does anyone know a good, free code profiler?

Posted
why don't make a full audit of the source with a profiler to find all the mleaks and find places where the code can be optimized?

We do know about most critical in terms of performance MaNGOS systems and patches are on their way :rolleyes:

Posted
hey vladimir, Oracle is not a good option?

I can tell you one thing. You will have bigger headache getting people to understand how to import data into oracle. Mysql setup and import is a breeze.

Posted
hey vladimir, Oracle is not a good option?
oracle is really nice, i work with it every day. however most of the mangos users would rather kill themself than understand how to work with oracle. oracle has amazing possibilities, but it's hard to use for someone who's not used to it.

and btw, such an oracle 11g is quite expensive and needs high-performance systems :)

Posted

->http://www.oracle.com/technology/software/popup-license/standard-license.html

LICENSE RIGHTS

We grant you a nonexclusive, nontransferable limited license to use the programs only for the purpose of developing, testing, prototyping and demonstrating your application, and not for any other purpose. If you use the application you develop under this license for any internal data processing or for any commercial or production purposes, or you want to use the programs for any purpose other than as permitted under this agreement, you must obtain a production release version of the program by contacting us or an Oracle reseller to obtain the appropriate license.

[...]

You may not:

- use the programs for your own internal data processing or for any commercial or production purposes, or use the programs for any purpose except the development of your application;

- use the application you develop with the programs for any internal data processing or commercial or production purposes without securing an appropriate license from us;

- continue to develop your application after you have used it for any internal data processing, commercial or production purpose without securing an appropriate license from us, or an Oracle reseller;

- remove or modify any program markings or any notice of our proprietary rights;

- make the programs available in any manner to any third party;

- use the programs to provide third party training;

- assign this agreement or give or transfer the programs or an interest in them to another individual or entity; - cause or permit reverse engineering (unless required by law for interoperability), disassembly or decompilation of the programs;

- disclose results of any program benchmark tests without our prior consent.

I would be interested in learning, but nothing I know of right now uses Oracle as a DB. Is the syntax similar to MySQL?

SQL is SQL, but the extensions to the default SQL are different. furthermore, oracle has PL/SQL

  • 3 weeks later...
Posted

Guys, the main problem is: who will maintain databases for different DB engines, provide patches etc? I see only few ppl who use PostgreSQL as DB Engine, 99% use MySQL. Don't you think that making support just because ' we want it, but we don't know if we would use it' is pointless?..

P.S. Prepared statements is a way to go for further DB performance tweaking... Thats my 2 cents ;)

Posted
But Ambal, After Oracle adquire Mysql, is very probable that dont continue free license.

MySQL already has commercial license, only Community Edition is free of charge. Thats why its free edition develops slowly now. So relax and have fun ;)

Posted

P.S. Prepared statements is a way to go for further DB performance tweaking... Thats my 2 cents ;)

YES! I don't know why sprocs aren't used. That would be the best way to go for what ever db server is used.

Posted
But Ambal, After Oracle adquire Mysql, is very probable that dont continue free license.

You mean after Oracle acquires Sun, since Sun acquired MYSQL AB in Feb 2008. If you're concerned about this, you should also be concerned with PGSQL since Sun is currently a huge contributor to PGSQL. Personally, I think you're overreacting as Sun not supporting free software- even after it's acquired by another company- would be a huge change in their business strategy.

You may as well claim that Java won't be available for free anymore.

Posted
P.S. Prepared statements is a way to go for further DB performance tweaking... Thats my 2 cents ;)
I second that. A lot of CPU cycles and bandwidth would be saved. The way queries are sent now is absurd - adding backslashes, compiling and sending queries that are a hundred bytes long.

Ambal, I would also like to know your opinion on adding an ORM layer to mangos. We could add metadata to SQL tables, then parse it with a standalone utility and create a class with methods to load and save records to database. Then we can further optimize database accesses by applying caching, keeping least recently used records in memory. This will also allow caching the entire database in server's memory, thus reducing the overhead of IPC between the server and the database to zero.

Posted
Ambal, I would also like to know your opinion on adding an ORM layer to mangos.

Hi, epozdnyakoff :) Well, we had to thought about ORM layer loooooooong ago: we have alot of code implemented and tested + some team members go mad when you just talk about using std::auto_ptr<> to prevent memory leaks with unreleased SQL query results in NEW code :huh: Also, we cache alot of records on server startup from DB (player level stats, creature_data etc) which doesn't change and reuse them like DBC data. Also, server stability is the big issue, thats why we rely on transactions (which lag our servers to the death) and try to not keep data in memory for too long...

Solid ORM layer is must-have for all serious DB-oriented applications but in MaNGOS, unfortunately, it will take ages to implement :( Prepared statements is much easier way to gain server speedup but thats not a panacea from questionable software design :confused:

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use