Questions tagged [asynchronous-programming]
The asynchronous-programming tag has no summary.
185 questions
1
vote
1
answer
797
views
Mixing reactive programming with non-reactive return requirements
Variable context from an initial non-reactive caller
The whole application cannot be reactive i.e. this method needs to return a result here
public string GetTextOfInterest()
{
var ...
4
votes
1
answer
150
views
Building objects from multiple async server queries
I'm building a system that uses objects that are built using multiple Async queries to a remote server (Firebase) and queries to a local DB.
How should I design a module to generate these objects?
...
3
votes
1
answer
73
views
Asyncronous processes competing for the output area
You enter the URL in the address string of your browser. It takes long time to appear in the client area. You are bored and type another address instead and click enter. Which page will be rendered in ...
3
votes
1
answer
159
views
How to document logical proofs against race conditions?
Specific Background
I'm writing a library to extend the async backbone of a language with cooperative multitasking. (The language is Hack, but C# also implements async-await with Task, if the concept ...
-4
votes
1
answer
1k
views
using node.js server with mysql-module and PHP for a penny-auction website? [closed]
I'm building a penny-auction platform like DealDash and just read into the WebSocket and node.js topic.
I used PHP, MySQL and Ajax to build the website. I'm nearly finished and just have to implement ...
2
votes
3
answers
140
views
Synchronising results from asynchronous tasks
In Android, I rather frequently need to get results from more than one service that utilizes an asynchronous callback pattern and I want to know if there's a better way to handle this pattern than ...
3
votes
1
answer
371
views
Connection between futures and exceptions?
Is there a connection between futures and exceptions? async-await looks very similar to throw-catch.
2
votes
3
answers
213
views
What is the right architecture for scalably scheduling and managing frequent periodic asynchronous?
I have built a setup which solves my problem, but I've pretty much just hacked it together by reading AWS docs and trying things out, so I want to see if there is a better way.
For the purpose of ...
1
vote
2
answers
1k
views
Making server logic independent of client interaction
I'm trying to make a realtime multiplayer web-game in node.js with express framework and socket.io library.
But I can't seem to make my server-side logic independent of client interactions.
I want ...
3
votes
2
answers
1k
views
In an event-driven environment, how should a "cancel" function abort all further events?
In my iOS app, things are mostly driven by events.
The user presses a button
The app listens for an external device to be connected to the iOS device
Once the device is detected (is connected), an ...
0
votes
1
answer
171
views
What is the difference between running two blocks of code on the same thread and running them on two synchronous threads?
Suppose I have two blocks of code, A and B. A is to be executed before B. As I understand, I can do one of two things: 1) Put B in a separate thread that is to be executed after A's thread, or 2) Put ...
2
votes
3
answers
205
views
Stopping asynchronous systems
I have a system which has 5 services. Each are run in a separate process. They resemble an assembly line, in the sense that they mostly process messages in the same order 1->2->3->4->5, however it's ...
0
votes
1
answer
404
views
Can you refer to the callback function as an API?
A system design is decoupled into two layers say layer A and layer B.
The interaction between layer A and layer B occurs through an interface that is exposed by layer B in form of an API. This ...
0
votes
1
answer
385
views
Async properties in interfaces to cater for the possibility of expensive first-time evaluation: Is this a good idea?
First of all, sorry if this post is too long. I'll start with the…
Short version:
Is it generally advisable or a good idea to design an interface property as asynchronous simply because we cannot be ...
1
vote
0
answers
100
views
Capturing keyboard events for a limited time
I'm trying to code a kind of simple video game where there are two kind of players:
Human Players: They enter an keyboard input
CPU Players: A random input is calculated
For Human Players there is a T ...
1
vote
1
answer
2k
views
Provide multiple SendCompleted callbacks to SmtpClient
I have an Email class that has a Send method that optionally takes an SmtpClient and sends an email asynchronously using SendAsync. If no SmtpClient is supplied to this method, it instantiates a ...
0
votes
2
answers
272
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 ...
2
votes
1
answer
179
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 )...
3
votes
1
answer
738
views
How to handle asynchronous calls in an offline application
I'm using an offline application's javascript API and I'd like to know if I can use deferred objects to handle the callbacks. The API calls do not use HTTP, the calls are to and from the applications ...
0
votes
2
answers
271
views
In Node.js, are non-blocking constructs usually preferable to blocking ones?
Is the following a statement of best practices in Node.js with regard to web applications? If not, how could it be improved?
The statement
The lifecycle of any web app has at least two phases: a ...
3
votes
0
answers
742
views
Gevent - Make blocking calls non-blocking
I have the blocking code shown below.
Is calling monkey.patch_all() enough/optimal to make it non-blocking?
Does Gevent handle iterations like these?
# front page
def front_page():
database = ...
5
votes
1
answer
432
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
votes
2
answers
158
views
Designing an application with safe paralleled tasking
The title may have been a little vague... I am working on a piece of software that is designed to perform one task. I would like this task to work in parallel, allowing for multiple asynchronous ...
1
vote
1
answer
196
views
Equivalent translation of Asynchronous behaviour in C
As a follow-up to my other question, if one were to build a general-purpose translator from a language that has support (be it with an external library or otherwise) for asynchronous behaviour to a ...
3
votes
1
answer
198
views
What is a good design approach in .NET for performing a series of checks in background process?
I have a flight planning system in .NET/SQL Server which needs to perform several validation checks. This needs to work on both a windows and a web client. Currently the checks run synchronously but ...
1
vote
2
answers
428
views
Why would Java app make RPC call to itself?
I am working with a multithreaded homegrown multi-module app in my new job. We use the the Thrift protocol to communicate RPC calls between different stand-alone applications in a distributed system. ...
2
votes
1
answer
266
views
Reporting and handling asynchronous process errors to a client
I have a product with two separate applications. The core of the product lives in the database (oracle) and runs according to a schedule. The other is a client application (currently ASP.NET MVC3) ...
2
votes
0
answers
277
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
vote
0
answers
80
views
How to display a very delayed success message after async method call in WinForms after Form is closed
The users are on a Windows Form where they fill out a fax cover sheet and hit Send. The remote fax service takes anywhere from two seconds to two minutes to return a result (long timeout). By that ...
0
votes
1
answer
133
views
Term for an error when code is executed before its ajax response? [closed]
What's the term for an error caused by executing a block of code before its relevant ajax response has come back? e.g., a timeline:
13:00:01 execute getDataViaAjax();
13:00:02 execute ...
1
vote
1
answer
551
views
Design pattern for locking asynchronous operations in Objective-C
I'm writing my first Objective-C Class. It's responsible for interaction with an HTTP SSO authentication service.
The process requires multiple HTTP transactions in order to complete. The Class acts ...
-2
votes
1
answer
193
views
Asynchronous Web Language [closed]
I'm searching for a suitable way to make web requests to databases and display results in real-time. The data will be used in an interface for staff, so there cannot be any blocking or lag as time is ...
0
votes
0
answers
68
views
Handling error with Promise
I'm writing a small application in TypeScript that has to do some asynchronous operation and I'm doing it with Promise and async/await sugar. But my problem do not rely on the particular language or ...
-1
votes
1
answer
93
views
How to name functions which continue a process after an asynchronous step
Say that you have an web application which prints pages in a document. Suppose that after validating the page range, the application does the following:
If a billing option is turned on, it first ...
1
vote
0
answers
256
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 ...