Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation on 03/23/20 in all areas

  1. hello, I did a good benchmark to test the Delphi Linux compiler. Resuming: - server I9 8core with Debian 10 and MySQL8 - server I9 8core with ClearLinux and Apache - server I9 8core with Windows 2016 and IIS10 - I7 client with apachebench The webbroker app from Windows or ClearLinux connect using pooled firedac connections to the Debian MySQL server. I don't want to bench different RDPMS, but only the layer IIS-ISAPI_webbroker and Apache-mod_webbroker. Multiple queries are done against a set returning thousand of lines x ten columns; then the dataset is serialized to REST string using DMVC serializers. The results are, using apachebench ab -n 1000 -c 10 -k -r Default Delphi 64bit IIS 10: 143 reqs/sec Default Delphi 64bit Linux Apache: 554 reqs/sec Delphi 64bit IIS 10 with RDP Intel TBB and Intel IPP libs: 567 reqs/sec (In my site you can download those libs) With a small text output instead of DB both Windows and Linux sustains 10000 reqs/sec So the Linux compiler is great performing and it's very reliable. Under apache I had errors raising the number of concurrent users, this need a manual tuning in apache config files (IIS is autotuning). Congratulations Emba! ------- WINDOWS IIS ISAPI Default Server Software: Microsoft-IIS/10.0 Server Hostname: / Server Port: 80 Document Path: / Document Length: 162716 bytes Concurrency Level: 100 Time taken for tests: 6.974 seconds Complete requests: 1000 Failed requests: 0 Keep-Alive requests: 1000 Total transferred: 162952000 bytes HTML transferred: 162716000 bytes Requests per second: 143.38 [#/sec] (mean) Time per request: 697.430 [ms] (mean) Time per request: 6.974 [ms] (mean, across all concurrent requests) Transfer rate: 22817.02 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.5 0 12 Processing: 47 657 330.7 511 2396 Waiting: 8 655 331.0 508 2396 Total: 47 657 330.7 511 2396 Percentage of the requests served within a certain time (ms) 50% 511 66% 578 75% 825 80% 969 90% 1203 95% 1291 98% 1500 99% 1732 100% 2396 (longest request) ------- WINDOWS IIS ISAPI with Intel TBB IPP Server Software: Microsoft-IIS/10.0 Server Hostname: / Server Port: 80 Document Path: / Document Length: 162716 bytes Concurrency Level: 100 Time taken for tests: 1.762 seconds Complete requests: 1000 Failed requests: 0 Keep-Alive requests: 1000 Total transferred: 162952000 bytes HTML transferred: 162716000 bytes Requests per second: 567.56 [#/sec] (mean) Time per request: 176.192 [ms] (mean) Time per request: 1.762 [ms] (mean, across all concurrent requests) Transfer rate: 90317.94 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.8 0 8 Processing: 23 159 64.5 148 387 Waiting: 8 157 64.7 145 383 Total: 23 159 64.3 148 387 Percentage of the requests served within a certain time (ms) 50% 148 66% 153 75% 160 80% 160 90% 266 95% 312 98% 355 99% 363 100% 387 (longest request) ------ APACHE MOD CLEARLINUX Server Software: Apache/2.4.41 Server Hostname: / Server Port: 80 Document Path: / Document Length: 162778 bytes Concurrency Level: 10 Time taken for tests: 1.804 seconds Complete requests: 1000 Failed requests: 0 Keep-Alive requests: 996 Total transferred: 162992068 bytes HTML transferred: 162778000 bytes Requests per second: 554.27 [#/sec] (mean) Time per request: 18.042 [ms] (mean) Time per request: 1.804 [ms] (mean, across all concurrent requests) Transfer rate: 88224.32 [Kbytes/sec] received Connection Times (ms) min mean[+/-sd] median max Connect: 0 0 0.1 0 2 Processing: 11 18 3.0 17 35 Waiting: 9 16 2.9 16 33 Total: 11 18 3.0 17 35 Percentage of the requests served within a certain time (ms) 50% 17 66% 19 75% 20 80% 20 90% 22 95% 24 98% 26 99% 27 100% 35 (longest request)
  2. Mohammed Nasman

    what is the possibility of having a rest/soap webapi in Delphi 2007

    If you can use the community edition, you should give Delphi MVC a try. Otherwise, I will go with @Lars Fosdal suggestion.
  3. Even it is not just for REST, you can write your own interface based methods and use mORMot as a REST server. Learning curve might be slower compared to some other options. However, it does run from Delphi 6 to Delphi 10.3.3 and has Linux support using Lazarus+FPC. There is no SOAP support as to my knowledge.
  4. Angus Robertson

    what is the possibility of having a rest/soap webapi in Delphi 2007

    The Internet Communications Suite (ICS) has a REST client component using Json and an application web server that sends whatever you give it. There is an ICS topic here. But no SOAP protocol as such, Json seems to have overtaken SOAP as much easier to use. ICS uses SuperObject for Json and reading XML, all Delphi 2007 compatible. Adding a SOAP wrapper to your XML objects should not be too hard. Angus
  5. If you have the option to choose REST only then you might really would like to consider MARS Curiosity. Edit: Just checked GitHub and it seems no packages exists for Delphi 2007.
  6. Anders Melander

    Exception.CreateFmt vs. CreateResFmt

    Constant resourcestring references are resolved during initialization by System._InitResStrings. If you change the application language after that, e.g. by calling LoadResourceModule, then these references will not be updated. In the example below the first ShowMessage in unaffected by the change of language while the second one isn't. resourcestring sFoo = 'Foo'; sBar = 'Bar'; const sFooBar: array[boolean] of string = (sFoo, sBar); sBetterFooBar: array[boolean] of PResStringRec = (@sFoo, @sBar); begin LoadResourceModule('foofoo.bar'); ShowMessage(sFooBar[True]); ShowMessage(LoadResString(sBetterFooBar[True])); end; Apart from that I suspect the RTL/VCL uses PResStringRec for C++ compatibility.
  7. I'd go for the C# approach instead of fiddling with an ancient Delphi.
  8. Lars Fosdal

    Boolean evaluation

    My argument comes from the goal of reducing code clutter and sanitizing conditions to be easy to read. Original code if aUser.Username<>aDocument.Owner then begin // If user is not an administrator if aUser.Administrator=false then begin showmessage('You are not allowed to delete this document'); exit; end; end; A boolean is by definition either true or false. An if condition takes a boolean argument, and if the argument is true, the following statement is executed. I don't need to check if BoolVar = true or BoolVar = false - only checking BoolVar or not BoolVar is enough. To have readable code, avoiding negations is a good thing, hence I would probably write the above something like this if (aUser.Username = aDocument.Owner) or aUser.Administrator then begin // do the deletion end else ShowMessage('You are not allowed to delete this document'); Naturally, there is no single right way of doing conditions - but explicitly comparing a boolean variable to a boolean value is unnecessary.
  9. Lars Fosdal

    Boolean evaluation

    I have to admit that I cringe whenever I see a boolean compared to true or false.
  10. David Heffernan

    Boolean evaluation

    Never compare to False or True. Instead write if someBool then Or if not someBool then That's not your problem though. Your problem is quite simple. It's the most obvious explanation. You are mistaken, in fact aUser.Administrator is false. It's that simple.
  11. Vandrovnik

    Stop IDE from writing unit names all by itself ?

    May be it will be easier to define empty System.Actions unit for Delphi XE than to fight with Delphi RIO (put it in a directory, where XE will search, but RIO will not).
×