Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Dual Mode Synchronized Application

5 posts in Networking Last posting was on 2011-08-04 07:25:30.0Z
Steve Cobo Posted on 2011-08-03 14:30:35.0Z
From: "Steve Cobo" <steve.cobo@somedomain.com>
Newsgroups: Advantage.Networking
Subject: Dual Mode Synchronized Application
Date: Wed, 3 Aug 2011 10:30:35 -0400
Lines: 2
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513
NNTP-Posting-Host: 132.216.228.19
Message-ID: <4e395b63$1@solutions.advantagedatabase.com>
X-Trace: 3 Aug 2011 07:29:55 -0700, 132.216.228.19
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Networking:956
Article PK: 1132367

Hi Guys!

I am trying to develop a "dual mode synchronized application." By this, I
mean an application that will connect to ADS when it is available (LAN or
Internet) and connect to a "synchronized" local copy of the DB using ALS
when ADS is not visible (ie not connected to either the LAN or Internet).
Think of this application as some sort of a sales utility for people in and
out of the office and visiting clients with their notebook computers.

Some preliminary questions:
1. How should I approach this using Delphi/Advantage (I am starting from
scratch)?
2. Are there any DB synchronization mechanisms available through Advantage
(or third party)?

Steve


Mark Wilkins Posted on 2011-08-03 17:56:10.0Z
From: "Mark Wilkins" <a@b.c>
Newsgroups: Advantage.Networking
References: <4e395b63$1@solutions.advantagedatabase.com>
In-Reply-To: <4e395b63$1@solutions.advantagedatabase.com>
Subject: Re: Dual Mode Synchronized Application
Date: Wed, 3 Aug 2011 11:56:10 -0600
Lines: 1
Organization: Sybase
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
NNTP-Posting-Host: 10.6.199.122
Message-ID: <4e398b8d$1@solutions.advantagedatabase.com>
X-Trace: 3 Aug 2011 10:55:25 -0700, 10.6.199.122
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Networking:957
Article PK: 1132366

Hi Steve,

One solution might be to use Advantage replication. This, however, would
require that you run ADS on the laptops rather than ALS (local server does
not support replication). The idea would be to replicate from the main
(central) database to each of the laptop databases. Advantage maintains a
queue of replication updates and sends the updates when the connection can
be made. If the target cannot be reached, then updates are stored in the
queue.

And, likewise, replicate from each laptop back to the central database. And
the same situation applies. The updates would be stored in the queue while
it is offline. And then when it can connect, the updates would be sent to
the main database.

One potential issue in this scenario is how to "nudge" the replication to
start when the connection is available. There is a separate thread in
Advantage that manages that process and periodically attempts to connect and
replicate if there is data in the queue. However, the wait time grows over
time (continued failures). I think that it can end up getting to be 1 hour
between attempts at the high end. You wouldn't want to have to sit and wait
for the next attempt. But this can be resolved with the system procedure
sp_ProcessReplicationQueues.

There is, of course, the possibility of conflicts with replication. If two
users on different laptops change the same record, then there will be a
conflict when they replicate back to the main database. These can be
handled with ON CONFLICT triggers. If, though, the users on the laptops are
dealing with independent portions of the data, you may not have issues with
that.

Mark Wilkins
Advantage R&D

"Steve Cobo" <steve.cobo@somedomain.com> wrote in message
news:4e395b63$1@solutions.advantagedatabase.com...
> Hi Guys!
>
> I am trying to develop a "dual mode synchronized application." By this, I
> mean an application that will connect to ADS when it is available (LAN or
> Internet) and connect to a "synchronized" local copy of the DB using ALS
> when ADS is not visible (ie not connected to either the LAN or Internet).
> Think of this application as some sort of a sales utility for people in
> and out of the office and visiting clients with their notebook computers.
>
> Some preliminary questions:
> 1. How should I approach this using Delphi/Advantage (I am starting from
> scratch)?
> 2. Are there any DB synchronization mechanisms available through Advantage
> (or third party)?
>
> Steve


Steve Cobo Posted on 2011-08-03 21:14:56.0Z
From: "Steve Cobo" <steve.cobo@somedomain.com>
Newsgroups: Advantage.Networking
References: <4e395b63$1@solutions.advantagedatabase.com> <4e398b8d$1@solutions.advantagedatabase.com>
In-Reply-To: <4e398b8d$1@solutions.advantagedatabase.com>
Subject: Re: Dual Mode Synchronized Application
Date: Wed, 3 Aug 2011 17:14:56 -0400
Lines: 6
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 15.4.3538.513
X-MimeOLE: Produced By Microsoft MimeOLE V15.4.3538.513
NNTP-Posting-Host: 132.216.228.206
Message-ID: <4e39ba2e$1@solutions.advantagedatabase.com>
X-Trace: 3 Aug 2011 14:14:22 -0700, 132.216.228.206
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Networking:958
Article PK: 1132368

Hi Mark,

Isn't running ADS on the laptops an expensive solution? I mean, we would
need as many server licenses as we have sales people! Mind you, 1 seater
license, but certainly not cheap.

I guess I should then be looking for some algorithm I could program (I don't
know, some sort of a flag in the tables with a date time stamp) that would
allow me to detect which record was last touched (local or server).

Steve



"Mark Wilkins" wrote in message
news:4e398b8d$1@solutions.advantagedatabase.com...

Hi Steve,

One solution might be to use Advantage replication. This, however, would
require that you run ADS on the laptops rather than ALS (local server does
not support replication). The idea would be to replicate from the main
(central) database to each of the laptop databases. Advantage maintains a
queue of replication updates and sends the updates when the connection can
be made. If the target cannot be reached, then updates are stored in the
queue.

And, likewise, replicate from each laptop back to the central database. And
the same situation applies. The updates would be stored in the queue while
it is offline. And then when it can connect, the updates would be sent to
the main database.

One potential issue in this scenario is how to "nudge" the replication to
start when the connection is available. There is a separate thread in
Advantage that manages that process and periodically attempts to connect and
replicate if there is data in the queue. However, the wait time grows over
time (continued failures). I think that it can end up getting to be 1 hour
between attempts at the high end. You wouldn't want to have to sit and wait
for the next attempt. But this can be resolved with the system procedure
sp_ProcessReplicationQueues.

There is, of course, the possibility of conflicts with replication. If two
users on different laptops change the same record, then there will be a
conflict when they replicate back to the main database. These can be
handled with ON CONFLICT triggers. If, though, the users on the laptops are
dealing with independent portions of the data, you may not have issues with
that.

Mark Wilkins
Advantage R&D

"Steve Cobo" <steve.cobo@somedomain.com> wrote in message
news:4e395b63$1@solutions.advantagedatabase.com...
> Hi Guys!
>
> I am trying to develop a "dual mode synchronized application." By this, I
> mean an application that will connect to ADS when it is available (LAN or
> Internet) and connect to a "synchronized" local copy of the DB using ALS
> when ADS is not visible (ie not connected to either the LAN or Internet).
> Think of this application as some sort of a sales utility for people in
> and out of the office and visiting clients with their notebook computers.
>
> Some preliminary questions:
> 1. How should I approach this using Delphi/Advantage (I am starting from
> scratch)?
> 2. Are there any DB synchronization mechanisms available through Advantage
> (or third party)?
>
> Steve


Mark Wilkins Posted on 2011-08-03 22:11:08.0Z
From: "Mark Wilkins" <a@b.c>
Newsgroups: Advantage.Networking
References: <4e395b63$1@solutions.advantagedatabase.com> <4e398b8d$1@solutions.advantagedatabase.com> <4e39ba2e$1@solutions.advantagedatabase.com>
In-Reply-To: <4e39ba2e$1@solutions.advantagedatabase.com>
Subject: Re: Dual Mode Synchronized Application
Date: Wed, 3 Aug 2011 16:11:08 -0600
Lines: 2
Organization: Sybase
MIME-Version: 1.0
Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response
Content-Transfer-Encoding: 7bit
X-Priority: 3
X-MSMail-Priority: Normal
Importance: Normal
X-Newsreader: Microsoft Windows Live Mail 14.0.8089.726
X-MimeOLE: Produced By Microsoft MimeOLE V14.0.8089.726
NNTP-Posting-Host: 10.6.199.122
Message-ID: <4e39c74e$1@solutions.advantagedatabase.com>
X-Trace: 3 Aug 2011 15:10:22 -0700, 10.6.199.122
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Networking:959
Article PK: 1132370

Hi Steve,

I can't answer the question of expensive (partially because I don't actually
know how much it costs ... I probably should pay more attention to that side
of it, but I prefer the development end). If you have to write your own
solution, then you have to weigh your development costs of that against what
the licenses would cost. So you have to be the one to determine if it is
expensive.

If you are going to roll your own solution, then a ModTime field could be
useful as you suggest. That field is a timestamp field that is updated with
the current time any time the record is updated. You might be able to use
that as part of your solution. Keep some kind of "time of last sync" stored
for each laptop database. Then when it is connected to the main database,
use that to find all records in the tables of interest that were modified
since the last sync time. If you have well-defined primary keys for the
tables that need to be kept in sync, then creating the necessary SQL
statements to make the updates shouldn't be too difficult.

Another possibility might be to use triggers that copy each updated record
to some separate table that contains all updates that need to be copied to
the other database.

Even if you don't write your own, it might be a good exercise to design it
and estimate the development cost so that you can better evaluate 3rd party
solutions.

Mark Wilkins
Advantage R&D

"Steve Cobo" <steve.cobo@somedomain.com> wrote in message
news:4e39ba2e$1@solutions.advantagedatabase.com...
> Hi Mark,
>
> Isn't running ADS on the laptops an expensive solution? I mean, we would
> need as many server licenses as we have sales people! Mind you, 1 seater
> license, but certainly not cheap.
>
> I guess I should then be looking for some algorithm I could program (I
> don't know, some sort of a flag in the tables with a date time stamp) that
> would allow me to detect which record was last touched (local or server).
>
> Steve
>
>
>
> "Mark Wilkins" wrote in message
> news:4e398b8d$1@solutions.advantagedatabase.com...
>
> Hi Steve,
>
> One solution might be to use Advantage replication. This, however, would
> require that you run ADS on the laptops rather than ALS (local server does
> not support replication). The idea would be to replicate from the main
> (central) database to each of the laptop databases. Advantage maintains a
> queue of replication updates and sends the updates when the connection can
> be made. If the target cannot be reached, then updates are stored in the
> queue.
>
> And, likewise, replicate from each laptop back to the central database.
> And
> the same situation applies. The updates would be stored in the queue
> while
> it is offline. And then when it can connect, the updates would be sent to
> the main database.
>
> One potential issue in this scenario is how to "nudge" the replication to
> start when the connection is available. There is a separate thread in
> Advantage that manages that process and periodically attempts to connect
> and
> replicate if there is data in the queue. However, the wait time grows
> over
> time (continued failures). I think that it can end up getting to be 1
> hour
> between attempts at the high end. You wouldn't want to have to sit and
> wait
> for the next attempt. But this can be resolved with the system procedure
> sp_ProcessReplicationQueues.
>
> There is, of course, the possibility of conflicts with replication. If
> two
> users on different laptops change the same record, then there will be a
> conflict when they replicate back to the main database. These can be
> handled with ON CONFLICT triggers. If, though, the users on the laptops
> are
> dealing with independent portions of the data, you may not have issues
> with
> that.
>
> Mark Wilkins
> Advantage R&D
>
>
> "Steve Cobo" <steve.cobo@somedomain.com> wrote in message
> news:4e395b63$1@solutions.advantagedatabase.com...
>> Hi Guys!
>>
>> I am trying to develop a "dual mode synchronized application." By this, I
>> mean an application that will connect to ADS when it is available (LAN or
>> Internet) and connect to a "synchronized" local copy of the DB using ALS
>> when ADS is not visible (ie not connected to either the LAN or Internet).
>> Think of this application as some sort of a sales utility for people in
>> and out of the office and visiting clients with their notebook computers.
>>
>> Some preliminary questions:
>> 1. How should I approach this using Delphi/Advantage (I am starting from
>> scratch)?
>> 2. Are there any DB synchronization mechanisms available through
>> Advantage (or third party)?
>>
>> Steve
>


sean Posted on 2011-08-04 07:25:30.0Z
Date: Thu, 04 Aug 2011 09:25:30 +0200
From: sean <sean@spydercomp.com>
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:5.0) Gecko/20110624 Thunderbird/5.0
MIME-Version: 1.0
Newsgroups: Advantage.Networking
Subject: Re: Dual Mode Synchronized Application
References: <4e395b63$1@solutions.advantagedatabase.com> <4e398b8d$1@solutions.advantagedatabase.com> <4e39ba2e$1@solutions.advantagedatabase.com> <4e39c74e$1@solutions.advantagedatabase.com>
In-Reply-To: <4e39c74e$1@solutions.advantagedatabase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 41.243.115.188
Message-ID: <4e3a4936@solutions.advantagedatabase.com>
X-Trace: 4 Aug 2011 00:24:38 -0700, 41.243.115.188
Lines: 134
Path: solutions.advantagedatabase.com
Xref: solutions.advantagedatabase.com Advantage.Networking:960
Article PK: 1132369

Honestly, if its for sales people on the road .....
(who will mostly be looking at your selling rates etc , making a few
appointments in the company diary and posting limited feedback .. ie
mostly reading ...)

then use Intraweb and get a once off internet license.
Its +/- 800 USD for unlimited internet connections (ie users) for your
company employees,
then they will be able to access your system through their browsers
without directly having to connect to your ADS.

Intraweb can deploy on either a web server , or normal machine/file
server as a standlone app/service

On 04/08/11 00:11, Mark Wilkins wrote:
> Hi Steve,
>
> I can't answer the question of expensive (partially because I don't
> actually know how much it costs ... I probably should pay more attention
> to that side of it, but I prefer the development end). If you have to
> write your own solution, then you have to weigh your development costs
> of that against what the licenses would cost. So you have to be the one
> to determine if it is expensive.
>
> If you are going to roll your own solution, then a ModTime field could
> be useful as you suggest. That field is a timestamp field that is
> updated with the current time any time the record is updated. You might
> be able to use that as part of your solution. Keep some kind of "time of
> last sync" stored for each laptop database. Then when it is connected to
> the main database, use that to find all records in the tables of
> interest that were modified since the last sync time. If you have
> well-defined primary keys for the tables that need to be kept in sync,
> then creating the necessary SQL statements to make the updates shouldn't
> be too difficult.
>
> Another possibility might be to use triggers that copy each updated
> record to some separate table that contains all updates that need to be
> copied to the other database.
>
> Even if you don't write your own, it might be a good exercise to design
> it and estimate the development cost so that you can better evaluate 3rd
> party solutions.
>
> Mark Wilkins
> Advantage R&D
>
> "Steve Cobo" <steve.cobo@somedomain.com> wrote in message
> news:4e39ba2e$1@solutions.advantagedatabase.com...
>> Hi Mark,
>>
>> Isn't running ADS on the laptops an expensive solution? I mean, we
>> would need as many server licenses as we have sales people! Mind you,
>> 1 seater license, but certainly not cheap.
>>
>> I guess I should then be looking for some algorithm I could program (I
>> don't know, some sort of a flag in the tables with a date time stamp)
>> that would allow me to detect which record was last touched (local or
>> server).
>>
>> Steve
>>
>>
>>
>> "Mark Wilkins" wrote in message
>> news:4e398b8d$1@solutions.advantagedatabase.com...
>>
>> Hi Steve,
>>
>> One solution might be to use Advantage replication. This, however, would
>> require that you run ADS on the laptops rather than ALS (local server
>> does
>> not support replication). The idea would be to replicate from the main
>> (central) database to each of the laptop databases. Advantage maintains a
>> queue of replication updates and sends the updates when the connection
>> can
>> be made. If the target cannot be reached, then updates are stored in the
>> queue.
>>
>> And, likewise, replicate from each laptop back to the central
>> database. And
>> the same situation applies. The updates would be stored in the queue
>> while
>> it is offline. And then when it can connect, the updates would be sent to
>> the main database.
>>
>> One potential issue in this scenario is how to "nudge" the replication to
>> start when the connection is available. There is a separate thread in
>> Advantage that manages that process and periodically attempts to
>> connect and
>> replicate if there is data in the queue. However, the wait time grows
>> over
>> time (continued failures). I think that it can end up getting to be 1
>> hour
>> between attempts at the high end. You wouldn't want to have to sit and
>> wait
>> for the next attempt. But this can be resolved with the system procedure
>> sp_ProcessReplicationQueues.
>>
>> There is, of course, the possibility of conflicts with replication. If
>> two
>> users on different laptops change the same record, then there will be a
>> conflict when they replicate back to the main database. These can be
>> handled with ON CONFLICT triggers. If, though, the users on the
>> laptops are
>> dealing with independent portions of the data, you may not have issues
>> with
>> that.
>>
>> Mark Wilkins
>> Advantage R&D
>>
>>
>> "Steve Cobo" <steve.cobo@somedomain.com> wrote in message
>> news:4e395b63$1@solutions.advantagedatabase.com...
>>> Hi Guys!
>>>
>>> I am trying to develop a "dual mode synchronized application." By
>>> this, I mean an application that will connect to ADS when it is
>>> available (LAN or Internet) and connect to a "synchronized" local
>>> copy of the DB using ALS when ADS is not visible (ie not connected to
>>> either the LAN or Internet). Think of this application as some sort
>>> of a sales utility for people in and out of the office and visiting
>>> clients with their notebook computers.
>>>
>>> Some preliminary questions:
>>> 1. How should I approach this using Delphi/Advantage (I am starting
>>> from scratch)?
>>> 2. Are there any DB synchronization mechanisms available through
>>> Advantage (or third party)?
>>>
>>> Steve
>>