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 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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
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...
|
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...
|
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....
|
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...
|
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
| |
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
|
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.
|
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...
|
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()
{
|
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...
|
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,...
| |
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...
|
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,...
|
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...
|
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...
|
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...
|
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...
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |