Skip to content

chzyer-dev/muxque

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

60 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Multiplex Message Queue

Build Status Coverage Status Software License

muxque is design to use in IM, follows pub/sub model, to achieve serve millions users by multiplex sockets.

goal

  • possible to subscribe multiple topics/channels in one client.
  • always persist messages to disk to keep them safe
  • zero-extra-cost(disk) for multicasted messages/channels
  • distributed and decentralized topologies without single points of failure
  • the number of topic can be unlimit(depends on hardware)
  • provide a horizontally scaling solution

benchmark

  • http test
$ go run github.com/chzyer/muxque/bench/httpserver/* # run the http server
$ go test -benchtime=10s -bench=. github.com/chzyer/muxque/bench
BenchmarkHttpPut	 3000000	      4693 ns/op (aka 213,083 rps)
  • internal test (without network)
$ go test -v -benchmem -bench=. -run=Nothing github.com/chzyer/muxque/topic
PASS
BenchmarkTopicGet	  500000	      3531 ns/op (aka 283,205 rps)	     431 B/op	       7 allocs/op
BenchmarkTopicPut	  500000	      2991 ns/op (aka 334,336 rps) 	     134 B/op	       3 allocs/op
ok  	github.com/chzyer/muxque/topic	4.404s

nsq

# using --mem-queue-size=1000000 --data-path= --size=200 --batch-size=200
# compiling/running nsqd
# creating topic/channel
# compiling bench_reader/bench_writer
PUB: [bench_writer] 2015/07/19 20:07:15 duration: 10.003577746s - 29.725mb/s - 155844.243ops/s - 6.417us/op
SUB: [bench_reader] 2015/07/19 20:07:25 duration: 10.014623761s - 17.258mb/s - 90481.282ops/s - 11.052us/op

Releases

No releases published

Packages

No packages published

Languages

  • Go 98.1%
  • Shell 1.4%
  • Makefile 0.5%