View previous topic :: View next topic |
Author |
Message |
obsidian-studios
Joined: 16 Feb 2005 Posts: 36 Location: Jacksonville, FL
|
Posted: Thu Nov 10, 2005 1:11 Post subject: |
|
|
dguntner wrote: |
I expect that you're probably the one person who uses Firebird |
For now, and because there is not much choice. There is a PostgreSQL plugin and I am sure people are using it as well.
dguntner wrote: | (MySQL being my poison of choice.) |
Poison it is, enjoy
dguntner wrote: |
Currently the ODBC plugin for NWNX2 for Linux does not support blob storage. MySQL itself certainly does. Just for the sake of clarity.
|
Correct, I meant I ain't touching the MySQL plugin so someone else will have to add blob support to it once the core nwnx has SCO/RCO support.
dguntner wrote: |
I, for one, certainly wish that you or someone would get the ODBC plugin for Linux to support blob storage and retrieval so that SCO/RCO functions will be available to us.
|
Just for clarity the current db plugin for nwnx on Linux is a MySQL plugin.The plugin does not have any ODBC code It really should be remaned to a mysql plugin and the include file changed from ODBC to MYSQL to reflect that. Like I use Firebird instead of ODBC when talking to NWNX.
I think it's horrible design to put all into one and call it a ODBC plugin. When it has nothing to do with ODBC. The ODBC plugin should allow you to use ANY db with ODBC support. Not coded and bound to only one db. There should be a ODBC, Firebird, MySQL, and possibly PostgreSQL plugins all named accordingly. Not all in one, like is done on Windows.
[quote="dguntner"]
At this point, I'm kinda unclear - has the main body of NWNX2 been ported to Linux (as of this last update that was done for the Windows version)?[quote]
Very little or none. NWNX on windows heavily differs from the Linux version. I was cleaning up the code, trying to get it more like the Windows one. However I am not sure I like all of the design and etc on Windows. So most likely some of the implementation on Linux should be and will change. It's been a while. I will have to check out the CVS code and diff if from the modified versions I have to know for sure.
Even beyond SCO/RCO support, there is still more stuff to be done to the Linux version of nwnx. To do all you can on windows.[/b] |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Tue Nov 22, 2005 19:20 Post subject: |
|
|
obsidian-studios wrote: | Quote: |
Are you planning on porting the Firebird plugin to windows also (please)? |
I do not like Windows. I will not develop native code for Windows (C/C++), and when I do it's only Java. With that being said nwnx for Windows has full ODBC support. There is an ODBC driver for Firebird. So there is nothing stopping you from using Firebird on Windows. That's just what I did at first so I could start developing a module and world.
Quote: | On the plugin are you using the embedded Super Server libraries that drive the database file directly or are you using it as a remote connection to an existing server process? |
Yes remote connection. The Firebird plugin utilizes Firebird's C API. It can connect to a local Firebird server or remote via TCP/IP. I have a dedicated Firebird server which I used both from Windows at first via ODBC. Then from Linux via the plugin. I did not want to go embedded for robustness. Part of the reason why I use Firebird over MySQL in general, robustness.
Now keep in mind, NWN is a single threaded app. Which basically means you will be working with one connection to the db. I have not implemented save points and etc as part of a transaction. There is full commit and rollback support. Not sure about doing multiple db connections. Definitely possibly but not how nwnx was designed or coded. |
I did some playing with the Firebird ODBC plugin, load testing it and NWNX. It failed my expectations
The exact code, simulating the old method I used to populate my gem tables:
Code: |
void main()
{
// SetPersistentString(GetLastUsedBy(), "demoName", "testValue");
object oModule=GetModule();
int TempOffSet=1;
while(TempOffSet < 50)
{
SetPersistentString(oModule,"gName"+IntToString(TempOffSet),"Cold Blooded Chaser",0,"gproperties");
SetPersistentString(oModule,"gMelee"+IntToString(TempOffSet),"+3 vs. Reptiles",0,"gproperties");
SetPersistentString(oModule,"gShield"+IntToString(TempOffSet),"+2 AC vs. Reptiles",0,"gproperties");
SetPersistentString(oModule,"gBow"+IntToString(TempOffSet),"NONE",0,"gproperties");
SetPersistentString(oModule,"gBelt"+IntToString(TempOffSet),"+2 AC vs. Reptiles",0,"gproperties");
SetPersistentString(oModule,"gBoot"+IntToString(TempOffSet),"+2 AC vs. Reptiles",0,"gproperties");
SetPersistentString(oModule,"gHelm"+IntToString(TempOffSet),"+2 AC vs. Reptiles",0,"gproperties");
SetPersistentString(oModule,"gArrow"+IntToString(TempOffSet),"NONE",0,"gproperties");
SetPersistentString(oModule,"gArmor"+IntToString(TempOffSet),"+2 AC vs. Reptiles",0,"gproperties");
SetPersistentString(oModule,"gGlove"+IntToString(TempOffSet),"As per Weapon/Shield",0,"gproperties");
TempOffSet=TempOffSet+1;
}
SendMessageToPC(GetLastUsedBy(), "Stored information in database.");
}
|
MySQL set this in 13,387 ms with Direct Connect, 13,876 ms via ODBC; both times were consistent with multiple runs.
Firebird's ODBC had a shortest runtime of 20,004 ms and a longest of 62,675 ms!!! And crashed the client with time-outs several times.
THIS code (the newer setup):
Code: |
void main()
{
// SetPersistentString(GetLastUsedBy(), "demoName", "testValue");
object oModule=GetModule();
int TempOffSet=1;
while(TempOffSet < 50)
{
string sSQL="INSERT INTO GemInfo VALUES ('Cold Blooded Chaser "+IntToString(TempOffSet)+" ','+3 vs. Reptiles','+2 AC vs. Reptiles','NONE','+2 AC vs. Reptiles','+2 AC vs. Reptiles','+2 AC vs. Reptiles','NONE','+2 AC vs. Reptiles','As per Weapon/Shield')" ;
SQLExecDirect(sSQL);
TempOffSet=TempOffSet+1;
}
SendMessageToPC(GetLastUsedBy(), "Stored information in database.");
}
|
Was actually faster via Firebird. MySQL Direct Connect gave a script time of 1,376 ms while Firebird ODBC gave one of 836 ms !!! VERY fast. Since both were done on the same machine and same module, with the same client, I can only think that the its ODBC breaks down under load or its memory block is insufficient for this type of connection.
Both tests were done on an un-optimized Win2K Pro machine (3 ghz, 1 gRam), some tweeking was done to Firebird to see if the issue in case #1 could be resolved without success.
I *KNOW* it is capable of handling this piddly load since our Anti-Virus management program at work utilizes it with over 2,000 computers attached via direct connections, so its got to be something in the ODBC driver.....
Which is why I asked if you would consider porting the built-in function |
|
Back to top |
|
|
obsidian-studios
Joined: 16 Feb 2005 Posts: 36 Location: Jacksonville, FL
|
Posted: Wed Nov 23, 2005 22:14 Post subject: |
|
|
Well first off I am not sure where I would even begin if I wanted to attempt porting it to windows. I would have to locate the needed headers. Not to mention what compiler would I use?
This is a task best left for someone who develops on Windows. Only code I run on windows is Java. C and C++ only for *nix or posix compliant operating systems.
With that said there is not to much unique to Linux in the Firebird plugin. So porting to Windows should not be too bad. However not sure about the differences in the nwnx core itself. Since there are differences in the Windows and Linux implementations.
I will start by getting the Firebird plugin added to the Linux nwnx project on sourceforge. Which I have been meaning to do for weeks now, just have not had the time. I hope to over the holiday weekend. If I do not die from eating to much |
|
Back to top |
|
|
Acrodania
Joined: 02 Jan 2005 Posts: 208
|
Posted: Wed Nov 23, 2005 22:35 Post subject: |
|
|
Careful with that turkey poison, it can be a killer
And thanks for listening..... |
|
Back to top |
|
|
Custodis
Joined: 17 Feb 2006 Posts: 1
|
Posted: Fri Feb 17, 2006 22:58 Post subject: |
|
|
So what is the status on this?
I wrote some scripts for Persistant Storage using ODBCv2 for windows, will syntax or anything change for the Linux version of database integration?
I read a few times about not supporting MySQL, what will you support? Firebird I've not heard of before is it a type of database?
What is the ETA on this as well. NWN2 will probably be coming out within the next year, and by that time I intend on upgrading. I would like to be able to use SCO/RCO in the mean time. |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Sat Jul 01, 2006 17:57 Post subject: |
|
|
@Dumbo: i can't load my modul with the odmbc extension ... at the end of the loading process the nwn server hangs...
Have you a running compilation for Linux Suse 9.1 ?
Any help are welcome _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
virusman
Joined: 30 Jan 2005 Posts: 1020 Location: Russia
|
Posted: Sun Jul 02, 2006 7:37 Post subject: |
|
|
Have you tried building it from sources? |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Sun Jul 02, 2006 12:47 Post subject: |
|
|
Yes, i have build it from sources - all seems ok, but when i load my module with the odbc2 extension (with hookscorco = true), after entering the module with a character the loading process hangs at the end of it - with hookscorco = false the entering of the module is possible (without the function of storing objects) _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Mon Jul 10, 2006 10:31 Post subject: |
|
|
Some things on the server must be damaged ...
I make a new install, recompiled the extension and plugins and all things running correctly. Thanks for your answers.
Btw, i have to honor dumbo for this plugin - a realy great work, speeds up my server more i can hope...
No more LAG while storing objects with a campaignobject! _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
Mermut
Joined: 10 May 2007 Posts: 1
|
Posted: Thu May 10, 2007 7:13 Post subject: |
|
|
Does anybody have the wrapper functions in nwscript to actually use SCO/RCO (similar to Set/GetPersistant<type> that are part of the ODBC stuff)?
I haven't found any documentation on the SCO/RCO stuff and freely admit that while I can use NWNx to retrieve and set things in various tables in the DB for various purposes, the actual guts of how it works is a mystery to me. |
|
Back to top |
|
|
Mikel of Avalon
Joined: 29 Dec 2004 Posts: 72 Location: Germany
|
Posted: Fri May 11, 2007 8:11 Post subject: |
|
|
I use the aps_include from the Windows-Install package.
Link: nwnx_odbc2_0924.zip
Make sure you have the additional requiered table pwobjdata in your database. The schema can also be found in the demo-module in the windows-package.
The requiered functions are SetPersistentObject and GetPersistentObject which a little bit different from Store/RetrieveCampaignObject, but its not too difficult to change your code. _________________ Mikel of Avalon
Kalandur - Die vergessene Welt |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group
|