Remotely

Last updated on March 09, 2016


  1. Home
  2. Manual
  3. Internals

Internals

TODO

Serialization

Float

Floats are encoded into 32 bits according to the IEEE 754 floating-point single precision format

Double

Doubles are encoded into 64 bits according to the [IEEE 754 floating-point double precision format)[http://en.wikipedia.org/wiki/Double-precisionfloating-pointformat#IEEE754double-precisionbinaryfloating-pointformat:binary64]

Int

Ints are encoded as either 32 or 64 bit 2s compliment, big-endian format

Boolean

Booleans are encoded as a single bit, 1 for true and 0 for false.

Array[Byte]

Byte arrays are stored as a 32-bit signed integer representing the number of bytes, followed by the actual bytes.

String

Strings are UTF-8 encoded into an Array of bytes, then serialized as Array[Byte] above

Sequences: List[A], Seq[A], IndexedSeq[A], Set[A], SortedSet[A]

Sequence like structures are all stored as a 32-bit signed integer representing the number of items in the collection followed by the bytes for each member of the collection

Option[A]

Optional values are represented by a single bit indicating if a byte encoding of the value follows.

Tuple2..7

Tuples are represented by a concatenation of the byte representation of each tuple member.

Disjunctions: A \/ B, Either[A,B]

Disjunctions are represented as a single bit discrimnator which indicates if the following bytes represent an A value or a B value. A zero bit indicates that A bytes follow, and a one bit indicates that B bytes follow

Map[A,B] / SortedMap[A,B]

Maps are encoded by converting them first to a Sequence of Tuple2 values (representing Key followed by Value), which is then encoded as an above List[(A,B)] would be.

Execution Context

An execution context is serialized as a Map[String,String] followed by a List[UUID] where uuid is encoded as 128 bits as documented here

Networking

TODO

Akka I/O

Currently the network I/O in remotely is currently all plumbed through Akka I/O internally.

TODO

KeepAlive