kl. 15:01:15 UTC+2 onsdag 31. juli 2013 skrev mortdeus følgende:
1. How does your xchan proposal differ from the actor model. As far as I
can tell by reading your proposal an xchan is an actor.
I have from time to time tried to study the actor model. I have no
experience with it and don't know it I must admit. I've been looking at
Wikipedia now. I see that π-calculus has a relationship with the actor
model and occam-π (oocam-pi) has π-calculus added to CSP. My paper about
XCHAN from last years' CPA-2012 conference was peer reviewed by the core of
the occam-π people. I can not remember or find in my own files any mention
from them about XCHAN being an actor. There may have been some mention in
the question session, but that is in case faint to me.
The XCHAN is no own process, and cannot take primary initiative. It cannot
spawn processes. It is a channel with an added feedback channel. And
sending never blocks at link level etc. See in my blog and paper. If XCHAN
is an actor it must be a tiny actor!
I'd be glad for any one who has studied the XCHAN paper and is an actor
expert to tell me. Maybe you?
2. Herb Sutter's opinion that ALL concurrent systems should be async is
nonsense. I say that of course because go and plan9's thread model
implements synchronous concurrency in a way that doesnt suck. The actor
model has many setbacks of its own and by no means is an asynchronous
system model guaranteed to produce a more efficient, responsive concurrent
program than a program using a synchronous system model .
Sutter doesn't state that *all* should be asynchronous. Most may be seen as
nonsense from some angle. But I must admit, I wouldn't have written the
blog if I didn't wonder about his angle of view. And, totally blind as I
may be, I don't see XCHAN having many setbacks..
3. The reality is that you have to design your program so that it
effectively exploits the asynchronous nature of the actor model. Just
like you have to design synchronous concurrent systems so there isn't
heavy lock contention. Anytime we observe the efficiency of modern
concurrent system or theoretical model, we always find that the most
devastating deficiency in a concurrent system is the developer inability to
designing a correct, efficient, simple, scalable system with the tools he
is currently provided.
Yes, but in the direction from "difficult" to "concurrency is easy". With
the occam version it is quite easy because the language is so simple.
occam-pi is more complex. I have some Go code from golang-nuts in the XCHAN
paper, and Go is more complex, *without* parallel usage rules. But it's
still "easier than most" I believe.
Rob Pike in his talk "Concurrency isn't Parallelism" points this out by
suggesting that the most fundamentally damning problem with concurrency is
that we don't have an accurate understanding of what concurrency actually
is in its fundamentally purest form. Rob suggests that the best way to
understand concurrency is to view it as a foundational principle of
software design; rather than a bunch of low level, complex, and
exploitable features we can add-on to our program. (multiple cores, hyper
threading, GPGPU, pthreads, actors, etc).
In occam, every statement/line is a process! You have to specify if they
run SEQ or PAR. Taken from there I believe Rob Pike is right. But Go by
design meets the wall, not with multicore with shared memory, but if memory
is not shared. Not so for occam.
Therefore taking our new understanding of concurrency into consideration,
it should become obviously clear that "concurrency vs concurrency" is
irrelevant because you wont learn anything useful when you compare a method
against a mindset.
I like it, even if I don't follow you fully. They both have dimensions of
method and mindset. The C++ people do have a difficult job in trying to set
up a concurrent mindset. People who will be going to use futures must of
course also have a mindset. Even features need mindsets.
--
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscribe@googlegroups.com.
For more options, visit
https://groups.google.com/groups/opt_out.