Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 6 of 6 total
Thread Advice on "not all time connected" connection
Mon, May 24 2010 12:29 PMPermanent Link

Tiago Ameller

Menorca Zeros i Uns SL

Avatar

Our last EDB project is a boat trip ticket sales. Server and ticket sales are on land with a 100 Mbit connection.
On every boat there is a wi-fi pointing to ticket sales antenna. While boats are moored in port, they have a good connection. During this time they also sell tickets and perform the tasks of checking passenger tickets.
At the time the boat starts to move, after a few minutes the connection is lost. When they return from the trip (one hour), the connection is reset and return to perform the tasks of selling and shipping again.
This system works reasonably well, EDB works fine in such little/medium projects.

Questions are:
What would be the best configuration of the connection to the server?
How do we find that we are losing the signal quality and therefore we should warn the user that is to be disconnected?
How do we detect that we again have a connection?

Note. 3G solution is not possible due to lack of coverage.
Mon, May 24 2010 2:03 PMPermanent Link

Roy Lambert

NLH Associates

Team Elevate Team Elevate

Tiago


Interesting questions but as far as I can see all hardware dependent. There may be someone here who has the right knowledge (not me though) but I'd also post on the CodeGear ngs for advice in accessing the Windows wireless network manager. It can, somehow, tell you what the signal strength is.

Roy Lambert [Team Elevate]
Tue, May 25 2010 3:22 AMPermanent Link

Tiago Ameller

Menorca Zeros i Uns SL

Avatar

Roy,

<<Interesting questions but as far as I can see all hardware dependent. There may be someone here who has the right knowledge (not me though) but I'd also post on the CodeGear ngs for advice in accessing the Windows wireless network manager. It can, somehow, tell you what the signal strength is.>>

My questions were about EDB configuration. TEDBEngine has some properties (ServerSessionTimeout, ServerDeadSessionInterval, ServerDeadSessionExpiration, ServerMaxDeadSessions and so on) related to such erratic connections. An advice of how configure them cal help us a lot.

We started getting server current time to detect we still have a live connection, but now using a "ping" to test connection quality.
Tue, May 25 2010 11:04 AMPermanent Link

Raul

Team Elevate Team Elevate


Have you looked at the tech article Tim wrote about connection, reconnections, etc :
http://www.elevatesoft.com/articles?action=view&category=edb&article=connections_disconnections_reconnections

Do you ships change any of the data while away (disconnected) ? If not then it's fairly simple to detect loss of connection and after certain number of retries (to avoid a false disconnect while at port due to other factors) simply let user know and then move into some kind of a "sleep,check connection" cycle until connected again (first sleep could be fairly long if you already know you'll be offline for an hour).

If there is a possibility of data change then you'd need to work with both local and remote data and sync it up. Using the EDB stores and built-in replication might be of use. Another artickle by Tim explains that as well : http://www.elevatesoft.com/articles?action=view&category=edb&article=building_sales_quote_replication_system_elevatedb

Raul
Tue, May 25 2010 5:07 PMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Tiago,

<< What would be the best configuration of the connection to the server? >>

As Raul suggested, this technical article is a good place to start:

http://www.elevatesoft.com/articles?action=view&category=edb&article=connections_disconnections_reconnections

Also, see this post from me on how to handle disconnected sessions:

http://www.elevatesoft.com/forums?action=view&category=edb&id=edb_general&page=1&msg=11749#11749

<< How do we find that we are losing the signal quality and therefore we
should warn the user that is to be disconnected? >>

Attach an exception handler to the TEDBSession.OnRemoteReconnect event.  If
that event fires, it means that the connection has failed for some reason
and EDB is trying to reconnect automatically.

<< How do we detect that we again have a connection? >>

Same situation.  If you execute any call to the server (open table, get the
date/time, etc.), then the OnRemoteReconnect event will *not* get fired if
the connection is still present.

The pinging occurs in a background thread, and will flag the connection as
disconnected for the next call to the EDB Server if it cannot ping the
server for any reason.  This means that the next call will automatically
fire the OnRemoteReconnect *before* attempting to send the actual request to
the EDB Server.  So you should have a connection status granularity of 60
seconds (by default - the TEDBSession.RemotePingInterval property value), or
30 seconds at a minimum (the lowest value permitted for the
RemotePingInterval property).

--
Tim Young
Elevate Software
www.elevatesoft.com
Wed, May 26 2010 2:50 AMPermanent Link

Tiago Ameller

Menorca Zeros i Uns SL

Avatar

Tim and Raul,

Thanks a lot for your detailed info. Currently system works almost right. With these advices, will work fine! Wink



Image