Coder Social home page Coder Social logo

jmjava / freestyle-rpc Goto Github PK

View Code? Open in Web Editor NEW

This project forked from higherkindness/mu-scala

0.0 2.0 0.0 952 KB

Freestyle RPC is a purely functional library for building RPC endpoint based services with support for RPC and HTTP/2

Home Page: http://frees.io/docs/rpc

License: Apache License 2.0

Ruby 0.35% Scala 99.65%

freestyle-rpc's Introduction

Build Status codecov.io Maven Central Latest version License Join the chat at https://gitter.im/47deg/freestyle GitHub Issues

freestyle-rpc

Freestyle RPC is a purely functional library for building RPC endpoint-based services with support for RPC and HTTP/2.

Also known as frees-rpc, it brings the ability to combine RPC protocols, services, and clients in your Freestyle program, thanks to gRPC.

Installation

frees-rpc is cross-built for Scala 2.11.x and 2.12.x.

It's divided into multiple and different artifacts, grouped by scope:

  • Server: specifically for the RPC server.
  • Client: focused on the RPC auto-derived clients by frees-rpc.
  • Server/Client: used from other artifacts for both Server and Client.
  • Test: useful to test frees-rpc applications.
Artifact Name Scope Mandatory Description
frees-rpc-server Server Yes Needed to attach RPC Services and spin-up an RPC Server.
frees-rpc-client-core Client Yes Mandatory to define protocols and auto-derived clients.
frees-rpc-client-netty Client Yes* Mandatory on the client side if we are using Netty in the server side.
frees-rpc-client-okhttp Client Yes* Mandatory on the client side if we are using OkHttp in the server side.
frees-rpc-config Server/Client No Provides configuration helpers using frees-config to load the application configuration values.
frees-rpc-marshallers-jodatime Server/Client No Provides marshallers for serializing and deserializing the LocalDate and LocalDateTime joda instances.
frees-rpc-prometheus-server Server No Scala interceptors which can be used to monitor gRPC services using Prometheus, on the Server side.
frees-rpc-prometheus-client Client No Scala interceptors which can be used to monitor gRPC services using Prometheus, on the Client side.
frees-rpc-prometheus-shared Server/Client No Common code for both the client and the server in the prometheus scope.
frees-rpc-dropwizard-server Server No Scala interceptors which can be used to monitor gRPC services using Dropwizard metrics, on the Server side.
frees-rpc-dropwizard-client Client No Scala interceptors which can be used to monitor gRPC services using Dropwizard metrics, on the Client side.
frees-rpc-interceptors Server/Client No Commons related to gRPC interceptors.
frees-rpc-testing Test No Utilities to test out frees-rpc applications. It provides the grpc-testing library as the transitive dependency.
frees-rpc-common Server/Client Provided* Common things that are used throughout the project.
frees-rpc-internal Server/Client Provided* Macros.
frees-rpc-async Server/Client Provided* Async instances useful for interacting with the RPC services on both sides, server and the client.
frees-rpc-netty-ssl Server/Client No Adds the io.netty:netty-tcnative-boringssl-static:jar dependency, aligned with the Netty version (if that's the case) used in the frees-rpc build. See this section for more information. Adding this you wouldn't need to figure out which would be the right version, frees-rpc gives you the right one.
  • Yes*: on the client-side, you must choose either Netty or OkHttp as the transport layer.
  • Provided*: you don't need to add it to your build, it'll be transitively provided when using other dependencies.

To use the project, add the following to your build.sbt:

addCompilerPlugin("org.scalamacros" % "paradise" % "2.1.1" cross CrossVersion.patch)

You can install any of these dependencies in your build as follows:

// required for the RPC Server:
libraryDependencies += "io.frees" %% "frees-rpc-server"            % "0.15.0"

// required for a protocol definition:
libraryDependencies += "io.frees" %% "frees-rpc-client-core"       % "0.15.0"

// required for the use of the derived RPC Client/s, using either Netty or OkHttp as transport layer:
libraryDependencies += "io.frees" %% "frees-rpc-client-netty"      % "0.15.0"
// or:
libraryDependencies += "io.frees" %% "frees-rpc-client-okhttp"     % "0.15.0"

// optional - for both server and client configuration.
libraryDependencies += "io.frees" %% "frees-rpc-config"            % "0.15.0"

// optional - for both server and client metrics reporting, using Prometheus.
libraryDependencies += "io.frees" %% "frees-rpc-prometheus-server" % "0.15.0"
libraryDependencies += "io.frees" %% "frees-rpc-prometheus-client" % "0.15.0"

// optional - for both server and client metrics reporting, using Dropwizard.
libraryDependencies += "io.frees" %% "frees-rpc-dropwizard-server" % "0.15.0"
libraryDependencies += "io.frees" %% "frees-rpc-dropwizard-client" % "0.15.0"

// optional - for the communication between server and client by using SSL/TLS.
libraryDependencies += "io.frees" %% "frees-rpc-netty-ssl" % "0.15.0"

// optional - for using the jodatime marshallers.
libraryDependencies += "io.frees" %% "frees-rpc-marshallers-jodatime" % "0.15.0"

Documentation

The full documentation is available at the frees-rpc site.

Demo

See the examples module.

Copyright

Freestyle is designed and developed by 47 Degrees

Copyright (C) 2017-2018 47 Degrees. http://47deg.com

freestyle-rpc's People

Contributors

47degfreestyle avatar adrianrafo avatar antoniomateogomez avatar eperinan avatar fedefernandez avatar jesusmtnez avatar juanpedromoreno avatar maaaikoool avatar pepegar avatar peterneyens avatar raulraja avatar tyler-clark avatar

Watchers

 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.