Skip to content

DamonOehlman/messenger-archetype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

The messenger Archetype

A messenger is simply a function that can be called to create a pull-stream Source and/or Sink. This source and sink can subsequently be used to send and/or receive messages. It's very simple.

A messenger function has the following signature:

fn(callback)

and the callback when executed has the following signature:

fn(err, source, sink)

The idea being that when you require the ability to send and/or receive messages you call the messenger function which initialises and creates a new messenging channel. In general, you shouldn't care too much about whether the messenger closes and can simply buffer outgoing messages using something like pull-pushable. In the event that messenger is closed (you will be able to detect this in both the source and the sink), you simply want to call the messenger function again to reopen the connection.

Known Implementations

Complete (or at least usable)

Proposed / In Progress

No known implementations in progress.

About

INPROGRESS: A high level description of what a messenger is

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published