netlog

所属分类:中间件编程
开发工具:GO
文件大小:0KB
下载次数:0
上传日期:2018-10-27 09:35:16
上 传 者sh-1993
说明:  一个轻量级、以HTTP为中心、基于日志(类似Kafka)的消息队列。
(A lightweight, HTTP-centric, log-based (Kafka-like) message queue.)

文件列表:
.travis.yml (1115, 2018-10-27)
CONTRIBUTING.md (1182, 2018-10-27)
LICENSE (16724, 2018-10-27)
biglog/ (0, 2018-10-27)
biglog/benchmark_test.go (3070, 2018-10-27)
biglog/biglog.go (13665, 2018-10-27)
biglog/biglog_test.go (3381, 2018-10-27)
biglog/example/ (0, 2018-10-27)
biglog/example/example.go (3134, 2018-10-27)
biglog/index_reader.go (6459, 2018-10-27)
biglog/index_reader_test.go (3169, 2018-10-27)
biglog/info.go (1074, 2018-10-27)
biglog/reader.go (3115, 2018-10-27)
biglog/reader_test.go (2605, 2018-10-27)
biglog/scanner.go (5314, 2018-10-27)
biglog/scanner_test.go (1924, 2018-10-27)
biglog/segment.go (17540, 2018-10-27)
biglog/segment_header.go (1381, 2018-10-27)
biglog/segment_test.go (3960, 2018-10-27)
biglog/streamer.go (3202, 2018-10-27)
biglog/streamer_test.go (2051, 2018-10-27)
biglog/util_test.go (1729, 2018-10-27)
biglog/watcher.go (883, 2018-10-27)
biglog/watcher_test.go (1591, 2018-10-27)
cmd/ (0, 2018-10-27)
cmd/netlog/ (0, 2018-10-27)
cmd/netlog/main.go (2518, 2018-10-27)
errors.go (3691, 2018-10-27)
integration/ (0, 2018-10-27)
integration/create_topic_test.go (2207, 2018-10-27)
integration/doc.go (20, 2018-10-27)
integration/integration_suite_test.go (1522, 2018-10-27)
integration/scanner_test.go (3437, 2018-10-27)
integrity_checker.go (3436, 2018-10-27)
integrity_checker_test.go (2305, 2018-10-27)
message.go (5779, 2018-10-27)
message_buffer.go (2096, 2018-10-27)
message_buffer_test.go (2511, 2018-10-27)
... ...

[![Build Status](https://travis-ci.org/ninibe/netlog.svg?branch=master)](https://travis-ci.org/ninibe/netlog) [![godoc reference](https://godoc.org/github.com/ninibe/netlog?status.png)](https://godoc.org/github.com/ninibe/netlog) # NetLog A lightweight, HTTP-centric, log-based (Kafka-style) message queue. ## Alpha software This is still early software and potentially buggy. To peek at the internals start with [BigLog](https://github.com/ninibe/netlog/tree/master/biglog). ### Roadmap - [x] low-level log management - [x] HTTP transport - [x] scanner based pub/sub - [x] custom data retention policy - [x] persistent scanners - [x] batching - [x] compression - [ ] good test coverage - [ ] proper documentation - [ ] streaming based pub/sub - [ ] async replication - [ ] kinesis-compatible transport - [ ] gRPC transport ### Non-goals * Match Kafka's performance. * Distributed system. ### Getting started While posting and fetching single messages is very inefficient, it's the simplest way to get started using nothing but curl commands. ```bash # compile server go get github.com/ninibe/netlog/cmd/netlog # run server bin/netlog # create new topic curl -XPOST localhost:7200/demo # post messages curl -XPOST localhost:7200/demo/payload --data-binary "message number one" curl -XPOST localhost:7200/demo/payload --data-binary "message number two" curl -XPOST localhost:7200/demo/payload --data-binary "message number three" # check topic info curl localhost:7200/demo # create scanner curl -XPOST "localhost:7200/demo/scanner?from=0" export SC="...UUID RETURNED..." # start scanning... curl -XGET "localhost:7200/demo/scan?id=$SC" x times ... # wait 5 seconds for new messages curl -XGET "localhost:7200/demo/scan?id=$SC&wait=5s" # wait 5 minutes curl -XGET "localhost:7200/demo/scan?id=$SC&wait=5m" # post more messages in another window curl -XPOST localhost:7200/demo/payload --data-binary "message number four" curl -XPOST localhost:7200/demo/payload --data-binary "message number five" # new scanner since 1 minute ago curl -XPOST "localhost:7200/demo/scanner?from=1m" ``` ### One-line-ish pub/sub ```bash # create new topic curl -XPOST localhost:7200/pubsubdemo # get scanner ID with jq export SCANNER=$(curl -s -XPOST "localhost:7200/pubsubdemo/scanner?from=0&persist=true" | jq -r .id) # subscribe to the topic while true; do; curl "localhost:7200/pubsubdemo/scan?id=$SCANNER&wait=1h" && echo; done # IN ANOTHER WINDOW # publish on the topic while true; do; read data; curl localhost:7200/pubsubdemo/payload --data-binary $data; done # write something and hit enter ``` ### Contributing Contributions are more than welcome, check the [contributing guidelines](https://github.com/ninibe/netlog/blob/master/CONTRIBUTING.md). To ask any questions you can write to the [netlog-dev mailing list](https://groups.google.com/forum/#!forum/netlog-dev).

近期下载者

相关文件


收藏者