Your software needs to leverage multiple cores, handle thousands of users and terabytes of data, and continue working in the face of both hardware and software failure. Concurrency and parallelism are the keys, and Seven Concurrency Models in Seven Weeks equips you for this new world. See how emerging technologies such as actors and functional programming address issues with traditional threads and locks development. Learn how to exploit the parallelism in your computer's GPU and leverage clusters of machines with MapReduce and Stream Processing. And do it all with the confidence that comes from using tools that help you write crystal clear, high-quality code. This book will show you how to exploit different parallel architectures to improve your code's performance, scalability, and resilience. Learn about the perils of traditional threads and locks programming and how to overcome them through careful design and by working with the standard library. See how actors enable software running on geographically distributed computers to collaborate, handle failure, and create systems that stay up 24/7/365. Understand why shared mutable state is the enemy of robust concurrent code, and see how functional programming together with technologies such as Software Transactional Memory (STM) and automatic parallelism help you tame it. You'll learn about the untapped potential within every GPU and how GPGPU software can unleash it. You'll see how to use MapReduce to harness massive clusters to solve previously intractible problems, and how, in concert with Stream Processing, big data can be tamed. With an understanding of the strengths and weaknesses of each of the different models and hardware architectures, you'll be empowered to tackle any problem with confidence. What You Need: The example code can be compiled and executed on *nix, OS X, or Windows. Instructions on how to download the supporting build systems are given in each chapter.
......(更多)
Paul Butcher 资深程序员,涉猎广泛,从单片机编码到高级声明式编程无所不精。Paul是一位少年天才,8岁时就已经开始在8位机上编写游戏。最近几年他开始痴迷于赛车,想要去叫板汉密尔顿。除本书外,还著有在亚马逊获得全五星好评的《软件调试修炼之道》。
黄炎 现供职于上海爱可生,从事数据库高可用软件开发。简介和代码一样简洁。
......(更多)
......(更多)
线程与锁模型其实是对底层硬件运行过程的形式化。这种形式化即是该模型最大的优点,也是它最大的缺点。
为了增强软件的容错性,并发代码的关键是独立性和故障检测。独立性是指一个故障不会影响到任务以外的其它任务。故障检测是指当一个任务失败时(原因可能是任务崩溃、失去相应或者硬件故障),需要通知负责故障处理的其它任务来处理。
......(更多)