M
mgdev
I've got a problem where my web service requests are not always processed in
the same order they are received.
Both the web service and the windows application are based on the .net
framework 1.1.
Background:
At the server the database is designed with a parent/child relationship.
The parent is a list of switches (switch A, B, C, ...) and the children are
the transactions for when an [on] or [off] command has been received. To
improve query speed I've included a column called [transUID] in the parent
table to store the [UID] of the newest child record. So when an [on] or
[off] command is received a new record is placed in the child table and an
update is made to the parent table to indicate the [UID] of the new child
record.
The client application is designed to send requests to the web service to
turn a switch [on] or [off]. For the most part this works normally.
However, if the client sends two or more requests quickly (less than a couple
of seconds in between) the server will sometimes process the requests out of
order.
For example: Lets start with the switch being currently set to [off]. The
[transUID] for the switch is pointing to the last record in the child table
that represents a status of [off]. Then the client quickly sends an [on]
request imediately followed by an [off] request (this is a toggle button
programmed to switch between [on] and [off]). Although the database may show
the exact same date and time for the two records, the [transUID] should show
the [UID] of the last transactional record. Unfortunately, this is not
always the case. Sometimes the second request will get processed first.
Then in my history I will see the transactions going from [on] to [on] to
[off]. And the [transUID] is no longer pointing to the correct transaction
and the data is now inaccurate.
Any suggestions?
the same order they are received.
Both the web service and the windows application are based on the .net
framework 1.1.
Background:
At the server the database is designed with a parent/child relationship.
The parent is a list of switches (switch A, B, C, ...) and the children are
the transactions for when an [on] or [off] command has been received. To
improve query speed I've included a column called [transUID] in the parent
table to store the [UID] of the newest child record. So when an [on] or
[off] command is received a new record is placed in the child table and an
update is made to the parent table to indicate the [UID] of the new child
record.
The client application is designed to send requests to the web service to
turn a switch [on] or [off]. For the most part this works normally.
However, if the client sends two or more requests quickly (less than a couple
of seconds in between) the server will sometimes process the requests out of
order.
For example: Lets start with the switch being currently set to [off]. The
[transUID] for the switch is pointing to the last record in the child table
that represents a status of [off]. Then the client quickly sends an [on]
request imediately followed by an [off] request (this is a toggle button
programmed to switch between [on] and [off]). Although the database may show
the exact same date and time for the two records, the [transUID] should show
the [UID] of the last transactional record. Unfortunately, this is not
always the case. Sometimes the second request will get processed first.
Then in my history I will see the transactions going from [on] to [on] to
[off]. And the [transUID] is no longer pointing to the correct transaction
and the data is now inaccurate.
Any suggestions?