Skip to main content

Questions tagged [asynchronous-programming]

Filter by
Sorted by
Tagged with
0 votes
1 answer
201 views

I'm writing an application that needs to log error/ exception messages but should still continue execution if the error is not a fatal error. I was thinking of making a method that returns a Task but ...
BipinR's user avatar
  • 163
0 votes
1 answer
487 views

At this link (https://blog.heroku.com/timeout-quickly#how-webservers-work), I read: All webservers will work in a similar way. Any new request will go to a queue, and the server will process them ...
prmph's user avatar
  • 141
0 votes
1 answer
277 views

Let' assume we have an IFiltersRepository repository that provides data about a list of "filters" that are used on the search screen of an app (filter by color, by price etc). The repository has the ...
fweigl's user avatar
  • 195
1 vote
2 answers
446 views

Say there are two microservices (example is simplified) PickupRequestService: lists pick-up requests of passengers DriverService: drivers use to accept pickup requests On a completely decoupled ...
IMB's user avatar
  • 343
13 votes
1 answer
10k views

I'm a long time Java developer, but with so little traffic on SE, I don't limit my viewing to any single tags. I've noticed that C# questions with async/await come up a lot, and as far as I've read it'...
Kayaman's user avatar
  • 1,980
0 votes
2 answers
611 views

I have to use a built-in API that works like this class MyAPIWrapper { func callAPI() { apiObj.delegate = self apiObj.doWork() // returns immediately, eventually calls self.delegate....
Max's user avatar
  • 186
0 votes
1 answer
246 views

I'd like to develop a microservice architecture application that sends text messages from one communication provider to another and I'm just considering changing architecture would be best suited to ...
Hugo's user avatar
  • 11
34 votes
14 answers
14k views

I have not found many resources about this: I was wondering if it's possible/a good idea to be able to write asynchronous code in a synchronous way. For example, here is some JavaScript code which ...
Cinn's user avatar
  • 483
-4 votes
2 answers
293 views

I decided to make an application, networking application, don't know what it has to do yet but mainly it should be a cross-client kind of like framework networking application/library. Since ...
Jacquie T's user avatar
1 vote
1 answer
1k views

I am trying to get my head around "event driven" microservices. I understood, there are several techniques and patterns, like event notification, event sourcing, CQRS, etc that can help us to achive ...
user2534584's user avatar
1 vote
1 answer
429 views

I got the following code snippet: public Task DistributeAsync(BankAccount account, decimal amount) { lock (account) { return repository.AddLoanAsync(account, amount).ContinueWith(task ...
J. Doe's user avatar
  • 19
4 votes
2 answers
5k views

I have a couple of functions, each function verifies a set of rules and updates a common object. The common object is just a container that holds a list of rules that passed or failed. I would like to ...
BipinR's user avatar
  • 163
51 votes
4 answers
14k views

Python added the async/await constructs in 3.5 in 2015. The Javascript community made steps towards it for a bazzillion years and finally added a very similar implementation to the draft in ES8 ...
Ziv's user avatar
  • 3,106
3 votes
1 answer
147 views

I was going through some articles related to Futures and Callables today and was thinking about the best practices when working in an MVC based environment. I was wondering, should one be creating ...
swayamraina's user avatar
3 votes
3 answers
281 views

I'm coming from the monolith background, using a single large relational database. From my research, many proponents of the microservice architecture favor the event-driven rather than REST driven ...
timetofly's user avatar
  • 209
1 vote
1 answer
223 views

We are new to c# and still trying to grok the async idioms. We have a windows service that requires us to iterate a list of results queried from a PC database to feed the parse cloud server (which ...
Ray Trask's user avatar
  • 119
2 votes
2 answers
2k views

My app is consuming a third party api. One of the requirements of this api is that my app cannot send more than 20 requests per second. Because of the nature of this app, and because my user base is ...
Matt Spinks's user avatar
4 votes
1 answer
1k views

So I've been working with background processing and event-driven systems, namely Azure WebJobs and ServiceBus. And while there is extensive use of async/await programming, I'm always wondering if it ...
ethane's user avatar
  • 151
0 votes
1 answer
2k views

Let's say we're talking about a webshop. Microservice 1: Manages products and their prices Microservice 2: Responsible for payment and checkout. If a user wants to pay for a product, the payment ...
Florian's user avatar
  • 201
0 votes
1 answer
196 views

I've lately been very interested in reactive microservice design with streaming and event-driven architectures. When one writes (i.e., manages) services, this paradigm works extremely well by simply ...
erip's user avatar
  • 241
4 votes
2 answers
2k views

In a CQRS/async microservices context, I have a command handler e.g. SendOrderConfirmationEmailCommandHandler implemented in a communications service. This depends on information from the orders ...
yogibear's user avatar
  • 141
0 votes
2 answers
4k views

I have an app with an optional login where some functionality requires the user to login. When checking if the user is logged in I use a framework that runs an async function that requests an access ...
Declan McKenna's user avatar
4 votes
1 answer
213 views

The application I'm developing requires that some data is obtained through different channels. As this is a network process, I have decided to use async programming. I have designed the following ...
Daniel García Rubio's user avatar
2 votes
1 answer
107 views

I've been looking at ways to let my app's users write plugins for it. However, to give them more options, I decided to implement a polyglot plugin system. From the engineering perspective there are ...
Vivek Joshy's user avatar
1 vote
1 answer
360 views

This scenario seems pretty ordinary, and yet, strangely, messaging systems (like Google Cloud PubSub and Task Queues and ActiveMQ) do not seem to support it -- they assume that topics/queues are long-...
Joshua Fox's user avatar
  • 1,110
0 votes
1 answer
1k views

Given a recursive subroutine in single threaded environment which starts numerous asynchronous I/O operations and registers callback functions for each of them. This callbacks will be called on the ...
atevm's user avatar
  • 111
-1 votes
2 answers
880 views

Java author mentions: Threads can simplify the development of complex systems by turning complicated asynchronous code into simpler straight-line code. Again the book says: Threads make it easier to ...
user1787812's user avatar
3 votes
1 answer
505 views

Assume I'm writing a library in Java for performing network calls. I want it to be efficient for cases like highly loaded reverse proxies etc (10s to 100s Krps coming in and out; client requests ...
starikoff's user avatar
  • 179
1 vote
1 answer
2k views

For anyone who uses callbacks, how do I approach it when the method is an asynchronous setter? Here's an example class API { constructor() { this.token = null; } refreshToken(callback) ...
Vic's user avatar
  • 171
4 votes
1 answer
25k views

I am developing an application that will read excel files from disk and then process tests based on the data in the files. In order to keep the user interface from locking up when loading files and ...
Tim Hutchison's user avatar
5 votes
4 answers
4k views

I'm writing a function in the node.js-style asynchronous way, but how do I know if these functions are truly asynchronous, i.e., that they run in parallel and not sequentially? Here is my code (...
chharvey's user avatar
  • 264
3 votes
3 answers
1k views

I have two asynchronous tasks that need to get completed - say they're "make a pie" (make) and "bake a pie" (bake). I also need to cleanup after everything's done - "clean the kitchen" (cleanup). bake ...
Chaosed0's user avatar
  • 227
5 votes
3 answers
2k views

I am working on a C library (SlipRock) for interprocess communication. The library currently exposes a simple, blocking API. This is easy to use, makes misuse (relatively) difficult (this is C after ...
Demi's user avatar
  • 826
7 votes
3 answers
1k views

I've seen this in C#, Hack, and now Kotlin: await or an equivalent operation can only be performed in special "async" contexts. Return values from these are, to borrow Hack's terminology, "awaitable" ...
concat's user avatar
  • 517
5 votes
2 answers
349 views

I'm trying to design an asynchronous component. Requirements on this component are : Component might receive events at any point in time Component might start a long-running operation and wait for its ...
Euphoric's user avatar
  • 38.2k
1 vote
0 answers
100 views

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 ...
charliebrownie's user avatar
4 votes
1 answer
150 views

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? ...
user1768940's user avatar
3 votes
1 answer
159 views

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 ...
concat's user avatar
  • 517
2 votes
1 answer
941 views

I'm currently developing an application which relies on multiple sockets listening for chat messages. When the messages come in, they're passed off to a bot that's associated with their channels. ...
Blue's user avatar
  • 89
3 votes
1 answer
73 views

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 ...
Val's user avatar
  • 367
24 votes
3 answers
47k views

I have few async REST services which are not dependent on each other. That is while "awaiting" a response from Service1, I can call Service2, Service3 and so on. For example, refer below code: var ...
Ankit Vijay's user avatar
  • 1,638
2 votes
1 answer
951 views

I have been in arguments with programmers that mixing elements with animations and react is very bad practice, and that all animations should be in a style sheet because that is something ...
Crow's user avatar
  • 121
2 votes
3 answers
140 views

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 ...
TBridges42's user avatar
7 votes
1 answer
478 views

I'm designing API for a python library that accepts asynchronous input and produces the asynchronous output: various signals come in, and various signals are generated in response (there's no one-to-...
max's user avatar
  • 1,115
3 votes
2 answers
351 views

In UI-related code, I often end up writing a construct like this: function doItOnceAndRepeat() { if (!stillNeededToDoIt()) { return; } doIt(); runLater(doItOnceAndRepeat, 1000)...
ris8_allo_zen0's user avatar
7 votes
1 answer
6k views

Call stack may contain several methods returning Task. If all of them are decorated with async, the flow of execution is quite simple. However, what if one of them is not awaited - are other method ...
nix's user avatar
  • 543
2 votes
2 answers
2k views

In the latest version of languages like TypeScript or ECMAScript you can use async/await constructs to write code that combines the clean structure of synchronous programming with the performance ...
danieleds's user avatar
  • 288
1 vote
0 answers
80 views

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 ...
TR888's user avatar
  • 219
0 votes
1 answer
867 views

I've looked for the solution of my problem but I've failed in finding a suitable answer. I've been trying to develop an Android application with heavy asyncronous networking capabilities. The problem ...
Göktay K.'s user avatar
3 votes
1 answer
489 views

I'm trying to figure out what the appropriate way to deal with this problem is in a functional way. I'm assuming there's a functional data structure or technique that will make this easy to handle. ...
Gregory Bell's user avatar