NetTalk Central

Author Topic: Nettalk and SQlite  (Read 4809 times)

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Nettalk and SQlite
« on: November 08, 2014, 04:03:56 AM »
Looking at the Sqlite database I thought it would be a good substiture for tps files in Nettalk, especially if I was able to create the databse as local to a mobile device. I like the idea of a platform independent database
However from the Clarion documentation

You can access the same SQLite file from multiple processes.  However, only one process can write to the file at the same time.  Once a process has written to any table in the SQLite database file that process is the only process that can write to any table in that database.
 
SQLite and Multithreading

SQLite is designed to be used on a single thread but he Clarion file driver overcomes this limitation as much as possible.  To make this work the driver has one limitation on usage.  Only one thread can be accessing the SQLite database while a transaction is active.  If another thread attempts to access an SQLite database and another thread is in the middle of a transaction, the non-transacting thread will wait until the transaction is completed..

As I understand it this would disqualify Sqlite from use with Nettalk unless the data was WORM. Is this correct?
I converted a small app of mine to sqlite and found in single user operation only one problem with case sensitivity of keys.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11300
    • View Profile
Re: Nettalk and SQlite
« Reply #1 on: November 10, 2014, 12:22:21 AM »
Hi Terry,

>> As I understand it this would disqualify Sqlite from use with Nettalk unless the data was WORM. Is this correct?

No, that's not correct - at least not as I read it.

Basically I read it as saying that file access will be "serialized" - especially in the case of writes - so that only one write is happening at once.

Write-locks are of a pretty short duration though, so as long as the system is not over-write-heavy I would expect it to be a reasonable replacement for TPS.

The biggest problem I have with using SQLite myself right now is that FM3 does not support it yet.

cheers
Bruce

terryd

  • Hero Member
  • *****
  • Posts: 759
    • View Profile
    • Davcomm
    • Email
Re: Nettalk and SQlite
« Reply #2 on: November 10, 2014, 01:53:54 AM »
Thanks Bruce
Yes the fm3 limitation is a problem.
Terry Davidson
Windows 10 64 bit/Windows7 64bit
Clarion 9.1.11529/Clarion10 12567
Nettalk 913
Nettalk 1015
StringTheory267/Winevent515/XFiles298/MessageBox239/Cryptonite186