- Drift into Failure
- How Complex Systems Fail
- Antifragile: Things That Gain from Disorder
- Leverage Points: Places to Intervene in a System
- Going Solid: A Model of System Dynamics and Consequences for Patient Safety
- Resilience in Complex Adaptive Systems: Operating at the Edge of Failure
- Puppies! Now that I’ve got your attention, Complexity Theory
- [Towards Resilient Architectures: Biology
Latency Comparison Numbers (~2012) | |
---------------------------------- | |
L1 cache reference 0.5 ns | |
Branch mispredict 5 ns | |
L2 cache reference 7 ns 14x L1 cache | |
Mutex lock/unlock 25 ns | |
Main memory reference 100 ns 20x L2 cache, 200x L1 cache | |
Compress 1K bytes with Zippy 3,000 ns 3 us | |
Send 1K bytes over 1 Gbps network 10,000 ns 10 us | |
Read 4K randomly from SSD* 150,000 ns 150 us ~1GB/sec SSD |
package sample.eventdriven.java; | |
import akka.actor.*; | |
import akka.persistence.AbstractPersistentActor; | |
import scala.concurrent.duration.Duration; | |
import java.io.Serializable; | |
import java.util.concurrent.TimeUnit; | |
import java.util.concurrent.TimeoutException; |
Slightly disorganized but reasonably complete notes on the algorithms, strategies and optimizations of the Akka Cluster implementation. Could use a lot more links and context etc., but was just written for my own understanding. Might be expanded later.
Links to papers and talks that have inspired the implementation can be found on the 10 last pages of this presentation.
This is the Gossip state representation:
lost(arg, function(err, result) { | |
if(err) return console.log(err); | |
In(result, function(err, result) { | |
if(err) return console.log(err); | |
callback(result, function(err, result) { | |
if(err) return console.log(err); | |
hell(result); | |
}); | |
}); | |
}); |
package sample.eventdriven.scala | |
import akka.actor.{Actor, ActorRef, ActorSystem, Inbox, Props} | |
import akka.persistence.PersistentActor | |
import scala.concurrent.ExecutionContext.Implicits._ | |
import scala.concurrent.duration._ | |
// =============================================================== | |
// Demo of an Event-driven Architecture in Akka and Scala. |
Transactors: Actors + STM | |
Actors are excellent for solving of problems where you have many independent processes | |
that can work in isolation and only interact with other Actors through message passing. | |
This model fits many problems. But the actor model is unfortunately a terrible model for | |
implementing truly shared state. E.g. when you need to have consensus and a stable view of | |
state across many components. The classic example is the bank account to clients to | |
deposits and withdrawals in which each operation needs to be atomic. For detailed | |
discussion on the topic see this JavaOne presentation: | |
http://www.slideshare.net/jboner/state-youre-doing-it-wrong-javaone-2009. |
/* | |
Copyright 2012 Twitter, Inc. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
http://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
These guidelines are meant to be a living document that should be changed and adapted as needed. We encourage changes that makes it easier to achieve our goals in an efficient way.
These guidelines mainly applies to Typesafe’s “mature” projects - not necessarily to projects of the type ‘collection of scripts’ etc.
This is the process for committing code into master. There are of course exceptions to these rules, for example minor changes to comments and documentation, fixing a broken build etc.