The async tag has no wiki summary.
1
vote
1answer
48 views
What are the underlying patterns in systems allowing asynchronous operations?
Say I'm working with a system that allows async, nonblocking operations. If I queue up a set of those operations and specify their result buffer references:
nonblocking_write( message, write_buffer ...
0
votes
2answers
86 views
When are nonblocking read or receive operations useful?
Regardless of library, language, or spec, asynchronous send/write operations make sense to me, because code later in the execution path may not have any dependency upon the success or failure of the ...
1
vote
1answer
46 views
GUI concept for a reactive, asynchronous graphical editor
I think I could describe this problem in an abstract way, but I suppose it will be easier to understand when I describe it in a real world environment.
The Problem
Imagine a graphical editor where ...
2
votes
1answer
135 views
Why do browsers clamp timeouts and intervals?
I've been working on some abstractions of setTimeout and setInterval in order to process large sets of data without blocking the event loop in the browser.
Upon this, I have discovered that browsers ...
1
vote
1answer
70 views
excute Vs excuteOnExecutor [closed]
There are two ways to execute AsynTask, i.e., execute and executeOnExecutor. I already know that execute works serially and executeOnExecutor works in parallel. So my question is:
Which one to use?
...
2
votes
1answer
167 views
Use cases and usage patterns of futures vs callbacks
I've become interested in futures lately, mostly due to their inclusion in standard C++ - but I see there is an active debate over futures vs. callbacks in many programming areas, such as Node.js.
...
0
votes
2answers
78 views
What are the advantages of using async JavaScript modules (like AMD) for traditional sites?
This is specific to JS in the browser for a traditional multi-page site (i.e. not a single-page app).
For single-page apps, the advantages are pretty clear: the main view page is going to be ...
0
votes
1answer
81 views
Is there a standard to imitating an async filestream
Im trying to replace an async filestream method, which is reading data from a Hid Device and feeding it to the UI. Ive considered writing the output into a log and then importing that log again, but ...
3
votes
2answers
166 views
Data Access Layer with Asynchronous services like MQ
I am tasked with creating a development, design and architecture guide for a large multi-year project. I have to dictate best design practices for a number of architectural perspectives. See the ...
1
vote
0answers
127 views
Callback pattern handling exceptions - Best practices in .NET 3.5
I am looking to implement the callback pattern with error handling such that error is caught and pass to the callback code with the response. Since I am using .NET 3.5, I cant use Task (TAP) pattern ...
-1
votes
1answer
215 views
Is class with callbacks a code smell in JavaScript? [closed]
When writing JavaScript (especially in node.js), I tend to use plain functions and callbacks. However, sometimes there's some context to share between some functions and I don't like to pass this ...
2
votes
2answers
241 views
What to Return with Async CRUD methods
While there is a similar question focused on Java, I've been in debates with utilizing Task objects. What's the best way to handle returns on CRUD methods (and similar)?
Common returns we've seen ...
1
vote
0answers
29 views
What happens differently when you add a task Asynchronously on GAE?
Google's doc on async tasks assumes knowledge of the difference between regular and asynchronously added tasks.
add_async(task, transactional=False, rpc=None)
Asynchronously add a Task or a list ...
3
votes
5answers
365 views
Why can't a server continue to act on a request after sending the response?
Say for example I've got a RESTful webservice, and I need to support creating a widget via a POSTed http request. I need to
Deserialize the POSTed widget.
Validate the deserialized widget.
Persist ...
4
votes
1answer
399 views
Designing interfaces and async
Suppose I have created interface IFolderRepository with methods like that:
IEnumerable<Folder> GetAllFolders();
Folder GetFolderWithId(int id);
void AddFolder(Folder newFolder);
void ...
2
votes
2answers
321 views
Converting event-based asynchrony to C#5 async
We currently have an interface for an asynchronous video decoder that runs on its own thread. Basically you feed it some data and it'll eventually call you back on its thread through some events, like ...
4
votes
1answer
313 views
What are the benefits of Android way of “saving memory” - explicitly passing Context objects everywhere?
Turned out, this question is not easy to formulate for me, but let's try.
In Android, pretty much any UI object depends on a Context, and has defined lifetime. Android can also destroy and recreate UI ...
1
vote
0answers
746 views
Best method for async initialization of view model in MVVM pattern (WPF)
I'm working on a business application (C#, WPF, EF, MVVM). I need to load a bunch of items from database, create view models for them and put them in a window. Is there a way to create the view model ...
1
vote
1answer
112 views
How to Avoid a Busy Loop Inside a Function That Returns the Object That's Being Waited For
I have a function which has the same interface as Python's input builtin, but it works in a client-server environment. When it's called, the function, which runs in the server, sends a message to the ...
-1
votes
1answer
832 views
Do we need even more web frameworks in C# now that async await is here
Developing endless frameworks for web application, websites and web services is always great fun. It's one of the richest areas where you have 100 different ways of achieving pretty much the same ...
5
votes
1answer
606 views
Blurring the lines between async and regular functions in C# 5.0
Lately I can't seem to get enough of the amazing async-await pattern of C# 5.0. Where have you been all my life?
I'm absolutely thrilled with the simple syntax, but I'm having one small difficulty. ...
2
votes
1answer
207 views
when is it necessary or when should a controller be async
When is it absolutely necessary for a controller to be async? Should all controllers be async or is it bad practice to make all of them async unless it is necessary.
Just looking for some general ...
1
vote
0answers
164 views
Is Windows Workflow Foundation appropriate for a CPU-heavy async application?
At one of the DevDays conferences a presenter said that Workflow Foundation isn't just for applications that require persistence, but they can make it easier to write and maintain Async WCF code and ...
14
votes
3answers
5k views
What determines which Javascript functions are blocking vs non-blocking?
I have been doing web-based Javascript (vanilla JS, jQuery, Backbone, etc.) for a few years now, and recently I've been doing some work with Node.js. It took me a while to get the hang of ...
10
votes
1answer
3k views
How can NodeJS be “non-blocking”?
I'm learning NodeJS and just wanted to clarify something. In several introductory tutorials and books so far, very early on they've described Node's "non-blocking" architecture - or rather that it's ...
1
vote
0answers
213 views
Single write, multiple read of stateful objects
Scenario:
One data input feed (call this Source)
Multiple objects (call these Layer1) read this Source, and analyze the feed. This analysis is stateful.
Layer1 objects have configuration parameters. ...
1
vote
0answers
315 views
Atmosphere + Long Polling : No message distribution?
I'm experiencing a strange behavior with Atmosphere + Long Polling.
I'd like to have a broadcaster per user, so I have registered a broadcaster on resource suspension with id : /user/.
I use ...
-2
votes
2answers
154 views
Calling blocking functions and execute code when result is ready, but without callbacks
I am designing an application that has some scripting capabilities: the host application may call the scripts to perform some operations when some events occur. To keep it easy and newbie-friendly, ...
3
votes
3answers
1k views
How to optimize calls to multiple APIs at once and return as one set?
I have a web app that searches across 2 APIs right now. I have my own Restful web service that I call, and it does all the work on the backend to asynchronously call the 2 APIs and concatenate them ...
12
votes
3answers
6k views
BackgroundWorker vs. Async/Await
I am new to C# development and wish to create a more responsive UI. In my preliminary research, I have seen two methods for achieving this:
Multi-threading in conjunction with the BackgroundWorker ...
5
votes
1answer
230 views
Asynchronously returning a hierarchal data using .NET TPL… what should my return object “look” like?
I want to use the .NET TPL to asynchronously do a DIR /S and search each subdirectory on a hard drive, and want to search for a word in each file... what should my API look like?
In this scenario I ...
9
votes
1answer
500 views
Futures/Monads vs Events
In an application framework
when performance impact can be ignored (10-20 events per second at max),
what is more maintainable and flexible to use as a preferred medium for communication between ...
16
votes
5answers
2k views
At what point is asynchronous reading of disk I/O more efficient than synchronous?
Assuming there is some bit of code that reads files for multiple consumers, and the files are of any arbitrary size: At what size does it become more efficient to read the file asynchronously? Or to ...
7
votes
2answers
13k views
When should I use StringBuilder or StringBuffer?
In a production web application, my fellow programmers used StringBuffer everywhere. Now I am taking care of application development and corrections. After reading StringBuilder and StringBuffer I ...
4
votes
1answer
169 views
Asynchronous update design/interaction patterns
These days many apps support asynchronous updates. For example, if you're looking at a list of widgets and you delete one of them then rather than wait for the roundtrip to the server, the app can ...
10
votes
4answers
2k views
How do you keep code with continuations/callbacks readable?
Summary: Are there some well-established best-practice patterns that I can follow to keep my code readable in spite of using asynchronous code and callbacks?
I'm using a JavaScript library that ...
2
votes
2answers
811 views
What's the best practice for async APIs that return futures on Scala?
I have started a project to write an async PostgreSQL driver on Scala and to be async, I need to accept callbacks and use futures, but then accepting a callback and a future makes the code cumbersome ...
4
votes
1answer
399 views
Cross-process asynchronous messages in .NET
(Asking this here instead of SO because I don't even know what technology to tag it with :))
My team is about to embark on a project to convert a large part of our code base to use asynchronous file ...
4
votes
2answers
3k views
How do you work with Asynchronous functions, recursively?
I am currently working on FLEX and have to call a web services. once I have the result, I have to call the web service again, with the previous result as the input.
A compounding problem, is that ...
0
votes
2answers
985 views
How to present asynchronous state change in chart or diagram?
I started to study about state transition chart. As I see, it assumes all state transition is done instantly with no time consuming. But in most of my case, I'm heavily depending on asynchronous I/O, ...
15
votes
3answers
7k views
How will C# 5 async support help UI thread synchronization issues?
I heard somewhere that C# 5 async-await will be so awesome that you will not have to worry about doing this:
if (InvokeRequired)
{
BeginInvoke(...);
return;
}
// do your stuff here
It looks ...
5
votes
2answers
548 views
How can I design an efficient moderation system for comments?
Here's the job I want to do:
My project is a website where there will be a lot of comments.
Those comments will be moderated: a moderator will connect, see comments and accept or refuse them.
I need ...
12
votes
6answers
2k views
Solutions to C# 5 async re-entrancy
So, something's been bugging me about the new async support in C# 5:
The user presses a button which starts an async operation. The call returns immediately and the message pump starts running again ...
0
votes
1answer
1k views
Should we (still) consider a synced XMLHTTPRequest bad practice?
As you may know, XMLHTTPRequest can be used synchronously or asynchronously, but synchronized requests have always been considered bad practice, and I've always agreed with that.
Not only is the ...
3
votes
1answer
320 views
How can I use Windows Workflow for validation of a Silverlight application?
I want to use Windows Workflow to provide a validation service. The validation that will be provided may have multiple tiers with chaining and redirecting to other stages of validation. The ...
3
votes
1answer
399 views
using blocking APIs with non-blocking server
We are using Tornado for our system (behind nginx) -- and everything is working fine.
Now we need to integrate a client lib (for Neo4j Graph DB) into our system. The problem is that it is blocking.
...
4
votes
2answers
890 views
How do you decide to Queue/Dispatch events Sync or Async? (in Observer Pattern)
Consider the following elements in an event-driven architecture:
Observable Object
Event Dispatcher
Observer(Listener)
Now, we have two messages:
From Observable Object to Event Dispatcher
From ...
3
votes
5answers
590 views
Where was “async” all these days?
It was started with C# 5's new keyword "async". And now I see this async programming everywhere from Javascript to C++, mostly from Microsoft. And from various discussions I came to know, this is a ...
9
votes
3answers
2k views
Choosing a JavaScript Asynch-Loader [closed]
I’ve been looking at various asynchronous resource-loaders and I’m not sure which one to use yet. Where I work we have disparate group-efforts whose class-modules may use different versions of jQuery ...
1
vote
5answers
510 views
Ways of handling asynchronous receive calls
I am implementing a primitive message-passing system. Currently, I am designing a receive function for async calls. Can I implement such a async receive function without using callback functions?