[DUG] Delphi vs C# for web services performance

Jolyon Smith jsmith at deltics.co.nz
Tue Mar 24 15:01:22 NZDT 2015


@Stefan and anybody else interested re JSON...

You might like to investigate my JSON implementation, available free (as in
beer) from my github repo.  The RTL Smoketest project includes tests for
the Deltics.JSON unit (smoketest framework is in the same repo) and also
acts as an example of basic usage (though this should be fairly
straightforward).

Supports Delphi 7 and later.



On 23 March 2015 at 15:45, Stefan Mueller <muellers at orcl-toolbox.com> wrote:

> Some thoughts:
>
>
>
> -        The real processing of the data be that in C# or Delphi
> (encoding to json/xml, etc) will probably be in <1ms range. The slight
> speed advantage of native compiled Delphi code over C# is irrelevant
> compared to the overhead of database, network and webserver request
> handling.
>
> -        The latest versions of IIS (anything version 8+) are quite
> speedy in request processing (catching up a bit with NGINX, etc). My
> webserver runs on an Xeon E3-1240 - which isn’t exactly very powerful
> hardware. last time I made some benchmarks I got 39k req/s for static
> content (small 174bytes file) and 9.3k req/s for a simple JSON Rest service
> (a simple service that returned some cities/states for a given country from
> cached data, 817bytes). That’s on default settings before performance
> tuning anything (which wasn’t necessary in my case). I’ve seen benchmarks
> running a simple service in WCF on a core i5 processor handling 50k+ req/s
> … I am sure if you get some proper hardware (xeon e7 ?) you can easily get
> into to 100k+ region.
>
> -        Delphi support for XML (through OmniXML, don’t use the native
> Delphi MSXML) is ok … but still haven’t really found a good JSON library
> for Delphi. The built in functions are a pain to work with (especially if
> you need to read JSON). I wish there is something like FastJSON (a C#
> library) in Delphi for serializing/deserializing.
>
> -        In my experience, anything web-related is just so much easier to
> do in DotNet. Delphi is great for desktop applications … and DotNet is
> fantastic for web stuff (great platform tied in with IIS, ASP.Net MVC, WCF,
> etc and heaps of awesome third party libraries).
>
> -        Benchmark your own service, it probably takes you less time to
> write a simple testcase in C# and benchmark it than it took me to respond
> to this email ;-/ …
>
>
>
>
>
> Kind regards,
>
> *Stefan Müller*,
> R&D Manager
>
> *ORCL* *Toolbox Ltd.*
> Auckland, New Zealand
>
>
> P Please consider the environment before printing this email
>
> This message is intended for the adresse named above and may contain
> privileged or confidential information.
> If you are not the intended recipient of this message you must not use,
> copy, distribute or disclose it to anyone.
>
>
>
> *From:* delphi-bounces at listserver.123.net.nz [mailto:
> delphi-bounces at listserver.123.net.nz] *On Behalf Of *John Bird
> *Sent:* Monday, 23 March 2015 2:33 p.m.
>
> *To:* NZ Borland Developers Group - Delphi List
> *Subject:* Re: [DUG] Delphi vs C# for web services performance
>
>
>
> Current version (Hospital Java app)  used to have a requirement that the
> DB returns each result within 200ms (fires about 15 simultaneous queries to
> various systems including 2 or 3 to ours).
>
>
>
> Currently the calls are to stored procedures on a SQL Server cluster to
> get the data.   The web service (Delphi or C#) would put a layer between
> the application and the DB, packaging the query results into XML or JSON
> and its pretty critical to get as close to the direct DB access speed as
> possible.   At times being a hospital system the load is high and the
> response times are crucial.
>
>
>
>
>
>
>
> *From:* Leigh Wanstead <leigh.wanstead at gmail.com>
>
> *Sent:* Monday, March 23, 2015 11:44 AM
>
> *To:* NZ Borland Developers Group - Delphi List
> <delphi at listserver.123.net.nz>
>
> *Subject:* Re: [DUG] Delphi vs C# for web services performance
>
>
>
> Hi John,
>
>
>
> What is your requirement for performance?
>
>
>
> i.e. One million user to get median value 100ms response time?
>
>
>
> Regards
>
> Leigh
>
>
>
> On 23 March 2015 at 10:27, John Bird <johnkbird at paradise.net.nz> wrote:
>
> There is a web service we might are looking at implementing.   We could use
> either Delphi or C#.  Performance is highly critical.   Will be getting
> getting REST request, getting data from a DB. and packaging it into XML or
> JSON according to the request.
>
> We have noticed that some C# web services have some latency but  this might
> be due to how they are setup on IIS rather than an inherent language issue.
>
> We are wondering if there is any clear reason to do it in Delphi - anyone
> have metrics or references etc on performance?
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
>
> ------------------------------
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
> _______________________________________________
> NZ Borland Developers Group - Delphi mailing list
> Post: delphi at listserver.123.net.nz
> Admin: http://delphi.org.nz/mailman/listinfo/delphi
> Unsubscribe: send an email to delphi-request at listserver.123.net.nz with
> Subject: unsubscribe
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://listserver.123.net.nz/pipermail/delphi/attachments/20150324/ee518fc4/attachment-0001.html 


More information about the Delphi mailing list