weibocom / wqs Goto Github PK
View Code? Open in Web Editor NEW微博的消息服务中间件。
License: Other
微博的消息服务中间件。
License: Other
把当前相互独立的mc servere
、HTTP server
改为
Server
层(全部控制HTTP API、引入Web框架和权限管理),Server
层下再延伸出各个协议的子server来提供各个协议的消息发送和接受。
HTTP API need change to Restful style?
If do this, maybe graceful.
It had better provide a graceful way to startup or shutdown wqs, this ensures that no messages are lost.
如题,生成消费,都要经常proxy进行转发吗?底层使用kafka,增加这一层proxy主要目的是啥呢?
version: dev_beta
commit: a819409e2c92832bf81946e0800b001d03a6910d
On memcached protocol, an empty value with "END" sent to the client, when the 'key' is not found or expired.
get group1.test1
END
get group1.test1
SERVER_ERROR engine error Timeout
Timeout error is a look of confusion for biz clients, because timeout may happened out of limit of no messages.
In many high availability scenarios, whole datacenter crash is supposed to happen any time. So many applications are build cross multiple IDCs, every single data center services a portion of traffics and accommodates the whole complete data. Every IDC will sync the traffic to the other data centers.
As a queue service, WQS should provide a abstract layer, so that the application developer programming cross multi-IDCs is as easy as single IDC.
At first glance, message should not IDable, just for in most cases, messages will be consumed sequentially in couple of seconds. There is no need to retrieve message randomly by ID, but ID is still useful in some common reasons:
Memcached protocol is one of the most popular protocols on the internet, wqs will partially support the memcached text protocl, including "set", "get" command.
We can post a message over text memcached protocol:
set queuename 0 0 11\r\nhello world\r\n
also we can consume the message simply as following:
get queuename\r\n
_go-metrics_
version: 0.1.0
commit:
One WQS instance crash in multi WQS IDC envirement will make a few data repeated to read .
And when the crash one reboot , also make some data which have be readed readful .
The number of repeated data positively correlated with the threads of reading clients
'go test' is a very useful tool to help the developers find out and figure out unapparent vulnerabilities. The coverage is expectedly close to 100%, but at least 30% of first released version 0.1.0 is more practical. The coverage will increase stably in the future version.
There are three message delivery semantics.
What people really want is definitely "exactly once", where by duplicate messages are not delivered. But within the context of a distributed system, "You Cannot Have Exactly-Once Delivery". [There are two common reasons duplicate may occur)[https://cwiki.apache.org/confluence/display/KAFKA/Idempotent+Producer]: one is network error when sending messages, the other is consumption's process crashes.
At most once semantics is easy to implement, actually in this condition the cluster will hit ultra high throughput and low latency, but data loss is an unacceptable option in many biz environment.
So, at least once delivery semantics becomes realistically the only option. We try everything to ensure no data loss, at the cost of complicated design, even if duplication.
Typically, performance is a measure of the speed and efficiency with witch a message service delivers messages from producer to consumer. How every, in WQS, there are different aspects of performance we care about.
Message throughput The number of messages or message bytes per second
Latency The time it takes a particular message to be delivered from producer to consumer.
Stability The overall availability of message service or how gracefully it degrades in cases of heavy load or failure.
Connection Load The number of message producers, or message consumers, or the number of concurrent connections a system can support.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.