Code Monkey home page Code Monkey logo

vanus-labs / vanus Goto Github PK

View Code? Open in Web Editor NEW
2.3K 11.0 112.0 5.88 MB

Vanus is a Serverless, event streaming system with processing capabilities. It easily connects SaaS, Cloud Services, and Databases to help users build next-gen Event-driven Applications.

Home Page: https://vanus.ai

License: Apache License 2.0

Go 99.44% Makefile 0.20% Dockerfile 0.23% Shell 0.10% HCL 0.03%
eventbus message-queue event-driven serverless cloudevents event-bridge cloudnative kafka rabbitmq rocketmq sns sqs kubernetes cloud-native microservices

vanus's Introduction

Vanus is an open-source message queue with built-in event processing capabilities.

stars License codecov Language Vanus Cloud docs

     


Introduction

Vanus helps users build event pipelines between SaaS, cloud services, and cloud functions in minutes.

1. Build the event-driven system

  • Get events from cloud services and SaaS, and deliver them to cloud functions or microservices.
  • Synchronize changed data or transfer data to the data lake.
  • Obtain events generated by SaaS and send them to other SaaS.

2. Out-of-the-box event computing capabilities

  • Real-time processing during event transmissions, such as filtering and transformation.
  • Natively support the CloudEvents specification, and can directly send events to workloads that support CloudEvent.

3. 100% open source, Super easy to use

  • One-click deployment, the installation is completed within 1 minute, and developers without MQ experience can also use it.
  • Message queues and connectors are 100% open source, a one-stop open-source solution.

Getting Started

You can install Vanus with a single command within 1 minute. Check out our website for detailed information.

kubectl apply -f https://dl.vanus.ai/all-in-one/v0.9.0.yml

Community

We have a few channels for contact:

How to contribute

See here for how to contribute to Vanus.

License

Vanus is under the Apache 2.0 license. See the LICENSE file for details.

vanus's People

Contributors

allensuvorov avatar c0d33ngr avatar calmius avatar dhanusaputra avatar hwjiangkai avatar ifplusor avatar jesministrator avatar juneezee avatar michaelg22 avatar mihai22125 avatar mrobot2 avatar n-kurasawa avatar nileshms avatar soumyadeep589 avatar stavrmaria avatar testwill avatar wenfengwang avatar xdlbdy avatar zyunfeii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

vanus's Issues

Inconsistent number of eventbus and eventlog

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

The number of eventlog need equal to the number of eventbug.

3. What did you see instead (Required)

Inconsistent number of eventbus and eventlog。

4. What is your Vanus version? (Required)

read event error

trigger use client sdk read event has rpc error

time="2022-08-11T08:17:00.798155619Z" level=warning msg="read event error" error="rpc error: code = Canceled desc = context canceled" eventlog_id="vanus:///eventlog/1660202185087308970?eventbus=performance-1&controllers=172.31.54.156:2048" offset=124611

store startup failed

Bug Report

store startup failed.

`
[centos@ip-172-31-59-20 vanus]$ kubectl get pod -n vanus
NAME READY STATUS RESTARTS AGE
vanus-controller-0 1/1 Running 0 7m22s
vanus-controller-1 1/1 Running 0 7m16s
vanus-controller-2 1/1 Running 0 7m11s
vanus-gateway-78d757d594-xtt69 1/1 Running 0 7m23s
vanus-store-0 0/1 CrashLoopBackOff 1 (4s ago) 6s
vanus-trigger-6996cfbdcb-c2zg7 1/1 Running 3 (6m55s ago) 7m23s
[centos@ip-172-31-59-20 vanus]$ kubectl logs -n vanus vanus-store-0
time="2022-08-11T07:28:08.676568019Z" level=debug msg="logger level has been set" log_level=DEBUG
time="2022-08-11T07:28:08.678628336Z" level=error msg="Create iouring failed." error="iouring_setup: function not implemented"
panic: iouring_setup: function not implemented

goroutine 1 [running]:
github.com/linkall-labs/vanus/internal/store/io.NewURing()
github.com/linkall-labs/vanus/internal/store/io/uring.go:54 +0x1dd
github.com/linkall-labs/vanus/internal/store/wal.defaultIOEngine(...)
github.com/linkall-labs/vanus/internal/store/wal/config_linux.go:23
github.com/linkall-labs/vanus/internal/store/wal.defaultWALConfig()
github.com/linkall-labs/vanus/internal/store/wal/config.go:57 +0x45
github.com/linkall-labs/vanus/internal/store/wal.makeConfig({0xc0000685e0, 0x3, 0x44a134})
github.com/linkall-labs/vanus/internal/store/wal/config.go:65 +0x89
github.com/linkall-labs/vanus/internal/store/wal.Open({0xc000029690, 0xa}, {0xc0000685e0, 0xc00000e3f8, 0x0})
github.com/linkall-labs/vanus/internal/store/wal/wal.go:104 +0x4c
github.com/linkall-labs/vanus/internal/store/meta.RecoverSyncStore({{0x0, {{0xc000029520, 0x5}}}}, {0xc000029690, 0xa})
github.com/linkall-labs/vanus/internal/store/meta/sync.go:178 +0x233
github.com/linkall-labs/vanus/internal/store/segment.(*server).recover(0xc00000a3c0, {0xa7f110, 0xc000028048})
github.com/linkall-labs/vanus/internal/store/segment/recovery.go:32 +0xd3
github.com/linkall-labs/vanus/internal/store/segment.(*server).Initialize(0xc00000a3c0, {0xa7f110, 0xc000028048})
github.com/linkall-labs/vanus/internal/store/segment/server.go:192 +0x2c
main.main()
./main.go:56 +0x3f0
[centos@ip-172-31-59-20 vanus]$
`
Should be caused by the kernel version.

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your Vanus version? (Required)

v0.2.0

sink lost some event messages in e2e test

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

sink lost some event messages in e2e test.
I sent 10000 event messages, but sink received only 4930.
https://github.com/linkall-labs/vanus/runs/7212590689?check_suite_focus=true

Run kubectl get pod -n vanus | grep quick-display | awk '{print $1}' | xargs kubectl logs -n vanus | grep -n "total" | wc -l
4930
failed

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your Vanus version? (Required)

add recover logic for timer

Enhancement

add recover logic to prevent other package panic causing the timer to restart.
`
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x10 pc=0xad9cba]

goroutine 8144 [running]:
github.com/linkall-labs/vanus/client/internal/vanus/eventlog.(*logSegment).EndOffset(...)
/home/centos/linkall/vanus/client/internal/vanus/eventlog/log_segment.go:98
github.com/linkall-labs/vanus/client/internal/vanus/eventlog.(*logReader).Read(0xc00081c240, {0xdd6210, 0xc000c87a00}, 0x56e0)
/home/centos/linkall/vanus/client/internal/vanus/eventlog/distributed_eventlog.go:392 +0x15a
github.com/linkall-labs/vanus/internal/timer/timingwheel.(*bucket).getEvent(0xc000423c00, {0xdd6210, 0xc000c87a00}, 0x2e32)
/home/centos/linkall/vanus/internal/timer/timingwheel/bucket.go:394 +0x1c6
github.com/linkall-labs/vanus/internal/timer/timingwheel.(*bucket).fetchEventFromOverflowWheelAdvance(0xc000423c00, {0xdd6210, 0xc000c87a00}, 0xc0003b7700)
/home/centos/linkall/vanus/internal/timer/timingwheel/bucket.go:295 +0x96
github.com/linkall-labs/vanus/internal/timer/timingwheel.(*timingWheelElement).fetchEventFromOverflowWheelAdvance.func1()
/home/centos/linkall/vanus/internal/timer/timingwheel/timingwheel.go:617 +0x190
created by github.com/linkall-labs/vanus/internal/timer/timingwheel.(*timingWheelElement).fetchEventFromOverflowWheelAdvance
/home/centos/linkall/vanus/internal/timer/timingwheel/timingwheel.go:602 +0x257
`

vanus-controller container restarts continuously

Bug Report

vanus-controller container restarts continuously

ubuntu@ip-172-31-57-192:~/jiangkai/projects/file$ kubectl get pod -n vanus
NAME                             READY   STATUS    RESTARTS         AGE
vanus-controller-0               1/1     Running   4 (8m40s ago)    48m
vanus-controller-1               1/1     Running   4 (8m38s ago)    48m
vanus-controller-2               1/1     Running   4 (8m28s ago)    48m

vanus-controller-0.log

1. Minimal reproduce step (Required)

deploy all-in-one.yaml

2. What did you expect to see? (Required)

container not restarted

3. What did you see instead (Required)

container restarts continuously

4. What is your Vanus version? (Required)

image tag: cae0d9b

Implement a sink for e2e test

Enhancement

Currently, the E2E test uses display as a sink to verify the consumption of events, but the way of querying logs is not flexible enough, so an enhanced sink needs to be implemented.

This sink can reflect the event consumption in a more flexible way.

timing message consume failed when eventbus not exist

Bug Report

timing message consume failed when eventbus not exist.
time="2022-08-11T08:32:20.010086035Z" level=error msg="lookup readable logs failed" error="rpc error: code = Unknown desc = {\"code\":\"RESOURCE_NOT_FOUND\",\"message\":\"eventbus not found\"}"

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your Vanus version? (Required)

reset offset maybe stop trigger and not start

now reset offset step is below:

  1. stop trigger
  2. get offset from eventbus client
  3. commit offset to trigger controller
  4. start trigger

if fail on step 2 or 3 or 4, the trigger is stopped and does not start again, have another solution no need to stop the trigger, or have a daemon thread monitor trigger that needs running but does not start will start the trigger

subscriptionScheduler stop has panic

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

subscriptionScheduler stop has panic

image

4. What is your Vanus version? (Required)

0.1.0

vsctl subscription create from param optimize

now vsctl subscription create from has 3 params fromLatest, fromEarliest, fromTime, optimize use a param from, for example:

--from latest
--from earliest
--from 2022-01-01T01:01:01Z

vsctl event put returns 200 but message lost

Bug Report

vsctl event put returns 200 but message lost

1. Minimal reproduce step (Required)

step1: vsctl event put __Timer_0_0 xxx
step2: vsctl event get __Timer_0_0 --offset 0 --number 1
step2 return 500, message not found

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your Vanus version? (Required)

v0.1.2

optimize fault recovery judgment logic

Enhancement

optimize fault recovery judgment logic.
The current fault recovery judgment logic uses logic of bucket start, which will lead to some error log printing, so needs to be re implemented.

vsctl event put failed

Bug Report

vsctl event put failed and return 400

gateway log:

time="2022-08-02T15:51:25.770926378Z" level=warning msg="append to failed" error="not writable" vrn="vanus://vanus-controller-0.vanus-controller:2048/eventbus/__Timer_0_0?controllers=vanus-controller-0.vanus-controller:2048,vanus-controller-1.vanus-controller:2048,vanus-controller-2.vanus-controller:2048"

store log:

time="2022-08-02T15:51:20.867241073Z" level=warning msg="Append failed." blockID=1659441842434422563 error="not leader"
time="2022-08-02T15:51:20.873542311Z" level=warning msg="Append failed." blockID=1659441842434422563 error="not leader"
time="2022-08-02T15:51:20.875681891Z" level=warning msg="Append failed." blockID=1659441842434422563 error="not leader"
time="2022-08-02T15:51:21.736343391Z" level=debug msg=heartbeat leader="vanus-controller-1.vanus-controller.vanus.svc:2048"
time="2022-08-02T15:51:22.465173574Z" level=debug msg="Append entries to raft log." appended_index=18 block_id=1659450063760863077 entries_num=1
time="2022-08-02T15:51:22.475198983Z" level=debug msg="Persist raft hard state." block_id=1659450063760863077 hard_state="{2 1659450064068188923 18}"
time="2022-08-02T15:51:22.476955757Z" level=debug msg="Store applied offset." applied_offset=18 block_id=1659450063760863077

1. Minimal reproduce step (Required)

vsctl event put

2. What did you expect to see? (Required)

event put success and return 200

3. What did you see instead (Required)

event put failed and return 400

4. What is your Vanus version? (Required)

v0.1.2

support spin to connect controller

Enhancement

In this current implementation, The SegmentServer/Trigger will shut down immediately when they start, but the Controller need some time to initialize, this will cause SegmentServer/Trigger CrashLoopBackOff when cluster init. we can sleep sometimes when starting instead of a shutdown immediately.

extract controller grpc client

Enhancement

TriggerWorker,SementServer,Gateway all need connect to controller leader, but the code is maintained separately ,exist code duplication,can extract a lib or func?

Corrupted data of store

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

Can't start store with corrupted data.

raft2022/06/27 06:48:12 INFO: 16f9479304b9dfed switched to configuration voters=(1655433034800422893 1655433044971246865 1655433062803036836)
raft2022/06/27 06:48:12 16f9479304b9dfed state.commit 5 is out of range [4, 4]
panic: 16f9479304b9dfed state.commit 5 is out of range [4, 4]

goroutine 1 [running]:
log.(*Logger).Panicf(0xc0001c2ee0, {0x9bdc2d, 0x40a905}, {0xc00040ab40, 0x8e1dc0, 0x0})
	log/log.go:231 +0x74
github.com/linkall-labs/vanus/raft.(*DefaultLogger).Panicf(0x16f9479304b9dfed, {0x9bdc2d, 0x0}, {0xc00040ab40, 0x0, 0x0})
	github.com/linkall-labs/vanus/[email protected]/logger.go:137 +0x26
github.com/linkall-labs/vanus/raft.(*raft).loadState(0xc00024b600, {0x3, 0x3, 0x0})
	github.com/linkall-labs/vanus/[email protected]/raft.go:1724 +0x19a
github.com/linkall-labs/vanus/raft.newRaft(0xc0001bdab8)
	github.com/linkall-labs/vanus/[email protected]/raft.go:357 +0x6de
github.com/linkall-labs/vanus/raft.NewRawNode(0xc000100870)
	github.com/linkall-labs/vanus/[email protected]/rawnode.go:49 +0x1d
github.com/linkall-labs/vanus/raft.RestartNode(0xc0001c2ee0)
	github.com/linkall-labs/vanus/[email protected]/node.go:245 +0x2b
github.com/linkall-labs/vanus/internal/store/block/replica.New({0xa5f170, 0xc000116008}, 0x16f9479304b9dfed, {0xa5f288, 0xc0002255e0}, 0xc0001c2ee0, {0x7f1838cab7b8, 0xc000200280}, 0xc000416310)
	github.com/linkall-labs/vanus/internal/store/block/replica/replica.go:131 +0x388
github.com/linkall-labs/vanus/internal/store/segment.(*server).makeReplicaWithRaftLog(0xc0002024e0, {0xa5f170, 0xc000116008}, 0x991780, {0xa5f288, 0xc0002255e0}, 0x885cc0)
	github.com/linkall-labs/vanus/internal/store/segment/server.go:692 +0xf5
github.com/linkall-labs/vanus/internal/store/segment.(*server).recoverBlocks(0xc0002024e0, {0xa5f170, 0xc000116000}, 0xc00038faa0)
	github.com/linkall-labs/vanus/internal/store/segment/recovery.go:86 +0x30e
github.com/linkall-labs/vanus/internal/store/segment.(*server).recover(0xc0002024e0, {0xa5f170, 0xc000116000})
	github.com/linkall-labs/vanus/internal/store/segment/recovery.go:50 +0x20e
github.com/linkall-labs/vanus/internal/store/segment.(*server).Initialize(0xc0002024e0, {0xa5f170, 0xc000116000})
	github.com/linkall-labs/vanus/internal/store/segment/server.go:132 +0x2c
main.main()
	./main.go:82 +0x5d3

4. What is your Vanus version? (Required)

0.1.0

Load timing message form overflowwheel has error log

Bug Report

Load timing message form overflowwheel has error log.

time="2022-08-05T02:49:37.780216419Z" level=debug msg="load event to next layer timingwheel" expiration="2022-08-05 02:50:10.555555 +0000 UTC" sourceEventbus=__Timer_2_5 time="2022-08-05T02:49:37.7840398Z" level=debug msg="end loading from overflowwheel" layer=2 pointer=3 time="2022-08-05T02:49:37.784145731Z" level=error msg="append event to failed" error="rpc error: code = Canceled desc = context canceled" eventbus=__Timer_2_6 expiration="2022-08-05 02:50:10.555555 +0000 UTC" time="2022-08-05T02:49:37.784180372Z" level=error msg="add event to eventbus failed" eventbus=__Timer_2_6 expiration="2022-08-05 02:50:10.555555 +0000 UTC" time="2022-08-05T02:49:37.78419176Z" level=debug msg="context canceled at bucket load" time="2022-08-05T02:49:38.167591239Z" level=debug msg="get event success" eventbus=__Timer_2_5 number=1 offset=0 time="2022-08-05T02:49:38.167662475Z" level=debug msg="load event to next layer timingwheel" expiration="2022-08-05 02:50:10.555555 +0000 UTC" sourceEventbus=__Timer_2_5 time="2022-08-05T02:49:38.741130645Z" level=debug msg="timingwheel pointer timer" layer=1 pointer=28 time="2022-08-05T02:49:38.810197148Z" level=debug msg="put event success" eventTime="2022-08-05 02:50:10.555555 +0000 UTC" eventbus=__Timer_1_27 time="2022-08-05T02:49:38.810235563Z" level=info msg="add event to eventbus success" eventbus=__Timer_1_27 expiration="2022-08-05 02:50:10.555555 +0000 UTC" time="2022-08-05T02:49:38.81024663Z" level=info msg="reinsert timing message success" expiration="2022-08-05 02:50:10.555555 +0000 UTC" sourceEventbus=__Timer_2_5

1. Minimal reproduce step (Required)

2. What did you expect to see? (Required)

3. What did you see instead (Required)

4. What is your Vanus version? (Required)

writing the message immediately after creating eventbus fails with an error "not writable"

Bug Report

writing the message immediately after creating eventbus fails with an error "not writable"

from the log, it took about 1s to write successfully.

1. Minimal reproduce step (Required)

write messages through eventlogwriter after creating eventbus

2. What did you expect to see? (Required)

the message can be written immediately after the eventbus is created successfully

3. What did you see instead (Required)

4. What is your Vanus version? (Required)

trigger read event log too many

trigger read event log too many , need reduce

time="2022-08-11T08:17:00.798155619Z" level=warning msg="read event error" error="rpc error: code = Canceled desc = context canceled" eventlog_id="vanus:///eventlog/1660202185087308970?eventbus=performance-1&controllers=172.31.54.156:2048" offset=124611

optimize vsctl subscription

  • vsctl subscription get and list table display style format
  • vsctl subscription list response default does not contain the offsets
  • vsctl subscription list response add limit
  • vsctl subscription create param optimize

fix ip 192.168.49.2

now config use fix ip 192.168.49.2(minikube default use) as gateway endpoint,if ip is not this, vsctl can not running,need

the highest layer timingwheel needs to clean up expired buckets

Enhancement

The highest layer timingwheel needs to clean up expired buckets.
Because the timingwheel at the highest layer is an data structure of limitless length array, it is necessary to clean up expired buckets after loading to release useless memory overhead.
The cleaning cycle is triggered once after each loading of the highest level timingwheel.

reduce service in Gaterway

Enhancement

According to discussion of #117, We should reduce service in the gateway module. This issue tracks the implementation of it.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.