RTC Forums
April 26, 2024, 11:08:26 AM *
Welcome, Guest. Please login or register.

Login with username, password and session length
 
   Home   Help Login Register  
Pages: 1 [2] 3
  Print  
Author Topic: Database Access  (Read 21540 times)
Kevin Powick
RTC Expired
*
Posts: 87


« Reply #15 on: December 17, 2010, 04:31:40 AM »

We're using PgDAC from DevArt (formerly Core Lab).

http://www.devart.com/pgdac

I've always really liked DevArt DACs, but they didn't have one for Postgres until last year.  So, prior to using their pgDAC product, we were using the components from MicroOLAP.

Considering the other databases we're working with, a great deal of consideration is being given to switching to either DevArt's UniDAC components, or the very popular AnyDAC from DA-Soft.

--
Kevin Powick
Logged

Linux is only free if your time is worthless
Walter
RTC License++
*****
Posts: 16


« Reply #16 on: December 17, 2010, 11:46:52 AM »

I haven't been back it a bit....

I have to agree with Kevin's approach - API etc.

The RTC servers I have created were for very specific requirements which needed 3 or 4 functions.

From day of deployment they have been rock solid and never failed.

Walter
Logged
Peter M.
RTC License+
****
Posts: 30


« Reply #17 on: December 22, 2010, 12:58:05 AM »

Walter, thanks again for your feedback. 


BTW, I'm currently working on the connection pool process...
a. Trying to decide whether to use a TList within a Critical Section, or a TThreadList.

b. Trying to decide whether to remove the DBConnection objects from the List using List.Delete and then add back using List.Add (based on archived articles),
   or whether to add an "Available" boolean property to the DBConnection which I can set to False when being used and True when done.
   (The advantage to "Available" is to keep track of the DBConnection objects and make sure they get freed in case of unexpected termination.)


If anyone has any thoughts on either of these items, I'd appreciate it!

Thanks,
-Peter
Logged
Kevin Powick
RTC Expired
*
Posts: 87


« Reply #18 on: December 22, 2010, 01:30:42 AM »

Peter,

Check out TObjectQueue of the Contnrs unit.

--
Kevin Powick
Logged

Linux is only free if your time is worthless
Peter M.
RTC License+
****
Posts: 30


« Reply #19 on: December 22, 2010, 02:41:07 AM »

Kevin, thanks for your feedback.

I had read about the TObjectQueue which can automatically free it's TObjects whenever they are removed from the Queue.
(I'm still leaning towards TThreadList ... only because I want a thread-safe List of object pointers.)

However, I do see an unrelated usage for the TObjectQueue in my app ... so thanks again for the tip.

-Peter
Logged
lionheart
Newbie
*
Posts: 18


« Reply #20 on: December 29, 2010, 08:04:48 AM »

Kevin,

Currently i am evaluating uniDAC for my next year project with RealthinSDK as the app server. From what i understand on UniDAC, it has advanced pooling mechanim in the TUniconnection component. So do we still need to implement the DB connection pooling ?
Logged
Kevin Powick
RTC Expired
*
Posts: 87


« Reply #21 on: December 29, 2010, 03:07:32 PM »

So do we still need to implement the DB connection pooling ?

I don' t know.  I've never used UniDAC.

--
Kevin Powick
Logged

Linux is only free if your time is worthless
Peter M.
RTC License+
****
Posts: 30


« Reply #22 on: December 29, 2010, 08:51:36 PM »

lionheart,

Questions:
1. What is the maximum number of simultaneous users/connections you will have?
2. Will any of your clients have firewall issues (do they need to communicate via http)?
3. Will the Requests/Results be handling large amounts of data (+100k, +500k, +1M, etc)?
4. Although Kevin is using PgDAC which is made by Devart (they also make UniDAC), what database will you be using?

Thanks,
-Peter


Logged
lionheart
Newbie
*
Posts: 18


« Reply #23 on: December 29, 2010, 10:58:16 PM »

Kevin,
Thanks for your reply, I was trying my luck that you have converted your app to unidac Smiley. I am using the trial version of UniDAC because i am evaluating the components, therefore i have not the source codes to verify the connection pooling implementation.

Peter,
Thanks for your reply, Before i answer your question please allow me share with you that i understand the importance of DB connection pooling in multi-user environment. The reason i am asking the necessity of it is specific to UniDAC (TUniConnection) which has its own pooling mechanism
and i thought Kevin, yrself or other gurus may share your experiences on it perhaps not to use the feature of the component due to it doesnt work well with RTC etc .. maybe.. Smiley

1. What is the maximum number of simultaneous users/connections you will have?
Somewhere ard 30

2. Will any of your clients have firewall issues (do they need to communicate via http)?
Should not be a problem because i work hand-in-hand with their MIS.

3. Will the Requests/Results be handling large amounts of data (+100k, +500k, +1M, etc)?

This depends on the parameters the clients set. I have DBgrids with some parameters (editboxes/comboboxes etc) for the users to set
which will be sent to the app server and use as query parameters to reduce the resultant dataset. However if the client does not put any parameters, it will be equivalent to returning the whole table ('SELECT column1, column2.. FROM table') which is not encourage but cannot hinder the user from doing so.

4. Although Kevin is using PgDAC which is made by Devart (they also make UniDAC), what database will you be using?
I will be using firebird for this project. The reason I am looking at UniDAC is for standardization (on my side)to meet other/future clients' request to use their choice SQL server.

Logged
Peter M.
RTC License+
****
Posts: 30


« Reply #24 on: December 30, 2010, 07:37:12 AM »

Thanks for your answers.

If you will only have a maximum of 30 simultaneous connections, perhaps you don't need DB Connection pooling...

Out of curiosity, how did you decide on Firebird instead of PostgreSQL?
(I'm asking because I have to make the same decision.)

Thanks,
-Peter
Logged
Kevin Powick
RTC Expired
*
Posts: 87


« Reply #25 on: December 30, 2010, 01:59:35 PM »

If you will only have a maximum of 30 simultaneous connections, perhaps you don't need DB Connection pooling...

Although the decision to use connection pooling is driven by factors such as the number of licensed server seats, the number of users,  server load, and usage patterns, I pretty much always implement it in any multi-user server application. Why waste resources and limit your ability to scale when the implementation of connection pooling is pretty easy?

--
Kevin Powick
Logged

Linux is only free if your time is worthless
lionheart
Newbie
*
Posts: 18


« Reply #26 on: December 31, 2010, 07:19:49 AM »

Peter M.

Firebird is the preferred choice of the customer. To me it will be the same coding because i have all the SQLs statements at the app server (no store procs etc) and i am quite happy with my testing with unidac so far which makes it quite easy to switch to other SQL server like PostgresSQL etc.. Cheesy

Kevin,
i agree with you on putting dbconnection pool on all multi-user application. What i am testing now is to use the pooling of the TUniConnection of unidac and see what happens next ;P.

This is what i am testing, please feel free to share your thoughts
1. I use jvpluginframework to modularize the application.
2. Place a UniConnection in one of the plugin. Enable the pooling feature of the component.
3. Place a RtcHttpServer in another plugin.
4. When loading the other plugins, Set all the RtcDataServerLink.server to the RtcHttpServer component in plugin (3) and datasets connection to the UniConnection component in plugin (2) (RtcDataServerLink is great in making this happen wih ease, try to do that in datasnap... hell break loose  Shocked)
5. .. still in progress... Smiley doing Rtcfuncs etc

Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #27 on: August 22, 2011, 09:30:22 PM »

If anyone is still searching for a place to start, take a look at the "rtcDB.pas" unit (added in RTC SDK v4.27), which contains a "DelphiDataSetToRTC" function (Server-side, to "pack" TDataSet data into a TRtcDataSet structure - ready for transport to the Client), "TRtcMemDataSet" and "TRtcDataSetMonitor" components (Client-side, for working wih in-memory TDataSet descendants which can be linked to DB-aware components to display TRtcDataSet data received from the Server) and the "TRtcDataSetChanges" class (Server-side, for accessing changes to a DataSet received from a Client). These new components, classes and functions provide basic functionality for working with DB-aware components when using the RTC SDK for communication, either through RTC remote functions or RTC Linkes Objects.

Best Regards,
Danijel Tkalcec
Logged
Ronald van Tour
RTC License++
*****
Posts: 37


« Reply #28 on: August 30, 2011, 10:36:01 AM »

Hi Danijel,

A small demo would help to get of the ground
Logged
D.Tkalcec (RTC)
Administrator
*****
Posts: 1881


« Reply #29 on: August 30, 2011, 03:08:19 PM »

Would a "Fishfact Demo" be enough, or does it have to be something more complex?

Best Regards,
Danijel Tkalcec
Logged
Pages: 1 [2] 3
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.21 | SMF © 2015, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.031 seconds with 16 queries.