I think that this topic worths some more details about sqlite and the REALSQLDatabase (they are the same).

Since version sqlite 3.3.7 when you try to open an sqlite database in a shared volume on OSX (not on Windows) you'll receive a DB IS LOCKED error. Starting from version 3.3.8 there is a new experimental code in sqlite that enables you to use a db in a shared volume also in OSX. Current version is 3.3.9 with 3.3.10 coming in the next days... I am expecting that this "experimental" code should be marked as "regular code" very soon.

So, with this new code you have solved only half of the problem because now you can safely open a shared db on OSX but you have no control over the locking mechanisms. REALSQLDatabase adopts a simple algorithm to try to solve BUSY errors (you'll receive a BUSY error when two or more clients try to write to the same table/record at the same time) ... REALSQLDatabase just try 10 times (sleeping one second every time a BUSY error is received) and after 10 times the BUSY error is returned. You have NO CONTROL over this algorithm, when you receive a BUSY error you know that the underline plugin has already tried to solve the dispute 10 times. What you can do is simply to try to perform again your SQL query or reports an error to the user. Does this simple algorithm works well? Well, I am sure that 99% of the times you'll find it perfect for you problems.
If you need more concurrency then you need to buy a dedicated server.

As you know I wrote the SQLite3ProfessionalPlugin that instead of adopt this algorithm, it gives you a way to be notified each time a BUSY error is detected, so you can implement your own algorithm. Please note that I am not trying to publicize my product I just want to clarify this topic because I have received some personal requests.

So, what is the conclusion?
The conclusion is that in future release (of both REALSQLDatabase and SQLite3ProfessionalPlugin) there will be the right code to enable you to work on shared databases and for low concurrency needs both the REALSQLDatabase algorithm or the SQLite3ProfessionalPlugin approach work very well.

SQLite is an incredible product but a lot of people that doesn't know it very well find easier to just blame it to be too simpler or not enough powerful.
This is simply not true.

---
Marco Bambini
http://www.sqlabs.net
http://www.sqlabs.net/blog/
http://www.sqlabs.net/realsqlserver/



On Jan 7, 2007, at 12:14 PM, Thorsten Hohage wrote:


On Sat, 6 Jan 2007 22:17:45 -0800, Giovanni <[EMAIL PROTECTED]> wrote:I get the point.=20

Does anyone have a solution that does not require an app running as server?

Of course, you can do your own thing - no question.

But first it depends on the many parameters, e.g. about what amount of data your talking? 30 articles, or 30.000 articles in a complex structure?

What does your application? E.g. displaying information, or a dialog system where a user can configure (e.g.) his car and get his price, or it's a CRM with 100 new entries per hour?

If all this prerequisites fits together, then go with your file- based solution, e.g. with xlm files. Every application for every user reads the whole file in his cache at startup, so a file access is not necessary.

But what's with the other CRUD-Operations? "Simple", design a notification-/messaging system. For each change send a message to all other running instances and then change the file. Or the first instance manage the files and all other instances request the necessary data from this application.

I bet the next requests from your customer is speed optimization, or perhaps NOW the 10.000 articles, ... and for everything you're able to find a solution, A developer was able to deliver all these requests 20, 30 years ago without a "real database", so you're now able too.

BUT if you do everything in the right way and you'll look back in 1 or 2 years, THEN you'll notice you've built your own database. I prefer not to reinvent the wheel every two years ;-)

ciao

Thorsten Hohage
--
that-Office.de Softwaredesign - Hamburg,Germany


_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>

Reply via email to