Jump to content
MarianSaad

Is datasnap Webbroker a good approach?

Recommended Posts

Hi,

I am building an API using delphi 10.3
The technology that I am using is datasnap web broker stand-alone application.
This API handles a web request that post data to my SQL server database.
The response I am returning is in JSON.

It works, but I am concerned about concurrent requests and a heavy load in general.

Also, at some point I will create another API that generates PDF file and sends it out to the client.

 

Should I use another type, like CGI or ISAPI?
Should I create connections and queries in code at runtime before each request and then free?

I am new to all this and still learning.
Can anyone please guide me with the technology that I use?

 

Thanks,

Marian

Share this post


Link to post

There are quite a few different avenues you could take to support API development.  The first step in any is to get it "to work" which you seemed to have accomplished!

 

Your next question is valid - will it scale?  The question remains, how much do you need it to scale?  How many concurrent connections are planned, what sort of total throughput is required and what are acceptable latencies?  Once you define those, you can test those things yourself by using tools like JMeter and BlazeMeter and see if your performance is acceptable.  If it's not, then you can look at scaling methods, either locally with Windows Clusters or migrating to cloud services on AWS or Azure.

 

If the performance isn't satisfactory, you could also look into different implementations.  One of the most commonly used frameworks is mORMot which has been highly optimized.  If you join their community you'll likely get some help getting started.  There's a LOT of code available, and much you can ignore to get started.

 

Another option is to get a commercial finely-tuned multi-tier approach from Components4Developers.  This option has been around a very long time and is quite mature, and quite performant.

Another commercial option to look into is the Remoting SDK from remobjects.  This also has been around quite a long time and is widely used.

For a real simple and performant commercial toolkit, also look at RealThinClient components.

 

There are plenty of other choices out there.  The next step that I would recommend is to analyze your projected usage and start establishing some real testing metrics that you can validate current and future decisions on.  Get the tools in place to back up your API infrastructure with measurements and validation.  In addition to API testing, get line-by-line performance measurements with ProDelphi or Nexus Quality Suite to track down different implementations.

 

 

  • Like 3

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×