Questions tagged [finagle]

Finagle is an open source network stack from Twitter that you can use to build asynchronous Remote Procedure Call (RPC) clients and servers in Java, Scala, or any other JVM-hosted language.

Finagle, created by Twitter, is an open source network stack for the JVM that you can use to build asynchronous Remote Procedure Call (RPC) clients and servers in Java, Scala, or any other JVM-hosted language.

See the user guide and source code for more information.

Questions about the design of Finagle or the status of related projects are likely to find better answers over at the Finaglers mailing list.
Questions about implementation details, finagle libraries, best practices and how-to's can be found in the finaglers google group.

167 questions
64
votes
2 answers

What are the differences between Scala middleware choices?

Note: Unfortunately this question was closed, but I'm trying to maintain it for if someone else comes along with the same question. I've been looking for a good solution to developing a service in Scala that will sit between mobile devices and…
Jack
  • 16,506
  • 19
  • 100
  • 167
34
votes
3 answers

Is there a simple way to specify a global dependency exclude in SBT

How would you exclude a transitive dependency globally? My project depends on a lot of the Twitter libraries or on libraries that depend on the Twitter libraries. I don't want slf4j-jdk14 in my classpath, no matter what (I use logback as slf4j…
reikje
  • 2,850
  • 2
  • 24
  • 44
19
votes
2 answers

What are advantages of a Twitter Future over a Scala Future?

I know a lot of reasons for Scala Future to be better. Are there any reasons to use Twitter Future instead? Except the fact Finagle uses it.
Sergey Alaev
  • 3,851
  • 2
  • 20
  • 35
18
votes
1 answer

Finagle and Akka, why not use them together?

I have not used Finagle nor Akka in practice, but I have been reading a lot of about them. Finagle being a RPC system and Akka a toolkit for highly concurrent applications, why all the people compare them as two possible solutions which cannot be…
12
votes
1 answer

Using Finagle for simple Scala SOAP client

I'm struggling to use Twitter's Finagle library to implement an HTTP request to a SOAP server. The code below executes the first test successfully (using java.net.URL), but I'm having a hard time with the second test (using Finagle client). What…
Jack
  • 16,506
  • 19
  • 100
  • 167
11
votes
2 answers

Boundaries between Services, Filters, and Codecs in Finagle

Netty, which is used within Finagle, uses a pipeline of "handlers" to sequentially process in and out bound data. Netty examples, and included libraries, show various handlers used for things such as authentication, protocol codecs, and the actual…
scaling_out
  • 1,103
  • 1
  • 10
  • 15
9
votes
3 answers

convert Scala Future to Twitter Future

I use Finagle as a web server which I want to return Scala-Futures from my application logic. How to convert scala.concurrent.Future to com.twitter.util.Future, in a non-blocking way of course?
jans
  • 1,768
  • 3
  • 17
  • 22
8
votes
3 answers

Difference between RPC system and Enterprise Service Bus

What's the difference between an RPC System, like Twitter's Finagle, and an Enterprise Service Bus, like Mule? What kind of problems are each of them good at solving?
Bradford
  • 4,143
  • 2
  • 34
  • 44
8
votes
1 answer

What does it mean for TCP connections to churn?

In the context of webservices, I've seen the term "TCP connection churn" used. Specifically Twitter finagle has ways to avoid it happening. How does it happen? What does it mean?
eman
  • 83
  • 4
7
votes
1 answer

how to bind request body in Finch

Here is the code to bind request param to the router. val testReader: Endpoint[Test] = Endpoint.derive[Test].fromParams val test: Endpoint[String] = post("test" ? testReader) { t : Test => { Created("OK") }} I am using the method fromParams.…
Xiaohe Dong
  • 4,953
  • 6
  • 24
  • 53
6
votes
3 answers

Set HTTP GET Parameters in Finagle

In Finagle, how do I create a request an HTTP GET request with parameters in a safe, clean way? val request = RequestBuilder() .url("http://www.example.com/test") .addParameter("key", "value") // this doesn't exist .buildGet() request //…
duckworthd
  • 14,679
  • 16
  • 53
  • 68
6
votes
1 answer

Twitter Future timeout doesn't apply to the whole flatMap chain

I'm writing a server end program using Twitter Finagle. I do not use the full Twitter server stack, just the part that enables asynchronous processing (so Future, Function, etc). I want the Future objects to have timeouts, so I wrote…
stackoverflower
  • 3,885
  • 10
  • 47
  • 71
5
votes
1 answer

Is it possible to have a generic logging filter in finagle that can be "inserted anywhere" in a chain of andThens?

In our code we create many "finagle pipelines" like so: val f1 = new Filter[A,B,C,D](...) val f2 = new SimpleFilter[C,D](...) val f3 = new Filter[C,D,E,F](...) val s = new Service[E,F](...) val pipeline: Service[A,B] = f1 andThen f2 andThen f3…
PhD
  • 11,202
  • 14
  • 64
  • 112
5
votes
2 answers

How to handle put requests in Finatra?

I have a service which has a put endpoint. I want to be able to access the url param as well as the body. How do I achieve this. This is my endpoint: put("/:customerNum") { foo: Foo => val custNum = ??? } How do I access customerNum ?
deep
  • 1,586
  • 1
  • 18
  • 29
5
votes
1 answer

Incompatible Jackson version: 2.7.1 in sbt?

I'm getting this error when running TwitterServer from sbt: SEVERE: LoadService: failed to instantiate 'com.twitter.finagle.stats.MetricsExporter' for the requested service…
mikebridge
  • 4,209
  • 2
  • 40
  • 50
1
2 3
11 12