Author Topic: SQL!  (Read 4261 times)

Offline shadyman

  • Friend
  • **
  • Posts: 50
    • View Profile
SQL!
« on: November 11, 2008, 05:58:40 pm »
See http://erroraccessdenied.com/node/1639 for my newly released SQL code.

It provides two methods of connecting to an SQL server:
1) Through the use of the driver efuns (to allow realtime, although blocking, SQL statements. YES, this means we can finally have SQL-ized player logins :))
2) Through the use of extern_cmds (sp?) to allow non-blocking SQL queries by using callbacks

Offline shigs

  • Acquaintance
  • *
  • Posts: 37
    • View Profile
Re: SQL!
« Reply #1 on: November 11, 2008, 06:12:15 pm »
This is awesome, You are a legend.

Offline shadyman

  • Friend
  • **
  • Posts: 50
    • View Profile
Re: SQL!
« Reply #2 on: November 24, 2008, 11:09:52 am »
Woot. Thanks  ;D

Offline quixadhal

  • BFF
  • ***
  • Posts: 642
    • View Profile
    • WileyMUD
Re: SQL!
« Reply #3 on: November 25, 2008, 12:57:00 pm »
1) Through the use of the driver efuns (to allow realtime, although blocking, SQL statements. YES, this means we can finally have SQL-ized player logins :))

Blocking on player logins would be bad unless the driver actually threads each connection.  I know it's pretty rare for an SQL server these days to lag much, but if you pick a bad time (like during a system backup), it could get ugly. :)

Great job though!

Offline wodan

  • BFF
  • ***
  • Posts: 434
  • Drink and code, you know you want to!
    • View Profile
Re: SQL!
« Reply #4 on: November 25, 2008, 01:12:55 pm »
If you think loading player files from the file system doesn't block, I have a bridge to sell you :)

Offline shadyman

  • Friend
  • **
  • Posts: 50
    • View Profile
Re: SQL!
« Reply #5 on: November 27, 2008, 12:51:47 pm »
I added an item to the "Things you must do to get SQL running" list, it now includes "edit /secure/daemon/master.c to allow the SQL daemon to access a socket". I attached a file outlining the change that's required.

Without this, you'd get non-blocking sockets ending up as -7, instead of a positive integer.

Offline quixadhal

  • BFF
  • ***
  • Posts: 642
    • View Profile
    • WileyMUD
Re: SQL!
« Reply #6 on: December 03, 2008, 10:47:46 pm »
If you think loading player files from the file system doesn't block, I have a bridge to sell you :)

Hmmmm....  I suppose so.  Although I tend to think of disk resources as being more reliable than network resources (which most databases are).  Good point Wodan! ;)