This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.io.RandomAccessFile | |
import java.nio.channels.FileChannel | |
import org.jboss.netty.buffer.{ByteBufferBackedChannelBuffer, ChannelBuffer, ChannelBuffers} | |
/** | |
* Maps a the filename to a memory mapped random access file across 1 or more buffers. | |
* Support files up to Long.MAX_VALUE. | |
* | |
* @param filename the file to map | |
* @param maxBufferSize the maximum number of bytes to map per buffer |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
import socket | |
import re | |
from time import sleep | |
from os import system | |
from threading import Thread | |
from optparse import OptionParser | |
parser = OptionParser() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import scala.collection.mutable.ListBuffer | |
import akka.actor.{Actor,ActorRef} | |
import akka.actor.Actor._ | |
import akka.routing.{ Listeners, Listen } | |
//Represents a domain event | |
trait Event | |
//A builder to create domain entities | |
trait EntityBuilder[Entity] { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import akka.actor.{Actor, FSM} | |
import java.util.concurrent.TimeUnit | |
sealed trait Health | |
case object Stale extends Health | |
case object Alive extends Health | |
case object Dead extends Health | |
case object HeartBeat |