#1 2016-08-29 12:19:39

edwinsn
Member
Registered: 2010-07-02
Posts: 1,217

Delphi for Linux preview - what do you think?

Hello ab,

Marco the Delphi PM has a new blog post which I guess you must have already noticed:
http://blog.marcocantu.com/blog/2016-au … oming.html

So we can expect that the next release of Delphi will support compiling binaries for Linux 64bit.

I think Delphi still has productivity advantages over Lazarus as an IDE.

Do you think of mORMot will follow? Maybe it's too early to talk about any decisions at the moment, but this news is still worth discussing smile

Last edited by edwinsn (2016-08-29 13:58:28)


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#2 2016-08-29 12:25:58

hnb
Member
Registered: 2015-06-15
Posts: 291

Re: Delphi for Linux preview - what do you think?

edwinsn wrote:

Do you think of mORMot will follow? Maybe it's too earlier to talk about any decisions this at the moment, but this news is still worth discussing smile

Waste of time. Delphi has "mORMot incompatible" EULA which makes mORMot usage (development?) illegal in Delphi. Delphi Linux compiler will be ARC only which is big problem.


best regards,
Maciej Izak

Offline

#3 2016-08-29 21:52:51

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

Re: Delphi for Linux preview - what do you think?

If it is arc only, this will be a no-go.

For server stuff, FPC is great, and Lazarus allows native debugging under Linux.
No need of the paserver remote debugging...

Offline

#4 2016-08-30 05:21:26

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 330

Re: Delphi for Linux preview - what do you think?

I like Linux for virtualization of Windows and freebsd over kvm very much and use it in production since years.
But I can't see the advantage of mORMot under Linux. There is no database available. Oracle is most to much and all others are too bad.

Offline

#5 2016-08-30 06:55:01

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

Re: Delphi for Linux preview - what do you think?

? no database available under Linux ?
There are other databases than MSSQL, Daniel. wink
Just try PostgreSQL! It is an amazing business database.

And with mORMot ORM/ODM, we use here mainly SQLite3 as local working DB, and MongoDB as shared centralized storage.
Performance is awesome, maintenance is low, cost is null, and very well integrated under Linux.
I see plenty of advantages of mORMot servers under Linux.

For servers, Windows is a just too huge, and expensive.
The update policy, disk size, mandatory GUI, and need of an antivirus, are difficult under Windows - perhaps https://technet.microsoft.com/en-us/win … ano-server may ease live servers maintainability.
The monthly Windows license does cost more than the hardware it runs on!

Offline

#6 2016-08-30 07:59:08

mpv
Member
From: Ukraine
Registered: 2012-03-24
Posts: 1,564
Website

Re: Delphi for Linux preview - what do you think?

While nano-server is a Windows 2016 we also have a Server Core - https://msdn.microsoft.com/en-us/librar … s.85).aspx - the Windows server without GUI. From my POV Win server monthly license cost is eliminated by the cost of system administrator (everybody can set up the Windows, for linux is not the same)

Offline

#7 2016-08-30 08:08:29

edwinsn
Member
Registered: 2010-07-02
Posts: 1,217

Re: Delphi for Linux preview - what do you think?

@ab,
I understand you, breaking changes are evil...

@mpv,
I"m not ssure, but with Windows Server Core, you'll have to learn PowerShell? I'd rather use linux commands now wink


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#8 2016-08-30 08:37:00

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

Re: Delphi for Linux preview - what do you think?

From my own experiment, setting up a Linux server is easier than a Windows server.
Installing Windows is simple.
But installing a safe Windows server, to run 24/7 on the Internet, demands some skills.

For instance, firewall setup is much easier with Linux than with Windows.
Once you have made your reference Linux server, it is very easy to setup new similar instances of the physical server.
Of course, with virtual machines it is even easier - and you do not have license issues as with Windows.

Offline

#9 2016-08-30 08:57:22

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 330

Re: Delphi for Linux preview - what do you think?

@AB
I've excepted an reaction like this. And of course I accept pov of other people.
The only thing I wanted, was to give you my opinion, based of my experiences with mORMot in my project (still not in production) over the last 2 years.

Now to your arguments:
There are surely other databases than MSSQL. But at business level the only alternative I can see is Oracle. Postgres should be an alternative, but for me, it's only a theory. I use postgres for some small things like CalDAV and so on. But to design of new db under/for postgres, backup, restore, maintain over years, is more complex. 

And what's the market share of postgres in business? In the ERP-environment I know SAP (Oracle), MS Dynamics (MSSQL) and some others.

For a bigger project you need much more, than a good database-core. Above all you need a very good Client-GUI, like MS SQL Studio. We have to import legacy databases to our new one "hundred thousand of times". You get problems like no more space available on disk and memory, to much CRUD's in one transaction and therefore server-crashs etc.

Sure, mORMot and SQLite are a awesome combination. But how much time I've to spent to work with a huge database? How can I work with it in team with several developers?

At the moment the combination of windows-server + http.sys + MSSQL + delphi (without its good GUI, developing were impossible) + mORMot and Zeos is for me unbeatable in bigger projects.

@MPV
Thank's for your statement. You have absolutely right. The cost of licenses are one thing. But the costs of maintainability are so much higher. I've used FreeBSD since 2001 as server-system for apache,exim,ldap,ssh etc. I'm sure with linux, this wouldn't have been possible. And I'm an absolutely exot with my solution. All others use windows, and nothing else.

Offline

#10 2016-08-30 09:26:05

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

Re: Delphi for Linux preview - what do you think?

Daniel: MSSQL is about to be available on Linux
https://blogs.microsoft.com/blog/2016/0 … r-on-linux

What do you define as "huge database"?
We have working Sqlite3 databases created and accessed with the mORMot ORM of more than 100GB, with insertion below 50 microseconds (not milliseconds), a lot of concurrent clients, and instant queries (with proper indexes defined at ORM level).
For comparison, the same DB with MSSQL will take more than 100GB on disk, for sure: AFAIR Sqlite3 file format is more efficient than MSSQL's, especially for TEXT columns.

Of course, I miss something like http.sys under Linux with mORMot.
In practice, a nginx front-end works very well, and is easier to setup for https publishing.
From my tests, mORMot's sockets on my PC gives 90MB/sec bandwidth under Linux, whereas it is only 24MB/sec under Windows...

Offline

#11 2016-08-30 10:33:46

edwinsn
Member
Registered: 2010-07-02
Posts: 1,217

Re: Delphi for Linux preview - what do you think?

@ab,

I agree with you. It's more of an application design issue for handling large-scale data, rather than just about the capability of the backend DB system. But I believe that MS SQL server is easier to use than Postress, especially the administration tool part.

PS, since you mentioned use Nginx as the front-end for a mORMot application under Linux, do you have any instruction about setting up that? Thanks.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#12 2016-08-30 11:24:44

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 330

Re: Delphi for Linux preview - what do you think?

I also use apache as the first server-part for ssl and only http between apache and mORMot. This is not a point against using windows.

With a big database a mean not a huge db with a big size, rather than an complex db with a higher grade of normalization, many tables, many relations, many indices.
Perhaps it is possible, to handle such a db also with SQLite. But I don't get the time, to try it. Therefor I use tools (db), wich save developing time.
We have used firebird as an alternative. This db seems to be good enough. But under Linux firebird isn't available (it was in past, but it was a pain do compile and install it under freebsd in contrast to windows, were the installation could be performed by the secretary).

If mssql will be available under Linux, I'll would give it a try. But atm I've to complete my project and no time to test.

Offline

#13 2016-08-30 13:25:50

edwinsn
Member
Registered: 2010-07-02
Posts: 1,217

Re: Delphi for Linux preview - what do you think?

@danielkuettner,

Just FYI, Though I've not used it, but PostgreSQL has been enhanced a lot in recent years, and is getting a lot of traction.


Delphi XE4 Pro on Windows 7 64bit.
Lazarus trunk built with fpcupdelux on Windows with cross-compile for Linux 64bit.

Offline

#14 2016-08-30 13:45:56

marcinb
Member
Registered: 2014-04-08
Posts: 11

Re: Delphi for Linux preview - what do you think?

@danielkuettner

I would separate DB server from mORMot server, like I have today with Tomcat and DB server. Then you can still have mORMot on Linux  and DB of your choice.

Offline

#15 2016-08-30 14:06:52

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 330

Re: Delphi for Linux preview - what do you think?

@marcinb
I don't understand your information. How do you want to split mORMot from db with Tomcat?

Offline

#16 2016-08-30 16:19:54

marcinb
Member
Registered: 2014-04-08
Posts: 11

Re: Delphi for Linux preview - what do you think?

@danielkuettner
I have separate machines for application server and database server. In my environment today it is Tomcat and Firebird SQL server, in near future another machine will be set up explicitly for mORMot server for use with mobile application.
Sorry for misleading post.

Offline

#17 2016-08-30 18:37:11

emk
Member
Registered: 2013-10-24
Posts: 96

Re: Delphi for Linux preview - what do you think?

ab wrote:

From my tests, mORMot's sockets on my PC gives 90MB/sec bandwidth under Linux, whereas it is only 24MB/sec under Windows...

And how much bandwidth produces http.sys?

Offline

#18 2016-08-31 08:53:51

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

Re: Delphi for Linux preview - what do you think?

24MB/sec locally.

Offline

#19 2016-09-01 04:35:19

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 330

Re: Delphi for Linux preview - what do you think?

@ab
Wouldn't it be possible to set Compiler Flags to "-fno-objc-arc" and disable arc?
In the blogs from Marco I read LLVM with arc-enabled, not -only.

Offline

#20 2016-09-01 07:12:33

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

Re: Delphi for Linux preview - what do you think?

AFAIR ARC cannot be disabled, even at compiler level.

Offline

#21 2016-09-01 16:16:22

danielkuettner
Member
From: Germany
Registered: 2014-08-06
Posts: 330

Re: Delphi for Linux preview - what do you think?

@ab

under

http://docwiki.embarcadero.com/RADStudi … _Compilers

there is a hint:

Note: Do not disable ARC on the command line. It is required for working with the FireMonkey and RTL frameworks.

This sounds for me like it would be possible.

Offline

#22 2016-09-01 16:28:18

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

Re: Delphi for Linux preview - what do you think?

And you have the time to fix the RTL?

Offline

#23 2016-09-03 15:00:26

erick
Member
Registered: 2015-09-09
Posts: 155

Re: Delphi for Linux preview - what do you think?

Hi,

I was hopeful that Mormot would support Delphi on Linux, just because debugging with Delphi feels easier.

But I guess I could write/test under windows, then FPC to other platforms.  Actually, for servers we're a FreeBSD shop too, so if FPC supports FreeBSD it would be preferable.  I'll have to try it.

I *really* like the fact that mormot is so flexible that you can make many OS-style decisions at deploy time rather than at project initiation time.

Erick

Offline

#24 2016-09-03 15:50:56

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

Re: Delphi for Linux preview - what do you think?

Debugging a Linux application using Lazarus on Linux is IMHO much easier than remote debugging via Delphi from Windows.

I won't spent time debugging Delphi ARC model under Linux, when there is already FPC available for Linux.
The code generated by FPC is comparable, even sometimes better, than Delphi's compiler.

Offline

#25 2016-09-03 17:21:12

erick
Member
Registered: 2015-09-09
Posts: 155

Re: Delphi for Linux preview - what do you think?

According to the mormot docs, FPC can't do server-side SOA due to RTTI limitations.  Has that been fixed yet?

Offline

#26 2016-09-03 17:42:13

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

Re: Delphi for Linux preview - what do you think?

Yes, the NewPascal distribution of FPC has the RTTI available, and it is about to be merged in the official FPC trunk AFAIR.
Anyway, it is easy to use Delphi once to generate the missing RTTI (as a Delphi unit), then integrate to the project, for FPC.

Offline

#27 2016-09-03 19:06:20

miab3
Member
From: Poland
Registered: 2014-10-01
Posts: 188

Re: Delphi for Linux preview - what do you think?

On a side note, just MariaDB (which is not mentioned) is best suited for simple efficient data storage on both systems.

Michal

Offline

#28 2016-09-05 08:07:57

hnb
Member
Registered: 2015-06-15
Posts: 291

Re: Delphi for Linux preview - what do you think?

ab wrote:

... it is about to be merged in the official FPC trunk AFAIR.

It may takes months or years.


best regards,
Maciej Izak

Offline

#29 2016-09-05 20:22:58

erick
Member
Registered: 2015-09-09
Posts: 155

Re: Delphi for Linux preview - what do you think?

I took a look at newpascal.org.  Interesting. 

Questions:
1. How stable would a mormot/NewPascal server be under Linux?  Would you say you are comfortable running it in production?

2.My shop is primarily FreeBSD-based.  How stable is that newpascal version?

3. The RTTI-from-Delphi solution doesn't work for me because my staff are not licensed for Delphi, just me.

Definitely keep up the good work.

Offline

#30 2016-09-06 05:23:04

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

Re: Delphi for Linux preview - what do you think?

1. Yes.

2. I didn't test the FreeBSD compatibility.
Perhaps they may be some missing unit references or APIs, but I guess the compatibility should be close to Linux.
AFAIR there is some kind of binary compatibility, so that you could try to run the Linux ELF binary under FreeBSD.
Any feedback is welcome!

3. It is enough if a single computer has a Delphi version - even a old Delphi 6 is enough, or Delphi starter!
Let all your staff download the Starter version for free - https://www.embarcadero.com/fr/products … l-download - it ends the 9th of september!
Then you could use it for testing under Windows, generate the missing RTTI, and then work and compile with FPC.

Offline

Board footer

Powered by FluxBB