知识库--STM内存事务简介(118)
来源:互联网 发布:2017最新网络热点话题 编辑:程序博客网 时间:2024/04/25 23:25
Shared mutable variables had to synchronize. Instead of relaxing and enjoying that feeling of a job well done, you probably had a nagging feeling of doubt, wondering whether you managed to synchronize in all the right places. My programming has involved quite a few such unnerving(不安) moments. That is mostly because of shared mutable state in Java failing the principle of least surprises. If we forget to synchronize, then unpredictable and potentially catastrophic results await us. But, to err is human; to forget is our nature. Rather than punish us, the tools we rely on should compensate for our deficiencies and help reach the targets our creative minds seek. For predictable behavior and results, we need to look beyond the JDK.
In this chapter, we’ll learn how to play it safe with shared mutability using the STM(Software Transactional Memory) model popularized by Clojure. Where possible, we can switch to or mix in Clojure on projects. But we are not forced to use Clojure, because there are ways to use STM directly in Java, thanks to nice tools like Multiverse(https://blenderartists.org/forum/showthread.php?109649-Blender-to-Multiverse-Export-Tool) and Akka(http://doc.akka.io/docs/akka/2.0/intro/getting-started-first-java.html). How to program transactional memory in Java. This model of programming is quite suitable when we have frequent reads and very infrequent write collisions(冲突)–it is simple to use yet gives predictable results.
learning:
1 Synchronization Damns Concurrency
2 The Deficiency of the Object Model(对象模型的缺陷)
3 Separation of Identity and State
4 Software Transactional Memory(STM)
5 Transactions in STM
6 Concurrency Using STM
7 Concurrency Using Akka/Multiverse STM
8 Creating Transactions
9 Creating Nested Transactions
10 Configuring Akka Transactions
11 Blocking Transactions – Sensible Wait
12 Commit and Rollback Events
13 Collections and Transactions
14 Dealing with the Write Skew Anomaly
15 Limitations of STM
- 知识库--STM内存事务简介(118)
- 知识库--STM(118)
- 知识库--SingleThreadModel STM(53)
- GCC 4.7的软件事务内存(STM)实现框架
- Akka的软件事务内存 (STM)
- 知识库--Concurrency Using STM(122)
- akka学习教程(九) STM软件事务内存
- 知识库--Creating Nested Transactions By Akka 内存嵌套事务(129)
- 知识库--Limitations of STM 【高并发写 not in favor】(137)
- 知识库--Akka 事务配置-using jvm(134)
- STM
- 【知识库】--spring --bean的加载简介(226)
- 理解Clojure STM 软件事务性内存
- STM —— 软件事务性内存
- 内存访问指令:ldr、str、ldm、stm
- 浅析Spring 事务(十九) 简介事务
- 事务简介
- 事务简介
- Java中BufferedReader和scanner的对比
- KMP算法
- MySQL 时间差、每15分钟统计一次数据
- Python基础差缺补漏
- 关于CPU的几个小知识
- 知识库--STM内存事务简介(118)
- 记录PHP易错题
- Java 线程面试题 Top 50(转 ImportNew)
- Node * a 与Node* &a
- .NET软件工程师知识要求
- Maven学习 (一) 搭建Maven环境
- 1
- 删除mac电脑中已在应用程序中删除在launchpad还有残留图标的应用
- 2