service

package
v0.0.0-...-24728fd Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 29, 2022 License: GPL-3.0 Imports: 4 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

type Service struct {
	SrvHub *net.UDPConn
	// contains filtered or unexported fields
}

func InitService

func InitService(port int, msgChan chan interface{}) *Service

func (*Service) DirectReply

func (s *Service) DirectReply(r *message.Reply) error

func (*Service) Execute

func (s *Service) Execute(v, n, seq int64, o *message.Request) (reply *message.Reply, err error)
Each replica i executes the operation requested by m  after committed-local(m, v, n, i)is true and i’s state

reflects the sequential execution of all requests with lower sequence numbers. This ensures that all non- faulty replicas execute requests in the same order as required to provide the safety property. After executing the requested operation, replicas send a reply to the client. Replicas discard requests whose timestamp is lower than the timestamp in the last reply they sent to the client to guarantee exactly-once semantics.

We do not rely on ordered message delivery, and therefore it is possible for a replica to commit requests out

of order. This does not matter since it keeps the pre- prepare, prepare, and commit messages logged until the corresponding request can be executed.

func (*Service) WaitRequest

func (s *Service) WaitRequest(sig chan interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL