Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi Kieran, I have a multi-threaded app and I'm starting to run into deadlock issues on EC locking/unlocking (OSC really). After a weekend of digging and researching I think your solution is the answer. Question #1: Is this the final, dust-settled version? Question #2: Do you always use a new EOObjectStore in your threads? It seems your implementation depends upon it. If so, what's your philosophy on how many you create and how long they live? I have tens of thousands of threads running per instance per day (only a few at a time) and something tells me creating a new OS for each is a bad idea. Thanks, Jon On 12/3/09 1:31 PM, Kieran Kelleher wrote: OK, this is the final concurrent utility code to provide manual locking ec's in a app with safeLocking on. And just for fun and Ricardo's enjoyment of anonymous classes ;-), the factory is an anonymous static class and its _create method returns anonymous ERXEC's with the two methods over-riden as per Anjo's suggestion. /** *AnonymousERXECfactorythatcreatesmanuallockingec'sinanappwheresafeLockingisonbydefault */ private static ERXEC.Factory manualLockingEditingContextFactory = new ERXEC.DefaultFactory() { @Override protected EOEditingContext _createEditingContext(EOObjectStore parent) { return new ERXEC(parent == null ? EOEditingContext.defaultParentObjectStore() : parent) { @Override public boolean useAutoLock() {return false;} @Override public boolean coalesceAutoLocks() {return false;} }; } }; /** *@returnaregularERXECwithnoauto-lockingfeatures */ public static EOEditingContext newManualLockingEditingContext() { returnmanualLockingEditingContextFactory._newEditingContext(); } /** *Idonotwantautolockinginnon-requestthreads * *@paramparent *@returnanERXECwithsafeLockingpropertiesturnedOFF. */ public static EOEditingContext newManualLockingEditingContext(EOObjectStore parent) { returnmanualLockingEditingContextFactory._newEditingContext(parent); } On Dec 3, 2009, at 2:54 PM, Mike Schrag wrote: i think we're talking two different things ... if you have an empty superclass constructor and you don't declare any constructors, then yes, there is an implicit constructor created in your subclass that calls super (as well, if you DO declare a constructor and there is an empty super constructor, implicitly a super() is added to the top of your constructor). in this case, because the anonymous subclass is declared as new ERXEC(os), it's actually calling the ERXEC(ObjectStore) constructor (which I PRESUME java secretly added into your subclass with a super(os) call -- this is a little different than a normal class). However, Kieran's specifically talking about the ERXEC.newEditingContext() factory method, which you're bypassing here by explicitly subclassing ERXEC and instantiating the class directly. ms On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote: Don't subclasses have an implicit super() to invoke the super class constructor? On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote: True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo ___ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/lists%40lochgarman.com This email sent to li...@lochgarman.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi Jon, On Feb 28, 2011, at 10:28 AM, Jon Nolan wrote: Hi Kieran, I have a multi-threaded app and I'm starting to run into deadlock issues on EC locking/unlocking (OSC really). After a weekend of digging and researching I think your solution is the answer. Question #1: Is this the final, dust-settled version? Yes, I always use the manual locking anonymous subclass in the background. I think dust will be settled when I can have a cleaner version of this functionality in Wonder without distastefully dirtying the ERXEC factory. Question #2: Do you always use a new EOObjectStore in your threads? No. In have a pool of OSC's dedicated to background threads. Usually 4 to 12 in the pool, depending on the application's needs and functionality. WKTaskObjectStoreCoordinatorPool.java Description: Binary data WKObjectStoreCoordinator is just a simple subclass that allows me to give the OSC a name for debugging/logging purposes, so you don't have to use that in the pool. Just use the regular Wonder ERXOSC. WKObjectStoreCoordinator.java Description: Binary data Since using this approach I have not experienced any EC deadlocks in production. Need to decide how to implement this cleanly in Wonder some day. Regards, Kieran It seems your implementation depends upon it. If so, what's your philosophy on how many you create and how long they live? I have tens of thousands of threads running per instance per day (only a few at a time) and something tells me creating a new OS for each is a bad idea. Thanks, Jon On 12/3/09 1:31 PM, Kieran Kelleher wrote: OK, this is the final concurrent utility code to provide manual locking ec's in a app with safeLocking on. And just for fun and Ricardo's enjoyment of anonymous classes ;-), the factory is an anonymous static class and its _create method returns anonymous ERXEC's with the two methods over-riden as per Anjo's suggestion. /** *AnonymousERXECfactorythatcreatesmanuallockingec'sinanappwheresafeLockingisonbydefault */ private static ERXEC.Factory manualLockingEditingContextFactory = new ERXEC.DefaultFactory() { @Override protected EOEditingContext _createEditingContext(EOObjectStore parent) { return new ERXEC(parent == null ? EOEditingContext.defaultParentObjectStore() : parent) { @Override public boolean useAutoLock() {return false;} @Override public boolean coalesceAutoLocks() {return false;} }; } }; /** *@returnaregularERXECwithnoauto-lockingfeatures */ public static EOEditingContext newManualLockingEditingContext() { returnmanualLockingEditingContextFactory._newEditingContext(); } /** *Idonotwantautolockinginnon-requestthreads * *@paramparent *@returnanERXECwithsafeLockingpropertiesturnedOFF. */ public static EOEditingContext newManualLockingEditingContext(EOObjectStore parent) { returnmanualLockingEditingContextFactory._newEditingContext(parent); } On Dec 3, 2009, at 2:54 PM, Mike Schrag wrote: i think we're talking two different things ... if you have an empty superclass constructor and you don't declare any constructors, then yes, there is an implicit constructor created in your subclass that calls super (as well, if you DO declare a constructor and there is an empty super constructor, implicitly a super() is added to the top of your constructor). in this case, because the anonymous subclass is declared as new ERXEC(os), it's actually calling the ERXEC(ObjectStore) constructor (which I PRESUME java secretly added into your subclass with a super(os) call -- this is a little different than a normal class). However, Kieran's specifically talking about the ERXEC.newEditingContext() factory method, which you're bypassing here by explicitly subclassing ERXEC and instantiating the class directly. ms On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote: Don't subclasses have an implicit super() to invoke the super class constructor? On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote: True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Thanks Kieran. I've implemented your solution and will roll it through to prod within a couple of days. I have deadlocks on at least a daily basis so if those disappear it will be another validation of your work... not to mention once again earning my gratitude. Slán, Jon On 2/28/11 8:50 AM, Kieran Kelleher wrote: Hi Jon, On Feb 28, 2011, at 10:28 AM, Jon Nolan wrote: Hi Kieran, I have a multi-threaded app and I'm starting to run into deadlock issues on EC locking/unlocking (OSC really). After a weekend of digging and researching I think your solution is the answer. Question #1: Is this the final, dust-settled version? Yes, I always use the manual locking anonymous subclass in the background. I think dust will be settled when I can have a cleaner version of this functionality in Wonder without distastefully dirtying the ERXEC factory. Question #2: Do you always use a new EOObjectStore in your threads? No. In have a pool of OSC's dedicated to background threads. Usually 4 to 12 in the pool, depending on the application's needs and functionality. WKObjectStoreCoordinator is just a simple subclass that allows me to give the OSC a name for debugging/logging purposes, so you don't have to use that in the pool. Just use the regular Wonder ERXOSC. Since using this approach I have not experienced any EC deadlocks in production. Need to decide how to implement this cleanly in Wonder some day. Regards, Kieran It seems your implementation depends upon it. If so, what's your philosophy on how many you create and how long they live? I have tens of thousands of threads running per instance per day (only a few at a time) and something tells me creating a new OS for each is a bad idea. Thanks, Jon On 12/3/09 1:31 PM, Kieran Kelleher wrote: OK, this is the final concurrent utility code to provide manual locking ec's in a app with safeLocking on. And just for fun and Ricardo's enjoyment of anonymous classes ;-), the factory is an anonymous static class and its _create method returns anonymous ERXEC's with the two methods over-riden as per Anjo's suggestion. /** *AnonymousERXECfactorythatcreatesmanuallockingec'sinanappwheresafeLockingisonbydefault */ private static ERXEC.Factory manualLockingEditingContextFactory = new ERXEC.DefaultFactory() { @Override protected EOEditingContext _createEditingContext(EOObjectStore parent) { return new ERXEC(parent == null ? EOEditingContext.defaultParentObjectStore() : parent) { @Override public boolean useAutoLock() {return false;} @Override public boolean coalesceAutoLocks() {return false;} }; } }; /** *@returnaregularERXECwithnoauto-lockingfeatures */ public static EOEditingContext newManualLockingEditingContext() { returnmanualLockingEditingContextFactory._newEditingContext(); } /** *Idonotwantautolockinginnon-requestthreads * *@paramparent *@returnanERXECwithsafeLockingpropertiesturnedOFF. */ public static EOEditingContext newManualLockingEditingContext(EOObjectStore parent) { returnmanualLockingEditingContextFactory._newEditingContext(parent); } On Dec 3, 2009, at 2:54 PM, Mike Schrag wrote: i think we're talking two different things ... if you have an empty superclass constructor and you don't declare any constructors, then yes, there is an implicit constructor created in your subclass that calls super (as well, if you DO declare a constructor and there is an empty super constructor, implicitly a super() is added to the top of your constructor). in this case, because the anonymous subclass is declared as new ERXEC(os), it's actually calling the ERXEC(ObjectStore) constructor (which I PRESUME java secretly added into your subclass with a super(os) call -- this is a little different than a normal class). However, Kieran's specifically talking about the ERXEC.newEditingContext() factory method, which you're bypassing here by explicitly subclassing ERXEC and instantiating the class directly. ms On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote: Don't subclasses have an implicit super() to invoke the super class constructor? On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote: True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock()
Fwd: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
Begin forwarded message: From: DANIEL BEATTY danielbea...@me.com Date: December 4, 2009 6:32:28 PM PST To: Miguel Arroz ar...@guiamac.com Bcc: DANIEL BEATTY danielbea...@me.com Subject: Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]] Greetings Miguel, Almost guilty as charged. I have a monster database, stored in regular MySQL. None of the MSsql database servers near by it have the capacity of raw size. Thus, I am stuck there. Although, what I would not give to have the spatial features of Postgres and the simplistity of preinstall OSX Server MySQL with MySQL Gui admin. Another 2 cents, Dan Sent from my iPhone On Dec 4, 2009, at 6:09 PM, Miguel Arroz ar...@guiamac.com wrote: Hey! On 2009/12/05, at 01:46, Mike Schrag wrote: And I'm not talking about asynchronous replication, I'm talking about real multi-master cluster with guaranteed integrity. That's what I'm referring ... I have not used it, only read about it enough to be intrigued by it. It requires your entire database to be loaded into memory, but memory is pretty damn cheap. If you have a truly HUGE database, this is not an option, but most of ours are not larger than the reasonable max amount of memory. Err... unless you have a monster machine with hundreds of GBs, why would you want to cluster a small DB? I don't see any scenario where I need to load balance a DB with half a dozen of GBs. If that's the MySQL way, I would say the PgSQL is probably best! ;) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/danielbeatty%40mac.com This email sent to danielbea...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
Another PRO for postgresql: language for writing stored procedures. A PRO for Oracle: OLAP implementation. JPM ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 5, 2009, at 1:40 AM, Lachlan Deck wrote: On 05/12/2009, at 12:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? He wouldn't have. I have and continue to. I have Animal-Cat-Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) Yep. I've avoided using fk constraints since mysql doesn't play nice with this. It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) What does your plugin do? It exists because there's no way to run migrations for ERAttachment in 5.4.x without it. It's modeled after the Wonder plugins, so it does the automatic loading and the jdbcInfo thing the others do too. I was going to repair the inheritance problems, try to find a way to do case insensitive searches without using UPPER, add indexing support, and a few other things, but after discovering that problem is due to the database, I'll probably just look for an alternative db (^_^) The plugin is freely available here if you're interested in it. https://r2d2w.svn.sourceforge.net/svnroot/r2d2w/trunk/ Ramsey with regards, -- Lachlan Deck smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi Tim, I have accessed PostgreSQL using Filemaker before using ODBC using Actual drivers. Caveat: I only used this with 8.0 and 8.5 using ODBC to import all data for subsequent processing rather than accessing data live. I gather Filemaker 9.0 can use an external data source in joins, but have no idea whether it would support PostgreSQL using these ODBC drivers... worth a look though. Best wishes, Mark 2009/12/3 Tim Worman li...@thetimmy.com: I'm also staring down a future with MySQL - for a much different reason. Our school has a lot of institutional knowledge of FileMaker Pro. I'm moving towards WO as the editing mechanism and leveraging that institutional knowledge for users' report writing needs. FMP only supports 3 databases for transparently including external ODBC data sources - and MySQL is the only option for us. Up to now I've been using OpenBase and been extremely pleased with it but FileMaker's got me by the short and curlies. I have been following Kieran's support of MySQL and I'm glad to see others see similar benefits. Tim Worman UCLA GSEIS On Dec 3, 2009, at 3:20 PM, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Mark: Yeah, you can use any ODBC data source to use the import functionality and script steps. However, FileMaker Pro 10 now has the ability to transparently use tables from an external data source as though they were internal tables. But it can only do this with SQL Server, Oracle, and MySQL. I may try to use the import angle but I'd really rather not have data moving back and forth that can change after the import. The newer functionality is very cool. Tim Worman UCLA GSEIS On Dec 4, 2009, at 12:49 AM, Mark Wardle wrote: Hi Tim, I have accessed PostgreSQL using Filemaker before using ODBC using Actual drivers. Caveat: I only used this with 8.0 and 8.5 using ODBC to import all data for subsequent processing rather than accessing data live. I gather Filemaker 9.0 can use an external data source in joins, but have no idea whether it would support PostgreSQL using these ODBC drivers... worth a look though. Best wishes, Mark 2009/12/3 Tim Worman li...@thetimmy.com: I'm also staring down a future with MySQL - for a much different reason. Our school has a lot of institutional knowledge of FileMaker Pro. I'm moving towards WO as the editing mechanism and leveraging that institutional knowledge for users' report writing needs. FMP only supports 3 databases for transparently including external ODBC data sources - and MySQL is the only option for us. Up to now I've been using OpenBase and been extremely pleased with it but FileMaker's got me by the short and curlies. I have been following Kieran's support of MySQL and I'm glad to see others see similar benefits. Tim Worman UCLA GSEIS On Dec 3, 2009, at 3:20 PM, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC.
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On 4 dec 2009, at 09:54, Tim Worman wrote: Mark: Yeah, you can use any ODBC data source to use the import functionality and script steps. However, FileMaker Pro 10 now has the ability to transparently use tables from an external data source as though they were internal tables. But it can only do this with SQL Server, Oracle, and MySQL. I may try to use the import angle but I'd really rather not have data moving back and forth that can change after the import. The newer functionality is very cool. Tim Worman UCLA GSEIS That was also available in Filemaker 9. I have sent Filemaker a request to also support postgresql in such a a way, but it seems that is not on their priority list. Too much attention for another platform might be counterproductive, I assume. It still is possible too import the data from postgresql 9 or any other database that supports ODBC, but there is no live connection possible as with MSSQl, Oracle and MySQL. Postgresql (WebObjects) might suffer from the Novell problem: nobody complained about it, as everybody did with WindowsNT, so new potential customers never knew it existed. I'll write the postgresql list they should screw up something major, so to get free publicity. And I'll bring down the iTunes store by downloading all the free iPhone apps available. That will teach them to rely on unfashionable technology. On Dec 4, 2009, at 12:49 AM, Mark Wardle wrote: Hi Tim, I have accessed PostgreSQL using Filemaker before using ODBC using Actual drivers. Caveat: I only used this with 8.0 and 8.5 using ODBC to import all data for subsequent processing rather than accessing data live. I gather Filemaker 9.0 can use an external data source in joins, but have no idea whether it would support PostgreSQL using these ODBC drivers... worth a look though. Best wishes, Mark 2009/12/3 Tim Worman li...@thetimmy.com: I'm also staring down a future with MySQL - for a much different reason. Our school has a lot of institutional knowledge of FileMaker Pro. I'm moving towards WO as the editing mechanism and leveraging that institutional knowledge for users' report writing needs. FMP only supports 3 databases for transparently including external ODBC data sources - and MySQL is the only option for us. Up to now I've been using OpenBase and been extremely pleased with it but FileMaker's got me by the short and curlies. I have been following Kieran's support of MySQL and I'm glad to see others see similar benefits. Tim Worman UCLA GSEIS On Dec 3, 2009, at 3:20 PM, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? What do you mean? That EOF will clean up orphaned objects that didn't get cascade-deleted by EOF when the related object was deleted? No. If EOF loads rows that have invalid FKs in them, it will create a fault for that object, then when you go to try to follow that relationship and the fault is fired, you'd get a missing object exception. I've had to deal with this exact situation before. I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? How would transactions protect you from having an invalid FK if you don't have any FK constraints? Dave -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/webobjects%40avendasora.com This email sent to webobje...@avendasora.com David Avendasora Senior Software Engineer K12, Inc. * WebObjects Documentation Wiki : http://wiki.objectstyle.org/confluence/display/WO/ * WebObjects API: http://developer.apple.com/legacy/mac/library/documentation/MacOSXServer/Reference/WO54_Reference/index.html * ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal-Cat-Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) Ramsey On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/rgurley%40mac.com This email sent to rgur...@mac.com smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 8:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal-Cat-Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). That's exactly the problem. The easiest way avoid this is by not having FK constraints in the DB at all (which is what Kieran is saying he does - you could think of this as infinitely-deferred constraints). But wait, it gets worse. Here's the _really_ frustrating part: EOF doesn't always do things in the same order, so you could set things up with FK constraints and have it all work just fine for weeks or months with only the occasional error, and then have it suddenly start failing every time. I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. Or you can just not use Vertical Inheritance. :-) Dave ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Actually, let me rephrase that. My brain was not working earlier since I had not yet had breakfast :-) The lack of deferred constraints prevents one using foreign key constraints in MySQL (InnoDB specifically supports FK constraints). The problem is that MySQL will not let you delete related rows during a transaction, rather than let you execute the full statement and then check for FK integrity afterwards. Please correct me if I am mistaken in my thinking here, but in WebObjects, the Deny delete rule of a relationship essentially does the same thing. Also, in java code, we have the ERXGuardedInterface~ (from now on let's say ~ means or a class spelled something like that) which implements canDelete() and that allows us to prevent deletion based on logic. We also have validateForDelete to prevent deletions in EOF logic. Since I have never used FL constraints in MySQL, Chuck or someone else can explain their exact role/benefit better I am sure. Now on the orphan issue. If you have orphans, it means that the FKs did not get nullified or cascade deleted or sth like that. It means your database did not roll back the failing transaction fully. The reason transactions protect you is because when you delete an object and the related items that have a Nullify relationship Delete rule, WO updates those foreign keys to null in the same transaction. And if you are dealing with orphans on a MySQL database, it means one of three things are wrong. (1) One of your tables is a MyISAM table. Use SHOW CREATE TABLE to check the engine type. MyISAM tables do not roll back. *Never* mix MyISAM and InnoDB tables updates in the same transaction! (2) Some fool in the *past* had a table that was MyISAM and screwed up the data integrity leaving nice tripwires for you to cleanup. My advice is get on the command line and find those orphans and fix them. Don't dirty your business logic to handle a screwed up database. Fix the data integrity and move on, never using MyISAM again (3) Some fool in the recent present put a 'No Action' as a Delete rule on the relationship in the EOModel, or (4) Some fool upgraded to MySQL 5.0+, did not read the release notes, and forgot to add the property 'innodb_rollback_on_timeout' in your / etc/my.cnf. This will screw you in rare cases that your app has died in the middle of a transaction I guess. I am baffled why that was needed after 5.0.13. Here is the excerpt form the release notes (copied from my own my.cnf file): snip # FROM The Release Notes for 5.0: # Incompatible change: As of MySQL 5.0.13, InnoDB rolls back only the last statement on a transaction # timeout. In MySQL 5.0.32, a new option, -- innodb_rollback_on_timeout, causes InnoDB to abort and roll # back the entire transaction if a transaction timeout occurs (the same behavior as in MySQL 4.1). innodb_rollback_on_timeout /snip On Dec 4, 2009, at 7:57 AM, David Avendasora wrote: On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? What do you mean? That EOF will clean up orphaned objects that didn't get cascade-deleted by EOF when the related object was deleted? No. If EOF loads rows that have invalid FKs in them, it will create a fault for that object, then when you go to try to follow that relationship and the fault is fired, you'd get a missing object exception. I've had to deal with this exact situation before. I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? How would transactions protect you from having an invalid FK if you don't have any FK constraints? Dave -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Ramsey, Just remove the FK constraints in MySQL. WO works fine without them since EOF takes care of it. If a database does not support deferred constraints, then you should not add FK constraints at all. Cheers, Kieran On Dec 4, 2009, at 8:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal-Cat- Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn $MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/ leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) Ramsey On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I don't use EOModel inheritance any more. It is a PITA. Not worth the hassle. Using Strategy design pattern to composite in different behaviours works better for me. Remember the OO Principle Favor composition over inheritance ... I now favor composition over inheritance ;-) BTW, for this setup the table is identical to a single-table inheritance table, except that the 'type' id field determines the lazily constructed strategy behaviour class for the EO. I will only ever use EOModel inheritance again, if (1) I am told to by a customer, or (2) Strategy design pattern behaviour composition simply does not make sense (so far it makes sense for every case I have looked at in last few years) YMMV ;-) Regards, Kieran On Dec 4, 2009, at 8:49 AM, David Avendasora wrote: Or you can just not use Vertical Inheritance. :-) ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
and boy is it easy to add new flavors of behaviour ... no need to touch the EOModel if the attributes are the same or a subset of the EO's attributes. On Dec 4, 2009, at 9:27 AM, Kieran Kelleher wrote: I don't use EOModel inheritance any more. It is a PITA. Not worth the hassle. Using Strategy design pattern to composite in different behaviours works better for me. Remember the OO Principle Favor composition over inheritance ... I now favor composition over inheritance ;-) BTW, for this setup the table is identical to a single-table inheritance table, except that the 'type' id field determines the lazily constructed strategy behaviour class for the EO. I will only ever use EOModel inheritance again, if (1) I am told to by a customer, or (2) Strategy design pattern behaviour composition simply does not make sense (so far it makes sense for every case I have looked at in last few years) YMMV ;-) Regards, Kieran On Dec 4, 2009, at 8:49 AM, David Avendasora wrote: Or you can just not use Vertical Inheritance. :-) ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 9:19 AM, Kieran Kelleher wrote: Actually, let me rephrase that. My brain was not working earlier since I had not yet had breakfast :-) M. Guinness! The lack of deferred constraints prevents one using foreign key constraints in MySQL (InnoDB specifically supports FK constraints). The problem is that MySQL will not let you delete related rows during a transaction, rather than let you execute the full statement and then check for FK integrity afterwards. Exactly, except that if EOF happens to be in a good mood and gets the right sequence by accident then it will work. Please correct me if I am mistaken in my thinking here, but in WebObjects, the Deny delete rule of a relationship essentially does the same thing. Also, in java code, we have the ERXGuardedInterface~ (from now on let's say ~ means or a class spelled something like that) which implements canDelete() and that allows us to prevent deletion based on logic. We also have validateForDelete to prevent deletions in EOF logic. Since I have never used FL constraints in MySQL, Chuck or someone else can explain their exact role/benefit better I am sure. If other things are touching your DB, it protects your referential integrity. I have written apps that have to deal with FKs being invalid due to no constraints and it is a PITA. Doable, especially with Wonder, but still, I like being able to assume that the FK constraint has my back. Now on the orphan issue. If you have orphans, it means that the FKs did not get nullified or cascade deleted or sth like that. It means your database did not roll back the failing transaction fully. The reason transactions protect you is because when you delete an object and the related items that have a Nullify relationship Delete rule, WO updates those foreign keys to null in the same transaction. Or that some other application is touching your DB. And if you are dealing with orphans on a MySQL database, it means one of three things are wrong. (1) ... (2) ... (3) ... (4) ... (5) You're DB doesn't live in a hermetically sealed environment and other things can change your data without EOF's blessing. Even if the only thing touching my app's DB today is my EOF app, I don't know that that is going to be the case in the future and I can't rely on EOF keeping maintaining Referential Integrity. Call it future-proofing, CYA, Anal Retentiveness, whatever, but if I can enforce referential integrity in the DB, that's where I will do it, and not being able to is a BIG downside to me. Dave On Dec 4, 2009, at 7:57 AM, David Avendasora wrote: On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? What do you mean? That EOF will clean up orphaned objects that didn't get cascade-deleted by EOF when the related object was deleted? No. If EOF loads rows that have invalid FKs in them, it will create a fault for that object, then when you go to try to follow that relationship and the fault is fired, you'd get a missing object exception. I've had to deal with this exact situation before. I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? How would transactions protect you from having an invalid FK if you don't have any FK constraints? Dave -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 9:33 AM, Kieran Kelleher wrote: and boy is it easy to add new flavors of behaviour ... You've been on this side of the pond too long. You are mixing your misspellings. :-P Dave David Avendasora Senior Software Engineer K12, Inc. * WebObjects Documentation Wiki : http://wiki.objectstyle.org/confluence/display/WO/ * WebObjects API: http://developer.apple.com/legacy/mac/library/documentation/MacOSXServer/Reference/WO54_Reference/index.html * ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 9:19 AM, Kieran Kelleher wrote: Actually, let me rephrase that. My brain was not working earlier since I had not yet had breakfast :-) M. Guinness! The lack of deferred constraints prevents one using foreign key constraints in MySQL (InnoDB specifically supports FK constraints). The problem is that MySQL will not let you delete related rows during a transaction, rather than let you execute the full statement and then check for FK integrity afterwards. Exactly, except that if EOF happens to be in a good mood and gets the right sequence by accident then it will work. Please correct me if I am mistaken in my thinking here, but in WebObjects, the Deny delete rule of a relationship essentially does the same thing. Also, in java code, we have the ERXGuardedInterface~ (from now on let's say ~ means or a class spelled something like that) which implements canDelete() and that allows us to prevent deletion based on logic. We also have validateForDelete to prevent deletions in EOF logic. Since I have never used FL constraints in MySQL, Chuck or someone else can explain their exact role/benefit better I am sure. If other things are touching your DB, it protects your referential integrity. I have written apps that have to deal with FKs being invalid due to no constraints and it is a PITA. Doable, especially with Wonder, but still, I like being able to assume that the FK constraint has my back. Now on the orphan issue. If you have orphans, it means that the FKs did not get nullified or cascade deleted or sth like that. It means your database did not roll back the failing transaction fully. The reason transactions protect you is because when you delete an object and the related items that have a Nullify relationship Delete rule, WO updates those foreign keys to null in the same transaction. Or that some other application is touching your DB. And if you are dealing with orphans on a MySQL database, it means one of three things are wrong. (1) ... (2) ... (3) ... (4) ... (5) You're DB doesn't live in a hermetically sealed environment and other things can change your data without EOF's blessing. Even if the only thing touching my app's DB today is my EOF app, I don't know that that is going to be the case in the future and I can't rely on EOF keeping maintaining Referential Integrity. Call it future-proofing, CYA, Anal Retentiveness, whatever, but if I can enforce referential integrity in the DB, that's where I will do it, and not being able to is a BIG downside to me. Dave On Dec 4, 2009, at 7:57 AM, David Avendasora wrote: On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? What do you mean? That EOF will clean up orphaned objects that didn't get cascade-deleted by EOF when the related object was deleted? No. If EOF loads rows that have invalid FKs in them, it will create a fault for that object, then when you go to try to follow that relationship and the fault is fired, you'd get a missing object exception. I've had to deal with this exact situation before. I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? How would transactions protect you from having an invalid FK if you don't have any FK constraints? Dave -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Why does this make me shiver? I'd like to have my DB take care of structural integrity for me as 1) I will make coding mistakes, 2) It is rare, that ONLY WO touches a DB, 3) I will not rely on EOF always doing the thing I expect it to do. Not having FK constraints is about as wrong as using MyISAM in my opinion. cug -- http://www.event-s.net On 4. Dec. 2009, at 06:21 , Kieran Kelleher wrote: Ramsey, Just remove the FK constraints in MySQL. WO works fine without them since EOF takes care of it. If a database does not support deferred constraints, then you should not add FK constraints at all. Cheers, Kieran On Dec 4, 2009, at 8:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal-Cat-Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) Ramsey On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi Guido shiver? is it that cold in California? ;-) Fair points. This has been a good discussion. What is the workaround ... is it that we must write a delegate to do ordering of updates like Chuck did for MS SQL Server? Is that right? Chuck? -Kieran On Dec 4, 2009, at 12:04 PM, Guido Neitzer wrote: Why does this make me shiver? I'd like to have my DB take care of structural integrity for me as 1) I will make coding mistakes, 2) It is rare, that ONLY WO touches a DB, 3) I will not rely on EOF always doing the thing I expect it to do. Not having FK constraints is about as wrong as using MyISAM in my opinion. cug -- http://www.event-s.net On 4. Dec. 2009, at 06:21 , Kieran Kelleher wrote: Ramsey, Just remove the FK constraints in MySQL. WO works fine without them since EOF takes care of it. If a database does not support deferred constraints, then you should not add FK constraints at all. Cheers, Kieran On Dec 4, 2009, at 8:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal- Cat-Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn $MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) Ramsey On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 5:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal-Cat- Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn $MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/ leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) See my MS SQL plugin for how to address at least part of this in the plugin: http://www.global-village.net/chill It addresses many of the issues caused by lack of deferred constraints, though I suspect that it might not fully handle VI. Maybe David remembers. And, uh, VI? Just say Hell NO! to VI. Chuck On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 6:21 AM, Kieran Kelleher wrote: Ramsey, Just remove the FK constraints in MySQL. WO works fine without them since EOF takes care of it. If a database does not support deferred constraints, then you should not add FK constraints at all. Chuck's bowels turn to water I once advocated that too, long ago, when I was younger and more foolish. Now I see that this is just plain crazy. You have too much breakfast this morning? On Dec 4, 2009, at 8:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal-Cat- Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn $MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/ leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) Ramsey On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 6:48 AM, David Avendasora wrote: On Dec 4, 2009, at 9:19 AM, Kieran Kelleher wrote: Actually, let me rephrase that. My brain was not working earlier since I had not yet had breakfast :-) M. Guinness! Damn! That was MY line you just used! The lack of deferred constraints prevents one using foreign key constraints in MySQL (InnoDB specifically supports FK constraints). The problem is that MySQL will not let you delete related rows during a transaction, rather than let you execute the full statement and then check for FK integrity afterwards. Exactly, except that if EOF happens to be in a good mood and gets the right sequence by accident then it will work. Please correct me if I am mistaken in my thinking here, but in WebObjects, the Deny delete rule of a relationship essentially does the same thing. Also, in java code, we have the ERXGuardedInterface~ (from now on let's say ~ means or a class spelled something like that) which implements canDelete() and that allows us to prevent deletion based on logic. We also have validateForDelete to prevent deletions in EOF logic. Since I have never used FL constraints in MySQL, Chuck or someone else can explain their exact role/benefit better I am sure. If other things are touching your DB, it protects your referential integrity. I have written apps that have to deal with FKs being invalid due to no constraints and it is a PITA. Doable, especially with Wonder, but still, I like being able to assume that the FK constraint has my back. Not to mention the small issue of indexes. So Kieran, you are manually creating indexes to compensate for lack of FK constraints? MySquirrelToy doesn't use them for FK constraints? Now on the orphan issue. If you have orphans, it means that the FKs did not get nullified or cascade deleted or sth like that. It means your database did not roll back the failing transaction fully. The reason transactions protect you is because when you delete an object and the related items that have a Nullify relationship Delete rule, WO updates those foreign keys to null in the same transaction. Or that some other application is touching your DB. And if you are dealing with orphans on a MySQL database, it means one of three things are wrong. (1) ... (2) ... (3) ... (4) ... (5) You're DB doesn't live in a hermetically sealed environment and other things can change your data without EOF's blessing. Even if the only thing touching my app's DB today is my EOF app, I don't know that that is going to be the case in the future and I can't rely on EOF keeping maintaining Referential Integrity. Call it future-proofing, CYA, Anal Retentiveness, whatever, but if I can enforce referential integrity in the DB, that's where I will do it, and not being able to is a BIG downside to me. +40,000,000 or so On Dec 4, 2009, at 7:57 AM, David Avendasora wrote: On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? What do you mean? That EOF will clean up orphaned objects that didn't get cascade-deleted by EOF when the related object was deleted? No. If EOF loads rows that have invalid FKs in them, it will create a fault for that object, then when you go to try to follow that relationship and the fault is fired, you'd get a missing object exception. I've had to deal with this exact situation before. I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? How would transactions protect you from having an invalid FK if you don't have any FK constraints? Dave -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 9:43 AM, Kieran Kelleher wrote: Hi Guido shiver? is it that cold in California? ;-) Fair points. This has been a good discussion. What is the workaround ... is it that we must write a delegate to do ordering of updates like Chuck did for MS SQL Server? Is that right? Chuck? Or... just use a real database with real database features. Deferred Constraints is what, SQL92? That would be 1992. What year is it now?I thought that only MS SQL did not have them. On Dec 4, 2009, at 12:04 PM, Guido Neitzer wrote: Why does this make me shiver? I'd like to have my DB take care of structural integrity for me as 1) I will make coding mistakes, 2) It is rare, that ONLY WO touches a DB, 3) I will not rely on EOF always doing the thing I expect it to do. Not having FK constraints is about as wrong as using MyISAM in my opinion. cug -- http://www.event-s.net On 4. Dec. 2009, at 06:21 , Kieran Kelleher wrote: Ramsey, Just remove the FK constraints in MySQL. WO works fine without them since EOF takes care of it. If a database does not support deferred constraints, then you should not add FK constraints at all. Cheers, Kieran On Dec 4, 2009, at 8:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? I have Animal- Cat-Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) Ramsey On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 6:27 AM, Kieran Kelleher wrote: I don't use EOModel inheritance any more. It is a PITA. Not worth the hassle. I've never found that to be the case. What trouble were you having? Chuck Using Strategy design pattern to composite in different behaviours works better for me. Remember the OO Principle Favor composition over inheritance That is Favor not use even when inheritance is appropriate. Chuck ... I now favor composition over inheritance ;-) BTW, for this setup the table is identical to a single-table inheritance table, except that the 'type' id field determines the lazily constructed strategy behaviour class for the EO. I will only ever use EOModel inheritance again, if (1) I am told to by a customer, or (2) Strategy design pattern behaviour composition simply does not make sense (so far it makes sense for every case I have looked at in last few years) YMMV ;-) Regards, Kieran On Dec 4, 2009, at 8:49 AM, David Avendasora wrote: Or you can just not use Vertical Inheritance. :-) ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 12:49 PM, Chuck Hill wrote: On Dec 4, 2009, at 6:48 AM, David Avendasora wrote: On Dec 4, 2009, at 9:19 AM, Kieran Kelleher wrote: The lack of deferred constraints prevents one using foreign key constraints in MySQL (InnoDB specifically supports FK constraints). The problem is that MySQL will not let you delete related rows during a transaction, rather than let you execute the full statement and then check for FK integrity afterwards. Exactly, except that if EOF happens to be in a good mood and gets the right sequence by accident then it will work. Please correct me if I am mistaken in my thinking here, but in WebObjects, the Deny delete rule of a relationship essentially does the same thing. Also, in java code, we have the ERXGuardedInterface~ (from now on let's say ~ means or a class spelled something like that) which implements canDelete() and that allows us to prevent deletion based on logic. We also have validateForDelete to prevent deletions in EOF logic. Since I have never used FL constraints in MySQL, Chuck or someone else can explain their exact role/benefit better I am sure. If other things are touching your DB, it protects your referential integrity. I have written apps that have to deal with FKs being invalid due to no constraints and it is a PITA. Doable, especially with Wonder, but still, I like being able to assume that the FK constraint has my back. Not to mention the small issue of indexes. So Kieran, you are manually creating indexes to compensate for lack of FK constraints? Yes I am :-)... now the achilles heel of MySQL has been exposed! MySquirrelToy doesn't use them for FK constraints? Now on the orphan issue. If you have orphans, it means that the FKs did not get nullified or cascade deleted or sth like that. It means your database did not roll back the failing transaction fully. The reason transactions protect you is because when you delete an object and the related items that have a Nullify relationship Delete rule, WO updates those foreign keys to null in the same transaction. Or that some other application is touching your DB. And if you are dealing with orphans on a MySQL database, it means one of three things are wrong. (1) ... (2) ... (3) ... (4) ... (5) You're DB doesn't live in a hermetically sealed environment and other things can change your data without EOF's blessing. Even if the only thing touching my app's DB today is my EOF app, I don't know that that is going to be the case in the future and I can't rely on EOF keeping maintaining Referential Integrity. Call it future-proofing, CYA, Anal Retentiveness, whatever, but if I can enforce referential integrity in the DB, that's where I will do it, and not being able to is a BIG downside to me. +40,000,000 or so On Dec 4, 2009, at 7:57 AM, David Avendasora wrote: On Dec 4, 2009, at 7:17 AM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? What do you mean? That EOF will clean up orphaned objects that didn't get cascade-deleted by EOF when the related object was deleted? No. If EOF loads rows that have invalid FKs in them, it will create a fault for that object, then when you go to try to follow that relationship and the fault is fired, you'd get a missing object exception. I've had to deal with this exact situation before. I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? How would transactions protect you from having an invalid FK if you don't have any FK constraints? Dave -Kieran On Dec 4, 2009, at 12:39 AM, Chuck Hill wrote: On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 10:19 AM, Kieran Kelleher wrote: Not to mention the small issue of indexes. So Kieran, you are manually creating indexes to compensate for lack of FK constraints? Yes I am :-)... now the achilles heel of MySQL has been exposed! Wow. Uh. Speechless. Me! -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On 4. Dec. 2009, at 09:43 , Kieran Kelleher wrote: Hi Guido shiver? is it that cold in California? ;-) Yeah, it actually is in the morning. At least it feels like this after a lng summer. Fair points. This has been a good discussion. What is the workaround ... is it that we must write a delegate to do ordering of updates like Chuck did for MS SQL Server? Is that right? Chuck? I think so, yes. The other point I mentioned was migrations that just don't work as well out of the box as with PostgreSQL and FrontBase. What I find critical is that they can't roll back properly. This requires WAY more sensitivity from the developer to get them right. cug ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
So, to sum up the pros and cons we heard in the discussion: FOR MySQL - Free - Easy to setup and configure - Clustering engine - Easy reliable replication AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On Dec 4, 2009, at 11:16 AM, Kieran Kelleher wrote: So, to sum up the pros and cons we heard in the discussion: FOR MySQL - Free So is PG, FrontBase, and others so no a major Pro - Easy to setup and configure Uh, it does not work correctly out of the box so I think this is a con - Clustering engine - Easy reliable replication Those two are really the only Pros that I can see for it. Those are the only things that would make me use it AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. - need to carefully configure it to get it to work correct -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 4, 2009, at 10:54 AM, Guido Neitzer wrote: On 4. Dec. 2009, at 09:43 , Kieran Kelleher wrote: Hi Guido shiver? is it that cold in California? ;-) Yeah, it actually is in the morning. At least it feels like this after a lng summer. Fair points. This has been a good discussion. What is the workaround ... is it that we must write a delegate to do ordering of updates like Chuck did for MS SQL Server? Is that right? Chuck? I think so, yes. You should be able to use the same one: public static void main(String argv[]) { ERXDatabaseContextMulticastingDelegate.addDefaultDelegate(new ERXEntityDependencyOrderingDelegate()); ... The MS SQL plug-in is for other things: • Bundled JDBC2INFO so that SQL can be generated without a live database connection • Improvements and bug fixes for SQL generation (particularly needed for ERMigrations) The other point I mentioned was migrations that just don't work as well out of the box as with PostgreSQL and FrontBase. What I find critical is that they can't roll back properly. This requires WAY more sensitivity from the developer to get them right. Ugh. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On 4. Dec. 2009, at 11:16 , Kieran Kelleher wrote: So, to sum up the pros and cons we heard in the discussion: FOR MySQL - Free - Easy to setup and configure - Clustering engine I have read a bit about this part as I'm always curious about synchronous multi-master clustering support in DBs. From Are people here referring to NDB Cluster? From reading the white papers I was kind of wondering how this could in any way be used in the typical (outside big corporations) requirements. Is somebody here actually using this? And I'm not talking about asynchronous replication, I'm talking about real multi-master cluster with guaranteed integrity. - Easy reliable replication Hmmm. Way back when we used it, it wasn't reliable. Every now and then slaves had to be completely rebuild. And it also wasn't straightforward as soon as something wasn't as expected. AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. All toys ... :-P Take care, Guido ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On Dec 4, 2009, at 4:48 PM, Ramsey Lee Gurley wrote: On Dec 4, 2009, at 2:29 PM, Chuck Hill wrote: On Dec 4, 2009, at 11:16 AM, Kieran Kelleher wrote: So, to sum up the pros and cons we heard in the discussion: FOR MySQL - Free So is PG, FrontBase, and others so no a major Pro MySQL Administrator is pretty nice to have. At least I don't have to shell out $150 on Navicat. Does postgres/frontbase/other have decent free tools? Uh, of course? :-) They are bundled with FB. PG has http://www.pgadmin.org/ - Easy to setup and configure Uh, it does not work correctly out of the box so I think this is a con - Clustering engine - Easy reliable replication Those two are really the only Pros that I can see for it. Those are the only things that would make me use it AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. - need to carefully configure it to get it to work correct Can it, even with careful setup, work correctly? Consider a circular reference like Nation - City. Every city has to have a nation, every nation has to have a capital city. With FK constraints on, it will be impossible to create a city and a nation. Correct? Yes, fully circular references are simply not possible without deferred constraints (or, well, no constraints if you go that way). Lack of deferred constraints creates an issue with EOF due to its non- deterministic ordering of operations. If FKs are off, I have to rely on EOF, and if Nation - City is huge (Which it probably would be) I don't want to map that. It will have a catastrophic performance impact when addToBothSides is called. But without mapping the to-many, I can delete the Nation and orphan all the cities. So it really sounds like a no win situation without deferred constraints. Yes, if you have circular relationships you are pretty well screwed coming and / or going. Anyway, I've found this discussion very enlightening. I'll probably be looking into database options this weekend (^_^) Looking at the Wonder plugin list, I see Derby, Postgres, Frontbase, and Oracle. I really like the idea of Derby. Embeddable, plus it's just java, and I especially like that after reading about Derby's CREATE FUNCTION ability. It sounds pretty sweet, but the only info I can find regarding Derby and deferred FKs is negative. I guess I just need to checkout the Derby framework and find out. I am pretty sure that Derby was added as an this is an easy option for demo apps rather than a this is a good option for production applications. This is one that I have wanted to look at for a while: http://www.firebirdsql.org/ http://www.ibphoenix.com/ It is an offshoot/descendant of Interbase, which I used back in my Delphi days. It might still be a bit Windows-centric. Postgres, Frontbase, and Oracle can all do deferred FKs, but it sounds like Oracle is not so desirable due to the migrations thing.. and the money thing. The money thing is usually the first roadblock. You need deep pockets to get around that! Of the other two, I'm probably going to lean toward Postgres, but I'm wondering... What will I do for admin tools? I'm not good at remembering cryptic command line options. IME, FB is easier to admin than PG. I'd not choose a database based on easy of admin only, that is just a nice to have. Speed, stability, SQL92 (at least) compliance, replication, and clustering are all more important than a whizzy GUI admin tool. Clearly, more study is needed (^_^) Oh, as for the Vertical inheritance... I was just testing/studying inheritance. I've read enough about what a waste of time VI is on this list. I know better than to actually want to use it myself. I've already seen it fail in MySQL and OpenBase, so I was more interested in why it was failing than actually attempting to use it. Say three Hail Marys and you are forgiven my son. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On 4. Dec. 2009, at 16:48 , Ramsey Lee Gurley wrote: [Free] So is PG, FrontBase, and others so no a major Pro MySQL Administrator is pretty nice to have. At least I don't have to shell out $150 on Navicat. Does postgres/frontbase/other have decent free tools? PGAdmin always did what I needed when I was on the GUI. Not as nice as Navicat, but working. But as I do 99% of my DB stuff on the commandline, I quite like psql. Definitely more than sql92 from FrontBase with it's weird display and somehow weird syntax for everything other than SQL. FrontBaseManager: okay. It's there. It kind of works for most things I needed. Anyway, I've found this discussion very enlightening. I think it is the first one where actual points were made apart form but I like it better. . and the money thing. Of the other two, I'm probably going to lean toward Postgres, but I'm wondering... What will I do for admin tools? I'm not good at remembering cryptic command line options. PGAdmin. http://www.pgadmin.org/ Clearly, more study is needed (^_^) Oh, as for the Vertical inheritance... I was just testing/studying inheritance. I've read enough about what a waste of time VI is on this list. I know better than to actually want to use it myself. I've already seen it fail in MySQL and OpenBase, so I was more interested in why it was failing than actually attempting to use it. You might also want to do some perf testing for your needs. FrontBase can be a very nice option if you are not running in the situations where it's query optimizer is just not up to the task. Also with FrontBase you need to make sure to filter data appropriately, even when importing or using other tools than EOF - otherwise, garbage in, server down. I had that a couple times. Nevertheless, FrontBase is easy to install, easy to use with WO, is SQL92 compliant, has some nice features like the LookSee full text index, multi-master replication and so on. PostgreSQL is a bit more cumbersome to set up, but not really hard or so, is definitely more robust, has a very good query optimizer and an explain analyze ... that actually works and that gives useful information. I never found FrontBase particularly helpful in that department. cug ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On 4. Dec. 2009, at 17:20 , Chuck Hill wrote: On Dec 4, 2009, at 5:11 PM, Guido Neitzer wrote: AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. All toys ... :-P Now, now Guido. Oracle is not a toy. It is a bloated, overpriced, creaky piece of antique 1970's technology. Hmmm. Fisher Price? Na, I know that Oracle is the enterprise' choice for DB tool - most of the time. And it also does seem to do this quite well. If you were actually allowed to post perf comparisons, we would even know how it performs for standard setups ... cug ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On Dec 4, 2009, at 5:27 PM, Guido Neitzer wrote: On 4. Dec. 2009, at 16:48 , Ramsey Lee Gurley wrote: [Free] So is PG, FrontBase, and others so no a major Pro MySQL Administrator is pretty nice to have. At least I don't have to shell out $150 on Navicat. Does postgres/frontbase/other have decent free tools? PGAdmin always did what I needed when I was on the GUI. Not as nice as Navicat, but working. But as I do 99% of my DB stuff on the commandline, I quite like psql. Definitely more than sql92 from FrontBase with it's weird display and somehow weird syntax for everything other than SQL. FrontBaseManager: okay. It's there. It kind of works for most things I needed. It has always done what I needed it to... which is not all that much. Anyway, I've found this discussion very enlightening. I think it is the first one where actual points were made apart form but I like it better. . and the money thing. Of the other two, I'm probably going to lean toward Postgres, but I'm wondering... What will I do for admin tools? I'm not good at remembering cryptic command line options. PGAdmin. http://www.pgadmin.org/ Clearly, more study is needed (^_^) Oh, as for the Vertical inheritance... I was just testing/studying inheritance. I've read enough about what a waste of time VI is on this list. I know better than to actually want to use it myself. I've already seen it fail in MySQL and OpenBase, so I was more interested in why it was failing than actually attempting to use it. You might also want to do some perf testing for your needs. FrontBase can be a very nice option if you are not running in the situations where it's query optimizer is just not up to the task. Or, more accurately, makes perverse optimization choices. Version 4.9 has fixed the ones that I kept hitting, but it does still make odd decisions sometimes. Also with FrontBase you need to make sure to filter data appropriately, even when importing or using other tools than EOF - otherwise, garbage in, server down. I had that a couple times. Yes! Nevertheless, FrontBase is easy to install, easy to use with WO, is SQL92 compliant, has some nice features like the LookSee full text index, multi-master replication and so on. And it can be very fast for large datasets, odd query optimization non- withstanding. PostgreSQL is a bit more cumbersome to set up, but not really hard or so, is definitely more robust, has a very good query optimizer and an explain analyze ... that actually works and that gives useful information. I never found FrontBase particularly helpful in that department. I've been using FB for at least 10 years now and I can confidently state that I have NO idea what the FB query plan information means. I can tell when it has given up optimization hope and is using brute force, but that is about it. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
So, to sum up the pros and cons we heard in the discussion: FOR MySQL - Free - Easy to setup and configure - Clustering engine I have read a bit about this part as I'm always curious about synchronous multi-master clustering support in DBs. From Are people here referring to NDB Cluster? From reading the white papers I was kind of wondering how this could in any way be used in the typical (outside big corporations) requirements. Is somebody here actually using this? And I'm not talking about asynchronous replication, I'm talking about real multi-master cluster with guaranteed integrity. That's what I'm referring ... I have not used it, only read about it enough to be intrigued by it. It requires your entire database to be loaded into memory, but memory is pretty damn cheap. If you have a truly HUGE database, this is not an option, but most of ours are not larger than the reasonable max amount of memory. AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. All toys ... :-P Oracle's a weird cat ... On the one hand, it his this weird pile of ancient restrictions (31 char column name limits, etc). On the other hand, it's insanely fast. I don't have real scientific comparisons to back this up, but anecdotally, it's fast as hell. ms ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
Hey! On 2009/12/05, at 01:46, Mike Schrag wrote: And I'm not talking about asynchronous replication, I'm talking about real multi-master cluster with guaranteed integrity. That's what I'm referring ... I have not used it, only read about it enough to be intrigued by it. It requires your entire database to be loaded into memory, but memory is pretty damn cheap. If you have a truly HUGE database, this is not an option, but most of ours are not larger than the reasonable max amount of memory. Err... unless you have a monster machine with hundreds of GBs, why would you want to cluster a small DB? I don't see any scenario where I need to load balance a DB with half a dozen of GBs. If that's the MySQL way, I would say the PgSQL is probably best! ;) Yours Miguel Arroz smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On Dec 4, 2009, at 8:11 PM, Guido Neitzer wrote: On 4. Dec. 2009, at 11:16 , Kieran Kelleher wrote: So, to sum up the pros and cons we heard in the discussion: FOR MySQL - Free - Easy to setup and configure - Clustering engine I have read a bit about this part as I'm always curious about synchronous multi-master clustering support in DBs. From Are people here referring to NDB Cluster? From reading the white papers I was kind of wondering how this could in any way be used in the typical (outside big corporations) requirements. Is somebody here actually using this? And I'm not talking about asynchronous replication, I'm talking about real multi-master cluster with guaranteed integrity. - Easy reliable replication Hmmm. Way back when we used it, it wasn't reliable. Every now and then slaves had to be completely rebuild. And it also wasn't straightforward as soon as something wasn't as expected. In 4.1 there was the occasional hiccup where you had to either (1) rebuild, or (2) check the actual statement which usually was an insert duplicate, and if that statement had already been executed, then just do a single statement skip and off it went again. However, I have not had a single slave hiccup since all the slaves were upgraded to 5.0.xx. In any case, if you had a at least 2 slaves, then the easy solution *without* doing a full dump of the master and reconfiguring was to stop a good working slave, literally copy the data directory and replace the one on the bad machine and start both up again. However, not a problem for me since 5.0.xx. There was one setting needed to ensure you could do this though (IIRC the slave name - used for replication log names - had to be the same or sth like that, but this again was just a property setting in my.cnf) Guido, I do appreciate your input here, especially since you have the advantage of a unique perspective AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. All toys ... :-P Take care, Guido ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
Wow, did not realize full-featured FB was free - makes it worth looking at now - however if Mike S started using MySQL, then switching is unlikely because MySQL integration will only get better! ;-) On Dec 4, 2009, at 2:29 PM, Chuck Hill wrote: FOR MySQL - Free So is PG, FrontBase, and others ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On Dec 4, 2009, at 8:27 PM, Guido Neitzer wrote: On 4. Dec. 2009, at 16:48 , Ramsey Lee Gurley wrote: [Free] So is PG, FrontBase, and others so no a major Pro MySQL Administrator is pretty nice to have. At least I don't have to shell out $150 on Navicat. Does postgres/frontbase/other have decent free tools? PGAdmin always did what I needed when I was on the GUI. Not as nice as Navicat, but working. But as I do 99% of my DB stuff on the commandline, I quite like psql. Definitely more than sql92 from FrontBase with it's weird display and somehow weird syntax for everything other than SQL. Now that is a pro in favor of PG. I dislike dependence on GUI tools for database servers where I usually want to ssh and tunnel into some remote database server and get stuff done and write utility shell scripts for admin and development. FrontBaseManager: okay. It's there. It kind of works for most things I needed. Anyway, I've found this discussion very enlightening. I think it is the first one where actual points were made apart form but I like it better. Yeah, it just says something good about this great group of people. I guess WebObjects devs are practical and reasonable. If they were over- emotional, they wouldn't be using it because they would be afraid of it being EOL'd or sth like that! BTW, not only were actual points made, but we (Chuck) can make fun of each other (me) without getting insulted! ;-) Heck, the Google Wave app was made for discussions like this the indentation and content is making it harder to find new comments! . and the money thing. Of the other two, I'm probably going to lean toward Postgres, but I'm wondering... What will I do for admin tools? I'm not good at remembering cryptic command line options. PGAdmin. http://www.pgadmin.org/ Clearly, more study is needed (^_^) Oh, as for the Vertical inheritance... I was just testing/studying inheritance. I've read enough about what a waste of time VI is on this list. I know better than to actually want to use it myself. I've already seen it fail in MySQL and OpenBase, so I was more interested in why it was failing than actually attempting to use it. You might also want to do some perf testing for your needs. FrontBase can be a very nice option if you are not running in the situations where it's query optimizer is just not up to the task. Also with FrontBase you need to make sure to filter data appropriately, even when importing or using other tools than EOF - otherwise, garbage in, server down. I had that a couple times. Nevertheless, FrontBase is easy to install, easy to use with WO, is SQL92 compliant, has some nice features like the LookSee full text index, multi-master replication and so on. PostgreSQL is a bit more cumbersome to set up, but not really hard or so, is definitely more robust, has a very good query optimizer and an explain analyze ... that actually works and that gives useful information. I never found FrontBase particularly helpful in that department. cug ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On Dec 4, 2009, at 6:27 PM, Kieran Kelleher wrote: Wow, did not realize full-featured FB was free - makes it worth looking at now Damn we are a cheap bunch!:-) It is has been free for a few years now. Definitely a contender. - however if Mike S started using MySQL, then switching is unlikely because MySQL integration will only get better! ;-) There is still that pesky deferred constraint issue. It won't affect all projects, but it will affect some. But as you are used to not having FK constraints anyway... ;-) Chuck On Dec 4, 2009, at 2:29 PM, Chuck Hill wrote: FOR MySQL - Free So is PG, FrontBase, and others -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On 4. Dec. 2009, at 17:46 , Mike Schrag wrote: That's what I'm referring ... I have not used it, only read about it enough to be intrigued by it. It requires your entire database to be loaded into memory, but memory is pretty damn cheap. If you have a truly HUGE database, this is not an option, but most of ours are not larger than the reasonable max amount of memory. Personally I have only fairly small databases - big tables being in the couple hundred thousand rows range. Professionally, it's a different thing. Big table in the couple billion rows tables. Oracle's a weird cat ... On the one hand, it his this weird pile of ancient restrictions (31 char column name limits, etc). On the other hand, it's insanely fast. I don't have real scientific comparisons to back this up, but anecdotally, it's fast as hell. Yeah, it's really weird. When I used it, I found it pretty cumbersome. Which might have to do with the fact that with the license cost, normally a DBA comes within the box ... so they don't really care about making it usable for mere mortals. cug -- http://www.event-s.net ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On 4. Dec. 2009, at 18:23 , Kieran Kelleher wrote: Hmmm. Way back when we used it, it wasn't reliable. Every now and then slaves had to be completely rebuild. And it also wasn't straightforward as soon as something wasn't as expected. In 4.1 there was the occasional hiccup where you had to either (1) rebuild, or (2) check the actual statement which usually was an insert duplicate, and if that statement had already been executed, then just do a single statement skip and off it went again. However, I have not had a single slave hiccup since all the slaves were upgraded to 5.0.xx. I stopped using it before 5.x. But if I recall correctly, we had the issues with 4.1. In any case, if you had a at least 2 slaves, then the easy solution *without* doing a full dump of the master and reconfiguring was to stop a good working slave, literally copy the data directory and replace the one on the bad machine and start both up again. However, not a problem for me since 5.0.xx. There was one setting needed to ensure you could do this though (IIRC the slave name - used for replication log names - had to be the same or sth like that, but this again was just a property setting in my.cnf) Right. Issue was - I was not very comfortable in MySQL and we had only one slave ... Guido, I do appreciate your input here, especially since you have the advantage of a unique perspective Na, not really. The times I worked with MySQL was when I was at a three person company back in good old Europe. Nevertheless, we did some whacky things back than that were real fun! ;-) Like trying to beat the hell out of a PG instance with raw copy import every 6 hours which hit the incredible speed of about 17k simple rows per second on my laptop (if I recall that correctly, I don't recall the numbers on the Xserve - I think we never really tested it, as the task always completed in under a minute, which was a bit better then the 15 minutes in the requirements) ... Take care, Guido ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On Dec 4, 2009, at 7:07 PM, Guido Neitzer wrote: On 4. Dec. 2009, at 17:46 , Mike Schrag wrote: That's what I'm referring ... I have not used it, only read about it enough to be intrigued by it. It requires your entire database to be loaded into memory, but memory is pretty damn cheap. If you have a truly HUGE database, this is not an option, but most of ours are not larger than the reasonable max amount of memory. Personally I have only fairly small databases - big tables being in the couple hundred thousand rows range. Professionally, it's a different thing. Big table in the couple billion rows tables. Yeah, I think a couple billion rows qualifies as big in general database terms. :-P Oracle's a weird cat ... On the one hand, it his this weird pile of ancient restrictions (31 char column name limits, etc). On the other hand, it's insanely fast. I don't have real scientific comparisons to back this up, but anecdotally, it's fast as hell. Yeah, it's really weird. When I used it, I found it pretty cumbersome. Which might have to do with the fact that with the license cost, normally a DBA comes within the box ... so they don't really care about making it usable for mere mortals. That was my big grumble against it, until they started revising the licensing terms. It can be seriously annoying to admin. It can pick up and MOVE when tuned correctly. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On 04/12/2009, at 11:17 PM, Kieran Kelleher wrote: Fair enough. Finally, we have one specific strike against it. ;-) Two actually. Non transactional ddl operations. Since we have Delete rules in the EOModel, is this feature a safety net that is needed for external non-WO apps that are accessing the database? No (though that's certainly a benefit for sysadmins). It means you cannot commit changes with the hope it'll save .. because it doesn't defer constraint checks (for foreign keys etc) until the end but per insert/update. I have never implemented constraints and have yet to have an orphan record since transactions/rollback protect against that, right? That's been my experience also. with regards, -- Lachlan Deck ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On 05/12/2009, at 12:02 AM, Ramsey Lee Gurley wrote: Hi Kieran, Have you tried vertical inheritance with MySQL? He wouldn't have. I have and continue to. I have Animal-Cat-Leopard. I try to create a leopard and it fails because com.webobjects.eoaccess.EOGeneralAdaptorException: EvaluateExpression failed: com.webobjects.jdbcadaptor._MySQLPlugIn$MySQLExpression: INSERT INTO Leopard(spots, id) VALUES (?, ?) withBindings: 1:33(spots), 2:9(id): Next exception:SQL State:23000 -- error code: 1452 -- msg: Cannot add or update a child row: a foreign key constraint fails (`example/leopard`, CONSTRAINT `Leopard_id_id_FK` FOREIGN KEY (`id`) REFERENCES `cat` (`id`)) Yep. I've avoided using fk constraints since mysql doesn't play nice with this. It gets the adaptor operations for Animal, then Leopard, then Cat... and blows up at leopard because there's no cat yet (I think). I had to google for What are deferred constraints so I could be very wrong, but I think it's blowing up because of lack of deferred constraints (^_^) It looks like I'll need to have an EODatabaseContext delegate override databaseContextWillOrderAdaptorOperations to fix it, unless there is something in the ERXSQLHelper that can get there first. This just happens to be a timely thread since I was messing with my MySQLPlugin last night (^_^) What does your plugin do? with regards, -- Lachlan Deck ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: MySQL [was: Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]]
On 05/12/2009, at 6:29 AM, Chuck Hill wrote: On Dec 4, 2009, at 11:16 AM, Kieran Kelleher wrote: So, to sum up the pros and cons we heard in the discussion: FOR MySQL - Free So is PG, FrontBase, and others so no a major Pro - Easy to setup and configure Uh, it does not work correctly out of the box so I think this is a con Yeah - it means lots of reading so as to, um, fine-tune what should have been an out-of-the-box option. - Clustering engine - Easy reliable replication Those two are really the only Pros that I can see for it. Those are the only things that would make me use it AGAINST MySQL - Lack of deferred constraints - Lack of transactional DDL (roll back failing migrations for example). As Mike pointed out, neither does Oracle, so not alone there. - need to carefully configure it to get it to work correct -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/lachlan.deck%40gmail.com This email sent to lachlan.d...@gmail.com with regards, -- Lachlan Deck ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
By the way Miguel, I made a little Optimistic lock action utility class to handle this (similar to how ERXEOAccessUtilities.ChannelAction is constructed)... you might find it useful... example of usage nippet is shown after the class listing below ... snip content = snippet of static inner class from my EO utilities class /** * Deals with the nitty-gritty of a critical strongshort-running/ strong * task where we depend on optimistic locking to guarantee that another * process does not change optimistic locking attributes at the same time. To * understand why this is necessary, read this: * {...@link http://terminalapp.net/dr-optimistic-locking/}. * * Wraps the actions in * appropriate locks. WARNING: The OSC is locked for the period of the * transaction. All EOF access on this OSC is blocked. Do not use this for * actions that take more than a few milliseconds on OSC's that are being * used by request threads! * * Code design inspired by {...@link ERXEOAccessUtilities.ChannelAction} * * @author kieran */ public static abstract class OptimisticLockAction { /** * This method is called in a new locked editing context that has been * created in the osc passed in. Perform your changes in this editing * context. Any errors will be thrown. Return any result you want. * * @param osc */ protected abstract Object doPerform(EOEditingContext ec); public Object perform() throws Exception { return perform(null); } /** * @param osc *the root object store to be locked so that true optimistic *locking can be enforced. * @return the result of your doPerform method implementation * @throws Exception */ public Object perform(EOObjectStore osc) throws Exception { osc.lock(); try { ERXEC ec = (ERXEC) ERXEC.newEditingContext(osc); ec.setCoalesceAutoLocks(false); ec.setUseAutoLock(false); ec.lock(); try { // Don't use stale EO's to begin with ec.setFetchTimestamp(System.currentTimeMillis()); return doPerform(ec); } catch (Exception e) { throw e; } finally { ec.unlock(); ec.dispose(); } } catch (Exception e) { throw e; } finally { osc.unlock(); } } } /snip snip content = example usage // Create a new Optimistic Lock action OptimisticLockAction action = new WKEOUtils.OptimisticLockAction() { @Override protected Object doPerform(EOEditingContext actionEditingContext) { CTCampaign localCampaign = (CTCampaign) actionEditingContext.faultForGlobalID(gid, actionEditingContext); try { // Make the critical concurrent changes that depend on optimistic locking failure localCampaign.shipMessages(); actionEditingContext.saveChanges(); } catch (EOGeneralAdaptorException e) { // Handle the optimistic lock failure ... } return null; } }; // Perform the optimistic lock action try { action.perform(parentObjectStore()); } catch (Exception e) { // Unexpected exception throw new NestableRuntimeException(e); } /snip On Dec 3, 2009, at 8:45 AM, Miguel Arroz wrote: Hello We use JMeter, not so much to test how much load can the server get, but to test my beloved weird concurrency handling situations. As almost any software in the world, it sucks specially at the UI level (it's far from being integrated in OS X, not even copy/paste works between it and the Mac world), and you have to allocate it a lot of RAM or it will eventually blow up the heap, but it gets the job done. Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Do you need to do anything different from ERXEC.saveTolarantly(b,b,b)? Cheers, Anjo Am 03.12.2009 um 16:02 schrieb Kieran Kelleher: By the way Miguel, I made a little Optimistic lock action utility class to handle this (similar to how ERXEOAccessUtilities.ChannelAction is constructed)... you might find it useful... example of usage nippet is shown after the class listing below ... snip content = snippet of static inner class from my EO utilities class /** *Dealswiththenitty-grittyofacriticalstrongshort-running/strong *taskwherewedependonoptimisticlockingtoguaranteethatanother *processdoesnotchangeoptimisticlockingattributesatthesametime.To *understandwhythisisnecessary,readthis: *...@link http://terminalapp.net/dr-optimistic-locking/}. * *Wrapstheactionsin *appropriatelocks.WARNING:TheOSCislockedfortheperiodofthe *transaction.AllEOFaccessonthisOSCisblocked.Donotusethisfor *actionsthattakemorethanafewmillisecondsonOSC'sthatarebeing *usedbyrequestthreads! * *codedesigninspired...@link ERXEOAccessUtilities.ChannelAction} * *...@authorkieran */ public static abstract class OptimisticLockAction { /** *Thismethodiscalledinanewlockededitingcontextthathasbeen *createdintheoscpassedin.Performyourchangesinthisediting *context.Anyerrorswillbethrown.Returnanyresultyouwant. * *...@paramosc */ protected abstract Object doPerform(EOEditingContext ec); public Object perform() throws Exception { return perform(null); } /** *...@paramosc *therootobjectstoretobelockedsothattrueoptimistic *lockingcanbeenforced. *...@returntheresultofyourdoperformmethodimplementation *...@throwsexception */ public Object perform(EOObjectStore osc) throws Exception { osc.lock(); try { ERXEC ec = (ERXEC) ERXEC.newEditingContext(osc); ec.setCoalesceAutoLocks(false); ec.setUseAutoLock(false); ec.lock(); try { // Don't use stale EO's to begin with ec.setFetchTimestamp(System.currentTimeMillis()); return doPerform(ec); } catch (Exception e) { throw e; } finally { ec.unlock(); ec.dispose(); } } catch (Exception e) { throw e; } finally { osc.unlock(); } } } /snip snip content = example usage // Create a new Optimistic Lock action OptimisticLockAction action = new WKEOUtils.OptimisticLockAction() { @Override protected Object doPerform(EOEditingContext actionEditingContext) { CTCampaign localCampaign = (CTCampaign) actionEditingContext.faultForGlobalID(gid, actionEditingContext); try { // Make the critical concurrent changes that depend on optimistic locking failure localCampaign.shipMessages(); actionEditingContext.saveChanges(); } catch (EOGeneralAdaptorException e) { // Handle the optimistic lock failure ... } return null; } }; // Perform the optimistic lock action try { action.perform(parentObjectStore()); } catch (Exception e) { // Unexpected exception throw new NestableRuntimeException(e); } /snip On Dec 3, 2009, at 8:45 AM, Miguel Arroz wrote: Hello We use JMeter, not so much to test how much load can the server get, but to test my beloved weird concurrency handling situations. As almost any software in the world, it sucks specially at the UI level (it's far from being integrated in OS X, not even copy/paste works between it and the Mac world), and you have to allocate it a lot of RAM or it will eventually blow up the heap, but it gets the job done. Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! I think so. This concurrency stuff is confusing, but it looks like saveChangesTolerantly relies on EOF Optimistic Locking. The problem is that EOF's Optimistic Locking is useless unless the OSC is locked, due to the reasons I have on that blog post, and that were already discussed here a few times. There's a disagreement between me and other people about this, I think OL is just broken, other people say it's a feature, not a bug :), but the point is, unless you lock OSC, some situations that should trigger an OL simply won't. The saveChangesTolerantly is useful to avoid writing a few lines of code (the read-again, change-again, try-to-write-again cycle) in some cases (like when you're changing a simple property in one object). However, we have very complex logic with data that depends on other data, so if we hit an OL exception, it would be so confusing to recover from that error that we prefer to throw everything away and start again from scratch. I still believe snapshots should be linked to an EC and not an OSC to avoid this problem, although that would require some heavy changing to EOF. Yours Miguel Arroz On 2009/12/03, at 15:09, Anjo Krank wrote: Do you need to do anything different from ERXEC.saveTolarantly(b,b,b)? Cheers, Anjo Am 03.12.2009 um 16:02 schrieb Kieran Kelleher: By the way Miguel, I made a little Optimistic lock action utility class to handle this (similar to how ERXEOAccessUtilities.ChannelAction is constructed)... you might find it useful... example of usage nippet is shown after the class listing below ... snip content = snippet of static inner class from my EO utilities class /** *Dealswiththenitty-grittyofacriticalstrongshort-running/strong *taskwherewedependonoptimisticlockingtoguaranteethatanother *processdoesnotchangeoptimisticlockingattributesatthesametime.To *understandwhythisisnecessary,readthis: *...@link http://terminalapp.net/dr-optimistic-locking/}. * *Wrapstheactionsin *appropriatelocks.WARNING:TheOSCislockedfortheperiodofthe *transaction.AllEOFaccessonthisOSCisblocked.Donotusethisfor *actionsthattakemorethanafewmillisecondsonOSC'sthatarebeing *usedbyrequestthreads! * *codedesigninspired...@link ERXEOAccessUtilities.ChannelAction} * *...@authorkieran */ public static abstract class OptimisticLockAction { /** *Thismethodiscalledinanewlockededitingcontextthathasbeen *createdintheoscpassedin.Performyourchangesinthisediting *context.Anyerrorswillbethrown.Returnanyresultyouwant. * *...@paramosc */ protected abstract Object doPerform(EOEditingContext ec); public Object perform() throws Exception { return perform(null); } /** *...@paramosc *therootobjectstoretobelockedsothattrueoptimistic *lockingcanbeenforced. *...@returntheresultofyourdoperformmethodimplementation *...@throwsexception */ public Object perform(EOObjectStore osc) throws Exception { osc.lock(); try { ERXEC ec = (ERXEC) ERXEC.newEditingContext(osc); ec.setCoalesceAutoLocks(false); ec.setUseAutoLock(false); ec.lock(); try { // Don't use stale EO's to begin with ec.setFetchTimestamp(System.currentTimeMillis()); return doPerform(ec); } catch (Exception e) { throw e; } finally { ec.unlock(); ec.dispose(); } } catch (Exception e) { throw e; } finally { osc.unlock(); } } } /snip snip content = example usage // Create a new Optimistic Lock action OptimisticLockAction action = new WKEOUtils.OptimisticLockAction() { @Override protected Object doPerform(EOEditingContext actionEditingContext) { CTCampaign localCampaign = (CTCampaign) actionEditingContext.faultForGlobalID(gid, actionEditingContext); try { // Make the critical concurrent changes that depend on optimistic locking failure
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I think this would be a terrible waste of mem? Also: didn't I add a fix a week or so ago for you to look over? Wouldn't that help with your problem? Cheers, Anjo Am 03.12.2009 um 16:26 schrieb Miguel Arroz: I still believe snapshots should be linked to an EC and not an OSC to avoid this problem, although that would require some heavy changing to EOF. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! On 2009/12/03, at 15:02, Kieran Kelleher wrote: ERXEC ec = (ERXEC) ERXEC.newEditingContext(osc); ec.setCoalesceAutoLocks(false); ec.setUseAutoLock(false); ec.lock(); Won't the manual lock() disable the autolocking automatically until the EC is manually unlocked again? I believe the ec stays locked until it's manually unlocked. Yours Miguel Arroz smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! I still didn't have time to test that, sorry. :( Anyway, I believe that won't solve the problem, because the issue is not at the EC level, but below. Having the EC refusing merges is good (I wrote a delegate for that), so I believe that should stay in ERXEC, but it's only part of the problem. The biggest issue is the snapshot handling in the OSC. The fact that there's only one snapshot per object for all the ECs means that, when you save, the OL check is being done against the status of the object left by the last EC that saved it, and not the status that was the current one when you read the object into the EC you are trying to save changes. Sorry if this sounds a bit confusing, the post explains it better. :) The thing is, OL is OK to avoid concurrent updates of the same data by different instances. But there's really no good way to avoid concurrent data updates in the same instance. You have no way to be notified that you discarded the changes made by another thread in the same instance. You could check, when saving, if there is any merging notification waiting to be applied to the EC, but besides being tricky, I'm not sure if you could do that 100% reliably in all situations. That's why I would like to have a snapshot per EC, so that I could generate an SQL query that does OL checking against what I had when I created that EC, and not against what was the last thing my instance saved. It would take more memory, yes, but it would avoid locking the OSC while applying changes to EOs. Yours Miguel Arroz On 2009/12/03, at 15:29, Anjo Krank wrote: I think this would be a terrible waste of mem? Also: didn't I add a fix a week or so ago for you to look over? Wouldn't that help with your problem? Cheers, Anjo Am 03.12.2009 um 16:26 schrieb Miguel Arroz: I still believe snapshots should be linked to an EC and not an OSC to avoid this problem, although that would require some heavy changing to EOF. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi Anjo, I think this is much different because we are locking the OSC for the duration of *making* and saving the concurrent changes so that we can *guarantee* that the snapshot (which is being used by saveChanges for optimistic locking comparison) has not changed from the time that we *started* the task. If you are not convinced I can give some examples. It is explained here: http://terminalapp.net/dr-optimistic-locking/ This extract explains the crunch of the problem: cite The problem here is the assumption EOF does when saving changes of attributes with optimistic locking enabled. EOF assumes that the row snapshots represent the original status of the objects when they were fetched to the context being saved. So, it compares the current database status with the original status to detect changes. The problem is that assumption is simply not true. There can only be one row snapshot in an EOF stack for a given row, and nothing will guarantee the snapshot doesn’t change in the middle of the critical section. /cite And if you use OSC synchronization across and within instances, there is even a higher risk of that snapshot changing behind your back while making the critical concurrent changes. In any case, this does work, and I only use it explicitly for those relatively rare cases where I really need optimistic locking on something like a workflow state transition task that should only ever be executed once on a specific EO for example. Also, in my experience, this technique is rarely used compared to the more common scenario of saveTolerantly, refresh, merge changes, etc. ... and many apps may never have business logic that requires this technique. I have one app ( Regards, Kieran On Dec 3, 2009, at 10:09 AM, Anjo Krank wrote: Do you need to do anything different from ERXEC.saveTolarantly(b,b,b)? Cheers, Anjo Am 03.12.2009 um 16:02 schrieb Kieran Kelleher: By the way Miguel, I made a little Optimistic lock action utility class to handle this (similar to how ERXEOAccessUtilities.ChannelAction is constructed)... you might find it useful... example of usage nippet is shown after the class listing below ... snip content = snippet of static inner class from my EO utilities class /** *Dealswiththenitty-grittyofacriticalstrongshort-running/strong *taskwherewedependonoptimisticlockingtoguaranteethatanother *processdoesnotchangeoptimisticlockingattributesatthesametime.To *understandwhythisisnecessary,readthis: *...@link http://terminalapp.net/dr-optimistic-locking/}. * *Wrapstheactionsin *appropriatelocks.WARNING:TheOSCislockedfortheperiodofthe *transaction.AllEOFaccessonthisOSCisblocked.Donotusethisfor *actionsthattakemorethanafewmillisecondsonOSC'sthatarebeing *usedbyrequestthreads! * *codedesigninspired...@link ERXEOAccessUtilities.ChannelAction} * *...@authorkieran */ public static abstract class OptimisticLockAction { /** *Thismethodiscalledinanewlockededitingcontextthathasbeen *createdintheoscpassedin.Performyourchangesinthisediting *context.Anyerrorswillbethrown.Returnanyresultyouwant. * *...@paramosc */ protected abstract Object doPerform(EOEditingContext ec); public Object perform() throws Exception { return perform(null); } /** *...@paramosc *therootobjectstoretobelockedsothattrueoptimistic *lockingcanbeenforced. *...@returntheresultofyourdoperformmethodimplementation *...@throwsexception */ public Object perform(EOObjectStore osc) throws Exception { osc.lock(); try { ERXEC ec = (ERXEC) ERXEC.newEditingContext(osc); ec.setCoalesceAutoLocks(false); ec.setUseAutoLock(false); ec.lock(); try { // Don't use stale EO's to begin with ec.setFetchTimestamp(System.currentTimeMillis()); return doPerform(ec); } catch (Exception e) { throw e; } finally { ec.unlock(); ec.dispose(); } } catch (Exception e) { throw e; }
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
So your actual problem is that the EO doesn't save the old value in an extra dict? Well, do so: create a (known key, optimization) dict with the locking attributes and the values from __dictionary (after an actual change, optimization). Then use DBC delegate databaseContextWillOrderAdaptorOperations to munge the values. Mind you, this is from a 5 min glance. But I think it will work. Patches welcome... Cheers, Anjo Am 03.12.2009 um 16:45 schrieb Miguel Arroz: Hi! I still didn't have time to test that, sorry. :( Anyway, I believe that won't solve the problem, because the issue is not at the EC level, but below. Having the EC refusing merges is good (I wrote a delegate for that), so I believe that should stay in ERXEC, but it's only part of the problem. The biggest issue is the snapshot handling in the OSC. The fact that there's only one snapshot per object for all the ECs means that, when you save, the OL check is being done against the status of the object left by the last EC that saved it, and not the status that was the current one when you read the object into the EC you are trying to save changes. Sorry if this sounds a bit confusing, the post explains it better. :) The thing is, OL is OK to avoid concurrent updates of the same data by different instances. But there's really no good way to avoid concurrent data updates in the same instance. You have no way to be notified that you discarded the changes made by another thread in the same instance. You could check, when saving, if there is any merging notification waiting to be applied to the EC, but besides being tricky, I'm not sure if you could do that 100% reliably in all situations. That's why I would like to have a snapshot per EC, so that I could generate an SQL query that does OL checking against what I had when I created that EC, and not against what was the last thing my instance saved. It would take more memory, yes, but it would avoid locking the OSC while applying changes to EOs. Yours Miguel Arroz On 2009/12/03, at 15:29, Anjo Krank wrote: I think this would be a terrible waste of mem? Also: didn't I add a fix a week or so ago for you to look over? Wouldn't that help with your problem? Cheers, Anjo Am 03.12.2009 um 16:26 schrieb Miguel Arroz: I still believe snapshots should be linked to an EC and not an OSC to avoid this problem, although that would require some heavy changing to EOF. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Under heavy EOF processing load across many background threads I was getting occasional deadlocks (this was a few weeks/months ago) and turning off the safelocking stuff for manually managed ec's fixed that problem. Actually I have a static utility method Utilities.newManualLockingEditingContext(...), but I removed that dependency for the sake of sharing this class with you just now. Think about it, if I am in a background thread (and no, I don't use, or want to use auto locking in my background threads!), I *could* get a NSNotification that invokes a method that autoLocks in between the time that I constructed and the time I called ec.lock() again it is just a concurrency risk and I can say for a fact that in production, I began getting occasional deadlocks when EOF was under heavy load once I turned on safeLocking a while back and the approach below fixed it and there has not been a single deadlock in production since this approach was taken for manual lock control ec's. Here is my usual utility for creating manual lock control ec's: snip /** * I do not want autolocking in non-request threads * * @param parent * @return an ERXEC with safeLocking properties turned OFF. */ public static EOEditingContext newManualLockingEditingContext(EOObjectStore parent) { ERXEC ec = (ERXEC) ERXEC.newEditingContext(parent); ec.setCoalesceAutoLocks(false); ec.setUseAutoLock(false); return ec; } public static EOEditingContext newManualLockingEditingContext() { return newManualLockingEditingContext(null); } /snip For now my mindset is that if it is manual lock control, then I don't want autolocking. lock/try/finally/unlock is my preferred approach in that usage. Works for me ... YMMV ;-) Regards, Kieran PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. On Dec 3, 2009, at 10:29 AM, Miguel Arroz wrote: Hi! On 2009/12/03, at 15:02, Kieran Kelleher wrote: ERXEC ec = (ERXEC) ERXEC.newEditingContext(osc); ec.setCoalesceAutoLocks(false); ec.setUseAutoLock(false); ec.lock(); Won't the manual lock() disable the autolocking automatically until the EC is manually unlocked again? I believe the ec stays locked until it's manually unlocked. Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Pardon my ignorance... Is this valid Java code, I mean creating and object followed by a { .. } block? What does that do? :-) Thanks, Ricardo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
anonymous inner subclass of ERXEC ... you're declaring a new class and instantiating it. ms On Dec 3, 2009, at 2:21 PM, Ricardo J. Parada wrote: On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Pardon my ignorance... Is this valid Java code, I mean creating and object followed by a { .. } block? What does that do? :-) Thanks, Ricardo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
It is an anonymous subclass. (I guess that is the correct term) If you look at the creation of the WKEOUtils.OptimisticLockAction creation earlier in this thread, it is the same thing. Each time we create an OptimisticLockAction, we create a different subclass of the abstract OL Action class with a new doPerform method. That after creation ,we can it. Same technique used in ERXEOAccessUtilities.ChannelAction. On Dec 3, 2009, at 2:21 PM, Ricardo J. Parada wrote: On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Pardon my ignorance... Is this valid Java code, I mean creating and object followed by a { .. } block? What does that do? :-) Thanks, Ricardo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Thank you Mike, Kieran and Bogdan for the clarification! :-) On Dec 3, 2009, at 2:32 PM, Kieran Kelleher wrote: It is an anonymous subclass. (I guess that is the correct term) If you look at the creation of the WKEOUtils.OptimisticLockAction creation earlier in this thread, it is the same thing. Each time we create an OptimisticLockAction, we create a different subclass of the abstract OL Action class with a new doPerform method. That after creation ,we can it. Same technique used in ERXEOAccessUtilities.ChannelAction. On Dec 3, 2009, at 2:21 PM, Ricardo J. Parada wrote: On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Pardon my ignorance... Is this valid Java code, I mean creating and object followed by a { .. } block? What does that do? :-) Thanks, Ricardo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Don't subclasses have an implicit super() to invoke the super class constructor? On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote: True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com This email sent to rpar...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
yeah, good point -- probably making a real subclass as well as a custom factory subclass and doing YourFactory.newEditingContext() would be slightly safer, in case the superclass factory is attaching delegates or something. ms On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote: True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
i think we're talking two different things ... if you have an empty superclass constructor and you don't declare any constructors, then yes, there is an implicit constructor created in your subclass that calls super (as well, if you DO declare a constructor and there is an empty super constructor, implicitly a super() is added to the top of your constructor). in this case, because the anonymous subclass is declared as new ERXEC(os), it's actually calling the ERXEC(ObjectStore) constructor (which I PRESUME java secretly added into your subclass with a super(os) call -- this is a little different than a normal class). However, Kieran's specifically talking about the ERXEC.newEditingContext() factory method, which you're bypassing here by explicitly subclassing ERXEC and instantiating the class directly. ms On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote: Don't subclasses have an implicit super() to invoke the super class constructor? On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote: True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/rparada%40mac.com This email sent to rpar...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
OK, this is the final concurrent utility code to provide manual locking ec's in a app with safeLocking on. And just for fun and Ricardo's enjoyment of anonymous classes ;-), the factory is an anonymous static class and its _create method returns anonymous ERXEC's with the two methods over-riden as per Anjo's suggestion. /** * Anonymous ERXEC factory that creates manual locking ec's in an app where safeLocking is on by default */ private static ERXEC.Factory manualLockingEditingContextFactory = new ERXEC.DefaultFactory() { @Override protected EOEditingContext _createEditingContext(EOObjectStore parent) { return new ERXEC(parent == null ? EOEditingContext.defaultParentObjectStore() : parent) { @Override public boolean useAutoLock() {return false;} @Override public boolean coalesceAutoLocks() {return false;} }; } }; /** * @return a regular ERXEC with no auto-locking features */ public static EOEditingContext newManualLockingEditingContext() { return manualLockingEditingContextFactory._newEditingContext(); } /** * I do not want autolocking in non-request threads * * @param parent * @return an ERXEC with safeLocking properties turned OFF. */ public static EOEditingContext newManualLockingEditingContext(EOObjectStore parent) { return manualLockingEditingContextFactory._newEditingContext(parent); } On Dec 3, 2009, at 2:54 PM, Mike Schrag wrote: i think we're talking two different things ... if you have an empty superclass constructor and you don't declare any constructors, then yes, there is an implicit constructor created in your subclass that calls super (as well, if you DO declare a constructor and there is an empty super constructor, implicitly a super() is added to the top of your constructor). in this case, because the anonymous subclass is declared as new ERXEC(os), it's actually calling the ERXEC(ObjectStore) constructor (which I PRESUME java secretly added into your subclass with a super(os) call -- this is a little different than a normal class). However, Kieran's specifically talking about the ERXEC.newEditingContext() factory method, which you're bypassing here by explicitly subclassing ERXEC and instantiating the class directly. ms On Dec 3, 2009, at 2:45 PM, Ricardo J. Parada wrote: Don't subclasses have an implicit super() to invoke the super class constructor? On Dec 3, 2009, at 2:38 PM, Kieran Kelleher wrote: True, but then I would be bypassing the EC factory, which just seems dirty, but yes, this very good suggestion is an elegant way to do it for sure. On Dec 3, 2009, at 2:16 PM, Anjo Krank wrote: PS. And even the above is not perfect protection against an autolock if a thread gets cpu execution delay between construction statement and the ec.setCoalesceAutoLocks(false) statement. After setting safelocking props to false, I should really check if the ec was autolocked and unlock it before returning or even have an ERXEC constructor that takes a safeLocking boolean param, but that would be two more undesired constructors ... so probably making isLockedInThread public (or accessible using reflection) should do the trick. In that case, you'd be better with return new ERXEC(os) { public boolean useAutoLock() {return false;} public boolean coalesceAutoLocks() {return false;} }; Cheers, Anjo ___ ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! I don't know EOF at that level well enough, although that might work. However, it's a little dirty... :) I would prefer something a little more integrated in the EOF architecture (that might have to evolve a little). Maybe separating the OSC from the DB connections, so that several OSCs could share the same connection. One would create an OSC for the critical part, without having the extra load of creating the connection itself. The OSC would be short lived, and as it would be used only by the critical section, the snapshots wouldn't be changed by anyone else, and it had the advantage of not locking up the app to everyone else. Now is the time you say ERsomething does that! Yours Miguel Arroz On 2009/12/03, at 16:33, Anjo Krank wrote: So your actual problem is that the EO doesn't save the old value in an extra dict? Well, do so: create a (known key, optimization) dict with the locking attributes and the values from __dictionary (after an actual change, optimization). Then use DBC delegate databaseContextWillOrderAdaptorOperations to munge the values. Mind you, this is from a 5 min glance. But I think it will work. Patches welcome... Cheers, Anjo Am 03.12.2009 um 16:45 schrieb Miguel Arroz: Hi! I still didn't have time to test that, sorry. :( Anyway, I believe that won't solve the problem, because the issue is not at the EC level, but below. Having the EC refusing merges is good (I wrote a delegate for that), so I believe that should stay in ERXEC, but it's only part of the problem. The biggest issue is the snapshot handling in the OSC. The fact that there's only one snapshot per object for all the ECs means that, when you save, the OL check is being done against the status of the object left by the last EC that saved it, and not the status that was the current one when you read the object into the EC you are trying to save changes. Sorry if this sounds a bit confusing, the post explains it better. :) The thing is, OL is OK to avoid concurrent updates of the same data by different instances. But there's really no good way to avoid concurrent data updates in the same instance. You have no way to be notified that you discarded the changes made by another thread in the same instance. You could check, when saving, if there is any merging notification waiting to be applied to the EC, but besides being tricky, I'm not sure if you could do that 100% reliably in all situations. That's why I would like to have a snapshot per EC, so that I could generate an SQL query that does OL checking against what I had when I created that EC, and not against what was the last thing my instance saved. It would take more memory, yes, but it would avoid locking the OSC while applying changes to EOs. Yours Miguel Arroz On 2009/12/03, at 15:29, Anjo Krank wrote: I think this would be a terrible waste of mem? Also: didn't I add a fix a week or so ago for you to look over? Wouldn't that help with your problem? Cheers, Anjo Am 03.12.2009 um 16:26 schrieb Miguel Arroz: I still believe snapshots should be linked to an EC and not an OSC to avoid this problem, although that would require some heavy changing to EOF. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
1) Yes, there is a ERXJDBCConnectionBroker that does what you say. I have not used it though. 2) Creating another OSC is not much overhead (IMHO) itself .. it is all the EO's and snapshots that are the overhead. I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. 3) If you use OSC synchronization (ERXOSCSynchronizer and ERJGroupsSync) you will still haev the problem of snapshots changing underneath you if you don't lock the OSC. So IMHO, the OptimisticLockAction approach works well . and if the approach ain't broke, why fix it :-) On Dec 3, 2009, at 3:44 PM, Miguel Arroz wrote: Hi! I don't know EOF at that level well enough, although that might work. However, it's a little dirty... :) I would prefer something a little more integrated in the EOF architecture (that might have to evolve a little). Maybe separating the OSC from the DB connections, so that several OSCs could share the same connection. One would create an OSC for the critical part, without having the extra load of creating the connection itself. The OSC would be short lived, and as it would be used only by the critical section, the snapshots wouldn't be changed by anyone else, and it had the advantage of not locking up the app to everyone else. Now is the time you say ERsomething does that! Yours Miguel Arroz On 2009/12/03, at 16:33, Anjo Krank wrote: So your actual problem is that the EO doesn't save the old value in an extra dict? Well, do so: create a (known key, optimization) dict with the locking attributes and the values from __dictionary (after an actual change, optimization). Then use DBC delegate databaseContextWillOrderAdaptorOperations to munge the values. Mind you, this is from a 5 min glance. But I think it will work. Patches welcome... Cheers, Anjo Am 03.12.2009 um 16:45 schrieb Miguel Arroz: Hi! I still didn't have time to test that, sorry. :( Anyway, I believe that won't solve the problem, because the issue is not at the EC level, but below. Having the EC refusing merges is good (I wrote a delegate for that), so I believe that should stay in ERXEC, but it's only part of the problem. The biggest issue is the snapshot handling in the OSC. The fact that there's only one snapshot per object for all the ECs means that, when you save, the OL check is being done against the status of the object left by the last EC that saved it, and not the status that was the current one when you read the object into the EC you are trying to save changes. Sorry if this sounds a bit confusing, the post explains it better. :) The thing is, OL is OK to avoid concurrent updates of the same data by different instances. But there's really no good way to avoid concurrent data updates in the same instance. You have no way to be notified that you discarded the changes made by another thread in the same instance. You could check, when saving, if there is any merging notification waiting to be applied to the EC, but besides being tricky, I'm not sure if you could do that 100% reliably in all situations. That's why I would like to have a snapshot per EC, so that I could generate an SQL query that does OL checking against what I had when I created that EC, and not against what was the last thing my instance saved. It would take more memory, yes, but it would avoid locking the OSC while applying changes to EOs. Yours Miguel Arroz On 2009/12/03, at 15:29, Anjo Krank wrote: I think this would be a terrible waste of mem? Also: didn't I add a fix a week or so ago for you to look over? Wouldn't that help with your problem? Cheers, Anjo Am 03.12.2009 um 16:26 schrieb Miguel Arroz: I still believe snapshots should be linked to an EC and not an OSC to avoid this problem, although that would require some heavy changing to EOF. ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored.
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! On 2009/12/03, at 20:53, Kieran Kelleher wrote: 1) Yes, there is a ERXJDBCConnectionBroker that does what you say. I have not used it though. I must check that. 2) Creating another OSC is not much overhead (IMHO) itself .. it is all the EO's and snapshots that are the overhead. I know, but creating a DB connection is, specially under heavy load (I don't want to create and destroy dozens of connections per second!). The snapshots would not worry me too much, in a critical section, you would have only the snapshots you really needed, and you would dispose the OSC after doing your stuff. I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) 3) If you use OSC synchronization (ERXOSCSynchronizer and ERJGroupsSync) you will still haev the problem of snapshots changing underneath you if you don't lock the OSC. So IMHO, the OptimisticLockAction approach works well . and if the approach ain't broke, why fix it :-) I don't use the synchronizer... I think it increases the concurrency chaos by several orders of magnitude. :) Anyway, those critical OSCs would not synchronize, as that would defeat their purpose. Yours Miguel Arroz smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 3, 2009, at 4:06 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 20:53, Kieran Kelleher wrote: 1) Yes, there is a ERXJDBCConnectionBroker that does what you say. I have not used it though. I must check that. 2) Creating another OSC is not much overhead (IMHO) itself .. it is all the EO's and snapshots that are the overhead. I know, but creating a DB connection is, specially under heavy load (I don't want to create and destroy dozens of connections per second!). The snapshots would not worry me too much, in a critical section, you would have only the snapshots you really needed, and you would dispose the OSC after doing your stuff. I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) 3) If you use OSC synchronization (ERXOSCSynchronizer and ERJGroupsSync) you will still haev the problem of snapshots changing underneath you if you don't lock the OSC. So IMHO, the OptimisticLockAction approach works well . and if the approach ain't broke, why fix it :-) I don't use the synchronizer... I think it increases the concurrency chaos by several orders of magnitude. :) Anyway, those critical OSCs would not synchronize, as that would defeat their purpose. I think the change notifications synchronize after you unlock the osc, but I might be mistaken. Perhaps Mike S might shed light on whether a locked OSC ignores changes or just gets those notifications when it gets unlocked. Looking at ERXObjectStoreCoordinatorSynchronizer src does not enlighten me quickly I'm afraid. Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 3, 2009, at 2:41 PM, Miguel Arroz wrote: On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) Christmas is coming. Maybe Santa will bring him a real database this year! :-P The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yeah, that JDBC2INFO bug is unfortunate. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
3) If you use OSC synchronization (ERXOSCSynchronizer and ERJGroupsSync) you will still haev the problem of snapshots changing underneath you if you don't lock the OSC. So IMHO, the OptimisticLockAction approach works well . and if the approach ain't broke, why fix it :-) I don't use the synchronizer... I think it increases the concurrency chaos by several orders of magnitude. :) Anyway, those critical OSCs would not synchronize, as that would defeat their purpose. I think the change notifications synchronize after you unlock the osc, but I might be mistaken. Perhaps Mike S might shed light on whether a locked OSC ignores changes or just gets those notifications when it gets unlocked. Looking at ERXObjectStoreCoordinatorSynchronizer src does not enlighten me quickly I'm afraid. a lock is a lock ... if you lock the osc, it's not getting updates. internally ERXOSCS acquires an EODBC lock before processing changes, so if you are locking, it's blocking (as expected) the change queue in ERXOSCS. as far as your app is concerned, remote synchronization should look almost exactly like an EC in your app performing those same changes. we actually post ObjectsChangedInStoreNotification ourselves after the changes, in fact. ms ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
with MySQL 5, I don't think there's any reason to believe it's less of a database ... in particular, mysql's has an actual clustering implementation whereas pg has a failure pile in a sadness bowl. http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL this seems to be a reasonably up-to-date comparison ms On Dec 3, 2009, at 5:58 PM, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com)
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! http://archives.postgresql.org/pgsql-hackers/2008-05/msg00913.php I don't know if it made into 8.4 or not, but they eventually understood they needed a better solution. Yours Miguel Arroz On 2009/12/03, at 23:20, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! Q: Does PostgreSQL have replication? A: Yes, currently we have a half-dozen different replication tools, depending on the user's purpose and platform. This is limited to master-slave replication in mature open source projects, including built-in PITR and Slony-I. Multi-master replication is available in the new project Bucardo as well as in various clustering tools. Built-in simple replication is planned for version 8.5, due in 2010. It didn't. Let's wait for 8.5! :) Yours Miguel Arroz On 2009/12/03, at 23:26, Miguel Arroz wrote: Hi! http://archives.postgresql.org/pgsql-hackers/2008-05/msg00913.php I don't know if it made into 8.4 or not, but they eventually understood they needed a better solution. Yours Miguel Arroz On 2009/12/03, at 23:20, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored.
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
That is awesome. If MySQL is in your future, the Wonder support will only get better ;-) Hey Miguel, FUD, FUD, FUD! ;-) On Dec 3, 2009, at 6:20 PM, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
They're adding REPLICATION in 2010, not clustering ... Most replication systems are asynchronous and, as a result, don't guarantee transaction commitment to the replicants in the event of a failure, which means it's not really a suitable option for fail-over/ha, only for backups. Bucardo is new, though. I'll have to try that one out. Incidentally, the page on the pg site that lists the options for replication/clustering should have an extra column labeled Piece of Shit and they should all be YES's. I managed to corrupt the cluster under pgpool and pgcluster in like 10 seconds. Not to mention they're almost all implemented as hacky triggers. ms On Dec 3, 2009, at 6:29 PM, Miguel Arroz wrote: Hi! Q: Does PostgreSQL have replication? A: Yes, currently we have a half-dozen different replication tools, depending on the user's purpose and platform. This is limited to master-slave replication in mature open source projects, including built-in PITR and Slony-I. Multi-master replication is available in the new project Bucardo as well as in various clustering tools. Built-in simple replication is planned for version 8.5, due in 2010. It didn't. Let's wait for 8.5! :) Yours Miguel Arroz On 2009/12/03, at 23:26, Miguel Arroz wrote: Hi! http://archives.postgresql.org/pgsql-hackers/2008-05/msg00913.php I don't know if it made into 8.4 or not, but they eventually understood they needed a better solution. Yours Miguel Arroz On 2009/12/03, at 23:20, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I'm also staring down a future with MySQL - for a much different reason. Our school has a lot of institutional knowledge of FileMaker Pro. I'm moving towards WO as the editing mechanism and leveraging that institutional knowledge for users' report writing needs. FMP only supports 3 databases for transparently including external ODBC data sources - and MySQL is the only option for us. Up to now I've been using OpenBase and been extremely pleased with it but FileMaker's got me by the short and curlies. I have been following Kieran's support of MySQL and I'm glad to see others see similar benefits. Tim Worman UCLA GSEIS On Dec 3, 2009, at 3:20 PM, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Le 09-12-03 à 18:29, Miguel Arroz a écrit : Hi! Q: Does PostgreSQL have replication? A: Yes, currently we have a half-dozen different replication tools, depending on the user's purpose and platform. This is limited to master-slave replication in mature open source projects, including built-in PITR and Slony-I. Multi-master replication is available in the new project Bucardo as well as in various clustering tools. Built-in simple replication is planned for version 8.5, due in 2010. It didn't. Let's wait for 8.5! :) Ick, Slony-I listed as mature... I used it and don't want to see that thing for the rest of my life. wocommunity.org runs on pgsql, but that's because Chunk forced me to :-) Yours Miguel Arroz On 2009/12/03, at 23:26, Miguel Arroz wrote: Hi! http://archives.postgresql.org/pgsql-hackers/2008-05/msg00913.php I don't know if it made into 8.4 or not, but they eventually understood they needed a better solution. Yours Miguel Arroz On 2009/12/03, at 23:20, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I saw some serious issues with MySQL and migrations lately, but haven't checked where the actual reason might be. It looked like you can't create table, then call existingTableNamed as this will return null. Also it actually created tables and didn't roll back when the migration failed. I don't know whether something was set up incorrectly, as I'm personally not using MySQL for reasons that might not be valid anymore. I also found it way more natural to use and it is better supported by the combination WebObjects / Wonder (wonder why ... :-) ). One more reason which always kept me away from MySquirrel: It let me down a couple times with screwed up data in the 3.x and 4.x times. Don't know what happened back then (long ago), but the safety wasn't there ... might have also been my inability to use it correctly. Interesting enough I never had these issues with PG. Guido -- http://www.event-s.net On 3. Dec. 2009, at 15:09 , Mike Schrag wrote: with MySQL 5, I don't think there's any reason to believe it's less of a database ... in particular, mysql's has an actual clustering implementation whereas pg has a failure pile in a sadness bowl. http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL this seems to be a reasonably up-to-date comparison ms On Dec 3, 2009, at 5:58 PM, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/guido.neitzer%40gmail.com This email sent to guido.neit...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 3, 2009, at 4:07 PM, Pascal Robert wrote: Le 09-12-03 à 18:29, Miguel Arroz a écrit : Hi! Q: Does PostgreSQL have replication? A: Yes, currently we have a half-dozen different replication tools, depending on the user's purpose and platform. This is limited to master-slave replication in mature open source projects, including built-in PITR and Slony-I. Multi-master replication is available in the new project Bucardo as well as in various clustering tools. Built-in simple replication is planned for version 8.5, due in 2010. It didn't. Let's wait for 8.5! :) Ick, Slony-I listed as mature... I used it and don't want to see that thing for the rest of my life. wocommunity.org runs on pgsql, but that's because Chunk forced me to :-) You should have listened to Chuck, he said Use FrontBase. Yours Miguel Arroz On 2009/12/03, at 23:26, Miguel Arroz wrote: Hi! http://archives.postgresql.org/pgsql-hackers/2008-05/msg00913.php I don't know if it made into 8.4 or not, but they eventually understood they needed a better solution. Yours Miguel Arroz On 2009/12/03, at 23:20, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
So, why not use OpenBase? Or does it have to be free... On 2009-12-03, at 6:20 PM, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
It is probably better to look at the flip side: what are my reasons FOR using this database instead of any other database? On Dec 3, 2009, at 2:58 PM, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I have been extremely pleased with it. I have not had any strange problems with modeling, data type/WO compatibility. Were it not for the aforementioned pressure to include FileMaker Pro as a report writer, I'd probably not be looking away from it at all. Although, it does cost money and times are tight. With version 10 there was a free single-connection developer option but I don't think there is in version 11. Tim Worman UCLA GSEIS On Dec 3, 2009, at 4:14 PM, André Mitra wrote: So, why not use OpenBase? Or does it have to be free... On 2009-12-03, at 6:20 PM, Mike Schrag wrote: Also, full disclosure -- i DO use Postgresql and I think it's a great database, but I always feel a little queasy when I do a deployment with PG without clustering support. There's always the feeling of i sure hope this doesn't screw me. FrontBase has clustering, but has an obnoxious bug with clustered sequences which basically requires that you use guid pks, which none of our stuff does, so it's pretty likely MySQL is in my future. ms On Dec 3, 2009, at 6:18 PM, Mike Schrag wrote: Caveat here -- I don't use MySQL (yet) for anything real. InnoDB is acid, though. I agree that you should never run a myisam mysql for most normal systems and that it's strange that this is the default, but the fact is that you CAN set it to innodb, and it's a perfectly capable (if not VERY capable) database. Soo -- I'm calling this out as FUD. Search google for postgresql corruption and you'll get plenty of matches, too: Results 1 - 10 of about 164,000 for postgresql corruption. Results 1 - 10 of about 12,700 for mysql innodb corruption. There are quite a few huge systems that are running on MySQL. And the simple fact that you can cluster it actually makes it far more resilient than postgresql. Go try to setup a fault tolerant deployment of PG. Have fun and let me know when you're done. ms On Dec 3, 2009, at 6:10 PM, Miguel Arroz wrote: Hi! There is nothing specifically wrong about using MySQL as a database for WO. What's wrong is using MySQL at all! ;) Essentially, it sucks. The first concern of MySQL authors is speed, and only then correctioness. This may be seen my the existence of InnoDB itself. First, speed. A few years later, yeah, this actually might be usable in something else than a blog if we actually add ACID properties to it! In my Univ, the IT team who deals with the central systems moved everything they could from mysql to PostgreSQL. Among other reasons, once in a while a MySQL table corrupted itself. PostgreSQL is much more robust. As always in software engineering, everything is a compromise. There may be a few situations where MySQL is dramatically faster than PostgreSQL, and the inverse is also true, it depends on the usage and the DB architecture. This to say that you should use what better suits your needs. But what I would not expect is MySQL to... you know... work! ;) Yours Miguel Arroz On 2009/12/03, at 22:58, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/arroz%40guiamac.com This email sent to ar...@guiamac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I have seen screwed up data from people using default MyISAM tables. Not transactional tables. So basically if your EC saveChanges fails, there is no rollback, so now you have a half-committed save . yes, using the default MyISAM engine *will* screw up your data big time and that is a problem with the engineer who configured the thing ;-) On Dec 3, 2009, at 7:08 PM, Guido Neitzer wrote: I saw some serious issues with MySQL and migrations lately, but haven't checked where the actual reason might be. It looked like you can't create table, then call existingTableNamed as this will return null. Also it actually created tables and didn't roll back when the migration failed. I don't know whether something was set up incorrectly, as I'm personally not using MySQL for reasons that might not be valid anymore. I also found it way more natural to use and it is better supported by the combination WebObjects / Wonder (wonder why ... :-) ). One more reason which always kept me away from MySquirrel: It let me down a couple times with screwed up data in the 3.x and 4.x times. Don't know what happened back then (long ago), but the safety wasn't there ... might have also been my inability to use it correctly. Interesting enough I never had these issues with PG. Guido -- http://www.event-s.net On 3. Dec. 2009, at 15:09 , Mike Schrag wrote: with MySQL 5, I don't think there's any reason to believe it's less of a database ... in particular, mysql's has an actual clustering implementation whereas pg has a failure pile in a sadness bowl. http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL this seems to be a reasonably up-to-date comparison ms On Dec 3, 2009, at 5:58 PM, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/guido.neitzer%40gmail.com This email sent to guido.neit...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/kieran_lists%40mac.com This email sent to kieran_li...@mac.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. On Dec 3, 2009, at 7:17 PM, Chuck Hill wrote: It is probably better to look at the flip side: what are my reasons FOR using this database instead of any other database? On Dec 3, 2009, at 2:58 PM, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/chill%40global-village.net This email sent to ch...@global-village.net -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
Hi! On 2009/12/04, at 01:25, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Most probably... ;) For me, it's the same discussion between Linux and FreeBSD. Linux has more features, does this and that, has more users, etc. But it sucks. How much depends on the distribution, but all that I tried seem a mess, poorly organized, and lots of things don't work well (or at all) in a fresh installation. BSD has much higher quality standards, and that shows. Of course, PgSQL is not perfect, but I believe it's a much higher quality product than MySQL, due to the same development philosophy. The clustering and replication are a problem, true. But putting that aside, I really prefer PgSQL. Yours Miguel Arroz smime.p7s Description: S/MIME cryptographic signature ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! with regards, -- Lachlan Deck ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On 3. Dec. 2009, at 17:25 , Kieran Kelleher wrote: [...] What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. So that is probably what screwed my migration so badly and I was correct with my recollection that schema changes in MySQL are not transaction safe - which makes the standard generated migration files useless as soon as you do single table inheritance. I messed around long enough with it, to get it somewhat working (hand optimizing the migration to make it work with MySQL), but I prefer to use FrontBase or PostgreSQL where it just works out of the box. Thanks, I still stay away from MySQL. Guido ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
I don't think I ever used MyISAM tables with a WO app. I have seen corrupted data with InnoDB tables and WO usage though. For the rest, they might have been MyISAM used from some PHP web crap, but the thing is: the SQL stored the thing and some historic data gets corrupted. That was the issue we had. I can't recall exactly enough to blame it completely on MySQL, but I stopped using it and I had never ever again any issues with corrupt data (95% PostgreSQL, 5% FrontBase usage). FrontBase has the issue that you can easily kill the server with bad input. This can't happen with PostgreSQL as you get your own backend for each connection. Between the three databases MySQL, PostgreSQL, and FrontBase, I've used PostgreSQL the most and with the most success and least amount of trouble. I'd love to see a multi master clustering solution for it though that actually works and is not a piece of shit. Guido -- http://www.event-s.net On 3. Dec. 2009, at 17:04 , Kieran Kelleher wrote: I have seen screwed up data from people using default MyISAM tables. Not transactional tables. So basically if your EC saveChanges fails, there is no rollback, so now you have a half-committed save . yes, using the default MyISAM engine *will* screw up your data big time and that is a problem with the engineer who configured the thing ;-) On Dec 3, 2009, at 7:08 PM, Guido Neitzer wrote: I saw some serious issues with MySQL and migrations lately, but haven't checked where the actual reason might be. It looked like you can't create table, then call existingTableNamed as this will return null. Also it actually created tables and didn't roll back when the migration failed. I don't know whether something was set up incorrectly, as I'm personally not using MySQL for reasons that might not be valid anymore. I also found it way more natural to use and it is better supported by the combination WebObjects / Wonder (wonder why ... :-) ). One more reason which always kept me away from MySquirrel: It let me down a couple times with screwed up data in the 3.x and 4.x times. Don't know what happened back then (long ago), but the safety wasn't there ... might have also been my inability to use it correctly. Interesting enough I never had these issues with PG. Guido -- http://www.event-s.net On 3. Dec. 2009, at 15:09 , Mike Schrag wrote: with MySQL 5, I don't think there's any reason to believe it's less of a database ... in particular, mysql's has an actual clustering implementation whereas pg has a failure pile in a sadness bowl. http://www.wikivs.com/wiki/MySQL_vs_PostgreSQL this seems to be a reasonably up-to-date comparison ms On Dec 3, 2009, at 5:58 PM, Kieran Kelleher wrote: Miguel, anyone, please enlighten me as to what specifically is wrong with using MySQL InnoDB as a database for WO because I have not seen any problem, but then I have not used PostgreSQL or FrontBase either - so maybe I don't see a problem that I should be concerned about. -Kieran On Dec 3, 2009, at 5:41 PM, Miguel Arroz wrote: Hi! On 2009/12/03, at 22:32, Kieran Kelleher wrote: I create new OSCs for most background tasks. The one thing is that I dispose() on it at the end of the task and the dispose() is only useful if you use ERXJDBCAdaptor is used since the regular WO 5.3 jdbc adaptor opens two connections for every OSC and leaves the stupid things open forever. ERXJDBCAdaptor only opens one db connection and releases it when u call dispose() IIRC. Dude! http://terminalapp.net/webobjects-postgresql-and-db-growing-and-growing/ ;) Dude! www.mysql.com - innodb (or cluster NDB) doesn't grow and grow (and it is not a toy, no matter what Chuck says ;-) ) No, it's a disaster! ;) The growing is a side effect of leaving the transaction opening that happens on PostgreSQL due to its architecture, but the point is the same, do what I say there to avoid the dumb connection. :) Yours Miguel Arroz ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/mschrag%40mdimension.com This email sent to msch...@mdimension.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/guido.neitzer%40gmail.com This email sent to guido.neit...@gmail.com ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription:
Re: Dr. Miguel 'Optimistic Locking' Arroz [was Re: WebObjects stress Testing tool?]
On Dec 3, 2009, at 5:44 PM, Lachlan Deck wrote: On 04/12/2009, at 12:25 PM, Kieran Kelleher wrote: I was just wondering why people were saying disaster, toy, etc wondering if I am missing something and going to lose all my data next week! Like I said, I have not used FrontBase or PostgreSQL in production and have never touched PostgreSQL, so if it is comparison you are after, I don't have one. However I will say that I started using MySQL at 4.0, then 4.1 and now 5.0. Being the stickler for learning as much as I think I need to do something right, I bought the original Jeremy Zawodny book Advanced MySQL and that gave me a clear understanding and confidence of how to set the thing up. I have never used the cluster engine (NDB) yet. I have always used InnoDB. I used MyISAM once for a readonly database (about 5 tables only) that has geocode lookups on tables of about 100 million rows because at the time it appeared faster (with mysql 4.0 at the time) to do points in radius operations which sometimes selected up to 500,000 rows in a select. My main ongoing project is InnoDB and every user is a user that does edits, with a small percentage of users absolutely hammering the database with production processing during business hours each day. I replicate to 3 slaves on that project purely for backup. It runs 24/7 and almost never have any Scheduled Maintenance downtime garbage because of the fact that the replication slaves are where the backups happen. One slave is remote and 2 onsite with the master. The binary logs on the master are written to a separate phyaical drive Why do I like it? - It is free - It has never left me down - no data/table corruption - It is simple to set up and configure - replication is a breeze to set up - It has multiple engine types for different scenarios - and finally the reason that most people like what they use: I am comfortable with it ;-) What would I like that I think I might be missing? - transactional structure changes (ie., create table and roll back.) transactions in InnoDB only apply to table/record edits themselves. + Deferred constraints! That is a pretty big strike against MySQL in my books. Chuck -- Chuck Hill Senior Consultant / VP Development Practical WebObjects - for developers who want to increase their overall knowledge of WebObjects or who are trying to solve specific problems. http://www.global-village.net/products/practical_webobjects ___ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (Webobjects-dev@lists.apple.com) Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com