Questions tagged [twitter-finagle]
58 questions
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…

Gorka Lerchundi Osa
- 442
- 3
- 9
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
4
votes
1 answer
Twitter Future & Cats Arrow
I'm trying to combine Twitter Future with Cats Kleisli and Arrow and I have a compilation error that I don't know how to solve it.
The code is the following:
package com.example
import scala.language.higherKinds
import cats.arrow.Arrow
import…

Octavian R.
- 1,231
- 8
- 12
4
votes
1 answer
Logging the remote host in Finagle
I'd like to log the called remote host to STDOUT when using Finagle Client. But as far as I see this is not possible via com.twitter.finagle.http.filter.LoggingFilter; Its #format (example see below) method cannot access the actual…

jonas
- 185
- 8
3
votes
0 answers
Finagle and load balancing
I have seen in many places that Finagle has service discovery and load balancing capabilities, but I cannot find any reference to actual detailed implementation.
How does Finagle client get the address of the Service Discovery?
How is such a service…

Mr.Eddart
- 10,050
- 13
- 49
- 77
3
votes
1 answer
ChannelClosedException - Upstream Address: Not Available
Our scala/thrift service is using twitter finagle 2.12-18.10.0 with java8. The Service is working fine for single request or handful of requests but when we try to hit the service with lot many requests we are…

Ashish Garg
- 101
- 1
- 7
3
votes
0 answers
Writing a testable Finagle Resolver
I'd like to test a Finagle Resolver properly.
Let's get a sample code:
import com.twitter.finagle.{Addr, Address, Resolver}
import com.twitter.util._
class DummyResolver extends Resolver {
override val scheme: String = "sample"
override def…

Alban Dericbourg
- 1,616
- 2
- 16
- 39
3
votes
1 answer
Finagle quickstart client
I have a bare sbt project to which I have added "com.twitter" %% "finagle-http" % "6.33.0". I am following the quickstart guide for Twitter Finagle. The code I have is a direct copy-paste:
import com.twitter.finagle.{Http, Service}
import…

EthanP
- 1,663
- 3
- 22
- 27
3
votes
1 answer
How can I validate the HMAC signature of a JWT token in pure Scala?
There's a few nice JWT token decoding libraries, but I have the feeling that I don't need any library because it should all boil down to base64 encode/decode and basic cryptography algorithms that can be found in the standard library.
I found…

sscarduzio
- 5,938
- 5
- 42
- 54
3
votes
1 answer
How to "include" Thrift files from different modules?
Scenario: One big project with multiple sub-projects, SBT build definition.
rootproject/
api/
src/
main/
thrift/
SomeService.thrift
core/
src/
main/
thrift/
SomeModel.thrift
What is the…

flavian
- 28,161
- 11
- 65
- 105
2
votes
0 answers
How does one get all query params from within a endpoint?
I'm writing a toy finch project and trying to allow requests to specify arbitrary query parameters to set some value. I am able to retrieve the value for a known parameter name (i.e. param[String]("foo")) but how can I get a Map[String,String] of…

BWStearns
- 2,567
- 2
- 19
- 33
2
votes
1 answer
java.lang.IllegalArgumentException: Failure parsing Toggle config resources when updating Scala version from 2.11 to 2.12
I have maven project with Scala and java. We are using twitter finagle library version 18.9.0.
The current version of scala is 2.11.11 and I want to update the version to 2.12.6.
When I compile the program now I get the below…

user51
- 8,843
- 21
- 79
- 158
2
votes
0 answers
Finch-oauth2 implicit grant
I've been using Finagle/Finch lately and I'm currently implementing OAuth2. The suitable grant type would be implicit, since it's a SPA (correct me if I'm wrong here). After trying to authenticate my client, it says that grant_type implicit is not a…

Mauro Palsgraaf
- 237
- 3
- 13