Watch, Follow, &
Connect with Us

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


Welcome, Guest
Guest Settings
Help

Thread: TDSServer OnError is firing, not very often, but don't understand the cause


This question is not answered. Helpful answers available: 2. Correct answers available: 1.


Permlink Replies: 1 - Last Post: Apr 28, 2015 4:31 PM Last Post By: Gilberto Ximenes
Keith Marbach

Posts: 69
Registered: 8/21/01
TDSServer OnError is firing, not very often, but don't understand the cause  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 27, 2015 6:37 PM
Delphi XE6, DS Server, TCP Transport (using compression and simple encryption).

Three questions here:

1) How does the DSServer know that a client is a new client? If it is based solely on IP address I think I might have a problem. My company has an office in another city. In that office we have many tablets on wifi. In the OnConnect event I see that all those tablets report the same IP address, the public IP address of that office. Will this cause a problem potentially with multiple clients using the same session? My design is that each new session (via onConnect) gets its own FireDac connection to our SQL DB, and that connection is used for the life of the session, then freed by a timer that looks for no activity on the connection for 2 minutes or more.
2) The error that I'm seeing a couple of times a day is this, reported by the DSServer.OnError with code, DSErrorEventObject.Error.Message: "Expected: '[' found: '"' at position: 10 {"method":"command_close","params":[1]". What is the source of that error, and how do I fix it.
3) Once I get the error in 2 I then start getting access violations, namely, "Access violation at address 004E02E6 in module 'JCMServer.exe'. Read of address 00000008." How do I track down the cause of that error?

I'm a Windows programmer and this transition to android/datasnap has been difficult. I have apps that are performing some critical processes for us, and things work pretty well, but my lack of understanding of the datasnap server sessions, TCP, etc. is hurting me, and I have not found a single resource where I can just sit and read and figure this stuff out. So that is a 4th question, how can I start from scratch and learn what I need to know to support 100 users submitting data using android or ios apps, writing all that data to our SQL Server?

Thanks.

Keith Marbach
Gilberto Ximenes

Posts: 5
Registered: 10/11/98
Re: TDSServer OnError is firing, not very often, but don't understand the cause  
Click to report abuse...   Click to reply to this thread Reply
  Posted: Apr 28, 2015 4:31 PM   in response to: Keith Marbach in response to: Keith Marbach
Hi,

I'll try to help you but, my memory and my english are not pretty good.

On 27/04/2015 22:37, Keith Marbach wrote:

Delphi XE6, DS Server, TCP Transport (using compression and simple encryption).

Three questions here:

1) How does the DSServer know that a client is a new client? If it is based solely on IP address I think I might have a problem. My company has an office in another city. In that office we have many tablets on wifi. In the OnConnect event I see that all those tablets report the same IP address, the public IP address of that office. Will this cause a problem potentially with multiple clients using the same session? My design is that each new session (via onConnect) gets its own FireDac connection to our SQ
L DB, and that connection is used for the life of the session, then freed by a timer that looks for no activity on the connection for 2 minutes or more.
Each connection is identified by a combination of server_ip + server_port +
client_ip + client_port. Even if the clients are connecting through a router,
NAS or firewall sharing the same IP, the client ports are different.

More information:
http://en.wikipedia.org/wiki/Network_socket

2) The error that I'm seeing a couple of times a day is this, reported by the DSServer.OnError with code, DSErrorEventObject.Error.Message: "Expected: '[' found: '"' at position: 10 {"method":"command_close","params":[1]". What is the source of that error, and how do I fix it.
3) Once I get the error in 2 I then start getting access violations, namely, "Access violation at address 004E02E6 in module 'JCMServer.exe'. Read of address 00000008." How do I track down the cause of that error?
A multithread application requires that you protects sensible areas with
critical sections. Simultaneous access to variables, handles and other resources
can lead to random access violations all over the place.

I'm a Windows programmer and this transition to android/datasnap has been difficult. I have apps that are performing some critical processes for us, and things work pretty well, but my lack of understanding of the datasnap server sessions, TCP, etc. is hurting me, and I have not found a single resource where I can just sit and read and figure this stuff out. So that is a 4th question, how can I start from scratch and learn what I need to know to support 100 users submitting data using android or ios apps,
writing all that data to our SQL Server?
Datasnap is not that hard, multithread is a beast.

Thanks.

Keith Marbach
Legend
Helpful Answer (5 pts)
Correct Answer (10 pts)

Server Response from: ETNAJIVE02