Watch, Follow, &
Connect with Us

For forums, blogs and more please visit our
Developer Tools Community.


Welcome, Guest
Guest Settings
Help

Thread: DataSnap Overview and Architecture with FireDAC and Firebird



Permlink Replies: 2 - Last Post: Jan 13, 2017 2:47 AM Last Post By: Hugues Van Land...
Hugues Van Land...

Posts: 4
Registered: 1/20/07
DataSnap Overview and Architecture with FireDAC and Firebird
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 8:29 AM
Hi all and best wished for this new year,

For datasnap application with multiple client using Firebird and FireDAC, :

Can we use one FDConnection for each client or can we use the same FDConnection ?

Best Regards
Jeff Overcash (...

Posts: 1,529
Registered: 9/23/99
Re: DataSnap Overview and Architecture with FireDAC and Firebird
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 10, 2017 10:24 AM   in response to: Hugues Van Land... in response to: Hugues Van Land...
Hugues Van Landeghem wrote:
Hi all and best wished for this new year,

For datasnap application with multiple client using Firebird and FireDAC, :

Can we use one FDConnection for each client or can we use the same FDConnection ?

Best Regards

You are going to want to use a connection per client. While gds32 (and therefor
fbclient) were made thread safe as of IB 6.0, it was made thread safe by
serializing access to the connection. This means your multiple clients running
against your server will all wait on each other even though their calls are
being done in separate threads. One connection per client stops the
serialization of API calls at the client dll level.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Hugues Van Land...

Posts: 4
Registered: 1/20/07
Re: DataSnap Overview and Architecture with FireDAC and Firebird
Click to report abuse...   Click to reply to this thread Reply
  Posted: Jan 13, 2017 2:47 AM   in response to: Jeff Overcash (... in response to: Jeff Overcash (...
Thanks for answer.

I actually use one FDConnection and I have error with DataSnap Client Application when I make intensive insert update in the same time.

I have error like this :
[FireDAC][Phys][FB]Error reading data from the connection
[FireDAC][Phys][FB]Error writing data to the connection.

I think problem come from transaction management but I'd like to know what is the best way to handle transaction in a datanap server with FireBird and FireDAC ?

Best Regards


Jeff Overcash (TeamB) wrote:
Hugues Van Landeghem wrote:
Hi all and best wished for this new year,

For datasnap application with multiple client using Firebird and FireDAC, :

Can we use one FDConnection for each client or can we use the same FDConnection ?

Best Regards

You are going to want to use a connection per client. While gds32 (and therefor
fbclient) were made thread safe as of IB 6.0, it was made thread safe by
serializing access to the connection. This means your multiple clients running
against your server will all wait on each other even though their calls are
being done in separate threads. One connection per client stops the
serialization of API calls at the client dll level.

--
Jeff Overcash (TeamB)
(Please do not email me directly unless asked. Thank You)
Learning is finding out what you already know. Doing is demonstrating that you
know it. Teaching is reminding others that they know it as well as you. We are
all leaners, doers, teachers. (R Bach)
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02