The right database for client-server web applications? (OT)

Discussion of chess software programming and technical issues.

Moderators: hgm, Dann Corbit, Harvey Williamson

User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: The right database for client-server web applications? (

Post by stegemma »

Rémi Coulom wrote:Yes, I already have the consolidation operation. It is really very slow. But for my applications, it is not necessary, so I don't worry to much about this.

Transactions are not so difficult with a journal. I don't wish to implement transactions that can be rolled back. I don't think they are necessary, and they are too complicated to implement, whatever the data structure. I will only implement simple transactions that can only be commited. In the multi-user case, they will be like a mutex. So they will have to be short in time. This simplified form of transactions is very easy to implement, and should cover all practical needs. I only have to implement a "start transaction" and "end transaction" operation in the journal.

This kind of transaction is really required, for crash safety and multi-user access. Transactions that can be rolled back may be convenient, but I never used them, and their implementation is complex. I could do it by storing undo data in the journal, but it is too costly for my taste, and not useful in my practice.
If you implement transactions with a mutex, you don't need roll-back, in normal use. A roll-back can occurs if multiple transactions run at the same time and one of them changes the input data of another one. I don't know other situations where a roll-back is necessary (despite for a "cancel" button that a user can press while transaction is still running). My server "Dedalo" fro the "Minosse" DB uses a simpler schema, with a Windows Critical Section for any command. That's works only for the nature of the application connected to Dedalo but can't be used for implementing transactions.

I think to be a good-programmer but not a god-programmer... so I don't trust my DB enough for business application where hundreds thousands of euros has been involved, as condominium administration is. I use it with success in technical applications, somehow similar to spreadsheets, in fact.
Author of Drago, Raffaela, Freccia, Satana, Sabrina.
http://www.linformatica.com
User avatar
stegemma
Posts: 859
Joined: Mon Aug 10, 2009 10:05 pm
Location: Italy
Full name: Stefano Gemma

Re: The right database for client-server web applications? (

Post by stegemma »

Now my application works with SQLite (embedded) SQL-Server (ODBC) and PostgreSQL. The TCP/IP protocol of PostgreSQL is very simple to implement, adapting my old sockets C++ classes and seems to works very well.

The HTML interface of the web-application-server uses web-sockets, that I've seen working on Android (Chrome), Windows and Mac OS X (Safari and Chrome). I've abandoned AJAX, because WS looks more asynchronous and can give an ambient more similar to a desktop application (I'm more experienced with this kind of programming).

Now I'm working on user authentication...

Many thanks to all have wrote in this thread.
Author of Drago, Raffaela, Freccia, Satana, Sabrina.
http://www.linformatica.com