Scala
Latest commit ba4a196 May 27, 2017 @vkostyukov vkostyukov committed on GitHub Merge pull request #779 from finagle/vk/syntax
Decouple Endpoint from Mapper (syntax)
Permalink
Failed to load latest commit information.
argonaut/src Remove encoding for exceptions from all of the json projects. May 15, 2017
benchmarks/src/main/scala/io/finch Upgrade Circe to 0.8 May 1, 2017
circe/src Remove encoding for exceptions from all of the json projects. May 15, 2017
core/src Decouple Endpoint from Mapper (syntax) May 24, 2017
docs/src/main Bump version Mar 31, 2017
examples/src Add Paths Apr 30, 2017
generic/src Introduce finch-generic module Mar 31, 2017
jackson/src Remove encoding for exceptions from all of the json projects. May 15, 2017
json-test/src/main/scala/io/finch/test Remove encoding for exceptions from all of the json projects. May 15, 2017
json4s/src Remove encoding for exceptions from all of the json projects. May 15, 2017
oauth2/src Introduce EndpointResult Dec 25, 2016
playjson/src Remove encoding for exceptions from all of the json projects. May 15, 2017
project update finagle and twitter util versions (#761) Mar 28, 2017
sprayjson/src Remove encoding for exceptions from all of the json projects. May 15, 2017
sse/src Bump dependencies Feb 11, 2017
test/src/main/scala/io/finch/test Update Cats, circe, ScalaCheck, and ScalaTest versions Nov 2, 2016
.codecov.yml Add .codecov.yml and set threshold Feb 22, 2017
.gitignore improve DecodeRequest API to return Try instead of Option Feb 3, 2015
.travis.yml Scala 2.12.0 + dependencies versions update Jan 6, 2017
CONTRIBUTING.md removed mentions of "request reader" across the docs Aug 1, 2016
LICENSE Fix #46 (Licensing) Jul 17, 2014
NOTICE Add note about maintainers Mar 17, 2017
README.md Add Threat Stack to the adopters list May 4, 2017
build.sbt Update some dependencies May 17, 2017
finch-logo.png Add new logo Dec 10, 2014
scalastyle-config.xml Sort imports Nov 15, 2015

README.md

Finch is a thin layer of purely functional basic blocks atop of Finagle for building composable HTTP APIs. Its mission is to provide the developers simple and robust HTTP primitives being as close as possible to the bare metal Finagle API.

Badges

Build Status Coverage Status Gitter Maven Central

Modules

Finch uses multi-project structure and contains of the following modules:

Installation

Every Finch module is published at Maven Central. Use the following sbt snippet ...

  • for the stable release:
libraryDependencies ++= Seq(
  "com.github.finagle" %% "[finch-module]" % "0.14.0"
)
  • for the SNAPSHOT version:
resolvers += Resolver.sonatypeRepo("snapshots")

libraryDependencies ++= Seq(
  "com.github.finagle" %% "[finch-module]" % "0.15.0-SNAPSHOT" changing()
)

Hello World!

This "Hello World!" example is built with the 0.14.0 version of just finch-core.

import io.finch._
import com.twitter.finagle.Http

val api: Endpoint[String] = get("hello") { Ok("Hello, World!") }

Http.server.serve(":8080", api.toServiceAs[Text.Plain])

See examples sub-project for more complete examples.

Performance

We use wrk to load test Finch+Circe against Finagle+Jackson to get some insight on how much overhead, an idiomatic Finch application written in a purely functional way, involves on top of Finagle/Jackson. The results are quite impressive (for a pre-1.0 version): Finch performs on 85% of Finagle's throughput.

Benchmark Run 1 Run 2 Run 3
Finagle + Jackson 33867.56 req/s 43781.26 req/s 43854.92 req/s
Finch + Circe 27126.25 req/s 36720.75 req/s 37191.58 req/s

Finch is also load tested against a number of Scala HTTP frameworks and libraries as part of the TechEmpower benchmark. The most recent round showed that Finch performs really well there, scoring a second place across all the Scala libraries.

Documentation

Adopters

Contributing

There are plenty of ways to contribute into Finch:

  • Give it a star
  • Join the Gitter room and leave a feedback or help with answering users' questions
  • Submit a PR (there is an issue label "easy" for newcomers)
  • Be cool and wear a Finch T-Shirt

The Finch project supports the Typelevel code of conduct and wants all of its channels (Gitter, GitHub, etc.) to be welcoming environments for everyone.

Finch is currently maintained by Vladimir Kostyukov, Travis Brown, and Ryan Plessner. After the 1.0 release, all pull requests will require two sign-offs by a maintainer to be merged.

License

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this software except in compliance with the License.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.