Hexagon is a microservices library written in Kotlin. Its purpose is to ease the building of services (Web applications, APIs or queue consumers) that run inside a cloud platform
jaguililla Merge pull request #130 from hexagonkt/hexagon
Document bintray helper script and update readme
Latest commit 8d5578a Sep 21, 2018
Permalink
Failed to load latest commit information.
.github Update Github templates Sep 13, 2018
gradle Document bintray helper script and update readme Sep 20, 2018
hexagon_benchmark Use Gatling default settings when feasible Sep 20, 2018
hexagon_core Java 10 support Sep 19, 2018
hexagon_scheduler Remove `hexagon_module` script to simplify building logic Sep 18, 2018
hexagon_site Document bintray helper script and update readme Sep 20, 2018
hexagon_starters Syntax clean up Sep 18, 2018
hexagon_vertx Remove `hexagon_module` script to simplify building logic Sep 18, 2018
messaging_rabbitmq Remove `hexagon_module` script to simplify building logic Sep 18, 2018
port_client Remove `hexagon_module` script to simplify building logic Sep 18, 2018
port_messaging Remove `hexagon_module` script to simplify building logic Sep 18, 2018
port_server Remove `hexagon_module` script to simplify building logic Sep 18, 2018
port_store Remove `hexagon_module` script to simplify building logic Sep 18, 2018
port_templates Remove `hexagon_module` script to simplify building logic Sep 18, 2018
server_jetty Remove `hexagon_module` script to simplify building logic Sep 18, 2018
server_servlet Remove `hexagon_module` script to simplify building logic Sep 18, 2018
store_mongodb Remove `hexagon_module` script to simplify building logic Sep 18, 2018
templates_pebble Remove `hexagon_module` script to simplify building logic Sep 18, 2018
.codecov.yaml Delete unused module Jun 16, 2018
.editorconfig Fix merge error (#105) Nov 22, 2017
.gitignore Bump version Aug 19, 2018
.travis.yml Fasten builds by ignoring output Aug 18, 2018
build.gradle Delete Rocker module because of problems with latest version Sep 19, 2018
code_of_conduct.md Community documentation (#43) Jun 25, 2017
contributing.md Improve documentation Aug 29, 2018
docker-compose.yaml Update infrastructure and documentation Dec 7, 2017
gradle.properties Extract Bintray configuration parameters to properties file Sep 18, 2018
gradlew Clean up and refactor (a lot) Aug 18, 2018
gradlew.bat Develop (#41) Jun 24, 2017
license.md Site updates (#112) Nov 27, 2017
readme.md Document bintray helper script and update readme Sep 20, 2018
settings.gradle Delete Rocker module because of problems with latest version Sep 19, 2018

readme.md

Hexagon
Hexagon

The atoms of your platform

Travis CI Codecov Codebeat Bintray

Quick Start | Guides | API Reference


Hexagon is a microservices library written in Kotlin. Its purpose is to ease the building of services (Web applications, APIs or queue consumers) that run inside a cloud platform.

It is meant to provide abstraction from underlying technologies to be able to change them with minimum impact. It is designed to fit in applications that conforms to the Hexagonal Architecture (also called Clean Architecture or Ports and Adapters Architecture).

The goals of the project are:

  1. Be simple to use: make it easy to develop user services (HTTP or message consumers) quickly. It is focused on making the usual tasks easy, rather than making a complex tool with a lot of features.
  2. Make it easy to hack: allow the user to add extensions or change the framework itself. The code is meant to be simple for the users to understand it. Avoid having to read blogs, documentation or getting certified to use it efectively.

What are NOT project goals:

  1. To be the fastest framework. Write the code fast and optimize only the critical parts. It is not slow anyway.
  2. Support all available technologies and tools: the spirit is to define simple interfaces for the most common features , so users can implement integrations with different tools easily.
  3. To be usable from Java. Hexagon is Kotlin first.

Quick Start

  1. Configure Kotlin in Gradle or Maven.
  2. Setup the JCenter repository (follow the link and click on the Set me up! button).
  3. Add the dependency:
  • In Gradle. Import it inside build.gradle:

    compile ("com.hexagonkt:server_jetty:0.23.5")
  • In Maven. Declare the dependency in pom.xml:

    <dependency>
      <groupId>com.hexagonkt</groupId>
      <artifactId>server_jetty</artifactId>
      <version>0.23.5</version>
    </dependency>
  1. Write the code in the src/main/kotlin/Hello.kt file:

    import com.hexagonkt.server.jetty.serve
    
    fun main(vararg args: String) {
        serve {
            get("/hello/{name}") { "Hello ${request["name"]}!" }
        }
    }
  2. Run the service and view the results at: http://localhost:2010/hello/world

You can read more details reading the Quick Start page, or checking the guides.

Status

DISCLAIMER: The project status is beta. Use it at your own risk. There are some modules not finished yet (e.g: storage and HTTP client) and the API is subject to change any time prior to release 1.0.

It is used in personal not released projects to develop APIs and Web applications.

Performance is not the primary goal, but it is taken seriously. You can check performance numbers in the TechEmpower Web Framework Benchmarks. You can also run the stress tests, to do so, read the contributing.md Benchmarking section

Tests, of course, are taken into account. This is the coverage grid:

CoverageGrid

The code quality is checked by Codebeat:

codebeat badge

Contribute

If you like this project and want to support it, the easiest way is to give it a star ✌️.

If you feel like you can do more. You can contribute to the framework in different ways:

To know what issues are currently open and be aware of the next features you can check the Project Board at Github.

You can ask any question, suggestion or complaint at the project's Slack channel. And be up to date of project's news following @hexagon_kt in Twitter.

Thanks to all project's contributors!

License

The project is licensed under the MIT License. This license lets you use the source for free or commercial purposes as long as you provide attribution and don’t hold any project member liable.