Delphi Handbooks Collection


Delphi XE Handbook


Delphi 2010 Handbook


November 30, 2012

DataSnap Webinar Material and BE-Delphi Code and Slides

Here are some tidbits I promised in terms of source code and slides for recent sessions. And the link to the DataSnap webinar white paper. More to come.

Here are some tidbits I promised in terms of source code and slides for recent sessions.

BE-Delphi Material

DataSnap Webinar Material

Patching the DataSnap Server for Multi-threading

If you download the source code for my datasnap webinar, you'll see that there is a simple speed test demo. Using it, you can change some of the settings of the server, and also enable sessions management in the client application. I cover this in detail in the white paper (where the code is listed and explained), and also blogged about this at http://blog.marcocantu.com/blog/datasnap_deployment_performance.html. The client of that speed testing demo has the option to run multiple threads hitting the server at the same time. As discussed in that blog post (and in others!) this easily crashes the server. 

As I already mentioned the R&D team jumped on this and has provided a number of fixes that will ship in Delphi XE3 Update 1, available soon. For the time being, however, you can apply the most relevant patch (again, not the only one) manually. Get the source code of the Data.DBXCommon.pas from the Delphi source, copy it in your project source code folder, add the unit to your project, open it in the editor, search the implementation of the method TDBXConnectionFactory.GetDriver, leave the initial part as it is and replace the line with the call to TDBXDelegateDriver.Create (listed also below) with the following "safer" code:

TDBXDriverRegistry.DBXDriverRegistry.FDrivers.LockList;
try
  Result := TDBXDelegateDriver.Create(TDBXDriverRegistry.DBXDriverRegistry.GetDriver(DriverDef));
finally
  TDBXDriverRegistry.DBXDriverRegistry.FDrivers.UnLockList;
end;

This is not the only fix but the most relevant one, so I felt it was worth sharing it right away. Others will be included in the coming update for Delphi XE3 (and C++Builder, alike). Going forward, we are adding some serious multithreaded testing to the internal test suites, to avoid similar issues in the future. Reworking and improving DataSnap is on my table, and I'm open to suggestions.

More to Come

Again, replay video is coming... and also a Q&A blog post is in the works... along with a "DataSnap white paper compilation" from material I wrote over the last 2 or 3 years on the topic. Stay tuned to my blog.

 





 

8 Comments

DataSnap Webinar Material and BE-Delphi Code and Slides 

Keep up the good work 
Comment by Anonymous on November 30, 14:48

DataSnap Webinar Material and BE-Delphi Code and Slides 

"Reworking and improving DataSnap is on my table, and 
I'm open to suggestions." 
This is exactly what I wanted to read on your blog. 
We've been talking about DS "improvements" many times 
and now the time has come, finally the "wish list" will 
turn in "features list". Thank you for your commitment 
Marco.
Comment by Daniele Teti [http://www.danieleteti.it] on November 30, 15:12

DataSnap Webinar Material and BE-Delphi Code and Slides 

Hi there Marco, take in consideration rethinking your
Delphi handbook serias, for example DataSnap XE3
Handbook, Firemonkey XE3 Handbook, etc. in this way
you can deliver faster and especialice input for the
customers.

Daniel Teti has an ORM solution open source, no news
about it lately since the anouncement of Delphi spring
framework team-up, hopefully You to can exchange ideas
and plan a roadmap for a new datasnap reloaded aproach.

Well is just my ponit of view.

Greetings Marco and Daniel.

Felipe
Comment by Felipe Piña on November 30, 19:32

DataSnap Webinar Material and BE-Delphi Code and Slides 

 "Slides (in PDF) of my Windows 8 session at BE-Delphi"

file is damaged and can not be repaired.... ha,ha,ha....
Comment by silvio on December 3, 04:32

DataSnap Webinar Material and BE-Delphi Code and Slides 

Silvio, I tried downloading the file and is shows fine on a couple of 
different PDF viewers. Might be you got a partial download...

-Marco 
Comment by Marco Cantu [http://www.marcocantu.com] on December 3, 14:08

DataSnap Webinar Material and BE-Delphi Code and Slides 

Hi from a C++ Builder user,
I have experienced issues where if a browser closes
while the DataSnap server is streaming an image file,
the DataSnap server hangs.  To avoid this we intercept
the request and stream it manually.  May be worth a
look whilst hardening up DataSnap Server.

We have several DataSnap servers at work, and more to
come, so are very interested in what you are doing.

Al
Comment by Alan Taylor [http://www.altor.com.au] on December 3, 22:16

DataSnap Webinar Material and BE-Delphi Code and Slides 

This Code fix the problem in XE2 too! thanks!

The official fix come to XE2 in Update 5 or only in XE3?

 
Comment by Daniel Santos on December 4, 18:42

DataSnap Webinar Material and BE-Delphi Code and Slides 

I have been wanting to upgrade to a new version of
Delphi, but I have been waiting on fixes to datasnap
before purchasing.  The needs to be some options that
allows cloning of lookup fields and aggregate fields.
 Both of these issues can ans should be passed to a 
data set clone and be functional.  If they are not
allowed to be passed you should be able to add them. 
Right now you can't because you can't add a field to
an open dataset.  Something needs to be done to make
these things work.  Can you also add some better debug
so that you don't get a empty dialogbox when you have
certain errors like key violations, etc.

If you fix it I will buy it.
Comment by Anonymous on December 11, 06:28


Post Your Comment

Click here for posting your feedback to this blog.

There are currently 0 pending (unapproved) messages.