falchion-jetty9-connector

Jetty 9 connector for Falchion container.

License

License

Categories

Categories

Jetty Container Application Servers Net
GroupId

GroupId

net.unit8.falchion
ArtifactId

ArtifactId

falchion-jetty9-connector
Last Version

Last Version

0.2.0
Release Date

Release Date

Type

Type

jar
Description

Description

falchion-jetty9-connector
Jetty 9 connector for Falchion container.
Project URL

Project URL

http://github.com/kawasima/falchion
Source Code Management

Source Code Management

https://github.com/kawasima/falchion

Download falchion-jetty9-connector

How to add to project

<!-- https://jarcasting.com/artifacts/net.unit8.falchion/falchion-jetty9-connector/ -->
<dependency>
    <groupId>net.unit8.falchion</groupId>
    <artifactId>falchion-jetty9-connector</artifactId>
    <version>0.2.0</version>
</dependency>
// https://jarcasting.com/artifacts/net.unit8.falchion/falchion-jetty9-connector/
implementation 'net.unit8.falchion:falchion-jetty9-connector:0.2.0'
// https://jarcasting.com/artifacts/net.unit8.falchion/falchion-jetty9-connector/
implementation ("net.unit8.falchion:falchion-jetty9-connector:0.2.0")
'net.unit8.falchion:falchion-jetty9-connector:jar:0.2.0'
<dependency org="net.unit8.falchion" name="falchion-jetty9-connector" rev="0.2.0">
  <artifact name="falchion-jetty9-connector" type="jar" />
</dependency>
@Grapes(
@Grab(group='net.unit8.falchion', module='falchion-jetty9-connector', version='0.2.0')
)
libraryDependencies += "net.unit8.falchion" % "falchion-jetty9-connector" % "0.2.0"
[net.unit8.falchion/falchion-jetty9-connector "0.2.0"]

Dependencies

compile (4)

Group / Artifact Type Version
org.eclipse.jetty : jetty-server jar 9.4.8.v20171121
io.dropwizard.metrics : metrics-jetty9 jar 4.0.2
io.dropwizard.metrics : metrics-jmx jar 4.0.2
org.slf4j : slf4j-simple jar 1.7.25

test (1)

Group / Artifact Type Version
junit : junit jar 4.12

Project Modules

There are no modules declared in this project.

Falchion

Falchion is an antifragile JVM container. Falchion container requires JDK9 because it's using SO_REUSEPORT flag. JDK9 supports SO_REUSEPORT only on Linux.

When the container has started, it forks JVM processes until the given pool size. If the container catch a HUP signal, it creates a new JVM processes and kill old processes.

Usage

Download the falchion script and run.

% falchion [mainClass] -cp classpath

Options

  • -cp Classpath
  • -basedir The base directory of jar files
  • -v application version
  • -p The pool size of JVM processes. (default value is 1)
  • --lifetime LIFETIME SECONDS The lifetime of one jvm process. If you set the option to 3600, container will kill all old JVMs and create new JVMs gracefully.
  • -m MONITORS Adds monitors for monitoring a jvm process. Available monitors:
    • JSTAT_GCUTIL GC statistics using jstat
    • METRICS_JMX Metrics using JMX
  • --auto-tuning tuning JVM parameters automatically.
  • --evaluator EVALUATOR

When using the options "-basedir" and "-v", Falchion container generates classpath using basedir and aplVersion. Please set the folder hierarchy like the example below.

  • applicationBaseDir <- basedir
    • 0.1.0 <- application version
      • applicationA.jar
      • applicationB.jar
      • subDir
        • applicationC.jar
    • 0.1.1

REST API

api

Falchion container provides HTTP APIs for getting the information of JVM processes or refreshing JVM processes.

GET /jvms

% curl -i http://localhost:44010/jvms
HTTP/1.1 200 OK
Date: Mon, 02 May 2016 10:11:24 GMT
Content-type: application/json
Content-length: 28

[{"id":"5jiic","pid":21914}]

GET /jvm/{id}

% curl -i http://localhost:44010/jvm/5jiic
HTTP/1.1 200 OK
Date: Mon, 02 May 2016 10:12:23 GMT
Content-type: application/json
Content-length: 182

{"id":"5jiic","pid":21914,"uptime":258357,"stats":[{"type":"gcutil","S0":0.0,"S1":100.0,"E":16.88,"O":3.1,"M":94.86,"CCS":80.13,"YGC":1,"YGCT":0.004,"FGC":0,"FGCT":0.0,"GCT":0.004}]}

POST /container/refresh

Kill all old JVMs and create new JVMs gracefully.

POST /container/refresh/{version}

Kill all old JVMs and create new JVMs gracefully. Change classpath using new version.

Auto tuning

Falchion can optimize JVM options automatically.

Versions

Version
0.2.0