Questions tagged [asynchronous]

30 questions
8
votes
4 answers

How to separate sync and async methods in C# type?

Lets say I design a generic read only repository IReadOnlyRepository. public interface IReadOnlyRepository { ... TEntity Find(object id) where TEntity : IEntity; IEnumerable Filter(Expression
Dmytro
  • 189
  • 4
6
votes
0 answers

Zeromq bidirectional asynchronous transmission?

I have a system which consists of two applications. Currently, two applications communicate using multiple zeromq publish/subscribe sockets generated for each specific type of transmission. Sockets are programmed in C. For example, AppX uses a…
5
votes
2 answers

Is it good approach to await async tasks in object destructor?

I'm currently working on class with some async tasks under the hood. In fact I need to delegate few tasks to asynchronous execution and be sure that all of them are finished before class was destroyed, I was thinking about await all the tasks until…
5
votes
2 answers

Is a promise-aware eventing system desirable?

I'm fully aware that Promises and eventing are both ways to do asynchronous programming, and you can choose either one for a given project. However, in practice, the code base I'm working with is large and we use many 3rd party libraries that…
4
votes
1 answer

How are asynchronous exception implemented?

What changes need to be made to a language/runtime if one wants to implement fully asynchronous exceptions (thrown from one thread to another, capable of interrupting pure computation without the need for polling)? What issues and challenges need to…
Martin
  • 149
  • 4
4
votes
1 answer

Is there a formula to figure out the total execution time of sequential asynchronous processes?

I have a set of steps that need to run sequentially over a list of data. However each step only operates on a single piece of data at a time. Because of this, I can run the steps asynchronously. For example I have two pieces of data, and two steps.…
3
votes
0 answers

Can multiple producers cause events with the same key to be enqueued out of order within a specific partition of a topic?

I'm aiming to create a simple event-driven system where each microservice operates with its own database. The idea is to share database changes across microservices through events. To ensure proper event ordering, I'm considering a strategy where I…
3
votes
3 answers

Make multithreaded program asynchronous

There is an application that processes TCP/IP requests according to some logic, and pretty always it connects to DB. Architecture is very common: one client -> one processing thread -> one DB connection -> one DB thread to process a query(DB thread…
3
votes
1 answer

Remote job execution and synchronization

I have master and nodes infrastructure. Master executes remote jobs on nodes. Each job returns success/failure message back to master. So the flow of execution is the following: master receives command master creates remote job and sends message to…
igor
  • 393
  • 1
  • 13
2
votes
2 answers

Should I create two synchronous or a single asynchronous rest APIs?

Here is the situation. System A sends the notification as it completes the work items to System B. System A does not know how many items the project consists of. It's just a pass-through system. System B knows the number of items. Once sys B…
2
votes
1 answer

Long running REST API in PHP, async?

I have a RESTful API built with PHP. In POST request saving to DB is triggered. The problem is that now I have to support long running tasks. For example a user triggers POST request that is going to take a few minutes to be processed and having to…
stubborn
  • 83
  • 1
  • 4
2
votes
2 answers

Achieving very large real-time async writes on MySQL tables without locking them to reads

I am building a webapp (Angular frontend, Groovy/Spring/Hibernate/MySQL backend) that will allow users to compete against each other over certain activities. Each activity will have 1 winner and 1 loser. I want a live user ranking system that ranks…
smeeb
  • 4,820
  • 10
  • 30
  • 49
2
votes
1 answer

What are the benefits of Asynchronous HTTP

Q.1 I know that when we are talking about synchronous HTTP, for each request a Thread may be spawn and get blocked, so when number of simultaneous connections increase, we will encounter massive thread overhead. Asynchronous mode will tolerate some…
1
vote
1 answer

Asynchronous HTTP request pattern

Here is the pattern that I thought about for a resource accepting a single asynchronous HTTP request at a time (i.e. a request which has not yet been fulfilled when the response is sent): Create a single process: POST /resource → 202 {"monitor":…
Géry Ogam
  • 602
  • 3
  • 13
1
vote
0 answers

Asynchronous communication with legacy system

Background My task is to create new system (X) for realtime work tracking for internal use. You should think it like an app that you have opened on a separate monitor/ on phone all day and you are logging your work progress there. In fact, there is…
Pettan
  • 11
  • 2
1
2