F
F
floppa3222019-12-12 15:09:24
Asynchronous programming
floppa322, 2019-12-12 15:09:24

Messaging performance?

Hello everyone :) In the framework that is gaining popularity - Vert.x (TCP / UDP server) copy on write array
is used as a thread-safe collection for messaging . The collection is intended for exchanging messages between some framework abstractions running in different threads. A typical user case of a message: a request comes to the abstraction-Http-server that requires calls to the database -> Http-server puts, say, the user id in the collection -> abstraction-DB takes the message, processes it and puts it back -> Http-server picks up the message from the database and returns the response to the client. As you understand, there can be a lot of messages in a unit of time. And that means insertion / deletion operations
. While copy on write collections are intended for cases where the data modification/read ratio is close to zero.
The question is why did the developers choose copy on write? Because in theory it should work very slowly.
The collection itself

Answer the question

In order to leave comments, you need to log in

1 answer(s)
O
Oleg, 2019-12-12
@402d

In theory, there is a heavy operation, only removing the element from the head of the queue. Again, in theory, it can
be performed along with updating the draining current in the memory chips.
In practice, you need to dig deep into all these virtulizations. And so the operation of copying data
in RAM from one place to another is performed by auxiliary controllers, and not by the ALU.
Sorry, in terms of early processors.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question