Giter Site home page Giter Site logo

advantageous / qbit Goto Github PK

View Code? Open in Web Editor NEW
709.0 709.0 141.0 16.19 MB

The Java microservice lib. QBit is a reactive programming lib for building microservices - JSON, HTTP, WebSocket, and REST. QBit uses reactive programming to build elastic REST, and WebSockets based cloud friendly, web services. SOA evolved for mobile and cloud. ServiceDiscovery, Health, reactive StatService, events, Java idiomatic reactive programming for Microservices.

Home Page: http://advantageous.github.io/qbit/

License: Apache License 2.0

Java 99.91% HTML 0.04% Shell 0.01% Lua 0.01% JavaScript 0.04%
actor aws health java microservice monitoring qbit websocket websocket-support

qbit's People

Contributors

bbyk avatar briandilley avatar bsa01 avatar builddaemonqbit avatar cmathiasml avatar ftaiolivista avatar gitter-badger avatar jarrad avatar mammatusplatypus avatar nizebulous avatar richardhightower avatar sailorgeoffrey 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  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

qbit's Issues

ENHANCE: BasicQueue, More types of queues, and more SOC seperations of concernt

BasicQueue
This class does too much
It needs knowledge of the type of queue.
There should be several queue implementations.
We need another that does metrics.
The queue also spawns a thread and does its own scheduling.
We really need the scheduling done by a third partys so we can add different types of schedulers.

Timeout throwing an exception for something that has already been handled.

[QueueListener Response Queue /services] DEBUG i.a.q.s.Server - Response not marked handled and it timed out, but could not be written io.advantageous.qbit.http.HttpRequest@87a022a3
java.lang.IllegalStateException: Response has already been written
at org.vertx.java.core.http.impl.DefaultHttpServerResponse.checkWritten(DefaultHttpServerResponse.java:452) ~[vertx-core-2.1.1.jar:na]
at org.vertx.java.core.http.impl.DefaultHttpServerResponse.putHeader(DefaultHttpServerResponse.java:128) ~[vertx-core-2.1.1.jar:na]
at org.vertx.java.core.http.impl.DefaultHttpServerResponse.putHeader(DefaultHttpServerResponse.java:39) ~[vertx-core-2.1.1.jar:na]
at io.advantageous.qbit.vertx.http.HttpServerVertx.lambda$createResponse$13(HttpServerVertx.java:184) ~[qbit-vertx/:na]
at io.advantageous.qbit.vertx.http.HttpServerVertx$$Lambda$15/289205234.response(Unknown Source) ~[na:na]
at io.advantageous.qbit.server.Server.handleMethodTimedOut(Server.java:504) [qbit-boon/:na]
at io.advantageous.qbit.server.Server.checkTimeoutsForRequests(Server.java:475) [qbit-boon/:na]
at io.advantageous.qbit.server.Server.access$200(Server.java:39) [qbit-boon/:na]
at io.advantageous.qbit.server.Server$1.idle(Server.java:268) [qbit-boon/:na]

error response handling

You can put errors messages into response codes for methods that throw exceptions.
We might want another class for this or... perhaps an enum of some sort to denote it is an error message.

There are many missing pieces to the architecture.

This works as a REST framework but not so much as a true websocket framework (yet).
We need to build out some more examples like perhaps a (gasp...) chatroom.
We need eventing (calls to client side without notification).
This will drive the architecture quite a bit.

ENHANCE: ServiceServerImpl break this out into many tasks

ServiceImpl
There is no way to configure with different method handler.
There is no way to pass AOP interception.
There is no callback for blocked call to be put into another queue or holding area for data faulting.
add this to doHandleMethodCall and beforeMethodProcessing
ServiceImpl can be run async, i.e., it manages its queue or it can run sync, i.e., the service bundle manages its queue. This is probably ok.

ServiceServerImpl
We really need a way to capture pre/post web socket and pre/post request

idle handling

Note that ServiceServerImpl only handles idle callback for checking timeouts. This may not be good enough if under heavily load use case. We may need to do a periodic check as well for timeouts. Not only when we are not busy. I noticed same issue with client. We should do a periodic flush regardless. We may want/need a periodic capability or timer of sorts in all queues.

handle errors from client proxy

java.lang.ClassCastException: org.boon.core.value.CharSequenceValue cannot be cast to java.util.List
at io.advantageous.qbit.vertx.QBitClient$2.accept(QBitClient.java:440)
at io.advantageous.qbit.vertx.QBitClient.handleAsyncCallback(QBitClient.java:225)
at io.advantageous.qbit.vertx.QBitClient.handleWebsocketQueueResponses(QBitClient.java:213)
at io.advantageous.qbit.vertx.QBitClient.lambda$startReturnProcessing$8(QBitClient.java:180)
at io.advantageous.qbit.vertx.QBitClient$$Lambda$3/1338841523.run(Unknown Source)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)

ENHANCE: WEBSOCKET FOR BINARY

WebsSocketSender
Only supports strings. If we ever go to a binary protocol. This is limited.
Change send to sendText. Add a binary sentBinary that takes a byte[].
Use a default method to call the sendText from sendBinary so that only sendText needs to be implemented.

Handle binary

HttpResponse
has one method which is a callback, that takes a string body.
It might be better if this took an HttpResponseBody so that you could hide/abstract the bytes from the server. This would also enable a binary protocol in the future.
This is not a high priority.

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.