Giter Site home page Giter Site logo

hexagontk / hexagon Goto Github PK

View Code? Open in Web Editor NEW
549.0 549.0 102.0 88.62 MB

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

Home Page: https://hexagontk.com

License: Other

CSS 0.52% Kotlin 96.22% HTML 2.43% PHP 0.01% Java 0.83%
gradle hacktoberfest hexagonal-architecture http http-server jvm kotlin micro-framework microservices pebble-templates rest server toolkit web

hexagon's People

Contributors

0001vrn avatar abhishekabk5 avatar alexeybrod avatar andreasvolkmann avatar anoojpoozhikuth avatar bikramjeetsingh avatar donky106 avatar esquith avatar hadv avatar ibado avatar jaguililla avatar jdornieden avatar jitakirin avatar johannea avatar mihinduranasinghe avatar mrpascal1 avatar mustakip-tw avatar norangebit avatar pavi2410 avatar pedro-cze avatar poojalakhani27 avatar ramyaravindranath avatar rishavgupta12345 avatar salmonking72 avatar sermock avatar sumitkp18 avatar tylerlowrey avatar wesleybrenno avatar xrd avatar zsmb13 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

hexagon's Issues

Implement Undertow static file handler

In UndertowEngine. The static resources handler is provisional. Code a proper one to replace this code:

        // TODO Code a proper handler
        val hasAssets = requestHandlers.filterIsInstance<AssetsHandler>().isNotEmpty()
        val resourceHandler =
            if (hasAssets)
                PredicateHandler(
                    Predicates.suffixes(".css", ".js", ".txt"),
                    ResourceHandler(ClassPathResourceManager (getSystemClassLoader (), "public")),
                    sessionHandler
                )
            else
                sessionHandler

Improve Servlet backend performance

  • Add a filter/servlet by each filter / route with a common prefix
  • Process routes with same prefix inside a servlet
  • Allow to enable disable features (automatic content-type, etc)
  • Pass parameters to backend (buffer sizes and that kind of stuff) using key/value pairs

Modularize source

Modules:

  • core: only dependencies will be: slf4j, cronutils and jackson. Includes all functionality, but without engines
  • test: test utilities and backends
  • events_rabbitmq
  • store_mongodb
  • serialization_messagepack (to be developed)
  • settings_events (to be developed)
  • template_pebble
  • template_kotlinxhtml
  • server_servlet
  • server_jetty
  • server_undertow (to be developed)
  • client_okhttp
  • tools
  • examples
  • desktop
  • front_end
  • mobile

Mongo and rabbitmq in core?

More of a question, I was a little confused on why mongo and rabbitmq things would be in a core rest framework? Is that assuming too much? Seems like perhaps those should be abstracted behind something so that I dont have to pull in those dependencies since many people may not use either of those?

Implement the microservice chassis pattern

When done... this is what should be added to the readme:

It also aims to implement the [Microservice Chassis Pattern] for a given platform
(being [Kubernetes] the reference platform). For this matter a range of functionalities will be
developed:

  • Configuration management
  • Service registering
  • Health check
  • Operation metrics
  • Logging management
  • Tracing support

Continuous Deployment

Deploy to Bintray (with Travis) when a tag is created and pushed.

Handle Github pages deployment here too (and get rid of docs directory)

Add test server backend

Add "Test" server implementation for tests without real networking.

This server will be an implementation of ServerEngine with an extra method: send(request: Request): Response that executes the callback and return the result without network involvement.

While developing this server some unspecified cases (route handlers order, etc.) can arise. In that case, please leave a comment to add a test to the Server/Router test suite.

Implement Authentication and Authorization

New project Web site design

Use Google's Material Desing Lite. The scope is only the design, Web site sources are in the hexagon_site module. A generated site to change the style can be found in hexagon_site/new_site in the feature/hexagon-38_documentation_web branch.

Check the following links for themes and structure:

For the generation:

  • Embed kts script tests inside md files.
  • Gather modules documentation from themselves.

Add samples and extra documentation to API docs using Dokka.

Create HTTP call record callback

Create callback to store requests/responses (calls), this callback can be used on the HTTP client and the server. The calls list should be available from the callback instance.

Callbacks already developed in the http/http_server module (on the com/hexagonkt/http/server/callbacks package) can be used as reference for development and testing of such components.

The callback should be added to the http/rest_tools module on the com.hexagonkt.http.callbacks package.

For information on how to build the project and pass the tests please refer to the contributing guide.

If you have any question or suggestion, please feel free to use this issue's comments to discuss them ๐Ÿ˜‰

Add SSL support

Add compression support

Implement compression support in port_http_server and port_http_client.

The goal would be to add a configuration parameter in the (Server|Client)Settings classes and force the compression headers to be sent accordingly.

The proper encoding and sending/receiving bodies must be checked by tests in the Ports' tests suites (the test classes used to validate adapters modules).

As a reference, you can check the fabulous MDN documentation regarding the subject:

Fix circular dependencies in IntelliJ

If the project is set up using single modules for components (instead the current strategy: source folders are modules) it fails because of circular dependencies mainly because of hexagon_test

Promote the project

Contact libraries used by Hexagon for them to add a 'backlink' ;)

Apply to GSoC: https://developers.google.com/open-source/gsoc/resources

Advertise in: http://kotlinlang.org/community (Slack, Blog...)

Check:

Add MIME Type support

Use Java Activation Framework. This could be implemented by moving and refactoring Undertow implementation.

Move current Undertow implementation (using JAF) in UndertowResponse.getMimeType() to Core to be used by other Server Engines if they do not provide one.

WebSockets support

When completed, create an example project like this one: http://sparkjava.com/tutorials/websocket-chat to show the feature.

Check Javalin implementation: https://javalin.io/documentation#websockets

This task is composed of two big areas:

1. Define the DSL to handle Websockets

The DSL will implement methods to add routes of WS type inside the router. I.e.:

Router {
    webSocket("/path") {
        onConnect {
            send("Message back")
        }
        onError {
            send("Message back")
        }
        onMessage {
            send("Message back")
        }
        onClose {
            send("Message back")
        }
    }
}

All callbacks will have a context to send/receive data to the client. This context will hold
methods to get/set attributes, headers, etc.

2. Implement the routes on adapters

The above step will add a list of routes to the router. On the adapters implementations, these
routes will be converted into the adapter's library format in the fun startup(server: Server)
method.

You can check the implementation of this method on the
http_server_jetty/src/main/kotlin/JettyServletAdapter.kt file, but the actual logic is also on the
http_server_servlet/src/main/kotlin/ServletFilter.kt file.

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.