Re: Scalaj vs akka as http client for Asyncio Flink

2019-04-17 Thread Till Rohrmann
Check the logs what Akka is logging and verify that the port you try to bind to is free. Cheers, Till On Wed, Apr 17, 2019 at 12:50 PM Andy Hoang wrote: > Hi Till, > > Sorry to bother you again, so I manage to build and work with akka http > client in my local > After deploy to yarn node, the a

Re: Scalaj vs akka as http client for Asyncio Flink

2019-04-17 Thread Andy Hoang
Hi Till, Sorry to bother you again, so I manage to build and work with akka http client in my local After deploy to yarn node, the actorsystem cant be connected. ``` PPLogger.getActivityLogger.info("### 1") implicit val system = ActorSystem("my-system") PPLogger.getActivityLogger.info("

Re: Scalaj vs akka as http client for Asyncio Flink

2019-04-12 Thread Till Rohrmann
Hi Andy, you can do some micro benchmarks where you instantiate your AsyncHttpClient and call the invoke method. But better would be to benchmark it end-to-end by running it on a cluster with a realistic workload which you also expect to occur in production. Cheers, Till On Fri, Apr 12, 2019 at

Re: Scalaj vs akka as http client for Asyncio Flink

2019-04-12 Thread Andy Hoang
Hi Till, Unfortunately I have to wait for the cluster to upgrade to 1.8 to use that feature: https://issues.apache.org/jira/browse/FLINK-6756 Meanwhile I can reimplement it in the copy-patse manner but I’m still curious if my AsyncHttpClient wo

Re: Scalaj vs akka as http client for Asyncio Flink

2019-04-12 Thread Till Rohrmann
Hi Andy, there is also a Scala version of the `RichAsyncFunction`. In Scala you have to specify a value for class members. This is different from Java. User code is first instantiated on the client where you create the job topology (basically where you call new RichAsyncHttpClient). The code is

Re: Scalaj vs akka as http client for Asyncio Flink

2019-04-11 Thread Andy Hoang
Hi Till, Thanks for your reply, I manage do some experiments and has result as some worked and some not. I hope you can give me a bit more insight: As your suggestion to impl a `RichAsyncFunction` with transient field, like this and having error ``` Class 'RichAsyncHttpClient' must either be d

Re: Scalaj vs akka as http client for Asyncio Flink

2019-04-11 Thread Till Rohrmann
Hi Andy, without being an expert of Akka's http client, I think you should not create a new ActorSystem for every call to `AsyncFunction#asyncInvoke`. What I would recommend you instead is to implement a `RichAsyncFunction` with a transient field for `ActorMaterializer` which you initialize in the

Scalaj vs akka as http client for Asyncio Flink

2019-04-11 Thread Andy Hoang
Hi guys, I’m try to decide which http client to go with Flink, currently I tested with scalaj and akka http client and both work ok with our current dev environment. For scalaj its is pretty straight forward since its is just calling an http request with its timeout. For akka http client its a