Package

curiodb

Permalink

package curiodb

Visibility
  1. Public
  2. All

Type Members

  1. abstract class Aggregate[T] extends Actor with CommandProcessing with ActorLogging

    Permalink

    Aggregate is the base actor class for aggregate commands.

    Aggregate is the base actor class for aggregate commands. An aggregate command is one that requires data for multiple keys, and therefore must retrieve data from multiple Node actors - this means that normal ClientNode -> KeyNode -> Node flow for a command does not suffice. Each of these command generally have a corresponding Aggregate subclass.

    The flow of an aggregate command is one where a ClientNode creates a temporary Aggregate actor that lives for the lifecycle of the command being responded to - upon receiving a command, the Aggregate actor breaks the command into the individual key/name/args required per key, and sends these on the normal KeyNode -> Node flow, with the Aggregate actor itself being the Command destination for the response, rather than a ClientNode. The Aggregate actor knows how many responses it requires (usually given by the number of keys/nodes it deals with), and once all nodes have responded, it then constructs the command's Response to send back to the ClientNode.

    The construction of each Aggregate subclass takes a type parameter specifying the response type it expects back from each Node, as well as a command it will send to each Node it messages.

    Various aspects of the aggregation flow can be controlled by overriding methods.

  2. class AggregateBitOp extends Aggregate[BitSet]

    Permalink

    Aggregate for the BITOP command.

    Aggregate for the BITOP command. Conceptually similar to AggregateSetStore where the results are reduced then stored, defering the final response to the Node being written to.

  3. abstract class AggregateBroadcast[T] extends Aggregate[T]

    Permalink

    Base Aggregate for all commands that need to communicate with *all* KeyNode actors, namely PUBSUB with the CHANNELS subcommand, and each of the commands that deal with the keyspace itself, namely KEYS/SCAN/DBSIZE/RANDOMKEY/DEL/EXISTS/FLUSHDB/FLUSHALL.

    Base Aggregate for all commands that need to communicate with *all* KeyNode actors, namely PUBSUB with the CHANNELS subcommand, and each of the commands that deal with the keyspace itself, namely KEYS/SCAN/DBSIZE/RANDOMKEY/DEL/EXISTS/FLUSHDB/FLUSHALL.

    As these commands don't deal with keys, define keys to means an incremental integer, one for each KeyNode actor in the system.

  4. trait AggregateCommands extends CommandProcessing

    Permalink

    AggregateCommands is exclusively part of ClientNode, but defined separately here for clarity.

    AggregateCommands is exclusively part of ClientNode, but defined separately here for clarity. A ClientNode is responsible for managing a single client connection, and handles certain commands that don't go through the normal ClientNode -> KeyNode -> Node flow. While some of these don't deal with Node actors at all, the bulk are commands that must aggregate values from multiple Node actors, which are all defined here. See the base Aggregate class for more detail.

  5. class AggregateDBSize extends BaseAggregateKeys

    Permalink
  6. class AggregateDel extends BaseAggregateBool

    Permalink

    Aggregate for the DEL command.

  7. class AggregateFlushAll extends AggregateSimpleReply

    Permalink

    Aggregate for the FLUSHALL command.

    Aggregate for the FLUSHALL command. It simply sends off the corresponding internal command to all KeyNode actors.

  8. class AggregateFlushDB extends AggregateSimpleReply

    Permalink

    Aggregate for the FLUSHDB command.

    Aggregate for the FLUSHDB command. It simply sends off the corresponding internal command to all KeyNode actors.

  9. class AggregateHyperLogLogCount extends Aggregate[Long]

    Permalink

    Aggregate for the PFCOUNT command.

    Aggregate for the PFCOUNT command. Simpy runs HLL count on the Node for each key given, and sums the results.

  10. class AggregateHyperLogLogMerge extends Aggregate[HLL]

    Permalink

    Aggregate for the PFMERGE command.

    Aggregate for the PFMERGE command. Reduces each HLL with a union operation, storing the final result in the Node for the given key.

  11. class AggregateKeys extends BaseAggregateKeys

    Permalink

    Aggregate for the KEYS command.

    Aggregate for the KEYS command. Simply combines all keys returned

  12. class AggregateMGet extends Aggregate[String]

    Permalink

    Aggregate for the MGET command.

    Aggregate for the MGET command. Probably the simplest Aggregate as it literally sends GET to each key, sending a list of responses back to the ClientNode.

  13. class AggregateMSetNX extends BaseAggregateBool

    Permalink

    Aggregate for the MSETNX command.

    Aggregate for the MSETNX command. We first query the KeyNode actors for each key existing, and only send values to store in Node actors if none of the keys exist, as per the MSETNX command's behavior.

  14. class AggregatePubSubChannels extends AggregateBroadcast[Iterable[String]]

    Permalink

    Aggregate for the PUBSUB CHANNELS command/subcommand.

    Aggregate for the PUBSUB CHANNELS command/subcommand. Simply builds a list of channels returned.

  15. class AggregatePubSubNumSub extends Aggregate[Int]

    Permalink

    Aggregate for the PUBSUB NUMSUB command/subcommand.

    Aggregate for the PUBSUB NUMSUB command/subcommand. This is a normal Aggregate subclass that simply returns a list of responses.

  16. class AggregateRandomKey extends AggregateBroadcast[String]

    Permalink

    Aggregate for the RANDOMKEY command.

    Aggregate for the RANDOMKEY command. To avoid pulling down all keys, each KeyNode has an internal _RANDOMKEY command, and we then draw a random one of these.

  17. class AggregateScan extends BaseAggregateKeys

    Permalink

    Aggregate for the SCAN command.

    Aggregate for the SCAN command. Applies scan behavior in the same way as the SSCAN/HSCAN/ZSCAN commands.

  18. class AggregateScriptExists extends AggregateBroadcast[Iterable[String]]

    Permalink

    Aggregate for the SCRIPT EXISTS command.

  19. class AggregateSet extends BaseAggregateSet

    Permalink

    Aggregate for all of the non-storing set commands, namely SDIFF/SINTER/SUNION.

    Aggregate for all of the non-storing set commands, namely SDIFF/SINTER/SUNION. It glues together the reducing operation with the completion process.

  20. abstract class AggregateSetReducer[T] extends Aggregate[T]

    Permalink

    Base Aggregate for all of the set operation commands, namely SDIFF/SINTER/SUNION/SDIFFSTORE/SINTERSTORE/SUNIONSTORE.

    Base Aggregate for all of the set operation commands, namely SDIFF/SINTER/SUNION/SDIFFSTORE/SINTERSTORE/SUNIONSTORE. It simply defines the set operation based on the command name, that will be used in subclasses to reduce the results to a single set.

  21. class AggregateSetStore extends BaseAggregateSet

    Permalink

    Aggregate for all of the storing set commands, namely SDIFFSTORE/SINTERSTORE/SUNIONSTORE.

    Aggregate for all of the storing set commands, namely SDIFFSTORE/SINTERSTORE/SUNIONSTORE. It overrides the completion process to store the reduced results in the appropriate Node, and abort sending a response which will be handled by the final Node being written to.

  22. abstract class AggregateSimpleReply extends AggregateBroadcast[String]

    Permalink

    Base Aggregate for commands that don't need data for a reply, namely FLUSHDB/FLUSHALL.

  23. class AggregateSortedSetStore extends AggregateSetReducer[IndexedTreeMap[String, Int]]

    Permalink

    Aggregate for all of the sorted set commands, namely ZINTERSTORE/ZUNIONSTORE.

    Aggregate for all of the sorted set commands, namely ZINTERSTORE/ZUNIONSTORE. It is very different from its AggregateSetStore counterpart, given the AGGREGATE/WEIGHTS args it supports.

  24. abstract class BaseAggregateBool extends AggregateBroadcast[Iterable[Boolean]]

    Permalink

    Base Aggregate for commands that deal with boolean responses from each KeyNode actor, namely DEL/MSETNX.

    Base Aggregate for commands that deal with boolean responses from each KeyNode actor, namely DEL/MSETNX.

    There are two ways this could be implemented, considering both commands accept multiple keys, and we don't know which KeyNode instances the keys belong to. The first approach, which we don't use, would be to send individual messages per keys, each with a single command and key - this would ensure each KeyNode only receives the keys it manages, but would mean a large number of messages given a large number of keys.

    Instead we opt for a different approach which is an unintuitive performance consideration - what we do is broadcast *all* keys in the original command to *all* KeyNode instances. We can do this because in each case (DEL/MSETNX) we're only interested in the "true" values returned from each KeyNode, and these are only given for valid keys (eg keys that belong to the KeyNode). So we get a bunch of extraneous "false" values in the responses, for each key that didn't actually belong to a KeyNode, but this does not affect the final result for DEL/MSETNX. The end result here is that we only send a message per KeyNode instead of a message per key, which performs incredibly better, even though we send a ton of redundant keys around.

  25. abstract class BaseAggregateKeys extends AggregateBroadcast[Iterable[String]]

    Permalink

    Base Aggregate for all commands that need to read lists of keys from each KeyNode actor, namely KEYS/SCAN/DBSIZE.

  26. abstract class BaseAggregateSet extends AggregateSetReducer[Set[String]]

    Permalink

    Base Aggregate for all of the non-storing set commands, namely SDIFF/SINTER/SUNION.

    Base Aggregate for all of the non-storing set commands, namely SDIFF/SINTER/SUNION. All it does is define the command used for retrieving all members for each key, namely SMEMBERS.

  27. class BitmapNode extends Node[BitSet]

    Permalink

    Bitmap commands.

    Bitmap commands. For simplicity the bitmap commands have their own Node type which uses a BitSet for its underlying value.

  28. case class CallArgs(args: Seq[String], clientId: String) extends Product with Serializable

    Permalink

    Args given to pcall/call functions inside a Lua script, that will be used to construct a Command payload from a LuaClientNode actor.

  29. class CallFunction extends VarArgFunction

    Permalink

    Lua API for pcall/call.

    Lua API for pcall/call. When called, it takes the args provided, constructs a CallArgs payload from them, creates a temporary LuaClientNode actor and sends them to it using the ask pattern. The raiseErrors arg marks the different behavior when a runtime Lua error occurs via pcall/call - specifically whether a LuaError is raised (as with call), or a message table containing the error is returned (as with pcall).

  30. abstract class ClientNode extends Node[Null] with PubSubClient with AggregateCommands with ScriptingClient

    Permalink

    A ClientNode is a special type of Node in the system.

    A ClientNode is a special type of Node in the system. It does not represent any key/value provided by a client, but instead is responsible for managing the life-cycle of a single client connection.

    ClientNode is subclassed according to each external protocol supported, such as the Redis protocol over TCP, JSON over HTTP, and also the Lua pcall/call scripting API. Each subclass is responsible for converting its input into a Command payload, and converting Response payloads back to the relevant protocol deal with.

    ClientNode is a Node subclass, as it also handles certain commands itself, such as utiilities that don't need to be routed via KeyNode actors.

  31. case class Command(input: Seq[Any] = Seq(), client: Option[ActorRef] = None, db: String = "0", clientId: String = "", id: String = ..., createdInTransaction: Boolean = false) extends Product with Serializable

    Permalink

    Main payload for a command - stores its name, key, and args, and contains utility methods for looking up attributes configured via commands.conf.

  32. trait CommandProcessing extends Actor

    Permalink

    Actor trait containing behavior for dealing with a Command - it contains a command variable that the class should initially set upon receiving it via the actor's receive method.

    Actor trait containing behavior for dealing with a Command - it contains a command variable that the class should initially set upon receiving it via the actor's receive method. Used by anything that a Command passes through, such as all ClientNode, KeyNode, Node, and Aggregate actors.

  33. case class ErrorReply(message: String = "syntax error", prefix: String = "ERR") extends Product with Serializable

    Permalink

    An error response, as per Redis protocol.

  34. class HashNode extends Node[Map[String, String]]

    Permalink

    Hash commands.

  35. class HttpClientNode extends JsonClientNode

    Permalink

    ClientNode that manages a single HTTP request - it extracts the JSON args list from it and constructs a Command payload from them, and then waits to receive back a Response payload, which it converts back to JSON before returning it as a HTTP response.

    ClientNode that manages a single HTTP request - it extracts the JSON args list from it and constructs a Command payload from them, and then waits to receive back a Response payload, which it converts back to JSON before returning it as a HTTP response.

    In the case of SUBSCRIBE/PSUBSCRIBE commands, state is changed into a chunked mode which holds the connection open and can send multiple PubSub messages back as chunked responses.

  36. class HttpServer extends Actor

    Permalink

    Actor for the HTTP server that registers creation of a HttpClientNode for each connection made.

  37. class HyperLogLogNode extends Node[HLL]

    Permalink

    HyperLogLog commands.

    HyperLogLog commands. For simplicity the hyperloglog commands have their own Node type which uses a net.agkn.hll.HLL for its underlying value.

  38. abstract class JsonClientNode extends ClientNode

    Permalink

    Base ClientNode for HTTP and WebSocket ClientNode actors - provides methods for converting to/from JSON, and cleanup on disconnect.

  39. class KeyNode extends Node[Map[String, Map[String, NodeEntry]]] with PubSubServer with ScriptingServer

    Permalink

    A KeyNode is a special type of Node in the system.

    A KeyNode is a special type of Node in the system. It does not represent any key/value provided by a client, but instead is responsible for managing the keyspace for a subset of keys in its value field, which contains a map of DB names, mapped to keys, mapped to nodes, where each node is represented by a NodeEntry. KeyNode takes on the role of a Node, as there are a variety of commands that logically belong to it.

    When a ClientNode (the other special type of node, responsble for handling a single client) receives a command for a particular key, the command is first routed to the KeyNode responsible for that key. The KeyNode maps each key to an ActorRef for the key's actual node (StringNode, ListNode, etc), having first created the Node actor at some point (this actually occurs when the key/node doesn't exist and, a command is run that doesn't have a default defined, and writes, as per in commands.conf), and forwards each command onto the Node when received. The routing strategy used is configurable via Akka (actor.deployment./keys.router in application.conf), defaulting to the consistent-hashing-pool router.

    A KeyNode also handles many commands itself that deal with key management, such as deleting, persisting, and expiring keys. Each NodeEntry instance stores a Option(Long/Cancellable) pair which if expiring, contains the timestamp of when the expiry will occur, and the Cancellable task that will actually run, deleting the node. Deletion of a node (either via expiry or the DEL command) simply sends a message to the Node actor which when received, shuts down the actor, and then removes the key and NodeEntry from the keyspace map.

    Lastly worthy of discussion is a feature that Redis does not provide, virtual memory, which simply allows a Node to persist its value to disk, and shut down after a period of time (defined by the curiodb.sleep-after duration value in reference.conf). The difference between this occurring and a Node being deleted, is that the key and NodeEntry is kept in the keyspace map. This is also why the ActorRef for each Node in a NodeEntry is an Option - a value of None indicates a sleeping Node. When a command is run against a key mapped to a sleeping Node, a new Node actor is created, which will read its previous value from disk. The idea here is to allow more data to be stored in the system than can fit in memory.

  40. class ListNode extends Node[ListBuffer[String]]

    Permalink

    ListNode supports blocking commands (BLPOP, BRPOP, etc) where if the list is empty, no immediate response is sent to the client, and when the next command is run that adds to the list, we essentially retry the original blocking command, and if we can perform it (eg pop), we then send the requested value back to the client.

    ListNode supports blocking commands (BLPOP, BRPOP, etc) where if the list is empty, no immediate response is sent to the client, and when the next command is run that adds to the list, we essentially retry the original blocking command, and if we can perform it (eg pop), we then send the requested value back to the client. This is implemented by storing an ordered set of Command instances that are blocked, and iterating them each time the next Command is received and processed. Timeouts are also supported via the scheduler, which simply removes the blocked Command from the set, and sends a null Response back to the ClientNode.

  41. class LogFuncton extends TwoArgFunction

    Permalink

    Lua API for the log function.

  42. class LuaClientNode extends ClientNode

    Permalink

    To implement call/pcall as synchronous functions, we need to use Akka's ask pattern.

    To implement call/pcall as synchronous functions, we need to use Akka's ask pattern. Since each of the Node types only support sending messages forwards (using tell), LuaClientNode is used as a temporary actor that coordinates a command being run with the ask pattern. It's also a ClientNode as it needs to construct Command payloads from a sequence of args, in its case, those provided by the pcall/call functions within a Lua script, and needs to be able to perform the same commands a ClientNode can, such as SELECT/TIME/etc.

    The ask flow is initiated when the LuaClientNode receives the CallArgs payload, constructed from the pcall/call function args in CallFunction below.

  43. abstract class Node[T] extends PersistentActor with CommandProcessing with ActorLogging

    Permalink

    Node is the base actor class that all concrete node types subclass Specifically, there is a concrete Node class for each data type namely: StringNode for strings, HashNode for hashes, etc.

    Node is the base actor class that all concrete node types subclass Specifically, there is a concrete Node class for each data type namely: StringNode for strings, HashNode for hashes, etc. There are also some special Node types, such as KeyNode which manages the key space for regular Node actors, and ClientNode which manages a single client connection.

    The base class here defines the core features of a Node actor, namely:

    • Its data value, typed by the type parameter that concrete subclasses must define.
    • Execution of the node's CommandRunner each time a Command is received.
    • Optionally persisting the node's value to disk (snapshotting) after a command has been handled (second point above), cleaning up older snapshots, and restoring from a snapshot on startup.

    Persistence warrants some discussion: we use akka-persistence, but not completely, as event sourcing is not used, and we rely entirely on its snapshotting feature, only ever keeping a single snapshot. This was basically the easiest way to get persistence working. We always store a reference to the last snapshot's meta-data (the lastSnapshot var) so that we can delete old snapshots whenever a new one is saved. As for saving, this is controlled via the config var curiodb.persist-after which is the duration after which a command runs that writes the node's value (described as writable in the commands.conf file). When one of these commands runs, we call save, which will schedule a Persist message back to the node itself. This is based on the assumption that there's no guarantee an actor's recieve and scheduler won't both execute at the exact same time, so we have everything run through receive. The persisting var stores whether persisting has been scheduled, to allow extra save calls to do nothing when persisting has already been scheduled.

  44. case class NodeEntry(kind: String, node: Option[ActorRef] = None, expiry: Option[(Long, Cancellable)] = None, sleep: Option[Cancellable] = None, deletedInTransaction: Boolean = false) extends Serializable with Product

    Permalink

    A KeyNode manages a subset of keys, and stores these by mapping DB names to keys to nodes, where nodes are represented by a NodeEntry.

    A KeyNode manages a subset of keys, and stores these by mapping DB names to keys to nodes, where nodes are represented by a NodeEntry.

    Annotations
    @SerialVersionUID()
  45. trait PubSubClient extends CommandProcessing

    Permalink

    PubSubClient is exclusively part of ClientNode, but defined separately here for clarity.

    PubSubClient is exclusively part of ClientNode, but defined separately here for clarity. A ClientNode is responsible for managing a single client connection, and PubSubClient is required to store a set of channels and patterns its subscribed to, similar to the way PubSubServer maps these to ClientNode ActorRef instances.

  46. case class PubSubEvent(event: String, channelOrPattern: String) extends Product with Serializable

    Permalink

    Message sent from PubSubServer/KeyNode to a PubSubClient/ClientNode so that it can manage its own channel/pattern subscriptions.

    Message sent from PubSubServer/KeyNode to a PubSubClient/ClientNode so that it can manage its own channel/pattern subscriptions. See PubSubServer for more detail.

  47. trait PubSubServer extends CommandProcessing

    Permalink

    PubSubServer is exclusively part of KeyNode, but defined separately here for clarity.

    PubSubServer is exclusively part of KeyNode, but defined separately here for clarity. A KeyNode is responsible for managing the keyspace for a subset of nodes, and therefore the same logic applies to pubsub channels. A PubSubServer (KeyNode) stores channel names mapped to ActorRef values for ClientNode actors (which have corresponding PubSubClient traits, similar to the PubSubServer/KeyNode relationship), which represent all client connections, pubsub or otherwise).

    A significant shortcoming in this design is handling for pattern subscriptions. The problem is that a pattern may match channels that are split across different KeyNode instances. To work around this initially, we actually store *every* pattern subscription on *every* KeyNode. Patterns are stored in the same way as channels, with patterns mapped to ActorRef values for ClientNode actors.

  48. class ReplyFunction extends OneArgFunction

    Permalink

    Lua API for the status_reply/error_reply functions.

    Lua API for the status_reply/error_reply functions. It just returns a message table with the given key and message.

  49. case class Response(value: Any, id: String) extends Product with Serializable

    Permalink

    Response a Node will return to a ClientNode after a command is run.

    Response a Node will return to a ClientNode after a command is run. Primarily used in CommandProcessing.

  50. case class Routable(command: Command) extends ConsistentHashable with Product with Serializable

    Permalink

    Command wrapper for routing it to its correct KeyNode.

  51. class ScriptRunner extends CommandProcessing with ActorLogging

    Permalink

    Scripts stored via the SCRIPT LOAD command are stored in KeyNode actors, and as such, scripts can be run from both KeyNode and ClientNode actors (mixed in with the ScriptingServer and ScriptingClient traits), via the EVALSHA and EVAL commands respectively.

    Scripts stored via the SCRIPT LOAD command are stored in KeyNode actors, and as such, scripts can be run from both KeyNode and ClientNode actors (mixed in with the ScriptingServer and ScriptingClient traits), via the EVALSHA and EVAL commands respectively. Given this, a temporary actor is required to run the script, as it may make synchronous Lua calls to pcall/call, which may result in a command running against the same KeyNode that's running the script - this would fail since the running Lua script would block the command from being run. So - ScriptRunner is merely a temporary actor that runs a Lua script, which is initiated by receiving the original Command payload it can then to respond to.

  52. trait Scripting extends CommandProcessing with ActorLogging

    Permalink

    Base trait for both KeyNode and ClientNode actors that provides the methods for compiling and running Lua scripts.

  53. trait ScriptingClient extends Scripting

    Permalink

    ClientNode mixin that can run scripts directly, or forward the various LOAD subcommands onto the relevant KeyNode actor.

  54. trait ScriptingServer extends Scripting

    Permalink

    KeyNode mixin that stores compiled Lua scripts via the LOAD SCRIPT command, and runs them via the EVALSHA command.

    KeyNode mixin that stores compiled Lua scripts via the LOAD SCRIPT command, and runs them via the EVALSHA command. In the same way PubSub channels leverage the routing implemented for keys, the SHA1 of scripts mimic keys too for distribution.

  55. class SetNode extends Node[Set[String]]

    Permalink

    Set commands.

  56. case class SimpleReply(message: String = "OK") extends Product with Serializable

    Permalink

    A simple response, as per Redis protocol.

  57. case class SortedSetEntry(score: Float, key: String = "")(implicit ordering: Ordering[(Float, String)]) extends Ordered[SortedSetEntry] with Product with Serializable

    Permalink

    A SortedSetEntry is stored for each value in a SortedSetNode.

    A SortedSetEntry is stored for each value in a SortedSetNode. It's essentially a score/key pair which is Ordered.

  58. class SortedSetNode extends Node[(IndexedTreeMap[String, Float], IndexedTreeSet[SortedSetEntry])]

    Permalink

    Sorted sets are implemented slightly differently than in Redis.

    Sorted sets are implemented slightly differently than in Redis. We still use two data structures, but different ones than Redis does. We use IndexedTreeMap to map keys to scores, and IndexedTreeSet to map scores to keys. Both these are provided by the same third-party library.

    Like Redis, IndexedTreeMap is a map that maintains key order, but also (unlike Java and Scala collections) supports indexing (for range queries).

    For scores mapped to keys, unlike Redis' skip list, we use IndexedTreeSet which is an ordered set that also supports indexing. We actually store both score and key (see SortedSetEntry above), which provides ordering by score then by key.

  59. class StringNode extends Node[String]

    Permalink

    String commands.

    String commands. Note that unlike Redis, bitmap and HLL commands have their own data types and corresponding classes, namely BitmapNode and HyperLogLogNode.

  60. class TableGetnFunction extends OneArgFunction

    Permalink

    Lua API for the status_reply/error_reply functions.

  61. class TcpClientNode extends ClientNode

    Permalink

    ClientNode that manages a single TCP connection - it buffers data received in the Redis protocol, until it contains a complete packet it can construct a Command payload with.

  62. class TcpServer extends Actor

    Permalink

    Actor for the TCP server that registers creation of a TcpClientNode for each connection made.

  63. case class TransactionAck(keyCount: Int = 1) extends Product with Serializable

    Permalink

    Message that a Node or KeyNode actor sends back to a ClientNode actor to acknowledge the number of keys it has dealt with after receiving _MULTI or _EXEC commands.

    Message that a Node or KeyNode actor sends back to a ClientNode actor to acknowledge the number of keys it has dealt with after receiving _MULTI or _EXEC commands. See ClientNode.awaitTransactionAcks for more detail.

  64. class WebSocketClientNode extends JsonClientNode with WebSocketServerWorker

    Permalink
  65. class WebSocketServer extends Actor

    Permalink

    Actor for the WebSocket server that registers creation of a WebSocketClientNode for each connection made.

Value Members

  1. object Attributes

    Permalink

    Loads all of the command attributes from commands.conf into a structure (command names mapped to maps of attribute names/values) that Command instances can use to look up their configured attributes.

  2. object Coerce

    Permalink

    Utilities for converting between Lua and JVM values.

    Utilities for converting between Lua and JVM values. Handles manual conversion between Seq and LuaValue, as well as conversion between ErrorReply/SimpleReply and Lua tables (or message tables).

  3. object CurioDB

    Permalink

    Entry point for the system.

    Entry point for the system. It configures Akka clustering, and starts the TCP and HTTP servers once the cluster has formed.

    Currently the number of nodes (instances of the program, not Node actors) in the cluster is fixed in size, given the config value curiodb.nodes, eg:

    curoidb.nodes = {
      node1: "tcp://127.0.0.1:9001"
      node2: "tcp://127.0.0.1:9002"
      node3: "tcp://127.0.0.1:9003"
    }

    We then use this value to configure the various akka.cluster config values. One of the main future goals is to explore Akka's cluster sharding package, which should allow for more dynamic topologies.

  4. object Delete extends ControlMessage with Product with Serializable

    Permalink

    Message that shuts a Node actor down and delete its value from disk.

  5. object LogLevel extends Enumeration

    Permalink

    Log levels.

  6. object Persist extends ControlMessage with Product with Serializable

    Permalink

    Message that a Node actor sends to itself when it's ready to save its value to disk.

    Message that a Node actor sends to itself when it's ready to save its value to disk. See Node.save() for more detail.

  7. object Sleep extends ControlMessage with Product with Serializable

    Permalink

    Message that tells an actor to shut down, but not delete its value from disk - the KeyNode holding its key still contains a reference to it, and a new actor will be started for it the next time a command is received for its key.

    Message that tells an actor to shut down, but not delete its value from disk - the KeyNode holding its key still contains a reference to it, and a new actor will be started for it the next time a command is received for its key. See KeyNode for more detail.

Ungrouped