5 ms·
This sounds interesting, but feels like magic. How do the tuples get to where they're going? In my experience, computing bits that feel like magic have hidden c
by toast0 8y ago
This sounds interesting, but feels like magic. How do the tuples get to where they're going? In my experience, computing bits that feel like magic have hidden costs, that are usually rather high.
Contrast this approach with Erlang, there's still a lot of tuples, but you have to (somehow) know where to send them at a (sometimes high) human cost to developers, but usually low runtime cost.
- teilo 8y agoI immediately thought of ETL when I read this. I don't see how this tuple space concept can work possibly replace robust supervised process management. Also, how is tuple space different than message passing? Somehow a process needs to know what values it is supposed to consume. Something has to manage that, and before you know it, you are passing messages through tuple space and have, essentially, re-invented the wheel.
- sago 8y agoTuple spaces are simply a way of coordinating between distributed processes. > possibly replace robust supervised process management. No more than message passing replaces supervised process management. A supervisor might use message passing to do its work, or it might use a tuple space, or something else again. It is still a separate thing. > how is tuple space different than message passing Message passing is an example of a shared nothing coordination scheme. For process A to know about some information, process B needs to send a message containing a copy of that information. This is useful, but not always practical. So few systems, even that use message passing, use only this simple form of message passing (more on that below). > Somehow a process needs to know what values it is supposed to consume. Of course. Is is no different regardless of the communication mechanism. Processes need to know what data they need to know. If anything, this is more difficult for message passing: where the sender needs to know what the receiver might need. > Something has to manage that Not necessarily. The processes can just go and read the data from memory. You would be right if you think that sounds like a terrible idea. But unfortunately it was, and still is, more than common. To avoid catastrophe it requires careful use of data locks, mutexes and dances around race conditions and deadlocks. So you are right in thinking that managed approaches are superior. Message passing is one such approach. Tuple spaces are another. > before you know it, you are passing messages through tuple space and have, essentially, re-invented the wheel Partially true, but the opposite is more common. Effectively tuple spaces use a database (of tuple data) as a coordination system, along with one blocking primitive (wait for data). You can, of course, use the data in the database as messages, create some kind of message brokering process, and reinvent message passing. But the opposite is also true. In a complicated system co-ordinated with message passing, you often end up with processes whose job it is purely to hold and be queried for data by multiple consumers/modifiers. Effectively this is coordinating via data. Or re-implementing a cut down tuple space via message passing. When you start to design a 'querying' protocol to allow different processes to access and wait for data in a consistent way, regardless of what that data is, you are very close. This isn't unique to just message passing and tuple spaces. A sufficiently complex (and well designed) program performing parallel computation with threads and semaphores will usually have its own ad hoc reimplementation of both message passing and tuple spaces. Whatever parallel computing formalism you use (and there are others besides these three), you are essentially solving the same problem. It is no surprise that they will begin to resemble each other. Your point seems to assume that message passing is a default. It is certainly the thing that seems to have won the battle for mindshare. But the thesis of the article is that basing a system around a tuple space is a better foundation. And by better I mean that it is easier to code at scale. I am not totally convinced. But I have to say it kind of chimes with my experience. Very large message passing systems become unwieldy, And I have ended up coding something that looks like a tuple space to tame the maze of producers and consumers.
- buckminster 8y ago"Any sufficiently complicated message passing system contains an ad-hoc, informally-specified, bug-ridden, slow implementation of half of tuple spaces."
- makmanalp 8y agoIt's better to think of tuple spaces as a concurrency / communications model than an implementation. So it's more like "the actor model" rather than Erlang's or Java/Akka's specific implementation of it. It's more about "if we had this type of system with these constraints and these features, abstracting away these details, what would we gain or lose?". You're right that in the end a good or bad implementation can make or break things (take a look at this paper: https://arxiv.org/abs/1612.02979 https://arxiv.org/abs/1612.02979), but that's not the point, at least with the original paper. The interesting thoughts from the paper as far as I can see were: 1) Tuple spaces are programming language or architecture or program independent, and vastly different programs can communicate with each other 2) You don't communicate directly to other agents by address, you write to a topic and read from a topic, which is a form of decoupling producers and consumers 3) The "block when nothing to read in this topic" idea, which makes programming coordination SO easy. I guess it's a bit like unix pipes. If tuple spaces don't seem that interesting and novel, it's probably because of the benefit of hindsight and that a lot of these ideas are so subsumed into the tools of today. I can't definitively make the claim that Linda is the cause of this, but I suspect it had some effect. I think the original author also had a lot of wacky ideas around "cyberspace" and all that, but that's another deal and I don't think it's why people find the Linda paper interesting now. The closest useful descendants of Linda to be seem to be modern Pub / Sub systems or coordination databases like RabbitMQ, Kafka, Zookeeper.
- toast0 8y agoI can't run my service on a model, I have to run it on an implementation. When people try to abstract away the hard parts of the problems, it usually leads to bad results. For examples, SQL let's you express all sorts of interesting queries, very few of which are a wise idea to run thousands of time per second; ORMs make this even worse -- how data is stored and how data is queried really need to be determined in concert in order to make data storage and retrieval work, assuming you have sufficient data and query volumes to care -- if you've got only a few thousand pieces of data, it barely matters. That's not to say SQL isn't useful, or interesting, it's just not enough. In this case, the mechanism seems too general -- if I want to read all the outstadning tuples with 2 as the second elememt, that's possible, but seems rather hard. If it's really about consuming tuples within a named channel, I want to know more about the expected or desired properties of distribution -- how is it determined which agent gets to consume a tuples when multiple request a matching tuple simultaneously, which tuple is consumed when many tuples exist that match. What guarantees are needed to ensure progress, what guarantees are hard to provide, what guarantees are useful, but not required etc. Is this the most basic abstraction for distribution, upon which other useful abstractions can be built -- or are there other underlying basic abstractions that are needed, are there useful abstractions which cannot be built upon this, etc.