User loginNavigation |
Connections between Transactions and Promises/Futures?I've been spinning my wheels on this for awhile, so I'm hoping LtU has an answer: has there been any connection derived between transactions and promises/logic variables? I'm considering here promises as implemented in Alice ML and at least ACI properties of transactions minus the D. The connection is more apparent in a personal project where this came up, so apologies if this seems ridiculous at first. If you view the store as an immutable pair: type 'a Store = { current: 'a; future: 'a Store Future } beginning a transaction consists of starting a computation with the promise for that future: val begin_trans: 'a Store -> ('a Store Promise -> ()) -> () and committing a transaction consists of resolving the promise for that future val commit_trans: 'a Store Promise -> 'a Store -> () Of course, transactions can nest stack-like, and one could recreate this by creating more promises down the call chain which get resolved as calls return. Of course, promises also permit non-nested resolution if needed (though I'm sure that sounds ridiculous for transactions). It seems a little tenuous as I've glossed over many details and LtU isn't the place for detail design discussions, but hopefully it's understandable enough that someone can point out where this has been already been discussed, or tell me how ludicrous the entire idea is. By naasking at 2009-11-19 00:13 | LtU Forum | previous forum topic | next forum topic | other blogs | 6265 reads
|
Browse archives
Active forum topics |
Recent comments
13 weeks 4 days ago
13 weeks 4 days ago
13 weeks 4 days ago
35 weeks 6 days ago
40 weeks 1 day ago
41 weeks 5 days ago
41 weeks 5 days ago
44 weeks 3 days ago
49 weeks 10 hours ago
49 weeks 11 hours ago