-
Notifications
You must be signed in to change notification settings - Fork 140
[Doc] QBit microservice Java lib Using auto flushing client proxies
Mostly we show you how to flush method calls for microbatching. At times it is convenient to periodically flush method calls just in case you are not under high loads.
Instead of having you create a lot of boiler plate code, we provide a SendQueue that is auto-flushing. Then we also provide the ability to create service queue proxies that are also auto-flushing.
ServiceQueue serviceQueue = ...
TodoServiceClient todoServiceClient =
serviceQueue
.createProxyWithAutoFlush(
TodoServiceClient.class,
50, TimeUnit.MILLISECONDS);
todoServiceClient.add(new TodoItem("foo", "foo", null));
AtomicReference<List<TodoItem>> items = new AtomicReference<>();
todoServiceClient.list(new Callback<List<TodoItem>>() {
@Override
public void accept(List<TodoItem> todoItems) {
items.set(todoItems);
}
});
The new method is createProxyWithAutoFlush. There are two versions of createProxyWithAutoFlush. One that takes a PeriodicScheduler and one that does not take a PeriodicScheduler.
You can pass your own PeriodicScheduler or you can use the system one.
public interface PeriodicScheduler extends Startable, Stoppable{
ScheduledFuture repeat(Runnable runnable, int interval, TimeUnit timeUnit);
default void start() {}
default void stop() {}
}
QBit Website What is Microservices Architecture?
QBit Java Micorservices lib tutorials
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.
Reactive Programming, Java Microservices, Rick Hightower
Java Microservices Architecture
[Microservice Service Discovery with Consul] (http://www.mammatustech.com/Microservice-Service-Discovery-with-Consul)
Microservices Service Discovery Tutorial with Consul
[Reactive Microservices] (http://www.mammatustech.com/reactive-microservices)
[High Speed Microservices] (http://www.mammatustech.com/high-speed-microservices)
Reactive Microservices Tutorial, using the Reactor
QBit is mentioned in the Restlet blog
All code is written using JetBrains Idea - the best IDE ever!
Kafka training, Kafka consulting, Cassandra training, Cassandra consulting, Spark training, Spark consulting
Tutorials
- QBit tutorials
- Microservices Intro
- Microservice KPI Monitoring
- Microservice Batteries Included
- RESTful APIs
- QBit and Reakt Promises
- Resourceful REST
- Microservices Reactor
- Working with JSON maps and lists
__
Docs
Getting Started
- First REST Microservice
- REST Microservice Part 2
- ServiceQueue
- ServiceBundle
- ServiceEndpointServer
- REST with URI Params
- Simple Single Page App
Basics
- What is QBit?
- Detailed Overview of QBit
- High level overview
- Low-level HTTP and WebSocket
- Low level WebSocket
- HttpClient
- HTTP Request filter
- HTTP Proxy
- Queues and flushing
- Local Proxies
- ServiceQueue remote and local
- ManagedServiceBuilder, consul, StatsD, Swagger support
- Working with Service Pools
- Callback Builders
- Error Handling
- Health System
- Stats System
- Reactor callback coordination
- Early Service Examples
Concepts
REST
Callbacks and Reactor
Event Bus
Advanced
Integration
- Using QBit in Vert.x
- Reactor-Integrating with Cassandra
- Using QBit with Spring Boot
- SolrJ and service pools
- Swagger support
- MDC Support
- Reactive Streams
- Mesos, Docker, Heroku
- DNS SRV
QBit case studies
QBit 2 Roadmap
-- Related Projects
- QBit Reactive Microservices
- Reakt Reactive Java
- Reakt Guava Bridge
- QBit Extensions
- Reactive Microservices
Kafka training, Kafka consulting, Cassandra training, Cassandra consulting, Spark training, Spark consulting