Skip to content
A Nailgun client written in Scala that can compile to native and be used as a JVM library.
Branch: master
Clone or download
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
cli/src/main/scala/snailgun Migrate everything to snailgun Jun 27, 2019
core/src Uncomment snailgun arg echo main app Jun 27, 2019
project Migrate everything to snailgun Jun 27, 2019
.gitignore
.java-version Split sailgun into `core` and `cli` Jun 26, 2019
.scalafmt.conf Split sailgun into `core` and `cli` Jun 26, 2019
.travis.yml Update project name in travis.yml Jun 27, 2019
LICENSE.md Add first version of sailgun Jun 26, 2019
NOTICE.md Migrate everything to snailgun Jun 27, 2019
README.md Update readme with right badges Jun 28, 2019
build.sbt Migrate everything to snailgun Jun 27, 2019

README.md

snailgun 🐌 🔫

Build Status Maven Central

Snailgun is a Nailgun client written in Scala.

The goal of snailgun is to be a flexible, cross-platform, zero-dependency Nailgun client that can be used both as a binary and as a library dependency.

Motivation

Nailgun is a useful protocol to communicate lightweight, short-lived clients with long-running servers.

Developers have traditionally used Nailgun to communicate native-like clients with services running on the JVM. However, there are many use cases that require JVM clients connect to Nailgun servers and those are currently unsupported.

Snailgun is an alternative implementation to the default Python and C clients of the Nailgun protocol that intends to be extensible, fast and support both JVM and Native clients.

  • It provides a simple API that for any JVM-based programming language.
  • It can be compiled to a Native binary that is 10x faster than the Python client through GraalVM's Native Image.

Snailgun's major use cases are:

  1. You need a client that talks the Nailgun protocol but you need to customize it.
  2. You need to communicate with a Nailgun server implemented in another language.
  3. You need to communicate a JVM client with a Nailgun server on the JVM. For example, if the server cannot be compiled to native or synchronizes concurrent clients.

Usage 🔧

Library

The API is meant to be simple and extensible. The snailgun-core directory that hosts the implementation. The entrypoint is Client and the full protocol implementation is Protocol.

Snailgun is published to Maven Central. Add it to your project with:

libraryDependencies += "me.vican.jorge" %% "snailgun" % "SNAILGUN_VERSION"

where SNAILGUN_VERSION is the latest git tag in this repository.

Binary

You can generate a Snailgun binary by following the steps described in the GraalVM Native Image guide.

To generate a native binary out of this repository, run snailgun-cli/graalvm-native-image:packageBin in a machine that has GraalVM and native-image installed.

You can’t perform that action at this time.