#1 Re: mORMot 2 » Converting a REST Client created with v. 1.18 to one using v. 2. » 2025-05-05 16:15:27

Thanks for the tip. The mORMot2 migration table appears to be very helpful.

#2 mORMot 2 » Converting a REST Client created with v. 1.18 to one using v. 2. » 2025-04-29 18:21:26

je_code
Replies: 2

I am taking over the code for a Delphi REST client that was created using mORMot v. 1.18. I would like for the project to use the latest version of mORMot (v. 2). However, I am having a rather hard time doing so. Any hints/pointers would be greatly appreciated.

The old project has a unit named 'mORMotClient.pas.' The header for the file shows the following:

/// remote access to a mORMot server using SynCrossPlatform* units
// - retrieved from http://localhost:8089/root/wrapper/CrossPlatform/mORMotClient.pas
// at 2016-08-24 10:15:19 using "CrossPlatform.pas.mustache" template
unit mORMotClient;

{
  WARNING:
    This unit has been generated by a mORMot 1.18.2929 server.
    Any manual modification of this file may be lost after regeneration.

  Synopse mORMot framework. Copyright (C) 2016 Arnaud Bouchez
    Synopse Informatique - http://synopse.info

  This unit is released under a MPL/GPL/LGPL tri-license,
  and therefore may be freely included in any application.

  This unit would work on Delphi 6 and later, under all supported platforms
  (including MacOSX, and NextGen iPhone/iPad), and the Free Pascal Compiler.
}

I am unable to locate the 'CrossPlatform.pas.mustache' file within the new version of mORMot. Is it still possible to generate the client wrapper using mORMot v. 2? It it is, is there a documentation available regarding this feature?

#4 mORMot 2 » What is the equivalent to mORMot 'ServiceLog' in mORMot2? » 2025-04-22 20:44:02

je_code
Replies: 1

I am in the process of converting a Delphi application using 'mORMot v. 1.18' into one using 'mORMot 2.' In the 'mORMot v. 1.18' application, I have the following lines of code:

  // Let's set the logging abilities of the server
  ServiceLog := TSQLLog;
  ServiceLog.Family.Level := LOG_VERBOSE;

  TServiceController.CheckParameters(ExeVersion.ProgramFilePath + c_HTTPExecutableName, c_HTTPServiceName, c_HTTPServiceDisplayName, c_HTTPServiceDescription);

  TSQLLog.Add.Log(sllTrace, 'Quitting command line');

I am having issues converting the above code to use 'mORMot 2.' Indeed, I am not finding an equivalent for 'ServiceLog.' Is there one?

#5 Re: mORMot 2 » 'mormot2tests.dpr' - 'Core crypto' - Regression Tests Failure » 2025-04-18 18:02:51

The speed difference might be partially explained by the age of my CPU. It was released in 2014.

I ran the same partial test on my 'host' PC. My results are still slower than yours but much better than my VM ones:

   mORMot2 Regression Tests
  --------------------------


1. Core units

 1.4. Core crypto:
  - RSA: 1,307,458 assertions passed  1.85s
     10 RS256 sign in 481.14ms i.e. 20/s, aver. 48.11ms
     100 RS256 verify in 83.16ms i.e. 1.1K/s, aver. 831.66us
     10 PS256 sign in 449.52ms i.e. 22/s, aver. 44.95ms
     100 PS256 verify in 83.84ms i.e. 1.1K/s, aver. 838.46us
  Total failed: 0 / 1,307,458 - Core crypto PASSED  1.85s


2. ORM


3. SOA


Software version tested: 2.3.10743 (2025-04-17 15:02:39)

Windows 10 64bit 22H2 (10.0.19045.5737) [ms1252 3.9GB 4A651701]
    4 x Intel(R) Xeon(R) CPU E3-1226 v3 @ 3.30GHz [8MB] (x86)
    on Dell Inc. Precision T1700 00
Using mORMot 2.3.10743 17 Apr 2025 and OpenSSL 1.1.1b  26 Feb 2019
    TSqlite3LibraryStatic 3.46.1 with internal MM
Generated with: Delphi 12.2 Athens 32 bit Win compiler

Time elapsed for all tests: 1.85s
Performed 18 Apr 2025, 10:54:26 by user1 on PC109NEW

Total assertions failed for all test suits:  0 / 1,307,458
! All tests passed successfully.

Since I was able to successfully run the partial tests on my VM, should I ignore the failed tests that occurred during while running the full set of tests?

#6 Re: mORMot 2 » 'mormot2tests.dpr' - 'Core crypto' - Regression Tests Failure » 2025-04-18 16:56:55

Thanks for the information.

I forgot to mention that I was running the tests on a VirtualBox Virtual Machine with the following processor: Intel(R) Xeon(R) CPU E3-1226 v3 @ 3.30GHz, 3292 Mhz, 2 Core(s), 2 Logical Processor(s).

Per your suggestion, I run the limited set of tests. They completed without any issues. Here are my results:

   mORMot2 Regression Tests
  --------------------------


1. Core units

 1.4. Core crypto:
  - RSA: 1,307,460 assertions passed  12.49s
     10 RS256 sign in 1.12s i.e. 8/s, aver. 112.08ms
     100 RS256 verify in 203.47ms i.e. 491/s, aver. 2.03ms
     10 PS256 sign in 1.12s i.e. 8/s, aver. 112.04ms
     100 PS256 verify in 206.23ms i.e. 484/s, aver. 2.06ms
  Total failed: 0 / 1,307,460 - Core crypto PASSED  12.49s


2. ORM


3. SOA


Software version tested: 2.3.10743 (2025-04-17 15:02:39)

Windows 10 64bit 22H2 (10.0.19045.5737) [ms1252 4GB 4A651701]
    2 x Intel(R) Xeon(R) CPU E3-1226 v3 @ 3.30GHz [8MB] (x86)
    on VBOX - 1 Oracle VirtualBox Version 7.1.8 VGA BIOS
Using mORMot 2.3.10743 17 Apr 2025
    TSqlite3LibraryStatic 3.46.1 with internal MM
Generated with: Delphi 12.2 Athens 32 bit Win compiler

Time elapsed for all tests: 12.49s
Performed 18 Apr 2025, 09:37:21 by user1 on DESKTOP-82SJUE9

Total assertions failed for all test suits:  0 / 1,307,460
! All tests passed successfully.

#7 mORMot 2 » 'mormot2tests.dpr' - 'Core crypto' - Regression Tests Failure » 2025-04-17 23:25:29

je_code
Replies: 6

Following the Installation Guide for mORMot2 on Windows (Windows 10 64-bit), I have opened and compiled 'mormot2tests.dpr' with my Delphi 12.2 Athens IDE.

When I ran the newly created executable, all of the regression tests except 36 of them run successfully. The 36 tests that failed belong to the 'Core crypto' section. The following statements were found in the 'log' file:

000000000000000B  ! rotat mormot2tests 2.3.10743 TSynLog 2.3.10743 {2 9.60 15.55 3.3GB/8GB 4a651701}
000000000000004B  ! EXC   ERsaException {Message:"TRsa.GenerateNew failed as rgrTimeout"} [Main] at 50c9c3   {2 9.60 15.55 3.3GB/8GB 4a651701}
0000000000000C90  ! EXC   ECryptCert {Message:"TCryptCertX509.GeneratePrivateKey(xkaRsa) failed"} [Main] at 50c9c3   {2 9.60 15.55 3.3GB/8GB 4a651701}

How do I resolve this issue?

Board footer

Powered by FluxBB