Migrating MultiMLton to the Cloud
暂无分享,去创建一个
A functional programming discipline, combined with abstractions like Concurrent ML’s first-class synchronous events, offers an attractive programming model for shared-memory concurrency. In particular, synchronous message-passing eases the burden of coordinating and reasoning about concurrent threads by having a communication action serve double-duty as a both a data transfer mechanism (sending or receiving data on a typed channel) as well as a synchronization point (senders and receivers block until a matching action is available). In high-latency distributed environments, like the cloud, however, synchronous communication comes with a high price in performance, given the significant cost of communicating data from one node to another. While switching to an explicitly asynchronous communication model may reclaim some of the performance lost in a synchronous world, by helping to mask communication overheads, program structure and understanding also becomes more complex. To ease the challenge of migrating concurrent applications to distributed cloud environments, we have built an extension of the MultiMLton compiler and runtime suitable that implements CML communication asynchronously, but guarantees that the resulting execution is faithful to the synchronous semantics of CML. We exploit MultiMLton’s support for lightweight checkpointing and rollback to integrate a notion of speculation that allows ill-formed executions to be re-executed, replacing offending asynchronous executions with safe synchronous ones. Several realistic case studies deployed on the Amazon EC2 demonstrate the utility of our approach.
[1] Suresh Jagannathan,et al. Lightweight checkpointing for concurrent ML , 2010, Journal of Functional Programming.
[2] Kunle Olukotun,et al. STAMP: Stanford Transactional Applications for Multi-Processing , 2008, 2008 IEEE International Symposium on Workload Characterization.
[3] John H. Reppy,et al. Concurrent programming in ML , 1999 .
[4] Jean Ferrié,et al. Serialization of concurrent operations in a distributed collaborative environment , 1997, GROUP.