473,765 Members | 2,172 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Execution queue

I'm trying to figure out the webservices architecture for library that
we currently use as a monolithic component.

Every execution is expressed by a call like this one

public static IList executeIt(someA rguments)...

To be completed teh executeIt method can take up to 15 seconds, so I
need to use asynchronous calls.

I read how .NET 2.0 manages async webservices very well, throught the
class System.Componen tModel.AsyncCom pletedEventArgs (as explained here
http://66.249.93.104/search?q=cache:...l=en&client=ig
-sorry for the use of google cache but weblogs.asp.net seems to be
down right now)

Now I'm trying to find out how the service should be created in order
to have just one flow of execution at a time. I mean if the service
receives two calls, there must be some kind of check to assure the
execution of the second call begins after the first one's ended.

How can I do that? Could you tell me some good links?
Thanks a lot
Lorenzo

Nov 23 '05 #1
1 1375
Lorenzo,

Why would you want to allow only one instance of execution for your web
service? Also, I would suggest reevaluating how you are designing your web
services. RPC-like calls are not really the desired way of doing business
for web services. They are really more about document exchange and business
processes, IMHO. Services exchange documents (in XML) which are processed
and affect some change in states (perhaps) in a database, or produce some
outcome. That is my view on them. I am not an expert though.

That being said, maybe you have no control over the web service design, so
that may not help you. With respect to your original question, I would offer
that you could create one main web service which is the entry point to your
system. This service would queue requests into a message queue (perhaps
MSMQ). Another service would then, one at a time, service the queued
requests. This second service could be written as a Windows Service to run
24/7 in the background. It would read from the queue, process, then repeat.

Hope that helps.

--
Mike
Nov 23 '05 #2

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

Similar topics

3
6944
by: Colin McKinnon | last post by:
Hi All, I'm trying to work out how to close the connection to the browser at a defined point within my code, but go on to do some time-consuming processing with PHP. Although it *should* be possible to do this by moving the slow stuff into a function registered with register_shutdown_function, it appears that in many cases, the connection is not closed before calling the shutdown function - there are also issues with calling other...
2
4720
by: Mark | last post by:
Hello all, I know why the following doesn't work ... I can't figure out how to make it work like I want it to. Basically, I only want the loop computing fibonacci numbers to run for approx 5 seconds. The timer fires, the exception is raised, but it is not caught ... because the execution stack for the function that raises isn't in the same thread as the try: except:. How do you fix this? Is it better to do this without exceptions as...
9
1279
by: Axel Mittendorf | last post by:
Hi, I have an app that writes text messages into a pipe and reads it out. Other programs write into this pipe too. Sometimes the pipe is full and my app freezes if it wants to write in that moment. It is not an option for me to open the pipe with O_NONBLOCK, so I thought I could use threads. Always when something shall be written into the pipe a new thread is created. These threads may hang on os.write, but they'll write out the data ASAP....
5
6306
by: Boris Nikolaevich | last post by:
This is backwards of what I usually want--normally if you have a long-running ASP script, it's a good idea to check to see whether the client is still connected so you can cancel execution. However, I have a script that absolutely MUST finish one it's been started--is there a way to cause the entire script to execute, even if the client disconnects in the middle of the process? It doesn't matter if the script returns anything to the...
6
3623
by: John | last post by:
Hi I have this code as below that first runs a report and then an update query to set a flag so these records are not included in the report next time. Private Sub Command2_Click() DoCmd.OpenReport "MyReport", acViewPreview DoCmd.OpenQuery "MyQuery" End Sub
3
4449
by: Robert Sorger | last post by:
I have a problem with thread execution after calling response.redirect() in a web form. Basically, I want the thread to continue to work (e.g. do some long database work) but want to redirect immediately to another page, so that the user does not have to wait. I tried the wollowing exemple with two webforms webform1.aspx and webform2.aspx : WebForm1.aspx just has one button which, when clicked, executes the following method
5
1700
by: SharpCoderMP | last post by:
is it possible to implement some safe way of performing two or more instructions in a kind of "atomic" way? consider this: we have two queues (implemented on top of an List<T>). now we need to move an element from one queue to another, so we need to do something like this: queue2.Enqueue(queue1.Dequeue()); int this case we may assume that nothing can cause this to fail resulting in loss of the object we want to move.
12
3544
by: Tomaz Koritnik | last post by:
Is it possible to asynchronously call a method from worker thread so that this method would execute in main-thread? I'm doing some work in worker thread and would like to report progress to main thread to update some controls. But I'd like to do that asynchronously so that worker thread would not block until main thread finished updating and refreshing controls which take some time. Using invoke is out since it blocks worker thread until...
4
4598
by: j_depp_99 | last post by:
Thanks to those guys who helped me out yesterday. I have one more problem; my print function for the queue program doesnt work and goes into an endless loop. Also I am unable to calculate the length of my queue. I started getting compilation errors when I included a length function. <code> template<class ItemType> void Queue<ItemType>::MakeEmpty() {
0
9568
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
9398
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9951
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
9832
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8831
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...
1
7375
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5275
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...
2
3531
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.