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
0
votes
1 answer

finatra/examples/twitter-clone: Testing the firebase client

In the twitter-clone example, the following firebase client is defined: @Singleton class FirebaseClient @Inject()( httpClient: HttpClient, mapper: FinatraObjectMapper) { // ... } I would like to write a test that uses this class. The problem…
Damian Nadales
  • 4,907
  • 1
  • 21
  • 34
0
votes
2 answers

Scala - Finatra - Reading ip address from header

I'm new to Finatra and scala. I need to store the ip address with another data in a post request. I'm using a custom case class: case class MyRequest(name : String, email: String) How can I also get remoteAddress in this request? Thanks in advance.
Pauls
  • 3
  • 2
0
votes
1 answer

Override RootMonitor

I have some code running inside Future.respond, that throws an NPE, because of a bug. The problem is that my unit tests totally missed it, and are all happily passing, because the NPE is swallowed by the RootMonitor. So, my question is if there is…
Dima
  • 39,570
  • 6
  • 44
  • 70
0
votes
1 answer

JSON web tokens(JWT) implementation in Finagle stack

Do we have a jwt service out there for finagle? A sample implementation would be great!
user786
  • 13
  • 6
0
votes
1 answer

Infinite Sequence of requests in Finagle with Future

I have an HTTP API endpoint that I need constantly check for new values. Luckily, it's supports long polling. So the idea is that I need to implement 'an infinite loop' where I do a request, wait for a response (at most 10mins), get some value from…
Ashald
  • 72
  • 1
  • 8
0
votes
1 answer

Finagle No asyncronous executing

i have a simple finagle thrift server: import com.twitter.finagle.Thrift import scala.concurrent.Future import com.twitter.util.{ Await, Future } object Main{ def main(args: Array[String]) { var count = 0 val myserver =…
Citrullin
  • 2,269
  • 14
  • 29
0
votes
2 answers

Thrift Debugging: Problems with my finagle server

I have a simple Thrift Server, implemented in scala with finagle: import com.twitter.util.{ Await, Future } import com.jakiku.thriftscala.{ RealTimeDatabasePageImpressions, PageImpressions } import com.twitter.finagle.Thrift import…
Citrullin
  • 2,269
  • 14
  • 29
0
votes
1 answer

How to use Filter with Service in Finagle RPC system?

I am learning twitter's RPC asynchronous system and it's important use filter and service deal with task logical.I have read the paper of https://twitter.github.io/finagle/guide/ServicesAndFilters.html and try write a simple code to make true I…
LoranceChen
  • 2,453
  • 2
  • 22
  • 48
0
votes
1 answer

How to convert a Future[Seq[A]] to a Future that contains Seq[A]?

I'm working on a Finatra app where I have a Future[Seq[A]] (from Finagle call). However, I need to convert that to a new object that contains Seq[A], for example case class Container[A](s: Seq[A]) That would result in Future[Container]. While I…
Andrew
  • 716
  • 1
  • 8
  • 19
0
votes
0 answers

Is it possible to expose Twitter's Finatra admin pages (port 9990) on the main service port?

We are working on a service using Twitter's Finatra. The main web services are exposed in port 8080 (using override def defaultFinatraHttpPort = ":8080"). Finatra exposes Finagle's Http Admin interface automatically on port 9000. Is it possible to…
Sebastian
  • 1,835
  • 3
  • 22
  • 34
0
votes
1 answer

Finagle Send request to random server within cluster

I am using finagle as rest client. In ClientBuilder I specify a range of hosts, but the request requires setting a url with host. How can I avoid specifying host in the request and let finagle choose one ? Thanks. val client =…
Alex
  • 11,479
  • 6
  • 28
  • 50
0
votes
2 answers

Using Finagle's clientbuilder, how do I set the host externally?

I am building a simple proxy to point to another server. Everything works but I need to find a way to be able to set the hosts in a ClientBuilder externally most likely using Docker or maybe some sort of configuration file. Here is what I…
Ryan Wilson
  • 1,743
  • 3
  • 15
  • 26
0
votes
1 answer

Finagle - upgrade ClientBuilder() to New APIs version

I have a project with Scala Play - Finagle and ElasticSearch I am using a Finagle client with the old version of the API, like this: val client = ClientBuilder() .codec(Http) .hosts("localhost:10000,localhost:10001,localhost:10003") …
Sanx
  • 223
  • 1
  • 6
  • 17
0
votes
1 answer

finagle filter add default behavior

question about filter : https://twitter.github.io/scala_school/finagle.html#Filter For typical stack of filters + service layout, how can I add a default behavior for each of the filters? Which basically look at the request/response and do some side…
user776635
  • 861
  • 3
  • 9
  • 13
0
votes
1 answer

Best way to run an asynchronous thread in a Finagle Server, on start up

I am getting started with the Finagle library in Java and trying to bring up couple of basic HTTP services which communicate in JSON. Let this be master and slave services. Master service has the following logic: It runs a thread on start up…
eternalthinker
  • 532
  • 6
  • 16