diff --git a/micro-application-register/readme.md b/micro-application-register/readme.md
index f47ff7ec2..4f3eb02f0 100644
--- a/micro-application-register/readme.md
+++ b/micro-application-register/readme.md
@@ -6,6 +6,8 @@ This plugin turns any service into a Service Registry client (and optionally ser
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-application-registry/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-application-registry)
+
Simply add to the classpath
Maven
@@ -13,17 +15,17 @@ Maven
com.aol.microservices
micro-application-registry
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-application-registry:0.62'
+ compile 'com.aol.microservices:micro-application-registry:x.yz'
## Depends on
micro-client
- micro-reactiv
+ micro-reactive
Import this plugin to add ServiceRegistry functionality, Rest Resource available on
diff --git a/micro-boot/readme.md b/micro-boot/readme.md
index ee74d07a8..faec3dc1c 100644
--- a/micro-boot/readme.md
+++ b/micro-boot/readme.md
@@ -4,6 +4,8 @@
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-boot/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-boot)
+
Add micro-boot to the classpath
Maven
@@ -11,12 +13,12 @@ Maven
com.aol.microservices
micro-boot
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-boot:0.62'
+ compile 'com.aol.microservices:micro-boot:x.yz'
And also add Grizzly and Jersey (micro-grizzly-with-jersey will add both)
@@ -25,12 +27,12 @@ Gradle
com.aol.microservices
micro-grizzly-with-jersey
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-grizzly-with-jersey:0.62'
+ compile 'com.aol.microservices:micro-grizzly-with-jersey:x.yz'
## Create a simple server
diff --git a/micro-client/readme.md b/micro-client/readme.md
index ba78183b6..6f950087e 100644
--- a/micro-client/readme.md
+++ b/micro-client/readme.md
@@ -11,6 +11,8 @@ The NIORestClient is available as Spring bean. AsyncRestClient can simply be in
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-client/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-client)
+
Simply add to the classpath
Maven
@@ -18,9 +20,9 @@ Maven
com.aol.microservices
micro-client
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-client:0.62'
\ No newline at end of file
+ compile 'com.aol.microservices:micro-client:x.yz'
\ No newline at end of file
diff --git a/micro-core/readme.md b/micro-core/readme.md
index be366937c..c61f91991 100644
--- a/micro-core/readme.md
+++ b/micro-core/readme.md
@@ -4,6 +4,9 @@ This module imports your configured plugins, starts and manages your JEE webserv
## To use
+
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-core/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-core)
+
Simply add to the classpath
Maven
@@ -11,9 +14,9 @@ Maven
com.aol.microservices
micro-core
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-core:0.62'
\ No newline at end of file
+ compile 'com.aol.microservices:micro-core:x.yz'
\ No newline at end of file
diff --git a/micro-cors/readme.md b/micro-cors/readme.md
index 384bd2d36..eff7a4444 100644
--- a/micro-cors/readme.md
+++ b/micro-cors/readme.md
@@ -4,6 +4,8 @@ Set response headers for Cross Domain support via a Servlet Filter
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-cors/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-cors)
+
Simply add to the classpath
Maven
@@ -11,9 +13,9 @@ Maven
com.aol.microservices
micro-cors
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-cors:0.62'
+ compile 'com.aol.microservices:micro-cors:x.yz'
diff --git a/micro-data/readme.md b/micro-data/readme.md
index 12e0d771c..5b39e1248 100644
--- a/micro-data/readme.md
+++ b/micro-data/readme.md
@@ -5,6 +5,9 @@ Creates a DataSource Spring Bean with name "mainDataSource" from v0.63 this will
## To use
+
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-data/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-data)
+
Simply add to the classpath
Maven
@@ -12,12 +15,12 @@ Maven
com.aol.microservices
micro-data
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-data:0.62'
+ compile 'com.aol.microservices:micro-data:x.yz'
# Configuring a data source
diff --git a/micro-events/readme.md b/micro-events/readme.md
index c51b773c7..e53803a08 100644
--- a/micro-events/readme.md
+++ b/micro-events/readme.md
@@ -4,6 +4,8 @@ This adds a facility to capture events such as requests, request execution and s
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-events/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-events)
+
Simply add to the classpath
Maven
@@ -11,12 +13,12 @@ Maven
com.aol.microservices
micro-events
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-events:0.62'
+ compile 'com.aol.microservices:micro-events:x.yz'
### Depends on
diff --git a/micro-grizzly-with-jersey/readme.md b/micro-grizzly-with-jersey/readme.md
index 962a14904..7e316ba3a 100644
--- a/micro-grizzly-with-jersey/readme.md
+++ b/micro-grizzly-with-jersey/readme.md
@@ -6,6 +6,8 @@ Convenience module that packages Grizzly, Jersey and Microserver together
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-grizzly-with-jersey/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-grizzly-with-jersey)
+
Simply add to the classpath
Maven
@@ -13,9 +15,9 @@ Maven
com.aol.microservices
micro-grizzly-with-jersey
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-grizzly-with-jersey:0.62'
\ No newline at end of file
+ compile 'com.aol.microservices:micro-grizzly-with-jersey:x.yz'
\ No newline at end of file
diff --git a/micro-grizzly/readme.md b/micro-grizzly/readme.md
index 36bd2da41..6dcc51d7d 100644
--- a/micro-grizzly/readme.md
+++ b/micro-grizzly/readme.md
@@ -7,6 +7,8 @@ Plugin that allows the Grizzly Web server to be used with Microserver.
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-grizzly/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-grizzly)
+
Simply add to the classpath
Maven
@@ -14,9 +16,9 @@ Maven
com.aol.microservices
micro-grizzly
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-grizzly:0.62'
\ No newline at end of file
+ compile 'com.aol.microservices:micro-grizzly:x.yz'
\ No newline at end of file
diff --git a/micro-guava/build.gradle b/micro-guava/build.gradle
index eb72fbd83..8d2ef16bd 100644
--- a/micro-guava/build.gradle
+++ b/micro-guava/build.gradle
@@ -1,8 +1,8 @@
description = 'micro-guava'
dependencies {
- compile group: 'com.google.guava', name: 'guava', version:'18.0'
- compile group: 'com.fasterxml.jackson.datatype', name: 'jackson-datatype-guava', version:'2.5.2'
+ compile 'com.google.guava:guava:19.0-rc2'
+ compile 'com.fasterxml.jackson.datatype:jackson-datatype-guava:2.6.3'
compile project(':micro-core')
testCompile project(':micro-grizzly')
testCompile project(':micro-jersey')
diff --git a/micro-guava/readme.md b/micro-guava/readme.md
index e56a3f326..b49cfd2e7 100644
--- a/micro-guava/readme.md
+++ b/micro-guava/readme.md
@@ -11,17 +11,19 @@ This plugin
Simply add to the classpath
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-guava/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-guava)
+
Maven
com.aol.microservices
micro-guava
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-guava:0.62'
+ compile 'com.aol.microservices:micro-guava:x.yz'
# Example Guava Resource
diff --git a/micro-jersey/readme.md b/micro-jersey/readme.md
index 603cf1efb..52ba8ff2a 100644
--- a/micro-jersey/readme.md
+++ b/micro-jersey/readme.md
@@ -6,6 +6,8 @@ Plugin that allows the Jersey to be used as the jax-rs implementation with Micro
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-jersey/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-jersey)
+
Simply add to the classpath
Maven
@@ -13,9 +15,9 @@ Maven
com.aol.microservices
micro-jersey
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-jersey:0.62'
\ No newline at end of file
+ compile 'com.aol.microservices:micro-jersey:x.yz'
\ No newline at end of file
diff --git a/micro-machine-stats/readme.md b/micro-machine-stats/readme.md
index 24cf685a8..2b1fa1bc7 100644
--- a/micro-machine-stats/readme.md
+++ b/micro-machine-stats/readme.md
@@ -2,3 +2,4 @@
Uses Sigar to capture machine stats for each service (CPU load, memory usage etc)
+Work in Progress.
diff --git a/micro-metrics/readme.md b/micro-metrics/readme.md
index a1c90fed3..6eff4ace5 100644
--- a/micro-metrics/readme.md
+++ b/micro-metrics/readme.md
@@ -6,6 +6,8 @@ This adds support for Dropwizard metrics annotations on Spring beans. For more d
## To use
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-metrics/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-metrics)
+
Simply add to the classpath
Maven
@@ -13,12 +15,12 @@ Maven
com.aol.microservices
micro-metrics
- 0.62
+ x.yz
Gradle
- compile 'com.aol.microservices:micro-metrics:0.62'
+ compile 'com.aol.microservices:micro-metrics:x.yz'
# Configuring Metrics Reporters
diff --git a/micro-reactive/readme.md b/micro-reactive/readme.md
index 4d67e4bc6..9572ca0b9 100644
--- a/micro-reactive/readme.md
+++ b/micro-reactive/readme.md
@@ -6,20 +6,24 @@ Also can run standalone outside of Microserver
## To use
+
+[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-reactive/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.aol.microservices/micro-reactive)
+
Simply add to the classpath
Maven
-
+ ```xml
com.aol.microservices
micro-reactive
- 0.62
+ x.yz
-
+ ```
Gradle
-
+ ```groovy
compile 'com.aol.microservices:micro-reactive:0.62'
-
+ ```
+
## Reactive mixin
implement com.aol.micro.server.reactive.Reactive to add Reactive functionality via [simple-react](https://github.com/aol/simple-react).
@@ -68,7 +72,7 @@ Find active jobs currently running (making use of @Suspended AsyncResponse async
The Pipes class can manage simple-react Adapters (Queues / Topics and Signals). Example using an Agrona wait-free Queue (with mechanical sympathy) :
Register your Pipe (bounded non blocking Queue) which returns a LazyFutureStream for infinite processing & start our server. Any events with the Key "test" passed into our Pipes class (via Reactive.enqueue for example) will be passed straight to our processing Stream.
-
+ ```java
public static void main(String[] args){
LazyFutureStream stream = Pipes.register("test", QueueFactories.
boundedNonBlockingQueue(100)
@@ -76,14 +80,14 @@ Register your Pipe (bounded non blocking Queue) which returns a LazyFutureStream
stream.filter(it->it!=null).peek(System.out::println).run();
new MicroserverApp(()-> "simple-app").run();
}
-
+ ```
NB - in practice with the current version - unless you expect to have a high throughput of data this implementation will be very inefficient (a blocking queue would in many cases perform better). v0.99 of simple-react will introduce native 'wait' strategies for Queues which will perform better than the custom simple-react filter we are using here. To create a pipe with a blocking queue :
-
+ ```java
Pipes.register("unbounded", new Queue()); // unbounded
Pipes.register("bounded", QueueFactories.boundedQueue(1000)); //bound size 1000
-
+ ```
Elsewhere in our application we can pass data to our Pipe (e.g. from a REST request, incoming data from an Aeron or Kafka Queue, Scheduled job etc)
-
+ ```java
@GET
@Produces("text/plain")
@Path("/ping")
@@ -91,7 +95,7 @@ Elsewhere in our application we can pass data to our Pipe (e.g. from a REST requ
this.enqueue("test","ping : " + next++);
return "ok";
}
-
+ ```
In this example our processing Stream will simple print
ping : 0
diff --git a/readme.md b/readme.md
index 281ffcbb8..e01e7f2a0 100644
--- a/readme.md
+++ b/readme.md
@@ -9,10 +9,10 @@ A convenient modular engine for Microservices. Microserver plugins offer seamles
Install Microserver with Grizzly and Jersey (Gradle config below)
- compile group: 'com.aol.microservices', name:'micro-grizzly-with-jersey', version:'0.62'
+ compile group: 'com.aol.microservices', name:'micro-grizzly-with-jersey', version:'x.yz'
Create and run a simple app
-
+ ```java
@Rest
@Path("/test")
public class SimpleApp {
@@ -25,7 +25,7 @@ Create and run a simple app
return "hello world!";
}
}
-
+```
# Tutorial and overview
@@ -35,10 +35,11 @@ Create and run a simple app
## Note on Fat Jars
Microserver (& Cyclops) have a plugin architecture and make use of the Java Service Laoder mechanism. Make sure your Far Jar implementation is configured to aggreagate services. With the Gradle Shadow Jar you do this with
-
+ ```groovy
shadowJar {
mergeServiceFiles()
}
+ ```
###Quick start youtube video
@@ -84,33 +85,33 @@ Microserver is a zero configuration, standards based, battle hardened library to
### Maven dependency
Microserver core
-
+ ```xml
com.aol.microservices
micro-core
- 0.62
+ x.yz
-
+```
Microserver Spring Boot
-
+ ```xml
com.aol.microservices
micro-boot
- 0.62
+ x.yz
-
+ ```
### Gradle dependency
Microserver core
-
- compile group: 'com.aol.microservices', name:'micro-core', version:'0.62'
-
+ ```groovy
+ compile group: 'com.aol.microservices', name:'micro-core', version:'x.yz'
+ ```
Microserver Spring Boot
-
- compile group: 'com.aol.microservices', name:'micro-boot', version:'0.62'
-
+ ```groovy
+ compile group: 'com.aol.microservices', name:'micro-boot', version:'x.yz'
+ ```
##Tech Stack
Microserver core is a lightweight server configuration engine built using Spring, Cyclops and Jackson.
@@ -125,7 +126,7 @@ Example working application :-
###The main class :-
-
+```java
public class AppRunnerTest {
@@ -134,13 +135,13 @@ Example working application :-
}
}
-
+ ```
This will deploy a REST server on port 8080 (configurable by test-app.port in application.properties), it will also automagically capture any Rest end points (Spring & Jersey annotations) that implement the tag interface RestResource (see below for an example).
###A rest end point
-
+ ```java
@Rest
@Path("/status")
public class StatusResource {
@@ -153,7 +154,7 @@ This will deploy a REST server on port 8080 (configurable by test-app.port in ap
}
}
-
+ ```
### Configuration Options
If you find you need configuration options for your application you have two options.
@@ -180,9 +181,9 @@ The configuration of your Rest end points can be managed via the Module interfac
e.g.
-
+ ```java
new MicroserverApp(() -> "context").start();
-
+ ```
() -> "context" is a Module!
@@ -190,7 +191,7 @@ e.g.
####Configurable Options
Module provides the following default methods, that clients can override
-
+ ```java
default Map getPropertyOverrides(){
return Maps.newHashMap();
}
@@ -235,7 +236,7 @@ Module provides the following default methods, that clients can override
default String getProviders(){
return "com.aol.micro.server.rest.providers";
}
-
+ ```
RestResource class defines the tag interface used to identify Rest end points for this module.
Filters provides a map of Servlet filters and the paths to which they should be applied
@@ -273,7 +274,7 @@ Embedding microservices is an optimisation that allows better performance, enhan
This example will start two different Rest end points - one on context "test-app" and another on context "alternative-app".
"test-app" will automagically wire in any Jersey end points that implement TestAppRestResource.
"alternative-app" will automagically wire in any Jersey end points that implement AltAppRestResource.
-
+ ```java
@Microserver
public class EmbeddedAppRunnerTest {
@@ -287,17 +288,17 @@ This example will start two different Rest end points - one on context "test-app
}
}
-
+ ```
##Building a 'fat' Jar
We recommend the Gradle plugin Shadow Jar. For Gradle 2.0 simply define it in your plugins section ->
-
+ ```groovy
plugins {
id 'java' // or 'groovy' Must be explicitly applied
id 'com.github.johnrengelman.shadow' version '1.2.0'
}
-
+ ```
Maven users can use Shade plugin or equivalent (Maven assembly plugin).