Create an account

Very important

  • To access the important data of the forums, you must be active in each forum and especially in the leaks and database leaks section, send data and after sending the data and activity, data and important content will be opened and visible for you.
  • You will only see chat messages from people who are at or below your level.
  • More than 500,000 database leaks and millions of account leaks are waiting for you, so access and view with more activity.
  • Many important data are inactive and inaccessible for you, so open them with activity. (This will be done automatically)


Thread Rating:
  • 922 Vote(s) - 3.53 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Actor model to replace the threading model?

#1
I read a chapter in a book (Seven languages in Seven Weeks by Bruce A. Tate) about Matz (Inventor of Ruby) saying that 'I would remove the thread and add actors, or some other more advanced concurrency features'.

* Why and how an actor model can be an advanced concurrency model that replaces the threading?
* What other models are the 'advanced concurrency model'?
Reply

#2
Also please see


[ActorScript™ extension of C#™, Java™, and Objective C™: iAdaptive™ concurrency for antiCloud™ privacy and securitY][1]

[1]:

[To see links please register here]

Reply

#3
Please the following paper

[Actor Model of Computation][1]

[1]:

[To see links please register here]

Reply

#4
See **Dataflow Programming**. It's an approach, which is a layer over top of the usual OOP design. In some words:

- there are a scene, where *Components* resides;
- Components have *Ports*: *Producers* (output, which generate messages) and *Consumers* (input, which process messages);
- there are *Messages* pre-defined between Components: one Component's Producer port is bind with another's Consumer.

The programming is going on 3 layer:

- writing the dataflow system (language, framework/server, component API),
- writing Components (system, basic, and domain-oriented ones),
- creating the dataflow program: placing components into the scene, and define messages between them.

Wikipedia articles are good starting point to understand the business: [

[To see links please register here]

][1]
See also "actor model", "dataflow programming" etc.


[1]:

[To see links please register here]

Reply

#5
It's not so much that the actor model will replace threads; at the level of the cpu, processes will still have multiple threads which are scheduled and run on the processor cores. The idea of actors is to replace this underlying complexity with a model which, its proponents argue, makes it easier for programmers to write reliable code.

The idea of actors is to have separate threads of control (processes in Erlang parlance) which communicate exclusively by message passing. A more traditional programming model would be to share memory, and coordinate communication between threads using mutexes. This still happens under the surface in the actor model, but the details are abstracted away, and the programmer is given reliable primitives based on message passing.

One important point is that actors do not necessarily map 1-1 to threads -- in the case of Erlang, they definitely don't -- there would normally be many Erlang processes per kernel thread. So there has to be a scheduler which assigns actors to threads, and this detail is also abstracted away from the application programmer.

If you're interested in the actor model, you might want to take look at the way it works in [Erlang][1] or [Scala][2].

If you're interested in other types of new concurrency hotness, you might want to look at [software transactional memory][3], a different approach that can be found in clojure and haskell.

It bears mentioning that many of the more aggressive attempts at creating advanced concurrency models appear to be happening in functional languages. Possibly due to the belief (I drink some of this kool-aid myself) that immutability makes concurrency much easier.


[1]:

[To see links please register here]

[2]:

[To see links please register here]

[3]:

[To see links please register here]

Reply

#6
I made this question my favorite and am waiting for answers, but since there still isn't, here is mine..

> Why and how an actor model can be an
> advanced concurrency model that
> replaces the threading?

Actors can get rid of mutable shared state, which is very difficult to code right. (My understanding is that) `actors` can basically thought as objects with their own thread(s). You send messages between actors that will be queued and consumed by the thread within the actor. So, whatever state in the actor is encapsulated, and will not be shared. So it is easy to code right.

see also

[To see links please register here]


> What other models are the 'advanced
> concurrency model'?

see

[To see links please register here]

Reply



Forum Jump:


Users browsing this thread:
1 Guest(s)

©0Day  2016 - 2023 | All Rights Reserved.  Made with    for the community. Connected through