Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Help me get DreamHost to add InnoDB support.

Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
02-20-2005 19:37
https://panel.dreamhost.com/index.cgi?tree=home.sugg

"Huns, I have DreamHost, but why should I click that link and vote for InnoDB?"

If you are interfacing systems developed in SL with systems developed at DreamHost, you are probably using a MySQL database at DH, which supports only MyISAM tables. This is okay for a lot of applications, but if you have to have safe transactions - i.e. you are writing software that has something to do with money, such as order entry and fulfillment - you are vulnerable to data loss or corruption should something fail in the middle of a transaction. To give you an example, if you are transferring money from user A to user B, you have to debit A's account and credit B's account. Those two things need to either both happen, or both fail, in order for your system to remain consistent. If you debit A, but then there is a power failure or someone kicks out a network cable or takes mysqld down for maintenance or something like that before you credit B, one of your customers is going to be missing money and the other is going to wonder where their money is. You may think this is a rare occurrence, but when money/goods/etc. are involved, you owe it to your customers to take every step to protect against this kind of failure.

With InnoDB, you can do something like this:

BEGIN
UPDATE Accounts SET Balance = Balance - 50 WHERE User='Joe Blow';
UPDATE Accounts SET Balance = Balance + 50 WHERE User='Phil Suckalewski';

At this point, if you enter COMMIT, both transactions are done, and the results are committed simultaneously. If something breaks in the middle of that, the database remains at its former state, before the BEGIN statement was entered.

If you enter ROLLBACK instead of COMMIT, both transactions are undone. This is also done if your application terminates its MySQL connection without sending COMMIT - so if the server your app is on should die in the middle of all this, the database goes back to its previous state.

Is it possible to do something like this with MyISAM tables? Yes, but you have to implement the logic for it inside your application. This adds complexity and development time to your project. You have to figure out some kind of journalling mechanism that can recover from failure at ANY point (which can be done but isn't a simple task), and then you have to run periodic consistency checks. You also have to read-lock the entire table during the transactions, which will cause any other processes reading it to stall, even if they are not looking at the same account! InnoDB supports row-level locking if you need it (and if you are smart, you will read-lock your rows before you update them, in order to protect yourself from race condition attacks.)

InnoDB also supports foreign key constraints (no CASCADE though), which you may miss if you are used to developing on more full-featured databases.


TIA
Maxx Monde
Registered User
Join date: 14 Nov 2003
Posts: 1,848
02-20-2005 20:43
I voted for it, huns.
Klintel Kiesler
Registered User
Join date: 31 Dec 2003
Posts: 51
02-20-2005 23:59
Awesome, voted.

The last time I voted for dreamhost features
there were only 5-10 things on that list, :)
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
02-21-2005 05:50
Can't we just compile it, assuming that the source is readily available?
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
02-21-2005 07:43
True, you could compile it and run an instance of it, and then move all of your stuff from DH's MySQL servers onto the instance, and set up phpMyAdmin for it if you felt inclined. However, DH has a policy against doing things that unduly impact other users, and they have a process watcher that will kill anything that uses up too much CPU/RAM. You probably don't want to worry that your database server could get killed at any moment without warning (or notification.) They might also have a policy against running daemons in general, but I'm not sure.
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
02-21-2005 19:12
You got a point there. :)

Anyways, vote submitted.
Danny DeGroot
Sub-legendary
Join date: 7 Jul 2004
Posts: 191
02-21-2005 20:11
From: Huns Valen
They might also have a policy against running daemons in general, but I'm not sure.



Yeah, they do. I asked.

== danny d.
Klintel Kiesler
Registered User
Join date: 31 Dec 2003
Posts: 51
10-03-2005 18:31
To those it may concern,

Sorry for bringing back an old topic, but I believe it was the best place to put it.

I just got my DreamHost newsletter, which contained a small section on InnoDB. The feature has been added :)

From: someone

we now offer InnoDB support on all new
MySQL databases anybody adds from our web panel (we still support
MyISAM tables as well of course!):

https://panel.dreamhost.com/?tree=goodies.mysql
Huns Valen
Don't PM me here.
Join date: 3 May 2003
Posts: 2,749
10-04-2005 01:33
HELL YES
Alondria LeFay
Registered User
Join date: 2 May 2003
Posts: 725
10-04-2005 06:09
God I love this host. :)