core hello world /

open Core.Std
open Async.Std

module Username : Identifiable = String
module Topic    : Identifiable = String

module Message = struct
  type t = { text: string;
             topic: Topic.t;
             from: Username.t;
             time: Time.t;
  with sexp, bin_io, compare

module Dump = struct
  type single = { topic : Topic.t;
                  message : Message.t;
                  num_subscribers: int;
  with sexp,bin_io, compare
  type t = single list with sexp,bin_io, compare

let publish_rpc = Rpc.Rpc.create

let subscribe_rpc = Rpc.Pipe_rpc.create

let dump_rpc = Rpc.Rpc.create

let shutdown_rpc = Rpc.Rpc.create