Android Question No of Connection used in Remote Data Connector

incendio

Well-Known Member
Licensed User
Longtime User
Hi all,

Suppose I have these codes
B4X:
Private reqM As DBRequestManager

reqM.Initialize(Me, "http://192.168.1.126:12001/rdc")       

Private cmd1 As DBCommand
cmd1.Initialize
cmd1.Name     = "com1"   
reqM.ExecuteQuery(cmd1, 0, Tag)

Private cmd2 As DBCommand
cmd2.Initialize
cmd2.Name     = "com2"   
reqM.ExecuteQuery(cmd2, 0, Tag)

How many connection use on those codes ? 1 connection or 2 connections?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
Your code doesn't follow the recommended pattern: [B4X] jRDC2 - B4J implementation of RDC (Remote Database Connector)

The client sends http requests to the server. The server manages a connection pool. If there are no available connections based on the connection pool configuration then the response will be blocked until a connection is available.

Bottom line, in most cases you don't need to worry about it.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I need to know how many connection created by jRDC2 because Firebird database server can only uses 1 core per connection.

For a small amount of data, this is OK, but for big data, processing will be to long, so I need to create many connection to Firebird Server so that firebird server can use available core to process all data simultaneously.

But if jRDC2 only create one connection for all request, than there is no point to create many connection for Firebird.
 
Upvote 0

incendio

Well-Known Member
Licensed User
Longtime User
I am using default setting for connection pool.

When there are more than 1 command/query to jRDC2, is this command execute 1 by one or at once?

Like example on my post #1, there are 2 commands, each one executed without wait for.

Is command #2 executed without waiting for command #1 finished or is it executed after command # 1 finished?

If command #2 executed after command # 1 finished, I think, this mean jRDC2 only use 1 connection at the time.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
Is command #2 executed without waiting for command #1 finished or is it executed after command # 1 finished?
1. Doesn't wait. Code execution never waits for anything unless you call Wait For.

2. There can be million different clients connecting to the server at the same time.

The server will make up to X connections to the database where X = maximum configured pool size.
 
Upvote 0
Top