Rick

Rick
Rick

Thursday, February 5, 2015

What is QBit again?


QBit is a queuing library for microservices. It is similar to many other projects like Akka, Spring Reactor, etc. QBit microservices is just a library not a platform. QBit has libraries to put a service behind a queue. You can use QBit queues directly or you can create a service. QBit services can be exposed by WebSocket, HTTP, HTTP pipeline, and other types of remoting. A service in QBit is a Java class whose methods are executed behind service queues. QBit implements apartment model threading and is similar to the Actor model or a better description would be Active Objects. QBit does not use a disruptor. It uses regular Java Queues. QBit can do north of 100 million ping pong calls per second which is an amazing speed (seen as high as 200M). QBit also supports calling services via REST, and WebSocket. QBit is microservices in the pure Web sense: JSON, HTTP, WebSocket, etc. 

QBit lingo

QBit is a Java microservice lib supporting REST, JSON and WebSocket. It is written in Java but I might one day write a version in Rust or Go or C# (but that would require a large payday).

Service 
POJO (plain old Java object) behind a queue that can receive method calls via proxy calls or events (May have one thread managing events, method calls, and responses or two one for method calls and events and the other for responses so response handlers do not block service. One is faster unless responses block). Services can use Spring MVC style REST annotations to expose themselves to the outside world via REST and WebSocket. 

ServiceBundle 
Many POJOs behind one response queue and many receive queues. There may be one thread for all responses or not. They also can be one receive queue. 

Queue
A thread managing a queue. It supports batching. It has events for empty, reachedLimit, startedBatch, idle. You can listen to these events from services that sit behind a queue. You don't have to use Services. You can use Queue's direct.

ServiceServer 
ServiceBundle that is exposed to REST and WebSocket communication

EventBus 
EventBus is a way to send a lot of messages to services that may be loosely coupled

ClientProxy 
Way to invoke service through async interface, service can be inproc (same process) or remoted over WebSocket.

Non-blocking
QBit is a non-blocking lib. You use CallBacks via Java 8 Lambdas. You can also send event messages and get replies. Messaging is built into the system so you can easily coordinate complex tasks. 


Speed
There is a lot of room for improvement with Speed. But already QBit is VERY fast.
 200M+ TPS inproc ping pong, 10M-20M+ TPS event bus, 500K TPS RPC calls over WebSocket/JSON, etc.
More work needs to be done to improve speed, but now it is fast enough where I am working more with usability.

Besides if I make it too fast, then no one will publish benchmarks, and then I can't publish follow up benchmarks that kick their ass. Where would be the fun? There is no story if their is no conflict. 

Do me a favor. Take a look at QBit. I could use your help, and I think you will like it. 

There are a lot of examples in the source code.

Also look at the benchmarks those have good examples too.

Also look at the EventManager as I used QBit to build it. It is a good example on how to build a service in QBit. 

Just basic stuff to get your warmed up.
https://github.com/advantageous/qbit/wiki/%5BDetailed-Tutorial%5D-------------QBit-service-example 

Client for the last one.
https://github.com/advantageous/qbit/wiki/%5BQuick-Start%5D-Building-a-TODO-web-microservice-client-with-QBit

Server for the last one. Earlier version of tutorial with less directions.


https://github.com/advantageous/qbit/wiki/%5BQuick-Start%5D-Building-a-TODO-web-microservice-server-with-QBit

This one I am proud of. Check out the second example. 


https://github.com/advantageous/qbit/wiki/%5BRough-Cut%5D-Working-with-event-bus


This one really shows the power of QBit and starts to lift of QBits skirt a little to show what is going on underneath.
 https://github.com/advantageous/qbit/wiki/%5BRough-Cut%5D-Working-with-private-event-bus

Another one.... 
https://github.com/advantageous/qbit/wiki/%5BRough-Cut%5D-Working-with-inproc-Services


Learn more about QBit.


  • [Detailed Tutorial] QBit microservice example
  • [Doc] Queue Callbacks for QBit queue based services
  • [Quick Start] Building a simple Rest web microservice server with QBit
  • [Quick Start] Building a TODO web microservice client with QBit
  • [Quick Start] Building a TODO web microservice server with QBit
  • [Quick Start] Building boon for the QBit microservice engine
  • [Quick Start] Building QBit the microservice lib for Java
  • [Rough Cut] Delivering up Single Page Applications from QBit Java JSON Microservice lib
  • [Rough Cut] Working with event bus for QBit the microservice engine
  • [Rough Cut] Working with inproc MicroServices
  • [Rough Cut] Working with private event bus for inproc microservices
  • [Rough Cut] Working with strongly typed event bus proxies for QBit Java Microservice lib
  • [Rough Cut] Working with System Manager for QBit Mircoservice lib
  • [Z Notebook] More benchmarking internal
  • [Z Notebook] Performance testing for REST
  • [Z Notebook] Roadmap
  • Home
  • Introduction to QBit
  • Local Service Proxies
  • QBit Boon New Wave of JSON HTTP and Websocket

  • QBit Docs

  • No comments:

    Post a Comment

    Kafka and Cassandra support, training for AWS EC2 Cassandra 3.0 Training