Documentation ¶
Index ¶
- type Config
- type DecodedBatchReadRequest
- type Frontend
- func (fe *Frontend) Close()
- func (fe *Frontend) GetConfig(args *interface{}, reply *common.Config) error
- func (fe *Frontend) GetName(args *interface{}, reply *string) error
- func (fe *Frontend) GetUpdates(args *common.GetUpdatesArgs, reply *common.GetUpdatesReply) error
- func (fe *Frontend) Read(args *common.EncodedReadArgs, reply *common.ReadReply) error
- func (fe *Frontend) Write(args *common.WriteArgs, reply *common.WriteReply) error
- type FrontendServer
- type Replica
- type ReplicaServer
- type Shard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { *common.Config // How many read requests should be made of the PIR server at a time? ReadBatch int // What's the minimum frequency when pending writes should be applied? WriteInterval time.Duration `json:",string"` // What's the minimum frequency when pending reads should be applied? ReadInterval time.Duration `json:",string"` // The trust domain this server is within. Includes keychain for the server. TrustDomain *common.TrustDomainConfig // In client read requests, which index is relevant for this server. TrustDomainIndex int }
Config represents the configuration needed to start a Talek server. configurations can be generated through util/talekutil
type DecodedBatchReadRequest ¶
type DecodedBatchReadRequest struct { Args []common.PirArgs ReplyChan chan *common.BatchReadReply }
DecodedBatchReadRequest represents a set of PIR args from clients. The Centralized server manages decoding of read requests to the client and applying the PadSeed for the TrustDomain
type Frontend ¶
Frontend terminates client connections to the leader server. It is the point of global serialization, and establishes sequence numbers.
func NewFrontend ¶
func NewFrontend(name string, config *Config, replicas []common.ReplicaInterface) *Frontend
NewFrontend creates a new Frontend for a provided configuration.
func (*Frontend) GetUpdates ¶
func (fe *Frontend) GetUpdates(args *common.GetUpdatesArgs, reply *common.GetUpdatesReply) error
GetUpdates provides the most recent global interest vector deltas.
type FrontendServer ¶
type FrontendServer struct { Frontend *Frontend *rpc.Server // contains filtered or unexported fields }
FrontendServer represents an HTTP served Frontend
func NewFrontendServer ¶
func NewFrontendServer(name string, serverConfig *Config, replicas []*common.TrustDomainConfig) *FrontendServer
NewFrontendServer creates a new Frontend implementing HTTP.Handler.
type Replica ¶
type Replica struct { // Channels ReadBatch []*common.ReadRequest ReadChan chan *common.ReadRequest // contains filtered or unexported fields }
Replica implements a centralized talek replica.
func NewReplica ¶
NewReplica creates a new Replica server.
func (*Replica) BatchRead ¶
func (r *Replica) BatchRead(args *common.BatchReadRequest, reply *common.BatchReadReply) error
BatchRead performs a set of reads against the talek database at one logical point in time. BatchRead is replicated to followers with a batching determined by the leader.
func (*Replica) Close ¶
func (r *Replica) Close()
Close shuts down active reading and writing threads of the server.
func (*Replica) Write ¶
func (r *Replica) Write(args *common.ReplicaWriteArgs, reply *common.ReplicaWriteReply) error
* PUBLIC METHODS (threadsafe) * TODO: need a receive queue serializer to be able to pause on missing seq numbers and process only in order - in case conn between leader and replica needs restart.
type ReplicaServer ¶
type ReplicaServer struct { Replica *Replica *rpc.Server // contains filtered or unexported fields }
ReplicaServer is an RPC server for a Replica
func NewReplicaServer ¶
func NewReplicaServer(name string, backing string, serverConfig Config) *ReplicaServer
NewReplicaServer creates a new Replica served over HTTP
type Shard ¶
type Shard struct { *pir.Server *pir.DB Entries []cuckoo.Item *cuckoo.Table // contains filtered or unexported fields }
Shard represents a single shard of the PIR database. It runs a thread handling processing of incoming requests. It is responsible for the logic of placing writes into memory and managing a cuckoo hash table for doing so, and of driving the PIR daemon.
func NewShard ¶
NewShard creates an interface to a PIR daemon at socket, using a given server configuration for sizing and locating data.
func (*Shard) BatchRead ¶
func (s *Shard) BatchRead(args *DecodedBatchReadRequest)
BatchRead performs a read of a set of client requests against the database.