Log in

(no subject)

After thinking about the article for some two days or so I start to get the feeling that a "transaction" as seen here is very close to the concept of "monad" from functional programming, as used in Haskell specifically, where any sequences of operations in a sequential programming sense are encapsulated in a Monad to hide side effects from the purely "functional world" inside a functional program.

What transactional memory achieves is encapsulation of the side effect of interacting with other processes, which can be likened to I/O really, as passed a token between these processes would be equivalent to taking a lock. So we could as well call it "monadic memory" - what we want to hide is the interaction with something outside of our smooth program flow. Two communicating Haskell processes could conveniently encapsulate their IPC as a monadic operation implemented by a transaction through a TM.

That is hardly a coincidence: when some research projects in the 70ies and 80ies tried to deal with massive parallelism they often came up with functional programming and distributed reduction of the parse-tree bottom-up as the way to go about things. Such was the case with e.g. the japanese fifth generation computer. Those would use Prolog to achieve a functional approach to the problem. (I'm told the Connection Machine did something similar.)

One *could* argue that by actively avoiding to redefine our problems in domain-specific languages (functional, data flow etc) we have come to the point where features of these languages come creeping in from the bottom layer of the architecture. On the other hand one could also argue that this way only the features that we really need from these languages have crystallized from the hardware side of things.

Anyway, thanks for an extremely thought-provoking article that really made me think about things!

Linus Walleij

Comment Form

No HTML allowed in subject


Notice! This user has turned on the option that logs your IP address when posting. 

(will be screened)