#1 2020-06-02 21:25:44

Bsaidus
Member
From: Algeria
Registered: 2018-12-16
Posts: 50

What to choose for best results.

Hello.
I want to know your opinion on what to choose to get best or very optimized results.
( or What you advise me basing on your experiences )

   1 )  for Database engines: 
           *  MariaDB or Firebird.
   2 )  for Object pascal dialect 
          * Delphi XE2, Delphi 2007 ( I have licenses ).
          * Lazarus/FPC
   3 ) Components for DB connection.
          * Zeos   ( I usually use ZEOS and I'm satisfied )

  Technical infos about the software.
    The soft I want to begin work is for Doctors, it will work with REST ( only REST no ORM ), and I want to use mORMot technologie for that.
    Certainnely the REST server and DB Server will be in some UNIX environnement.
    the communication will use VPN.

So What you advise me to choose ( mainelly DB engine that scall good.).

Thank you.

Offline

#2 2020-06-02 21:39:33

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: What to choose for best results.

I would use SQlite3 as database engine, possibly with several databases, e.g. one per Doctor.
Or at least use SQLite3 with a Micro-Service orientation, i.e. not a single REST server, but several, each one with its context and purpose... and its own database.
This would give the best performance and scaling.

Zeos is very good and well supported. But I would use the SynDB layer in front of it, to have direct JSON support, and the ability to switch to the ORM if needed.
And use MariaDB in preference to Firebird. Or even better, if a enterprise-grade DB is needed, consider PostgreSQL, which has SynDBZeos or direct SynDBPostgresql support.

Of course, for a new project I would switch to Lazarus/FPC, since it is more stable (FPC 3.2 fixes + Lazarus 2.6), and has perfect Linux support, whereas we don't support Delphi for Linux.
Instead of a VPN, I may also try our Relay feature, much easier to configure.

And I would use the ORM, to use objects, not SQL.

Offline

#3 2020-06-02 22:11:20

Bsaidus
Member
From: Algeria
Registered: 2018-12-16
Posts: 50

Re: What to choose for best results.

Thank you Arnaud for a quick reply.

ab wrote:

I would use SQlite3 as database engine, possibly with several databases, e.g. one per Doctor.
Or at least use SQLite3 with a Micro-Service orientation, i.e. not a single REST server, but several, each one with its context and purpose... and its own database.
This would give the best performance and scaling.

The database will be centralised ( the doctors can see Patients files simultaniousely ( not diagnostics ) ).
Do not you think that spread a SQLite3 db's and doing synchronization between them for each modification will engender much network trafic & much work in programmig.?


ab wrote:

Zeos is very good and well supported. But I would use the SynDB layer in front of it, to have direct JSON support, and the ability to switch to the ORM if needed.
And use MariaDB in preference to Firebird. Or even better, if a enterprise-grade DB is needed, consider PostgreSQL, which has SynDBZeos or direct SynDBPostgresql support.

Of course I'll use the mormot interface to ZEOS, and thank you for advising MariaDB.

ab wrote:

Of course, for a new project I would switch to Lazarus/FPC, since it is more stable (FPC 3.2 fixes + Lazarus 2.6), and has perfect Linux support, whereas we don't support Delphi for Linux.

Can I use the lazarus/fpc (3.2rc1) even in the RC state ??

ab wrote:

Instead of a VPN, I may also try our Relay feature, much easier to configure.

First time I listen that 'RELAY FEATURE', could you point me to the DOC or even to the exemple that treating this feature.?

ab wrote:

And I would use the ORM, to use objects, not SQL.

I have a poor experience with ORM's & I'm habituated to work with SQL, so It is not so easy to swich.


Thanks you ARNAUD.

Offline

#4 2020-06-03 06:42:26

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 14,240
Website

Re: What to choose for best results.

Bsaidus wrote:

Do not you think that spread a SQLite3 db's and doing synchronization between them for each modification will engender much network trafic & much work in programmig.?

You don't need to have several DBs. The client/server stuff is REST. The fact that the DB is client/server or local to the service is a technical detail. And since SQLite3 is in-process, it will be faster than any remote DB (even on the loopback).
If you can, don't have synchronize DB, with manual SQL to synchronize it. Proper synchronization is a real PITA. So use a single DB within the service, and let several clients connect to them.
If you want synchronization, try e.g. our master/slace replication - but you will need the ORM.

Bsaidus wrote:

Can I use the lazarus/fpc (3.2rc1) even in the RC state ?

Yes, RC is very stable - we use it on production.

Bsaidus wrote:

First time I listen that 'RELAY FEATURE', could you point me to the DOC or even to the exemple that treating this feature.?

It is not fully documented yet.
But you will find enough information in the main comment of https://github.com/synopse/mORMot/blob/ … oRelay.pas

Offline

Board footer

Powered by FluxBB