473,803 Members | 3,616 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Async design question - Request IDs

When designing an asynchronous service-based system, generally speaking
whose responsibility is it to determine when a duplicate request is sent -
the system hosting the service or the feeding systems. Are there any best
practices when it comes to determining duplicate requests in an asynchronous
system.

For example, lets say you have an OLTP system that tracks inventory with
several other applications feeding into the OLTP system. The feeding
applications send messages defined by the OLTP via MSMQ. NOTE: I know that
Txn MSMQ will guarantee delivery once, I am not addressing dups in this
sense. I am speaking more generally about determining dups whether or not
MSMQ is used. Technically speaking, this service could be a web service in
which I wouldn't get the delivered once guarantee.

Here is the dilemma:
#1
Should the feeding system - lets an application that allows for inventory
adjustments - be responsible for tracking its own "pending" adjustments
(ones that have not actually been processed by the OLTP). In other words,
the OLTP allows for a generic "FeedingSystemI D-External ID" that it will
check on each request. If the incoming request has the same ID as a
previous one it will be considered a DUP by the OLTP. In this scenario the
"dishing" out of request ID is delegated to the feeding systems, leaving the
OLTP "dumb" in this manner.

#2
The other scenario is that the OLTP has a certain set of unique conditions
it checks before considering a request to be a DUP. In other words, the
OLTP checks the RequestDate, SKU and some other criteria for each request to
determine if the request is a DUP. This scenario puts full responsibility
on the service (in this case OLTP).

#2 seems like the better approach but I was curious if there are any best
practices when it comes to determining duplicate requests when designing an
async system.

Thanks,
Kevin
Nov 16 '05 #1
1 1391
#2 sounds best to me Kevin....

The reciever of the message(pay load) can check the for
authenticity\du plicate\invalid data etc, you wouldn't want the sender to
check for any of these (may be the sender might want to do some simple
checking) but to check for anything important then I would let reciever do
this and return a structured response to acceptance of the message (pay
load).
HTH

Ollie
"Kevin C" <kc@noneya.co m> wrote in message
news:eR******** ******@TK2MSFTN GP10.phx.gbl...
When designing an asynchronous service-based system, generally speaking
whose responsibility is it to determine when a duplicate request is sent -
the system hosting the service or the feeding systems. Are there any best
practices when it comes to determining duplicate requests in an asynchronous system.

For example, lets say you have an OLTP system that tracks inventory with
several other applications feeding into the OLTP system. The feeding
applications send messages defined by the OLTP via MSMQ. NOTE: I know that Txn MSMQ will guarantee delivery once, I am not addressing dups in this
sense. I am speaking more generally about determining dups whether or not
MSMQ is used. Technically speaking, this service could be a web service in which I wouldn't get the delivered once guarantee.

Here is the dilemma:
#1
Should the feeding system - lets an application that allows for inventory
adjustments - be responsible for tracking its own "pending" adjustments
(ones that have not actually been processed by the OLTP). In other words,
the OLTP allows for a generic "FeedingSystemI D-External ID" that it will
check on each request. If the incoming request has the same ID as a
previous one it will be considered a DUP by the OLTP. In this scenario the "dishing" out of request ID is delegated to the feeding systems, leaving the OLTP "dumb" in this manner.

#2
The other scenario is that the OLTP has a certain set of unique conditions
it checks before considering a request to be a DUP. In other words, the
OLTP checks the RequestDate, SKU and some other criteria for each request to determine if the request is a DUP. This scenario puts full responsibility
on the service (in this case OLTP).

#2 seems like the better approach but I was curious if there are any best
practices when it comes to determining duplicate requests when designing an async system.

Thanks,
Kevin

Nov 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
2967
by: Shawn Meyer | last post by:
Hello - I am trying to write a class that has an async BeginX and EndX, plus the regular X syncronous method. Delegates seemed like the way to go, however, I still am having problems getting exactly what I want. Here are my goals 1. I would like the IAsyncResult that is returned by the Begin function to be able to be waited on or polled to check for completion. 2. The Begin function would take a callback, and the async process would
6
1857
by: gabriel.landais | last post by:
Hi, I'm currently building a parser class in JS and I have a question about variables. I retrieve XML data and then process it. After that, I process a result array (mydataarray). It looks like this : function MyClass() { var mydataarray = ;
4
2484
by: Bob Badger | last post by:
Hi, Simple question (although I guess with a complicated answer). Is HTTP an async protocol? For instance, if I send a message to a c# webservice via http what is the protocol actually doing? Thanks in advance Steffan
6
3827
by: Shak | last post by:
Hi all, Three questions really: 1) The async call to the networkstream's endread() (or even endxxx() in general) blocks. Async calls are made on the threadpool - aren't we advised not to cause these to block? 2) You can connect together a binaryreader to a networkstream:
3
2041
by: Angus | last post by:
Hello I have written my own C++ class to handle winsock. It uses an asynchronous programming model so basically you ask for something and then when network has info it gets sent to my class and I can deal with it. Basically, a user class derives from this networking class and overrides functions such as OnCompleteMessage. Sometimes, however, it is more convenient for the user class if it can call a function which then provides the...
7
5081
by: =?Utf-8?B?Q2FybG8gRm9saW5p?= | last post by:
Hi, I implemented asynchronous calls to a web resource (using HttpWebRequest) from asp.net 2.0. The request it's made asyncronously (I see that beginGetResponse returns immediately). The number of worker thread and completionPortThreads are over 300. Making 200 calls I see that 100 are queued. There's a counter telling how much async calls are handled? How can I raise the number of request handled?
10
4516
by: Frankie | last post by:
It appears that System.Random would provide an acceptable means through which to generate a unique value used to identify multiple/concurrent asynchronous tasks. The usage of the value under consideration here is that it is supplied to the AsyncOperationManager.CreateOperation(userSuppliedState) method... with userSuppliedState being, more or less, a taskId. In this case, the userSuppliedState {really taskId} is of the object type,...
3
2545
by: Giulio Petrucci | last post by:
Hi there, I'm quite a newbie in Web Service programming/using and I'm sorry if my question could sound quite "stupid". ;-) I'm working on an application which should request a service to a WebService, calling its method "FooMethod(...args...)". I've imported the web reference within my VisualStudio project and tryed to invoke the method. I noticed that the intellisense expose also: - an "AsyncFooMethod(...args...(+1 overloads))";
1
2855
by: APA | last post by:
I've seen the MS sample async web request pattern and I ask is it really async if it is using a ManualResetEvent and setting WaitOne()? The ManualResetEvent object is being declared as a static variable so isn't it causing problems with other threads that may be using the same class to execute the async web request? If I remove the ManualResetEvent object will it be truly asynchronous and will I be losing something? Also, in my app the web...
0
9703
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10548
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10295
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9125
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5500
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4275
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3798
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2970
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.