GithubHelp home page GithubHelp logo

kryndex / finatra Goto Github PK

View Code? Open in Web Editor NEW

This project forked from twitter/finatra

0.0 2.0 0.0 10.79 MB

Fast, testable, Scala services built on Twitter-Server and Finagle

Home Page: https://twitter.github.io/finatra/

License: Apache License 2.0

Python 4.33% Scala 91.32% Shell 0.35% Java 3.40% HTML 0.04% Thrift 0.56%

finatra's Introduction

Finatra

Build Status Test Coverage Project status Maven Central Gitter

Status

This project is used in production at Twitter (and many other organizations), and is being actively developed and maintained.

Finatra Logo

Finatra is a lightweight framework for building fast, testable, scala applications on top of TwitterServer and Finagle. Finatra provides an easy-to-use API for creating and testing Finagle servers and apps as well as powerful JSON support, modern logging via SLF4J, Finagle client utilities, and more.

Getting involved

Features

Documentation

To get started, see the Getting Started section of our User Guide to get up and running. Or check out the specific sections for building HTTP or Thrift servers.

Examples

An HTTP controller and server:

import com.twitter.finatra.http._

@Singleton
class ExampleController extends Controller {
  get("/") { request: Request =>
    "<h1>Hello, world!</h1>"
  }
}
import com.twitter.finatra.http._

class ExampleServer extends HttpServer {
  override def configureHttp(router: HttpRouter): Unit = {
    router
      .filter[CommonFilters]
      .add[ExampleController]
  }
}

A Thrift controller and server:

import com.twitter.finatra.thrift._

@Singleton
class ExampleThriftController 
  extends Controller
  with MyThriftService.BaseServiceIface {
  
  override val myFunction = handle(MyFunction) { args: MyFunction.Args =>
    ...
  }
}
import com.twitter.finatra.thrift._

class ExampleServer extends ThriftServer {
  override def configureThrift(router: ThriftRouter): Unit = {
    router
      .add[ExampleThriftController]
  }
}

Example Projects

Finatra includes working examples which highlight various features of the framework and include tests. In the develop branch these examples are included in the root sbt build and are thus buildable as part of the entire project. In the master branch (or a release branch) these examples can be built using their invididual sbt (or Maven) build files.

Please take a look through the examples for more detailed information on features, testing, and building with sbt (or Maven).

Latest version

The master branch in Github tracks the latest stable release, which is currently:

Maven Central

available on Maven Central. See the First Steps section in the User Guide for how to add dependencies.

Releases are done on an approximately monthly schedule. While semver is not followed, the changelogs are detailed and include sections on public API breaks and changes in runtime behavior.

Development version

The develop branch in Github tracks the latest code which is updated every week. If you want to contribute a patch or fix, please use this branch as the basis of your Pull Request.

For more information on providing contributions, please see our CONTRIBUTING.md documentation.

Presentations

Check out our list of presentations: Finatra Presentations.

Authors

A full list of contributors can be found on GitHub.

Follow @finatra on Twitter for updates.

License

Copyright 2013-2017 Twitter, Inc.

Licensed under the Apache License, Version 2.0: https://www.apache.org/licenses/LICENSE-2.0

finatra's People

Contributors

cacoco avatar capotej avatar scosenza avatar twoism avatar edma2 avatar pcalcado avatar yufangong avatar jcrossley avatar ryanoneill avatar kevinoliver avatar xorlev avatar mosesn avatar armandocanals avatar tptodorov avatar tomjadams avatar nhnfreespirit avatar isabelmartin avatar caniszczyk avatar vkostyukov avatar taylorleese avatar luciferous avatar njohns-grovo avatar alexitc avatar wisechengyi avatar manjuraj avatar mairbek avatar leeavital avatar fayimora avatar virusdave avatar fasholaide avatar

Watchers

James Cloos avatar  avatar

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.