Hi,
I have some general questions regarding ConsistentHashingPool and
PinnedDispatcher
1. If my message (request id based) processing logic is CPU intensive.
Will ConsistentHashingPool have better performance/throughput than 1 single
actor? (considering multiple core CPU )
2. Will
ot as fast yet as it can be.
> Luckily, this is exactly what we are working on, as 2.0 will allow fusing
> graphs into one actor instead of N.
>
> -Endre
>
> On Thu, Nov 26, 2015 at 8:18 AM, Leon Ma <tutu...@gmail.com >
> wrote:
>
>> Just worry about the cost of th
Ah, got it!
Thanks a lot for the explanation!
Leon
在 2015年11月26日星期四 UTC-8上午1:23:04,Akka Team写道:
>
>
>
> On Thu, Nov 26, 2015 at 8:30 AM, Leon Ma <tutu...@gmail.com >
> wrote:
>
>> I don't quite catch the word "inline"
>>
>
> I answered to y
; Hi Leon,
>
> On Thu, Nov 26, 2015 at 8:51 AM, Leon Ma <tutu...@gmail.com >
> wrote:
>
>> Let me make it a little complex:
>>
>> Assuming I have a source, for each element A of the source:
>>
>> if(A.property1 == 1) goes to flow1 + flow2 + flow3
>&g
o someStuff
> else do otherStuff
> }
>
> The question that you need to ask yourself is exactly the same as with
> actors: "do I need a separate actor for this (to exploit parallelism, or
> for isolation) or I can execute this as part of this actor?"
>
>
Leon
在 2015年11月25日星期三 UTC-8上午2:41:39,Akka Team写道:
>
> Ok, then the answer is that one stream will be materialized for each
> incoming connection sharing the lifecycle of the connection.
>
> Why does this matter btw?
>
> -Endre
>
> On Wed, Nov 25, 2015 at 9:02 AM,
d try to use it inline?
>
> -Endre
>
> On Wed, Nov 25, 2015 at 10:09 AM, Leon Ma <tutu...@gmail.com
> > wrote:
>
>> Hi,
>>
>> I have some questions regarding below code:
>>
>> val myFlow: Flow[A, B, Any] =
>> Flow.fromGraph(FlowGraph
Hi,
I have below stream:
broadcast ~> filter1 ~> flowA ~> flowB ~> merge
broadcast ~> filter2 ~> flowC ~> merge
Assuming filter1 and filter2 are exclusive, which means my input element
will either go upper flow or go down flow.
How can I guarantee the order?
Say I have a source of X, Y,
Hi,
I have some questions regarding below code:
val myFlow: Flow[A, B, Any] =
Flow.fromGraph(FlowGraph.create() { implicit b =>
import akka.stream.scaladsl.FlowGraph.Implicits._
val broadcast = b.add(Broadcast[A](2))
val merge = b.add(Merge[B](2))
val flow1 =
Hi, Endre
The code snippet is copied from akka.http.scaladsl.Http.scala
在 2015年11月24日星期二 UTC-8上午6:14:30,Akka Team写道:
>
> Hi Leon,
>
> On Tue, Nov 24, 2015 at 2:38 PM, Leon Ma <tutu...@gmail.com >
> wrote:
>
>> Hi,
>>
>> Checking below code
Hi.
Is there any way I can inspect metrics of a running stream with something
like a stream monitor.
For example, I'd like to see average processing time for each element of
each stage, or the average/max buffered element count for each stage.
Those statistics might help me to improve the
Hi,
Checking below code:
bind(interface, port, settings, httpsContext, log)
.mapAsyncUnordered(settings.maxConnections) { connection ⇒
handleOneConnection(connection).recoverWith {
// Ignore incoming errors from the connection as they will cancel
the binding.
Hi,
I'd like to apply different sub flows against attributes of input elements.
For example, for my source of HttpRequest:
if (contains HttpHeader A) then go thru flowA
if (contains HttpHeader B) then go thru flowB
else go thru flowC
I got some ideas from
thread:
Hi,
Assuming I do this:
Source.single(A).via(flow1).via(flow2) via(flowN).toSink(Sink.head)
How does the ActorMmaterializer implement this internally ? Will it create
1 actor per flow (N actors) and only process 1 element for each actor?
Thanks
Leon
--
>> Read the
t; i.e. you broadcast A, then you calculate B and C in parallel, then you
> wait on both (ZipWith) to calculate D.
>
> -Endre
>
> On Thu, Nov 19, 2015 at 7:34 AM, Leon Ma <tutu...@gmail.com >
> wrote:
>
>> Hi,
>>
>> Assuming I have a Source A which co
ntrol where you
> want your actor boundaries, declaratively. I.e. you will be able to run
> your N-length flow in one actor if that is what you need.
>
> -Endre
>
>
> On Thu, Nov 19, 2015 at 10:48 AM, Leon Ma <tutu...@gmail.com
> > wrote:
>
>> Hi,
>>
&g
.
> Regards,
> Patrik
>
> On Wed, Nov 11, 2015 at 4:13 AM, Leon Ma <tutu...@gmail.com >
> wrote:
>
>> Hi,
>>
>> Assuming I have below flows:
>>
>> Source(..).via(flow1).via(flow2).via(flow3).to(...)
>>
>>
>> questions:
>> 1.
Hi,
Assuming I have a Source A which contains elements A1, A2
And I'd like to build flow like this:
1. A1 --> B1, A1 --> C1 For an element A1 , I can call some services
(time consuming) to transform it into B1 and C1 respectively, and they're
independent transformation which can run
Hi,
Assuming I have below flow:
Source(..).via(flow1).via(flow2).via(flow3)...via(flowN).toSink(..)
I'd like to model the stream that any exception happens will lead the
elements go to the very last flowN. (like a guardian fanalizer)
For example, when processing elementA in flow2, we got
Hi,
Assuming I have below flows:
Source(..).via(flow1).via(flow2).via(flow3).to(...)
questions:
1. how many actors will be created when run this flow? 1 actor for 1 flow?
2. if I found that flow2 is slower than others (bottle neck), Can I enlarge
capacity for it? for example, use some router
Hi,
I'd like to process the http request with a bunch of flows like this:
val bindingFuture = Http().bindAndHandleAsync({
request =>
Source.single(request)
.via(flow1)
.via(flow2)
.via(flowN)
.runWith(Sink.head)
}, interface =
Thanks a lot!
It's really helpful!
Leon
在 2015年9月1日星期二 UTC-7上午11:54:48,Lance Arlaus写道:
>
> Leon-
>
> There's a couple of ways to solve this, but one simple solution is to use
> a combination of Broadcast, filter, and Merge.
> 1. Broadcast the elements to two branches and filter each branch.
Hi,
I have below Actor which can return a chunked response:
class DemoActor extends Actor {
override def receive: Receive = {
case req: HttpRequest =>
val source = Source(List(Chunk("Hello"), Chunk("World"), LastChunk))
sender() ! HttpResponse(entity =
Hi,
I have below flow setup:
Source ---> FlowA ---> FlowB ---> FlowC > Sink
I'd like to do some checking on elements out of FlowA, if some criteria
matches, shortcut FlowB and directly pipe to FlowC.
I'm not sure whether I should use something like FlexiRoute like:
Source >
Hi,
Assuming I have below definitions:
val flow : Flow[HttpRequest, HttpResponse, Unit] = ???
val request : HttpRequest = ???
It seems I can get a Future[Response] by doing:
val response = Source.single(request).via(flow).runWith(Sink.head)
I have some questions:
1. Any other ways to get
use case?
Cheers,
André
On Tuesday, August 25, 2015 at 9:21:46 AM UTC+2, Leon Ma wrote:
Hi,
I have some general questions about akka-http:
1. Is there any concrete samples that illustrate how to return chunked
response with akka-http?
2. Does Route/Directives (high-level api) supports
Hi,
I have some general questions about akka-http:
1. Is there any concrete samples that illustrate how to return chunked
response with akka-http?
2. Does Route/Directives (high-level api) supports chunked response?
Thanks
Leon
--
Read the docs: http://akka.io/docs/
Check the
Hi,
I just checked some code on 2.3-dev branch:
https://github.com/akka/akka/blob/release-2.3-dev/akka-http-marshallers-java/akka-http-jackson/src/main/scala/akka/http/javadsl/marshallers/jackson/Jackson.scala
Got it , thanks a lot!
在 2015年6月7日星期日 UTC-7上午4:42:52,Akka Team写道:
Hi Leon,
The scan method of FJP will very likely be your top method unless you have
very favorable load patterns for FJP. I wouldn't worry about it, unless you
see a performance problem with your application.
-Endre
On
!
On Friday, April 3, 2015 at 4:00:53 AM UTC+2, Leon Ma wrote:
Hi,
In my application.conf, I'd like to include another conf from a dependent
jars.
Shall I just do
include abc.conf
or
include classpath(abc.conf)
Thanks
Leon
--
Read the docs: http://akka.io/docs/
Check
Hi,
In my application.conf, I'd like to include another conf from a dependent
jars.
Shall I just do
include abc.conf
or
include classpath(abc.conf)
Thanks
Leon
--
Read the docs: http://akka.io/docs/
Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
Hi,
In most cases, fork-join-executor is better than thread-pool-executor,
however I'm wondering what's the best scenario to use thread-pool-executor.
Thanks
Leon
--
Read the docs: http://akka.io/docs/
Check the FAQ:
Thank you so much for your detailed answers, I'll try to look into it
deeper :)
Leon
在 2014年11月28日星期五UTC-8上午2时10分36秒,Patrik Nordwall写道:
On Thu, Nov 27, 2014 at 10:44 AM, Leon Ma tutu...@gmail.com javascript:
wrote:
Hi, Konrad
I have some common questions regarding akka stream.
Say I
and please look forward to our 1.0 release which is coming
soon (then, with docs!).
On Mon, Nov 17, 2014 at 10:10 AM, Leon Ma tutu...@gmail.com javascript:
wrote:
Hi,
I'm wondering if akka-stream is a good candidate for creating an async
pipeline for data processing.
Take http request
Hi,
I'm wondering if akka-stream is a good candidate for creating an async
pipeline for data processing.
Take http request as example, I'd like the request go thru a series of
pipeline handlers 1 by 1 asynchronously and finally get a response.
More over, I'd like to see it's capable to jump
-stream-tests%2Fsrc%2Ftest%2Fscala%2Fakka%2Fstream%2Fscaladslsa=Dsntz=1usg=AFQjCNFqMXzxZAhy9dxEgPnDHh6I1Spf1A
Happy hakking and please look forward to our 1.0 release which is coming
soon (then, with docs!).
On Mon, Nov 17, 2014 at 10:10 AM, Leon Ma tutu...@gmail.com javascript:
wrote:
Hi
Nice! Let me try it.
Thanks a lot!
Leon
在 2014年7月18日星期五UTC-7上午4时58分22秒,Konrad Malawski写道:
Hello again,
yeah, it would be a different stream, so you loose any ordering guarantees.
But how about spinning up an Actor, that will serve as an adapter for your
“non actors” to talk with the
other EventBus?
You can create your own buses very easily, like that:
http://doc.akka.io/docs/akka/2.3.4/scala/event-bus.html
On Thu, Jul 17, 2014 at 2:45 PM, Leon Ma tutu...@gmail.com javascript:
wrote:
Hi,
I'd like to use EventStream to send my specific messages and I have my
own
Hi, Ivan
I guess you must be very familiar with both aspectj and scala, could you
help me on below question?
I'm trying to do some experimental point cut on scala.concurrent.Future,
something like:
@Aspect
class FutureAspect {
@Around(value = execution (*
by and when I say all events I'm including future's body/callbacks and
actor supervision messages, not just regular tell
I happened to see your project has dependencies on aspectj, right?
Are you using AOP to intercept some akka classes like LocalActorRef?
I'm just curious that which weaver
My case is actually to pass some information like Mapped Diagnostic Context.
Some of my legacy java code is using threadlocal to carry on those MDC
information, that's why I need a way to:
intercept tell : collect threadlocal information and do some wrapping
like MDCCtx(mymessage,
Hi,
Assuming I want to do some aop advice against some of the actor method like
ask , tell, etc like:
@Around(value = execution (* akka.actor.ScalaActorRef.$bang(..))
args(message,sender), argNames = jp,message,sender)
def handle(jp: ProceedingJoinPoint, message: AnyRef, sender: ActorRef) {
Hi,
Usually I do:
actorRef ! SomeRequest
expectMsg(SomeResponse)
However I'd like to know whether I can get the last response message object
like this:
actorRef ! SomeRequest
val resp = lastMsg()
resp.propA should be (...)
resp.StringProp contains mysubstring should be(true)
Is it doable?
Snapshotshttp://lampwww.epfl.ch/~prokopec/ctries-snapshot.pdf
B/
On 14 May 2014 at 07:05:42, Leon Ma (tutu...@gmail.com javascript:)
wrote:
Hi,
Any suggestions on how to choose concurrent map impl in scala?
java's ConcurrentHashMap or scala's TrieMap?
Any performance comparison?
Thanks
and processes the messages one by one from it.
We guarantee that fields are properly visible, even if the actor jumps
around threads - no need for CHM in the actor
On Thu, May 15, 2014 at 7:31 AM, Leon Ma tutu...@gmail.com
javascript:wrote:
Hi,
Assuming I have an actor which hold a map M
I would do below in my code:
context.system.scheduler.scheduleOnce(duration, self, action)
I guess there must be some task queue to hold the deferred task, any size
limitation?
Will the above call throw some reject exception said exceed max size?
Thanks
Leon
--
Read the docs:
Hi,
I have some questions regarding to akka actor creation.(I'm using akka
2.2.3)
I'm expecting below 2 statements have same effect: (according to some
document)
context.actorOf(Props(classOf[MyClass], myParam))
context.actorOf(Props(new MyClass(myParam)))
However, the 2nd code complains
47 matches
Mail list logo