Giter Club home page Giter Club logo

zenith's Introduction

Zenith

Build Status Maven Central Coverage Size License

Zenith is a functional HTTP toolkit for Scala.

Getting started

Zenith is currently available for Scala 2.11.12 and 2.12.4.

To get started with SBT, simply add the following to your build.sbt file:

libraryDependencies += "io.github.sungiant" %% "zenith" % "0.4.5"

Additionally, the zenith-netty package contains an off the shelf implementation of Zenith's abstract network layer:

libraryDependencies += "io.github.sungiant" %% "zenith-netty" % "0.4.5"

Finally the zenith-default package is great for getting started, it contains an the shelf implementation of a Zenith compatible sequencing context as well as some useful Zenith plugins:

libraryDependencies += "io.github.sungiant" %% "zenith-default" % "0.4.5"

A working example

A demo project can be found in the orphan demo branch of this repository.

Architecture

Zenith is achitected around an abstract network layer and a generic sequencing context. This make it possible to write a web service using Zenith that allows for easily changing both the network layer implementation (Netty, Akka HTTP...) and the sequencing context (Scala Future, Twitter Future, Akka Future + WriterT Monad Transformer) that binds operations together.

Zenith makes it easy to write a webservice against exactly the dependences you want, if you decide that you want your project to only have dependencies on Akka HTTP, you can do that, simply switch out the zenith-netty package for your own implementation of Zenith's abstract network layer using Akka HTTP. Zenith doesn't impose such choices upon your project.

Zenith is written in a functional style; the codebase does not include a single instance of Scala's var keyword.

The core part of Zenith, the package zenith, depends upon:

An implementation of Zenith's abstract network layer is provided in a seperate package zenith-netty that additionally depends upon:

  • netty an event-driven asynchronous network application framework

An implementation of a Zenith compatible sequencing context and a handful of useful plugins are, again, provided in a seperate package zenith-default that additionally depends upon:

  • circe for functional JSON

Alternatives

  • unfiltered a toolkit for servicing HTTP requests
  • finch a combinator library for building Finagle HTTP services

License

Zenith is licensed under the MIT 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.

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.