The Cloud Module contains a set of conventions and APIs that helps the developer to design an application well suited to cloud environments. Its core features is provided by kikaha-cloud
module and its main APIs are described on the following topics.
This API provides a simple way to gather the basic identification data regarding your application and its runtime environment. All cloud-related modules depends on this configuration in order to provide a better experience configuring your application on a cloud environment.
The bellow snippet code shows how one can have access to this API.
public class SampleService {
@Inject ApplicationData appData;
// print sibling nodes on your cluster application
public void printSiblingNodesLocalAddress(){
applicationData.getSiblingNodesOnTheCluster()
.forEach( n -> System.out.println( n.getLocalAddress() ) );
}
}
Only a few configuration parameters should be properly configured before start a kikaha application that uses the kikaha-cloud
module:
server.smart-server.application.name
): It is highly recommended that you override this with an unique identifier of your application cluster on your Data Center. It helps the cloud module to distinguish your application on an environment that have more than one micro-service running on the same Data Center.server.smart-server.application.name
): If you have more than one version of your application running at the same time on the same Data Center it is also highly recommended that you use override version attribute with its respective value for the same reason described above.Here is how your application.yml
file should look like:
server:
smart-server:
application:
name: "capacitor"
version: "1.0.0"
Responsible for a manual cluster management of your application.
TODO
Identify which node your application is actually running.
TODO
Identify if the current request was already started on other application or node.
TODO
Kikaha is shipped with a few cloud-related modules which may be very handy while deploying a cloud application:
Codahale's team did an impressive job designing a very good API to deal with application metrics. The kikaha-cloud-metrics
is a tiny layer for the following features:
Consul.io is probably the most interesting Service Discovery application available at the market. The kikaha-cloud-consul
module provide tight integration with the following Consul.io features:
TODO
TODO
WELCOME About Kikaha philosophy
GETTING STARTED Getting started in 1 minute Creating a Kikaha maven project Architecture overview
TUTORIALS Logging configuration Configuring the server Creating your first HTTP route Kikaha's command line interface Configuring your favorite IDE Wro4j Integration
CORE FEATURES HTTP and HTTPS Routing static assets Dependency injection Authentication and authorization Smart routes
ESSENTIAL MODULES μRouting API WebSocket Routing Database Connection Pool JSON with Jackson Protobuf Mustache Templates Rocker Templates BCrypt
CLOUD MODULES Overview of Cloud Modules Consul.io Codahale's Metrics Auth0 Single Sign-On μWorkers - Actor-like API Hazelcast
AWS-RELATED MODULES Overview of AWS-Related Modules Deploying Applications on AWS AWS IAM Credentials AWS EC2 AWS SQS queues AWS CloudWatch metrics AWS Application Load Balancer AWS Lambda functions AWS X-Ray
ADVANCED TOPICS Creating custom modules Routing with Undertow's API Creating custom cloud modules