/go-mansbridge

Go Implementation of the newscast protocol for distributed agents

Primary LanguageGo

Initial Golang implementation of the "newscast model is a general approach for communication in large agent-based distributed systems"

Named for Canada's premiere newscaster, Peter Mansbridge

This is a simplied implementation of the protocol outlined in the original paper, based on the author's subsequent paper on their own implementation

Will hopefully expand to cover more of the details outlined in the original paper.

Usage:

  • implement the Agent interface

  • create a Correspondent by calling NewCorrespondent and passing it a WireService implementation, Agent implementation, and other settings

       encoder := mansbridge.GobWireEncoder{}
       wireService := mansbridge.NewUdpWireService(*port, encoder)
       c := mansbridge.NewCorrespondent(mansbridge.NewAgent(agentID, 10), wireService, *delay, *seed, *cacheSize)
  • call Correspondent.StartReporting() this is a blocking call, so it is recommended to do this in a goroutine