on 4/26/00 5:29 AM, Gunnar R|nning <[EMAIL PROTECTED]> wrote:

> jon * <[EMAIL PROTECTED]> writes:
> 
>> 
>> gag...why is there an autoupdate in the MySQL schema? You don't need to do
>> that if you use Turbine's IDBroker...
>> 
> 
> The table locking used by the IDBroker could possibly prove to be a
> performance problem with applications that do have a lot of updates. I
> do personally like to depend  on the way the database allocates new ids.

Updates don't cause a table locking issue. Inserts do.

Also, this is something that you can tune by simply increasing the size of
the block of numbers you can get. So, if you know that you are going to be
doing a lot of inserts, then simply increase that number and then lower it
when you are done. If you are doing 100 inserts, grab a block of 100
numbers. It is as simple as that.

Your statement doesn't hold up at all.

> Maybe one should look into a simple API that allowed you to use
> sequences for Oracle and PostgreSQL, IDENTITY for Sybase and SQL Server,
> auto increment for MySQL and some other hack for databases like Progress
> that don't have sequences or auto increment.

If you look at the Peer stuff in Turbine, we already have that API ALSO
IMPLEMENTED AND WORKING!

> I think the DB interface in Turbine would be a good place to add such an
> API. I see that there already are couple of undocumented methods there that
> are related.  

That is because they are already used for the BasePeer stuff.

> I think something like this would be a reasonable abstraction of the id
> generation that may give us a lot more scalable implementations than the
> current IDBroker interface.

Prove to me that the IDBroker doesn't scale. You are totally wrong that you
think it doesn't.

> The "long" datatype above should maybe also be something else, so one
> doesn't put any silly restrictions on precision of an id column. BigDecimal
> is probably the right datatype for this.

Submit a patch.

-jon

--
Scarab -
      Java Servlet Based - Open Source
         Bug/Issue Tracking System
        <http://scarab.tigris.org/>




--
--------------------------------------------------------------
Please read the FAQ! <http://java.apache.org/faq/>
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Archives and Other:  <http://java.apache.org/main/mail.html>
Problems?:           [EMAIL PROTECTED]

Reply via email to