I am beginning with actor model and have some problem in getting the concept behind, could you please explain in simple words with an example.
What is the meaning of "The illusion of shared memory on modern computer architectures" from the Akka actor documentation?
232 Views Asked by supernatural At
1
There are 1 best solutions below
Related Questions in AKKA
- Akka-persistence, tagging past event
- how to migate a Akka cluster without stopping service
- Await.result always hangs/timeout and never returns result (Scala - Akka actors)
- Can we create akka actor from the context of shard actor?
- Optimizing CPU Utilization and Throughput in Akka / Pekko Streams on HTTP
- Handling of WebSocket Client Messages in Play Framework
- akka PubSub not working across distributed system
- Handling WebSocket Connections in Play Framework
- Propagating exception to root actor
- akka stream merge data from multiple replicas system
- akka.presistance.postgresql too many clients already
- Akka Streams: How to construct a Source of Sources with GraphDSL?
- Skip flow on failure akka streams
- How to regulate the speed between actors in java?
- Keep ordering by merging multiple slow sources in akka streams
Related Questions in REACTIVE-STREAMS
- Reactor doesn't throw NPEs. Is it still a Reactive Streams implementation?
- Consuming reactor mono incrementally
- Is it wrong to use "try catch" inside a reactive stream operator(project reactor)?
- java spring boot app deployment on jboss 7.2 error: nested exception is java.lang.NoClassDefFoundError: org/reactivestreams/Publisher
- What is the difference between submit() and offer() in a SubmissionPublisher (Java Reactive Streams)
- RxJava: how to extract blocks form a source observable?
- Why does Mutiny Multi does not throw any Exception if an execution fails?
- Retrying and dropping erroneous elements of a Flux without pausing downstream demand for data during retry backoff period
- Websockets with Spring WebFlux: properly mix authentication data with event treatment
- How can I make a stub using Mockito to simulate the operation of a transaction in a reactive stack
- pass a method reference to WebClient.exchangeToMono method
- How to throttle throughput of a Quarkus reactive messaging stream
- Flux.zip with repeated empty Mono leads to endless Flux instead of empty Flux
- Mono.just() is still blocking in my use case when the emitted element is pending
- RxJava how to intersperse a Flowable?
Related Questions in ACTOR-MODEL
- In node.js (or asynchronous programming in general), what happens to the elements in the event loop when the thread crashes?
- Actors v.s. HTTP
- How to create multiple parent actors in Thespian
- Add/remove child from supervisor children list at runtime in Elixir
- How to create a child actor in akka.net using F#?
- How does akka update a mutable state?
- Can an actor have multiple addresses?
- Should I throw an exception in failed grain method?
- Actor references in scala
- Why Actors in Actor Model can have multiple adresses
- Multiple questions related to Actor-based model
- Can we have global state in actor-based systems?
- How to spawn verticles that will be undeployed after they've done their work
- Orleans. Akka.net. Problem with understanding the actor model
- What is the meaning of "The illusion of shared memory on modern computer architectures" from the Akka actor documentation?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
First, let's be clear what you are referencing. You are quoting from the opening documentation where it discusses why a new programming model is needed. I mention this because this is all very computer science theory, and not directly relevant to learning the API. Overall, I'd consider it a relatively minor point.
But, that paragraph of the docs gives a couple of examples already. The paragraph's point fundamentally being, that concurrency is inherently hard on a modern system, and that traditional concurrency APIs often create abstractions that have unintended performance consequences.
Specifically, the paragraph talks about how even if memory is "shared" via a concurrency API, that the realities of modern CPU architectures means that not all access is equal. That if a piece of data is created by thread 0 and it is used by thread 1, that the CPU architecture ends up invalidating that data on thread 0 and shipping the cache line over to thread 1. i.e. that even if the memory is marked as "shared" there is actually a significant performance penalty every time a different thread accesses that memory. The "shared" memory model is an illusion because the CPUs need to maintain a variety of caches that result in the memory not really being shared, but rather passed back and forth (at significant cost).
This is just one minor point of the opening justification, but it leads to some of the benefits of the concurrency provided by the Actor model. Since an actor has exclusive access to its state not only is the API simpler (because you don't have to worry about concurrency), but the physical CPU doesn't have to worry about that concurrency either. That not only do YOU not have worry about locks, but the CPU doesn't have to worry about locking either: it will be able to access memory without having to pass cache lines back and forth between phyiscal cores/CPUs.