Skip to content

teleclimber/twine-protocol

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Twine Protocol

Twine Protocol is a developer-friendly way of getting two running processes to have non-trivial message and payload exchanges.

See the wiki where I dump some thoughts and current info.

The implementations can work using different transports:

  • Unix sockets
  • WebScokets
  • WebRTC (maybe? Haven't tried to implement yet)
  • postMessage?

Use Cases

  • A front end and a back end
  • A sandboxed process and its host
  • Along running job and its host

Why?

I wanted a simple way to communicate between two processes without reinventing a message protocol every time. More:

  • Simple and effective. Lightweight.
  • Reasonably performant. Small messages. Minimal handshake.
  • Quick to adopt: no code-gen. Just import and use.
  • Reusable in different environments (transports). Use the same APIs and patterns, no need to learn something new.
  • Payload-agnostic. Send JSON, strings, binary data, or just a single byte.
  • Bidirectional. Either side can send.
  • Powerful enough to support non-trivial exchange of information that might occur between two running functions.

Implementations

State of Development

It's extremely early. I'm dogfooding this in Dropserver and learning as I go. Implementations leave a lot to be desired.

There is more in the Wiki here on Github.

About

Description of the Twine Protocol

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published