Hi, I'd like to accomplish the following:
class SearchController : AsyncController
{
public ActionResult Index(string query)
{
if(!isCached(query))
{
// here I want to asynchronously invoke the Search action
}
else
{
ViewData["results"] = Cache.Get("results");
...
I'm designing a part of a JEE6 application, consisting of EJB3 beans. Part of the requirements are multiple parallel (say a few hundred) long running (over days) database hunts. Individual hunts have different search parameters (start time, end time, query filter). Parameters may get changed over time.
Currently I'm thinking of the foll...
I am a newbie in socket programming. I am developing a server client application.
And I am using Asynchronous tcp ip socket. But now I am facing a problem. In my client side I am receiving my data by a 2kb byte array by beginReceive method. Its working perfectly if data size below or equals to 2 kb, but problem occurring when data size e...
Hi,
Meaning the C10K problem, what is the best way to do asynch I/O on Mac OS X (assume to use on Mac and iPhone/iPad)?
On Linux our choice is epoll, on Windows is I/O Completion Ports.
Top priority is performance and scalability (thousands of connections).
UPDATE
OK. As Darwin is BSD-like system, my common idea is to use kqueue. Is...
Suppose an example. I have following interface:
public interface DataSource<T> {
Future<T> fetch();
}
This datasource can do asynchronous data fetching. And we have following tag for using datasource in JSP:
<html>
<d:fetch from="${orderDS}" var="orders">
<c:foreach in="${orders}" var="order">
<div class="order">
...
I need to make an HTTP request to a resource that looks like "xy:index.html" in Java.
The HTTP implementation does not have to be sophisticated. I just need to be able to do this to avoid same-origin violations when running in development mode for a GWT app by forwarding HTTP requests on the server-side to the "xy" protocol.
Any clue...
I have a function that needs to perfom two operations, one which finishes fast and one which takes a long time to run. I want to be able to delegate the long running operation to a thread and I dont care when the thread finishes, but the threads needs to complete. I implemented this as shown below , but, my secondoperation never gets don...
I have to mount a WebDav location and wait for the operation to be finished before to proceed (it's a script).
So I'm using the library in this way:
location = gio.File("dav://server.bb")
location.mount_enclosing_volume(*args,**kw) # The setup is not much relevant
location.get_path() # Returns None because it's not yet mounted since the...
The app I'm working on has a self contained database. The only time I need HTTP request is when the user first loads the app.
I do this by calling a class that verifies whether or not a local DB exists and, if not, create one with the following request:
HttpRequest data = new HttpRequest("http://www.somedomain.com/xml", "GET", this); d...
I tried this
myProcess = new Process();
myProcess.StartInfo.CreateNoWindow = true;
myProcess.StartInfo.WindowStyle = ProcessWindowStyle.Hidden;
myProcess.StartInfo.FileName = "Hello.exe";
myProcess.StartInfo.Arguments ="-say Hello";
myProcess.StartInfo.UseShellExecute = false;
...
I have a WinForms app. that when a button is clicked retrieves a bunch of data from database formats it and displays it to the end user.
The operation can take 10 - 30 seconds.
I would like to display a message to the user in a Dialog just saying "Be patient the operation is running" while the operation is running and then close when th...
I'm trying to write a dead-simple interface for an IRC library, like so:
import simpleirc
connection = simpleirc.Connect('irc.freenode.net', 6667)
channel = connection.join('foo')
find_command = re.compile(r'google ([a-z]+)').findall
for msg in channel:
for t in find_command(msg):
channel.say("http://google.com/search?q=%s...
The problem is to render huge reports. Basically we have lots of data that get rendered in html reports (mostly using repeater or gridview). As it so happens, the data started out small and now we have tons of it. There are lots of such reports already built so total rewrite is not an option. Heck, the business is not even letting us pag...
---[ejb request]--> bean -----[http request]----> host
I would like to invoke http client method (http put, get...) within a bean, but I want these beans, either MDB or stateless session bean, run as quick as possible (with extreme short life time).
Problem is, the http connection is too slow (especially when connecting to slow host...
I would like EndGetMatches in the code below to get called when a certain event is fired.
BeginGetMatches executes and completes but I don't want EndGetMatches to get called yet.
I want to return the ActionResult only when my other Thread notifies me i'm ready to.
public delegate void MatchEvent(MatchEventArgs args);
public IAsyncResult...
I need to call a method that starts some asynchronous code
MyClass* myClass = [[MyClass alloc] init];
[myClass startAsynchronousCode];
Now I cant simply release it as this would cause an error since the code is still running:
[myClass release]; // causes an error
What is the best way to deal with the memory?
...
Hi there,
I recently started programming in WinForms using C#. I have a requirement where I need to search a set of folders and the sub-folders and display the status information to a textbox as I do the search like -
Looking up folder "C:\Windows"...
Found 8 files...
Copying file 1 of 8 to "D:\Temp"...
I have a method which does all...
Hello
I don't know enough about VB.Net yet to use the richer HttpWebRequest class, so I figured I'd use the simpler WebClient class to download web pages asynchronously (to avoid freezing the UI).
However, how can the asynchronous event handler actually return the web page to the calling routine?
Imports System.Net
Public Class Form1...
I'm working on a client/server application in C#, and I need to get Asynchronous sockets working so I can handle multiple connections at once. Technically it works the way it is now, but I get an OutOfMemoryException after about 3 minutes of running. MSDN says to use a WaitHandler to do WaitOne() after the socket.BeginAccept(), but it do...
Hi guys,
I'm trying to get data from a website- xml. Everything works fine.
But the UIButton remains pressed until the xml data is returned and thus if theres a problem with the internet service, it cant be corrected and the app is virtually unusable.
here are the calls:
{
AppDelegate *appDelegate = (AppDelegate *)[[UIApplicatio...