10 ms·
Let’s Talk Concurrency: Panel with Sir Tony Hoare, Joe Armstrong, Carl Hewitt
- lelf 8y agoVideos https://www.youtube.com/user/ErlangSolutions/videos https://www.youtube.com/user/ErlangSolutions/videos
- paulhallett 8y agoDo they all talk at the same time?
- throwaway8879 8y agoConcurrency is not parallelism, friend.
- cwingrav 8y agoThis guy. Fun at parties. ;) A good point but most would think of the two the same. I know I had a hard time getting some ideas across on some research I was doing until I separated these two concepts out. Then people started to understand.
- arethuza 8y agoAren't concurrency and parallelism orthogonal?
- sudhirj 8y agoNot if they happen at the same time.
- anthony_doan 8y ago> Aren't concurrency and parallelism orthogonal? As in they're independent of each other? The answer would be no. Concurrency doesn't require parallelism but parallelism require concurrency. The second answer to this quora link explains it way better than I can. https://www.quora.com/What-is-the-difference-between-concurrency-and-parallelism https://www.quora.com/What-is-the-difference-between-concurr...
- chrisseaton 8y ago> parallelism require concurrency I don't think it does. For example in a SIMD system there is parallelism, but no concurrency. Operations are being performed in parallel, but there is only a single program (SI..) and no concurrent tasks.
- zzzcpan 8y agoStill, different pieces of hardware execute the same instruction on different data. Think of this as data concurrency if you like.
- arethuza 8y agoOr the same single threaded executable running as two processes on different cores/cpus - there is parallelism but no concurrency within any of the processes?
- bullen 8y agoI think you have to add "Joint" Parallel as a definition of two separate cores that collaborate on the same data at the same time - that requires concurrent memory/disc access. That Erlang can't provide BTW.
- arethuza 8y agoWell, here is someone suggesting that they orthogonal: http://composition.al/blog/2014/11/24/yet-another-blog-post-about-how-parallelism-is-not-concurrency/ http://composition.al/blog/2014/11/24/yet-another-blog-post-...
- ignoramous 8y agoPersonally, a blog post by yosefk, the greatest CPP basher of all time [0], cleared the differences up for me: https://yosefk.com/blog/parallelism-and-concurrency-need-different-tools.html https://yosefk.com/blog/parallelism-and-concurrency-need-dif... [0] https://wiki.c2.com/?CppBashing https://wiki.c2.com/?CppBashing
- glockenspielen 8y ago"concurrency includes parallelism as a special case." -Carl Hewitt http://lambda-the-ultimate.org/node/5231?from=200&comments_per_page=200 http://lambda-the-ultimate.org/node/5231?from=200&comments_p...
- RobertoG 8y agoNo, they optimize the talk filling the others speakers pauses.
- avip 8y agoOrganizers gave each a single fork for dinner.
- AzzieElbab 8y agoIs this happening over a dinner?
- inopinatus 8y agoThey try, but then each stops, waits a random interval, then speaks again.
- deleted 8y ago[deleted]
- tunnuz 8y agoThat is called a "manel".
- jabgrabdthrow 8y ago"rtf personual" `person git`
- eddd 8y agoI used to drink a lot of cool-aid from erlang. It is true, that they have got concurrency model right. They embraced actor model, messages between processies are copied over for a good reason, etc. However, I don't think it is enough to call it a day. Comparing to modern languages, erlang lacks a lot. Elixir is trying to fill those gaps, but how many layers of abstraction can you add to an ecosystem before it is unusable? With go and rust available, erlang/elixir looks like a very good tool but for a very limited pool of use cases - routing/filtering/messaging.
- keymone 8y ago> erlang/elixir looks like a very good tool but for a very limited pool of use cases - routing/filtering/messaging. wasn't that the original goal for erlang?
- b3orn 8y ago> Comparing to modern languages, erlang lacks a lot. Could you elaborate on that? What exactly does erlang as a language (tooling/libraries/frameworks aside) lack in your opinion? What do those modern language have that erlang doesn't?
- lelf 8y ago> Comparing to modern languages, erlang lacks a lot. Like? > With go and rust available, Yeah, tell me when those “modern languages” will be distributed, stop using stop-world GC, and contain at least 1% of introspection Erlang has.
- christophilus 8y agoRust, at least doesn't use GC. But yeah. Introspection and distribution is something BEAM does super well. I don't know of a better platform for that.
- jerf 8y ago(Actually a meta-reply to several comments.) Erlang got a lot right a long time before anyone else, but when that happens, it is a strong temptation to assume that everything about that early success is fundamental to the solution and anyone lacking it can't possibly succeed. But you don't really have the evidence for that, because for a long time, you had only one data point, and you can't draw lines (let alone n-dimensional hyperplanes) through one point meaningfully. The evidence says that modern people mostly don't care about distribution, don't care about stop-the-world GC in a very large percent of the cases (especially as stop-the-world time is getting shorter and shorter), and don't need Erlang-style introspection very often. I know how useful the latter in particular is, because I also used Erlang for a long time and I used it a lot. But again, what happens, especially when you''ve got the only solution, is that the one solution selected early gets worked into the system very deeply and looks very fundamental, but that doesn't mean that it's the only viable way to do it. So when running an Erlang system, I needed a lot of introspection to keep it running. But when I run non-Erlang systems, I do not simply collapse into a heap and wail that I don't have introspection and watch helplessly as the system collapses around me... I solve the problem in other ways. Entire communities of people are also solving the problem, and sharing their solutions, and refining them as they go as well, just as Erlang did with their solutions. The Erlang community has basically been complaining for the whole nearly 10 years of Go's 1.0+ existence that it doesn't have every single Erlang feature, but it was never about having every single feature that Erlang has. Erlang is a local optimum, and while I think it's a very interesting and educational one (and I mean that, quite sincerely and with great respect; anyone designing a new language today ought to at least look at Erlang and anyone designing a language with a concurrency story ought to study it for sure), I'm not even remotely convinced it's a global optimum. To get to any other optimum does mean that you'll have to take some steps back down the hill, but if all you look at are the steps down the Erlang slope but not the steps up some other slope, you won't get the whole story. (I would call out the type system in particular as something deeply sub-optimal. I understand where it came from. I understand why someone in the 1986, with 33 fewer collective years of experience than we have now, would say that the easiest way to have total isolation is to use total immutability, and the simplest way to ensure types can't go out of sync is to not have types. But it crunked up the language to have immutability within a process (that is, "A = 1, A = 2" could have totally worked like any other language without breaking Erlang itself; have separate operators for what = does today and an operator for "unconditional match&bind" and everything works fine), when all it needed was to ensure that messages can't contain references/pointers but can only copy concrete values. And it doesn't solve the problem of preventing things from going out of sync to simply not have types, because you still have types in all of the bad ways (if two nodes have two different implementations of {dict, ...}, you still lose in all the same ways), you just don't get types in any of the good ways. It was a superb, excellent stab at the problem in 1986, and again, I mean that with great respect for the achievement. But in the cold harsh world of engineering reality, it is one of the huge openings for later languages to exploit, and they are. There are others, too; this is in my opinion one of the biggest, but not the only.)
- mruts 8y agoThe Actor model sounds really great, and while I haven't used Erlang in a serious context, I have used Scala Akka Actors extensively and I find them very difficult to reason about. Actors might be great if you have a huge system over the network that you need to manage, but I don't find them that great for single computer programs. For example, I tried to implement a Akka bittorrent client and found it very difficult and confusing. You end up with a big graph of actors in which most of the messages sent are related to keeping track of state and actors. Moreover, actors are untyped so it's not obvious what messages they accept of send. Without a lot of documentation and discipline, the code becomes extremely unreadable very very quickly. Also bugs are very hard to find and very easy to create. Maybe it's less elegant, but for a lot of problems, just using select or epoll is a lot easier.
- thedoops 8y agoScala and Akka are... less simple. It's also not like the actor model takes over the whole paradigm. Actors are largely a runtime concern. You're still using modules and functions. The JVM is also less suited to implementing an Actor model. A lot of the BEAM's power comes from the preemptive scheduler.
- haspok 8y agoThat (the preemptive scheduler) and OTP/gen_server, which covers about 90% of the cases Erlang should be used for anyway. These are the foundations of Erlang-land, however, sadly neither of those have equivalents in Akka or on the JVM.
- haspok 8y ago"You end up with a big graph of actors" - you are almost certainly doing something wrong, the actor graph shouldn't need to be "big", and the supervisor hierarchy almost never deeper than 2-3 levels. A typical mistake when doing actor-based system design is to think that actors are replacements for modules or classes (or taken to the extreme: function calls), which is not the case.
- 8y ago
- carlehewitt 8y agoIn a wide-ranging discussion, there were some fundamental disagreements among the panelists as follows: I disagreed with Tony Hoare about using synchronous communication as the primitive because it is too slow for both IoT and many-core chips. Instead, the primitive for communication should be asynchronous sending and receiving, from which more complex protocols can be constructed. Also, I disagreed with Tony about sequential actions (using ";") as being foundational. Instead, concurrent actions are foundational for digital systems as follows: * Receipt of a communication activated sending other communications * An Actor received one communication before it received another communication Consequently, a computation is a partial order of causality. Tony and I did agree that tooling is needed for navigating the partial order. We just disagreed about whether sequential actions (using ";") are foundational. Furthermore, class hierarchies are not a suitable foundation for Scalable Intelligent Systems. Interfaces instead of subclassing should be used for IoT communication. Also, entities and descriptions in large ontologies do not fit in an object class hierarchy, e.g., Java and C++. Subclassing is not secure because it allows a subclass to impersonate a superclass. I disagreed with Joe Armstrong about requiring use of external mailboxes because they are inefficient in both space and time. Instead of requiring an external mailbox for each Actor, buffering/reordering/scheduling should be performed inside an Actor as required. Of course, Tony and Joe made other great points with which we agree entirely. See the following for more information: http://web.stanford.edu/class/ee380/Abstracts/190123.html
- acje 8y agoOne of the things I can't see the actor model explain is how to scale an actor vertically, which obviously has it's purpose. Amdahl's law and all that. However these days we see people build actor frameworks using CSP (golang) and "restricted shared memory" in Rust http://actix.rs http://actix.rs Isn't it ironic? Yet shows that the actor model can be inclusive of many "competing" paradigms, and gain from them, perhaps even need them to scale vertically?
- carlehewitt 8y agoThis is a very good question. Citadels are larger scale Actors which can be incorporated into other Citadels, where a Citadel is an Actor for a systems of Actors (perhaps including IoT). See the following: http://web.stanford.edu/class/ee380/Abstracts/190123.html