In which way is akka real-time?

2020-07-10 06:05发布

问题:

At a couple of places there is state that akka is somehow "real-time". E.g.:

http://doc.akka.io/docs/akka/2.0/intro/what-is-akka.html

Unfortunately I was not able to find a deeper explanation in which way akka is "real-time". So this is the question:

In which way is akka real-time?

I assume akka is not really a real-time computing system in the sense of the following definition, isn't it?: https://en.wikipedia.org/wiki/Real-time_computing

回答1:

No language built on the JVM can be real-time in the sense that it's guaranteed to react within a certain amount of time unless it is using a JVM that supports real-time extensions (and takes advantage of them). It just isn't technically possible--and Akka is no exception.

However, Akka does provide support for running things quickly and with pretty good timing compared to what is possible. And in the docs, the other definitions of real-time (meaning online, while-running, with-good-average-latency, fast-enough-for-you-not-to-notice-the-delay, etc.) may be used on occasion.



回答2:

Since akka is a message driven system, the use of real-time relates to one of the definition of the wikipedia article you mention in the domain of data transfer, media processing and enterprise systems, the term is used to mean 'without perceivable delay'.

"real time" here equates to "going with the flow": events/messages are efficiently processed/consumed as they are produced (in opposition to "batch processing").



回答3:

Akka can be a foundation for a soft real-time system, but not for a hard one, because of the limitations of the JVM. If you scroll a bit down in the Wikipedia article, you will find the section "Criteria for real-time computing", and there is a nice explanation about the different "real-timeness" criteria.



回答4:

systems that are subject to a "real-time constraint"— e.g. operational deadlines from event to system response.

en.wikipedia.org/wiki/Real-time_computing

The akka guys might be reffering to features like futures that allow you to add a time constraint on expectations from a computation.

Also the clustering model of akka may be used to mean an online system which is real-time(Abstracted so as to look like its running locally).



回答5:

My take is that the Akka platform can support a form of real-time constraint by delivering responsive applications through the use of (I'm quoting here):

  • Asynchronous, non-blocking and highly performant event-driven programming model
  • Fault tolerance through supervisor hierarchies with “let-it-crash” semantics
  • Definition of time-out policies in the response delivery

As already said, all these features combined provides a platform with a form of response time guarantee, especially compared to mainstream applications and tools available nowadays on the JVM.

It's still arguable to claim that Akka could be strictly defined as a real-time computing system, as per wikipedia's definition.
For such claims to be proven, you would better refer to the Akka team itself.