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 | 6316 reads
|
Browse archives
Active forum topics |
Recent comments
22 weeks 6 days ago
22 weeks 6 days ago
22 weeks 6 days ago
45 weeks 19 hours ago
49 weeks 2 days ago
50 weeks 6 days ago
50 weeks 6 days ago
1 year 1 week ago
1 year 6 weeks ago
1 year 6 weeks ago