/stubborn

Persistent, testable, configurable adapter for clients that use duplex protocols.

Primary LanguageGoApache License 2.0Apache-2.0

Stubborn

Stubborn is a framework that's written in Go for clients that uses duplex protocols such as WebSocket.

Examples

Status

The Stubborn framework provides a complete and tested persistent connection for the duplex protocols using various types of clients.

Installation

go get github.com/filinvadim/stubborn

Stubborn advantages

  1. Agnostic to any clients by DuplexConnector interface.
  2. Therefore, it's fully testable using mock that implements three methods:
    Close() error
    ReadMessage() (messageType int, p []byte, err error)
    WriteMessage(messageType int, data []byte) error
    
  3. Persistence. Stubborn framework won't stop fetching data even if panic() occurs (that's useful if for example Gorilla WebSocket was used as client).
  4. Fairly configurable for any API requirements.
  5. No external dependencies whatsoever.

Stubborn disadvantages

  1. Framework wasn't benchmark tested but expected average speed.