I have no idea what the library does, but I shamelessly assume that by saying “using MySQL” you’re referring to creating some table holding the lock data, in a similar way to Gigaspaces.
FYI, MySQL has support for application locks in the form of RELEASE_LOCK() and GET_LOCK(). Those are just named mutexes you can create, without meddling with tables. More info here: http://dev.mysql.com/doc/refman/5.1/en/miscellaneous-functions.html. Those functions are pretty neat and sometimes very convenient, but I don’t know if they are any good for you.
Shlomo – yes, something like that. I do need auto-release semantics – after X time the lock should be released automatically.
I don’t think I’ll write an SQL implementation, the implementation in GigaSpaces was rather easy and good enough for us – most of the time was spent on writing the tests anyway.
Avish:
Nice to see
4/7/09, 23:34usyou contributing to the community. Way to go! Also, good choice of name.ripper234:
Thanks, I pondered the name for some time.
5/7/09, 9:08Shlomo:
I have no idea what the library does, but I shamelessly assume that by saying “using MySQL” you’re referring to creating some table holding the lock data, in a similar way to Gigaspaces.
5/7/09, 10:39FYI, MySQL has support for application locks in the form of RELEASE_LOCK() and GET_LOCK(). Those are just named mutexes you can create, without meddling with tables. More info here: http://dev.mysql.com/doc/refman/5.1/en/miscellaneous-functions.html. Those functions are pretty neat and sometimes very convenient, but I don’t know if they are any good for you.
ripper234:
Shlomo – yes, something like that. I do need auto-release semantics – after X time the lock should be released automatically.
I don’t think I’ll write an SQL implementation, the implementation in GigaSpaces was rather easy and good enough for us – most of the time was spent on writing the tests anyway.
5/7/09, 10:45