Documentation ¶
Index ¶
- Constants
- func BenchLatency(numQueries int, coordinatorAddr, logfile string, conf *config.Config)
- func BenchTputEmbed(coordinatorAddr, logfile string)
- func BenchTputOffline(coordinatorAddr, logfile string)
- func BenchTputUrl(coordinatorAddr, logfile string)
- func DumpServerToFileWithoutHint(s *Server, filename string)
- func DumpStateToFile[S TiptoeServer](s *S, filename string)
- func LoadServerFromFileWithoutHint(s *Server, filename string)
- func LoadStateFromFile[S TiptoeServer](s *S, filename string)
- func LocalSetupCoordinator(conf *config.Config)
- func RunClient(coordinatorAddr string, conf *config.Config)
- func RunCoordinator(numEmbServers, numUrlServers, port int, addrs []string, log bool, ...)
- func Serve(servers []*Server, portOffset int) []string
- type AnsType
- type Client
- func (c *Client) Free()
- func (c *Client) NumClusters() int
- func (c *Client) NumDocs() uint64
- func (c *Client) PreprocessQuery() *underhood.HintQuery
- func (c *Client) ProcessHintApply(ans *UnderhoodAnswer)
- func (c *Client) QueryEmbeddings(emb []int8, clusterIndex uint64) *pir.Query[matrix.Elem64]
- func (c *Client) QueryUrls(clusterIndex, docIndex uint64) (*pir.Query[matrix.Elem32], uint64)
- func (c *Client) ReconstructEmbeddings(answer *pir.Answer[matrix.Elem64], clusterIndex uint64) uint64
- func (c *Client) ReconstructEmbeddingsWithinCluster(answer *pir.Answer[matrix.Elem64], clusterIndex uint64) []uint64
- func (c *Client) ReconstructUrls(answer *pir.Answer[matrix.Elem32], clusterIndex, docIndex uint64) string
- func (c *Client) Setup(hint *TiptoeHint)
- type Coordinator
- func (c *Coordinator) ApplyHint(ct *underhood.HintQuery, out *UnderhoodAnswer) error
- func (c *Coordinator) Free()
- func (c *Coordinator) GetEmbeddingsAnswer(query *pir.Query[matrix.Elem64], ans *pir.Answer[matrix.Elem64]) error
- func (c *Coordinator) GetHint(request bool, h *TiptoeHint) error
- func (c *Coordinator) GetUrlsAnswer(query *pir.Query[matrix.Elem32], ans *pir.Answer[matrix.Elem32]) error
- func (k *Coordinator) GobDecode(buf []byte) error
- func (k *Coordinator) GobEncode() ([]byte, error)
- func (c *Coordinator) Serve(port int)
- func (c *Coordinator) Setup(numEmbServers, numUrlServers int, addrs []string, log bool, ...)
- func (c *Coordinator) SetupConns()
- type ExperimentType
- type Perf
- type QueryType
- type Server
- func NewEmbeddingServers(serversStart, serversEnd, clustersPerServer int, hintSz uint64, ...) ([]*Server, []string, []*corpus.Corpus)
- func NewServerFromFile(file string) *Server
- func NewServerFromFileWithoutHint(file string) *Server
- func NewUrlServers(numServers, clustersPerServer int, hintSz uint64, log, wantCorpus, serve bool, ...) ([]*Server, []string, []*corpus.Corpus)
- func (s *Server) Clear()
- func (s *Server) GetEmbeddingsAnswer(query *pir.Query[matrix.Elem64], ans *pir.Answer[matrix.Elem64]) error
- func (s *Server) GetHint(request bool, hint *TiptoeHint) error
- func (s *Server) GetUrlsAnswer(query *pir.Query[matrix.Elem32], ans *pir.Answer[matrix.Elem32]) error
- func (s *Server) GobDecode(buf []byte) error
- func (s *Server) GobEncode() ([]byte, error)
- func (s *Server) PreprocessEmbeddingsFromCorpus(c *corpus.Corpus, hintSz uint64, conf *config.Config)
- func (s *Server) PreprocessUrlsFromCorpus(c *corpus.Corpus, hintSz uint64)
- func (s *Server) Serve(port int)
- type TiptoeHint
- type TiptoeServer
- type UnderhoodAnswer
Constants ¶
View Source
const BLOCK_SZ = 10
Number of servers to launch at once
Variables ¶
This section is empty.
Functions ¶
func BenchLatency ¶
func BenchTputEmbed ¶
func BenchTputEmbed(coordinatorAddr, logfile string)
func BenchTputOffline ¶
func BenchTputOffline(coordinatorAddr, logfile string)
func BenchTputUrl ¶
func BenchTputUrl(coordinatorAddr, logfile string)
func DumpStateToFile ¶
func DumpStateToFile[S TiptoeServer](s *S, filename string)
func LoadStateFromFile ¶
func LoadStateFromFile[S TiptoeServer](s *S, filename string)
func LocalSetupCoordinator ¶
func RunCoordinator ¶
Types ¶
type AnsType ¶
type AnsType interface { TiptoeHint | UnderhoodAnswer | pir.Answer[matrix.Elem64] | pir.Answer[matrix.Elem32] }
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
func (*Client) NumClusters ¶
func (*Client) PreprocessQuery ¶
func (*Client) ProcessHintApply ¶
func (c *Client) ProcessHintApply(ans *UnderhoodAnswer)
func (*Client) QueryEmbeddings ¶
func (*Client) ReconstructEmbeddings ¶
func (*Client) ReconstructEmbeddingsWithinCluster ¶
func (*Client) ReconstructUrls ¶
func (*Client) Setup ¶
func (c *Client) Setup(hint *TiptoeHint)
type Coordinator ¶
type Coordinator struct {
// contains filtered or unexported fields
}
func (*Coordinator) ApplyHint ¶
func (c *Coordinator) ApplyHint(ct *underhood.HintQuery, out *UnderhoodAnswer) error
func (*Coordinator) Free ¶
func (c *Coordinator) Free()
func (*Coordinator) GetEmbeddingsAnswer ¶
func (*Coordinator) GetHint ¶
func (c *Coordinator) GetHint(request bool, h *TiptoeHint) error
func (*Coordinator) GetUrlsAnswer ¶
func (*Coordinator) GobDecode ¶
func (k *Coordinator) GobDecode(buf []byte) error
func (*Coordinator) GobEncode ¶
func (k *Coordinator) GobEncode() ([]byte, error)
func (*Coordinator) Serve ¶
func (c *Coordinator) Serve(port int)
func (*Coordinator) SetupConns ¶
func (c *Coordinator) SetupConns()
type ExperimentType ¶
type ExperimentType int
const ( EMBEDDINGS ExperimentType = 0 URLS ExperimentType = 1 OFFLINE ExperimentType = 2 )
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
func NewEmbeddingServers ¶
func NewServerFromFile ¶
func NewUrlServers ¶
func (*Server) GetEmbeddingsAnswer ¶
func (*Server) GetHint ¶
func (s *Server) GetHint(request bool, hint *TiptoeHint) error
Note: need to keep full hint contents here!!
func (*Server) GetUrlsAnswer ¶
func (*Server) PreprocessEmbeddingsFromCorpus ¶
func (*Server) PreprocessUrlsFromCorpus ¶
type TiptoeHint ¶
type TiptoeServer ¶
type TiptoeServer interface { Server | Coordinator }
type UnderhoodAnswer ¶
type UnderhoodAnswer struct { EmbAnswer underhood.HintAnswer UrlAnswer underhood.HintAnswer }
Click to show internal directories.
Click to hide internal directories.