asynchronous

What ways exist to distribute asynchronous batch tasks?

I am currently investigating what Java compatible solutions exist to address my requirements as follows: Timer based / Schedulable tasks to batch process Distributed, and by that providing the ability to scale horizontally Resilience, no SPFs please The nature of these tasks (heavy XML generation, and the delivery to web based recei...

NSURLConnection NSURLRequest proxy for asynchronous web service calls

I have multiple views which make the same NSURLRequest/NSURLConnection request. Ideally, in order to get some code reuse, I'd like to have some sort of a "proxy" which does all the underlying work of creating/executing the (asynchronous) request/connection, setting up all the delegate methods, etc., so I don't have to copy all those NSUR...

Async urlfetch on App Engine

My app needs to do many datastore operations on each request. I'd like to run them in parallel to get better response times. For datastore updates I'm doing batch puts so they all happen asynchronously which saves many milliseconds. App Engine allows up to 500 entities to be updated in parallel. But I haven't found a built-in functio...

Understanding Asynchronous HttpWebRequest

I'm trying to figure out how this works exactly. HttpWebRequest has a method BeginGetResponse which accepts as a parameter a ResponseCallback. Firstly, is this callback called immediately (in a new thread) or once it receives a response back from the server? Or is it the job of EndGetResponse to wait for the response? Secondly, once yo...

Get data from dynamic HTTPService Asynchronous to populate an Advanced Data Grid Flex

I have to populate an Advanced Data Grid which have the following fields: Continent->State->Society-->Actual Value-->Estimate Value I want to simulate a financial market so i have to change some of the values by asynchronous request from an HTTPService; have you got any idea to do so? Thank you. If necessary i'll post the .as file, but i...

Reactive Extensions (Rx) and asynchronous class

I've read in this post: "The joy of Rx: The event-based asynchronous pattern vs IObservable" that the use of EBAP is discourage. What is the best way to design an asynchronous component with the new Rx extensions (something like the PrimeNumberCalculator example of msdn)? Thank you in advance. Update I managed to write my own prime nu...

Populate dropdownlist asynchronously...

I have a page that will populate two dropdownlist by loading items from SQL Server during Page_Load event, so, when opening the page it may take some time to load. Currently, the dropdownlist will load asynchronously but it still will slow down the page loading. How can i load those dropdownlist after the page is completely loaded? Prot...

Asynchronous request using wininet

I have already used wininet to send some synchronous HTTP requests. Now, I want to go one step further and want to request some content asynchronously. The goal is to get something "reverse proxy"-like. I send an HTTP request which gets answered delayed - as soon as someone wants to contact me. My thread should continue as if there was...

Need help on asynchrous non-blocking file loading with boost::asio and boost::iostreams ( or something different? )

I'm coding in c++, and I'm trying to load an image file asynchronously. After some research, I found some mentions about using boost::asio and boost::iostreams to do it. However, the documentation and example for boost::asio is mostly socket related, so it doesn't help me much. Here is what I need: Load a file asynchronously and upon ...

How does the BackgroundWorker class fire its events on the UI thread?

I'm in the process of writing a asynchronous-operation manager somewhat similar to the BackgroundWorker class. I know that the BackgroundWorker does some internal voodoo (using the AsyncOperation class, from what I've read) to fire its events on the thread that created the BackgroundWorker, which is typically a UI thread. My question is...

APC execution context question?

When an Asynchronous Procedure Call (APC) occurs it is executed 'Asynchronously' to the current context of the thread. Per this MSDN info: APC Now my question is, what exactly does it mean 'execute asynchronously to the context of the current thread'? Is it that executes besides what the thread is already executing, or is the thread i...

VB.NET - ThreadPool and delegate in c# to VB.NET

Hey, how this is written in VB.NET? This was an example I found on http://www.codeproject.com/KB/silverlight/SynchronousSilverlight.aspx. ThreadPool.QueueUserWorkItem(delegate { var channelFactory = new ChannelFactory<ISimpleService>("*"); var simpleService = channelFactory.CreateChannel(); var asyncResult = simpleService.BeginGetGre...

How can I load an ASP.NET GridView from multiple sources asynchronously?

Here is the situation. I need to hit ~50 servers and grab some data from a file. I then want to display a few rows for each in an ASP.NET GridView control. I tried doing this with Threads/ThreadPool and successfully gather all the data in session. What I'd like to do, and what I am having a hard time figuring out, is update the grid fo...

C# asynchronous socket BeginSend

i would like some info on the following: Socket.BeginSend Method (array<Byte>[]()[], Int32, Int32, SocketFlags, AsyncCallback, Object) client.BeginSend(message, 0, message.Length, SocketFlags.None, new AsyncCallback(SendData), client); if the message.lenght is greater than the buffersize (32) do i have to invoke BeginSend multiple ti...

Can get Console input from an asynch method using a delegate?

Hi all, EDIT: Issue worked around. This Console code was testing for ultimate use in a WPF app. I've moved the code to a WPF test app and it works, slightly modified of course. So I'll leave this Console issue, as at the end of the day it's not actually important! I'm basically trying to call "Console.ReadLine()" from an asynch metho...

Should I always call TcpClient.EndConnect (even when connection fails?)

C# has several useful classes for networking tasks such as TcpClient and WebClient. Both have BeginX methods (BeginConnect and BeginGetResponse respectively) that according to MSDN should always be followed by EndX. Both accepts a delegate that is called once the operation is complete. However, say we fail to establish a connection, and...

Dynamic datagrid Httpservice

I receive from the httpservice with a certain frequency a string like this: 1#3#234525234 where row#column#value I want to display into datagrid the above string at real time; at the moment my code displays the whole string, composed by many strings like the one above. How can i solve the problem? Thanks in advance I have the following ...

Launch a process and get its return code or interrupt it if it lasts too long

Hello, I have a PHP script launched from a command-line (aka CLI mode, no webserver involved). In this script I launch a command that will run from some time, usually exiting after a couple minutes. But at times, this command will run for hours because of various issues, and the best I can do is kill it and wait for a while before laun...

Asynchronous Sockets - Handling false socket.AcceptAsync values

The Socket class has a method .AcceptAsync which either returns true or false. I'd thought the false return value was an error condition, but in the samples Microsoft provide for Async sockets they call the callback function synchronously after checking for failure, as shown here: public void StartAccept(SocketAsyncEventArgs acceptEven...

How does one do async ajax calls using cherrypy?

I'm using cherrypy's standalone server (cherrypy.quickstart()) and sqlite3 for a database. I was wondering how one would do ajax/jquery asynchronous calls to the database while using cherrypy? ...