Skip to main content

Stack Exchange Network

Stack Exchange network consists of 183 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [async]

Filter by
Sorted by
Tagged with
1 vote
2 answers
137 views

Designing persistence guarantees in an ingestion pipeline with a non-customizable intermediary

I’m migrating a large volume of historical RRD data into a VictoriaMetrics cluster. By design, vminsert buffers and asynchronously forwards data to vmstorage. This makes it unclear when data is ...
SPYN's user avatar
  • 21
2 votes
2 answers
209 views

Best way to add asynchronous execution for already implemented synchronous process

I have a complex process implemented in Java Spring microservice. Currently this process is triggered on user request and it is synchronously executed. This often results in a gateway timeout. ...
DimitrijeCiric's user avatar
6 votes
2 answers
554 views

How is async implemented natively?

How is async logic implemented natively without threads? What would be the high level structure of the system? Is it just a separate OS thread that gets and pushes requests and results in 2 queues? I ...
codefast's user avatar
  • 179
0 votes
2 answers
948 views

C# readability - async/await or return for wrapping asynchronous functions?

Say I have an asynchronous method: public async Task DoThing(int x) { // ... } Now, I want to wrap this method with a new method. Each of these two options are functionally equivalent: public ...
AAM111's user avatar
  • 161
1 vote
0 answers
503 views

How to structure your Python code with asynchronous and synchronous parts

I have a Python FastAPI server application which naturally guides you towards the asynchronous paradigm. For legacy reasons, I have to support two backends, one which is purely synchronous and one ...
user3058865's user avatar
1 vote
0 answers
127 views

golang: pattern for handling message queues? Are named functions anti-idiomatic somehow?

Had a discussion today in how to implement services that work with messages coming in from event queues. We call these services processors. One of us argues for using several functions, while the ...
Albert Balbastre-Morte's user avatar
2 votes
2 answers
436 views

What are the risks in eliminating sync over async?

I'm reviewing changes to a widely used library, which are supposed to be refactorings, and so we want to minimize the risk of introducing any accidental regression. Of course, there are changes from ...
Tim Lovell-Smith's user avatar
8 votes
1 answer
5k views

Should web API controller actions that perform no async work always be declared as async?

I have been going over our app web api and making sure all async work is async all the way - and no artificial asynchronicity is enforced. Say I have the following web api controller: [HttpGet] ...
Veverke's user avatar
  • 541
0 votes
1 answer
212 views

Bubbling errors upstream in async message-based services

Imagine a simple set up of an API and a 2nd service, where the API pushes some msgs to the message queue and the service pulls them and processes them. Now, if an error occurs while processing a msg, ...
Milkncookiez's user avatar
0 votes
1 answer
604 views

How to optimize average rating calculation in a review system?

I'm thinking of a designing a review system (restaurant, hotel etc) where users can drop star reviews. Typically in a such a application, you can see the average rating of an entity along with all ...
Ahmed Sadman Muhib's user avatar
0 votes
1 answer
215 views

How should I handle routine health checks in a Node.js/Nest.js application?

I have a Nest.js application, and lately I've been thinking about how I can ensure that data is synchronized between two sources - my database and an external database. For example - and to my ...
Michael Jay's user avatar
0 votes
1 answer
324 views

Can resource which requires asynchronous cleanup be constructed synchronously?

More specifically this applies only to resources which have asynchronous dependencies themselves (but I think that's majority of them). Concrete example: class Foo : IAsyncDisposable { public ...
Shadow's user avatar
  • 361
49 votes
6 answers
32k views

In JavaScript, how is awaiting the result of an async different than sync calls?

I'm having a hard time wrapping my head around the use of async/await and regular sync function calls in JavaScript. Let's say I have two functions: Function 1: async function doSomething() { ...
noblerare's user avatar
  • 1,381
0 votes
3 answers
201 views

Critical section with two different "rights of way" [closed]

In C#, how do I handle critical section with two different "rights of way"? Theoretical use case: imagine a swimming pool (the resource). Many individual swimmers (worker threads A, B, C, ...
Yann's user avatar
  • 119
4 votes
1 answer
553 views

Share models between AsyncAPI and RESTful APIs?

What I try to solve: Given I run a set of microservices, most of which expose a RESTful API and additionally publish or consume events via messaging broker, and I have decided to go "API first&...
observer's user avatar
  • 167

15 30 50 per page
1
2 3 4 5
12
Morty Proxy This is a proxified and sanitized view of the page, visit original site.