#1 Yesterday 20:11:33

loki
Member
Registered: 2018-01-20
Posts: 11

Migrating ISAPI App to Standalone HTTP Server with mORMot 2

Hello,

I have a large ISAPI application, and I’m looking to remove the dependency on IIS. Ideally, I’d like to switch to a standalone HTTP server to simplify deployment.

Is this possible with mORMot 2? Does it support HTTPS? And are there any example projects available to help get started?

Thank you very much for your help.
Best regards,
Stéphane

Offline

#2 Today 13:25:39

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,072
Website

Re: Migrating ISAPI App to Standalone HTTP Server with mORMot 2

If hosted on Windows, you can use the http.sys web server of mORMot, and manage HTTPS as you did with IIS.
Both IIS and this mORMot web server use the same API, calling http.sys.

But you may consider our async socket server, which works on both Linux (using epoll) and Windows (using IOCP).
For HTTPS, you can try to use our SSPI layer on Windows, but we advice on using OpenSSL, even on Windows.
And on production, a Linux server may be the best idea - if you can let your code compile with FPC.

For a large application, consider our interface-based services.
It would help switching from your existing server to the new in several steps:

1) Keep the existing ISAPI server, but encapsulate both client and server side logic into interfaces and classes. Follow SOLID principles (especially interface segregation) if you can.
2) Switch to the mORMot stack, which would make all marshalling automatic.

Offline

#3 Today 15:14:53

loki
Member
Registered: 2018-01-20
Posts: 11

Re: Migrating ISAPI App to Standalone HTTP Server with mORMot 2

Thanks, Arnaud! Do you have a sample showing how to use http.sys with mORMot?

Regarding your async socket server — and I may be wrong — I think http.sys might be more stable and efficient since it's built into Windows. For now, I'm not targeting Linux.

Offline

#4 Today 16:16:16

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,072
Website

Re: Migrating ISAPI App to Standalone HTTP Server with mORMot 2

From the regression tests on a loopback, in fact http.sys was not noticeably faster nor scaling than our IOCP server. I observed the contrary.
But it may depend on the system version it runs on, the system/antivirus load, and whatever black magic Windows makes under the hood.

Anyway, if you need performance, Linux is the way to go, way faster and stable than Windows in our tests on active REST/JSON process.
(I am not speaking about sponsored microbenchmarks)

Offline

#5 Today 16:27:02

loki
Member
Registered: 2018-01-20
Posts: 11

Re: Migrating ISAPI App to Standalone HTTP Server with mORMot 2

Thanks Arnaud smile If I'm not mistaken, there's actually more code in your IOCP server than in the http.sys wrapper, right? So theoretically, http.sys should be more stable and have fewer bugs than the IOCP implementation — even though you're an excellent programmer smile

Note: i ask the same to chatGPT, he know about mormot, and say : "IOCP Server (mORMot custom asynchronous server): More code to maintain (even if already well-written)"

Offline

#6 Today 20:05:42

ab
Administrator
From: France
Registered: 2010-06-21
Posts: 15,072
Website

Re: Migrating ISAPI App to Standalone HTTP Server with mORMot 2

Anyway, with mORMot if you use interface-based services, you can switch from one server to the other, on need.

Offline

Board footer

Powered by FluxBB