Skip to content

maxdeliso/micron

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Abstract

micron is a multiple input multiple output broadcasting program.

Notes

  • Implemented using event driven I/O.
  • Data is stored in a central shared ring buffer [0, M-1], with shared cursor location c.
  • Each peer has a position p in the ring buffer.
  • Toggles of read/write/accept interest flags are done using a delay queue and a separate thread.

Building

You can build directly on your local machine using maven, or use the provided Dockerfile.

docker build -t micron .

Testing

  1. docker run -p 1337:1337 micron
  2. yes a | nc localhost 1337
  3. yes b | nc localhost 1337

Notes

  • requires Java 17 or greater
  • you should see as and bs interleaved in the output, roughly equally, and this will generalize to as many connected peers as there are.
  • you can tail the metrics using: tail -f logs/metrics.log; this will show some basic metrics and gauges about performance.

References

About

multiple input multiple output streaming relay

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published