[akka-user] Re: Akka Backed Micro Service Framework - BeyondJ

2016-03-08 Thread 何品
thank you for share this:)

在 2016年3月9日星期三 UTC+8上午5:33:17,nkasvosve写道:
>
> So Lightbend is about to release Lagom ... we have already built a robhust 
> framework based on Akka. 
>
> http://beyondj.com
>
> BeyondJ is a JVM platform for deploying wars and fat jars. It provides, 
> out of the box, clustering, load balancing, scaling, and self healing.
>
> No split brain problems.
>
> One can use the Java technology of their choice.
>
> In that vain of thought, I cannot wait to see what Lagom will bring to the 
> table.
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: [akka java 2.4.2] creating a flow sending elements of the stream to given actorRef and pushing results back to stream

2016-03-08 Thread paweł kamiński
thanks, for all help. 

it is running for ever as I am testing concepts of updating a remote client 
asynchronously, in real time Updater will get updates from other actors and 
yes I will add supervision strategies.
Im running this app from unit tests that creates spring context and also 
http-serwer/actors along so maybe there is something funny going on. I ve 
never integrated akka with existing spring-based aps but this is just a 
proof of concept and I have almost identical app running both spring mvc 
with netty :) I ll dump logs to a file this way it should be easier to 
follow the flow.

On Tuesday, 8 March 2016 23:33:38 UTC+1, Rafał Krzewski wrote:
>
> W dniu wtorek, 8 marca 2016 23:10:38 UTC+1 użytkownik paweł kamiński 
> napisał:
>>
>> but this is impossible to change concurrently as I log it and then pass 
>> to Pattern#ask. I just wonder why it is send from 
>> *akka://akka-system/deadLetters* and why *ReceiveTimeout* is not sent 
>> back to Updater...
>>
>> Oh, that's right! A message sent without specifying a sender (like when 
> you are invoking ActorRef.tell from outside an actor) originates from 
> deadLetters, but message from an ask should originate from /temp/$ 
>  Something really weird is going on here.
>
> Regarding the ReceiveTimeouts, The log entries are 25 minutes later, and 
> log format is different - I don't know what to make of that. Two different 
> program runs with configuration change in between? That would explain why 
> serial # of B1 actor is different. Otherwise I don't see why should it be 
> restarted, as the Updater actor appears to run "forever", unless you are 
> terminating it somehow from the outside (in the code not shown here). If 
> the actor crashed with an exception in receive, you'd notice that in the 
> log. Also you'd probably have to configure appropriate supervisionStrategy 
> in updater's actor parent to restart it.
>
>  
>
>> the application I try to put together is a proof of concept and there is 
>> no use to use scala at this point.
>>
>> Well, it's a matter of what you are comfortable using. It would be much 
> shorter in Scala, and easier to read for some people, but harder for others 
> :) Neither am I suggesting that rewriting it in Scala would fix the problem 
> at hand.
>
> Cheers,
> Rafał
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-08 Thread Andrew Gaydenko
Giovanni, I mean your last suggestion with custom stage.

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-08 Thread Andrew Gaydenko
Giovanni, hi!

What do you think about replacing

val sink = Sink.fold(zero)(Keep.right[U, U])

with

val sink = Sink.last[U]


?

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: [akka java 2.4.2] creating a flow sending elements of the stream to given actorRef and pushing results back to stream

2016-03-08 Thread paweł kamiński
but this is impossible to change concurrently as I log it and then pass to 
Pattern#ask. I just wonder why it is send from 
*akka://akka-system/deadLetters* and why *ReceiveTimeout* is not sent back 
to Updater...

the application I try to put together is a proof of concept and there is no 
use to use scala at this point.

On Tuesday, 8 March 2016 22:57:04 UTC+1, Rafał Krzewski wrote:
>
> First, let me say that even tough I program in Java for a living, I have 
> only ever used Akka with Scala. I'm actually surprised by the amount of 
> syntactic noise in Akka with Java variant!
>
> I doubt the "*ask* sends messages to only one updater even though I use 
> right actorRef" part:
>
> 2016-03-08 18:10:33.949  INFO 69545 --- 
> [akka-system-akka.actor.default-dispatcher-4] actors.RequestRouter : 
> Using updater for *B12* - Actor[akka://akka-system/user/*B12*
> #-1049418234].
> 2016-03-08 18:10:33.949  INFO 69545 --- 
> [akka-system-akka.actor.default-dispatcher-20] actors.Updater: 
> Actor[akka://akka-system/user/*B1*#857515287] : Received from 
> Actor[akka://akka-system/deadLetters] new update request *'B12*'
>
> Apparently the message that you intended to send to updater B12 ended up 
> in updater's B1 mailbox! It looks like the value of updater variable 
> changed between log.info and ask invocation. It looks like you where 
> closing over a  mutable variable that gets modified concurrently by 
> different threads, but since updater is a local variable in the closure 
> passed to mapAsync, this really shouldn't been happening... Weird.
>
> I guess that's all I can say without digging in with a debugger :) Good 
> luck!
> Rafał
>
> W dniu wtorek, 8 marca 2016 18:41:27 UTC+1 użytkownik paweł kamiński 
> napisał:
>>
>> one more thing that is not working for me right now
>>
>> this is a code handling incoming connection and requests
>>
>> receive(ReceiveBuilder
>> .match(IncomingConnection.class, connection -> {
>> log.info("Established new connection from {}.", 
>> connection.remoteAddress());
>> Flow handler = 
>> handleUpdateRequest(materializer);
>> connection.handleWith(handler, materializer);
>> })
>>
>>
>> and the handleUpdateRequest method
>>
>>
>> private Flow 
>> handleUpdateRequest(ActorMaterializer materializer) {
>> return Flow
>> .of(HttpRequest.class)
>> .mapAsync(1, request -> {
>> log.debug("Handling request. {}", request.getUri());
>>
>> String mime = request.getHeader(Accept.class)
>> .map(HttpHeader::value)
>> .orElse("application/json");
>>
>> Query query = uri.query();
>> Optional idOp = query.get("id");
>> if (!idOp.isPresent()) {
>> return createResponse(StatusCodes.BAD_REQUEST);
>> }
>>
>> String id = idOp.get();
>>
>> ActorRef updater = getUpdater(id, materializer.system());
>>
>> log.info("Using updater for {} - {}.", id, updater);
>>
>>
>>  return asResponseFromScalaFuture(ask(updater, bidderId, new Timeout(
>> RESPONSE_WAIT_DURATION)));
>>
>> });
>> }
>>
>>
>> public Updater() {
>> HashSet refs = Sets.newHashSet();
>> receive(ReceiveBuilder
>> .match(String.class, request -> {
>> log.info("{} : Received from {} new update request {}.", 
>> self(), sender(), request);
>>context().setReceiveTimeout(Duration.apply(3, 
>> TimeUnit.SECONDS));
>> refs.add(sender());
>> })
>> .match(ReceiveTimeout.class, timeout -> {
>> log.info("{} : Sending response.", self());
>> refs.stream()
>> .forEach(ref -> {
>> log.info("{} : Sending response to {}.", self(), 
>> ref);
>> ref.tell(createFakeResponse(), self());
>> });
>> refs.clear();
>> })
>> .build());
>> }
>>
>>
>> everything works when there is only one connection. request is sent to 
>> updater (actorRef) and response is converted from scala future back to java 
>> future and httpResponse is passed back to flow.
>>
>> but when there is more than one connection I can see in logs that only 
>> one actor (updater) is responding, while investigating I noticed that 
>> *ask* sends messages to only one updater even though I use right 
>> actorRef and there is unique updaters for each connection.
>>
>> 2016-03-08 18:10:33.949 DEBUG 69545 --- 
>> [akka-system-akka.actor.default-dispatcher-9] actors.RequestRouter : 
>> Handling request. http://localhost/budgets?id=B1
>> 2016-03-08 18:10:33.949  INFO 69545 --- 
>> 

[akka-user] Re: [akka java 2.4.2] creating a flow sending elements of the stream to given actorRef and pushing results back to stream

2016-03-08 Thread Rafał Krzewski
First, let me say that even tough I program in Java for a living, I have 
only ever used Akka with Scala. I'm actually surprised by the amount of 
syntactic noise in Akka with Java variant!

I doubt the "*ask* sends messages to only one updater even though I use 
right actorRef" part:

2016-03-08 18:10:33.949  INFO 69545 --- 
[akka-system-akka.actor.default-dispatcher-4] actors.RequestRouter : 
Using updater for *B12* - Actor[akka://akka-system/user/*B12*#-1049418234].
2016-03-08 18:10:33.949  INFO 69545 --- 
[akka-system-akka.actor.default-dispatcher-20] actors.Updater: 
Actor[akka://akka-system/user/*B1*#857515287] : Received from 
Actor[akka://akka-system/deadLetters] new update request *'B12*'

Apparently the message that you intended to send to updater B12 ended up in 
updater's B1 mailbox! It looks like the value of updater variable changed 
between log.info and ask invocation. It looks like you where closing over a 
 mutable variable that gets modified concurrently by different threads, but 
since updater is a local variable in the closure passed to mapAsync, this 
really shouldn't been happening... Weird.

I guess that's all I can say without digging in with a debugger :) Good 
luck!
Rafał

W dniu wtorek, 8 marca 2016 18:41:27 UTC+1 użytkownik paweł kamiński 
napisał:
>
> one more thing that is not working for me right now
>
> this is a code handling incoming connection and requests
>
> receive(ReceiveBuilder
> .match(IncomingConnection.class, connection -> {
> log.info("Established new connection from {}.", 
> connection.remoteAddress());
> Flow handler = 
> handleUpdateRequest(materializer);
> connection.handleWith(handler, materializer);
> })
>
>
> and the handleUpdateRequest method
>
>
> private Flow 
> handleUpdateRequest(ActorMaterializer materializer) {
> return Flow
> .of(HttpRequest.class)
> .mapAsync(1, request -> {
> log.debug("Handling request. {}", request.getUri());
>
> String mime = request.getHeader(Accept.class)
> .map(HttpHeader::value)
> .orElse("application/json");
>
> Query query = uri.query();
> Optional idOp = query.get("id");
> if (!idOp.isPresent()) {
> return createResponse(StatusCodes.BAD_REQUEST);
> }
>
> String id = idOp.get();
>
> ActorRef updater = getUpdater(id, materializer.system());
>
> log.info("Using updater for {} - {}.", id, updater);
>
>
>  return asResponseFromScalaFuture(ask(updater, bidderId, new Timeout(
> RESPONSE_WAIT_DURATION)));
>
> });
> }
>
>
> public Updater() {
> HashSet refs = Sets.newHashSet();
> receive(ReceiveBuilder
> .match(String.class, request -> {
> log.info("{} : Received from {} new update request {}.", 
> self(), sender(), request);
>context().setReceiveTimeout(Duration.apply(3, 
> TimeUnit.SECONDS));
> refs.add(sender());
> })
> .match(ReceiveTimeout.class, timeout -> {
> log.info("{} : Sending response.", self());
> refs.stream()
> .forEach(ref -> {
> log.info("{} : Sending response to {}.", self(), 
> ref);
> ref.tell(createFakeResponse(), self());
> });
> refs.clear();
> })
> .build());
> }
>
>
> everything works when there is only one connection. request is sent to 
> updater (actorRef) and response is converted from scala future back to java 
> future and httpResponse is passed back to flow.
>
> but when there is more than one connection I can see in logs that only one 
> actor (updater) is responding, while investigating I noticed that *ask* 
> sends messages to only one updater even though I use right actorRef and 
> there is unique updaters for each connection.
>
> 2016-03-08 18:10:33.949 DEBUG 69545 --- 
> [akka-system-akka.actor.default-dispatcher-9] actors.RequestRouter : 
> Handling request. http://localhost/budgets?id=B1
> 2016-03-08 18:10:33.949  INFO 69545 --- 
> [akka-system-akka.actor.default-dispatcher-9] actors.RequestRouter : 
> Using updater for B1 - Actor[akka://akka-system/user/B1#857515287].
> 2016-03-08 18:10:33.949 DEBUG 69545 --- 
> [akka-system-akka.actor.default-dispatcher-4] actors.RequestRouter : 
> Handling request. http://localhost/budgets?id=B12
> 2016-03-08 18:10:33.949  INFO 69545 --- 
> [akka-system-akka.actor.default-dispatcher-14] actors.Updater: 
> Actor[akka://akka-system/user/B1#857515287] : Received from 
> Actor[akka://akka-system/temp/$r0] new update request 'B1'
> 

[akka-user] Akka Backed Micro Service Framework - BeyondJ

2016-03-08 Thread nkasvosve
So Lightbend is about to release Lagom ... we have already built a robhust 
framework based on Akka. 

http://beyondj.com

BeyondJ is a JVM platform for deploying wars and fat jars. It provides, out 
of the box, clustering, load balancing, scaling, and self healing.

No split brain problems.

One can use the Java technology of their choice.

In that vain of thought, I cannot wait to see what Lagom will bring to the 
table.

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] change of Tech Lead

2016-03-08 Thread Heiko Seeberger
Dear Roland,

Reacting to opportunities – should we add opportunistic as another trait to 
Reactive? My apologies, but this was just too tempting. When we meet in Munich, 
I owe you a beer for this and another one or as many as you can drink for the 
fantastic work you did for Akka.

Dear Patrik,

I’m glad to see you take over, knowing that Akka remains in excellent hands.

Cheers
Heiko

--

Heiko Seeberger
Home: heikoseeberger.de 
Twitter: @hseeberger 
Public key: keybase.io/hseeberger 
> On 07 Mar 2016, at 18:37, Roland Kuhn  wrote:
> 
> Dear fellow hakkers,
> 
> as of today I am passing on the baton of Akka Tech Lead @ Lightbend to Patrik 
> Nordwall. Don’t worry, I will stay around and keep working on Akka, but it 
> will no longer be my day job come April: I am co-founding actyx 
> —a new start-up in Munich that aims at bringing 
> reactive design principles to the IT behind industrial manufacturing—where I 
> will build and lead the engineering organization. It was always my plan to 
> solve concrete customer challenges once I have collected enough experience 
> with building the tools, and while I had not yet started looking for an 
> opportunity I could also not pass this one up when it presented itself.
> 
> Akka will be in good hands with Patrik and the rest of the team, he is as 
> passionate about distributed systems as I am and he is a much more 
> disciplined coder—not to mention that he joined the Akka team before any 
> other current member including myself. I am very grateful that I had the 
> chance to be part of this amazing team for the past 4.5 years and I have no 
> desire to leave this awesome community anytime soon.
> 
> Regards,
> 
> Roland
> 
> 
> Lightbend – Reactive apps on the JVM.
> twitter: @rolandkuhn
>  
> 
> 
> -- 
> >> Read the docs: http://akka.io/docs/ 
> >> Check the FAQ: 
> >> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >> 
> >> Search the archives: https://groups.google.com/group/akka-user 
> >> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to akka-user@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/akka-user 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: change of Tech Lead

2016-03-08 Thread 'Ryan Tanner' via Akka User List
Congrats Roland!

On Monday, March 7, 2016 at 10:42:32 AM UTC-7, rkuhn wrote:
>
> Dear fellow hakkers,
>
> as of today I am passing on the baton of Akka Tech Lead @ Lightbend to 
> Patrik Nordwall. Don’t worry, I will stay around and keep working on Akka, 
> but it will no longer be my day job come April: I am co-founding actyx 
> —a new start-up in Munich that aims at bringing 
> reactive design principles to the IT behind industrial manufacturing—where 
> I will build and lead the engineering organization. It was always my plan 
> to solve concrete customer challenges once I have collected enough 
> experience with building the tools, and while I had not yet started looking 
> for an opportunity I could also not pass this one up when it presented 
> itself.
>
> Akka will be in good hands with Patrik and the rest of the team, he is as 
> passionate about distributed systems as I am and he is a much more 
> disciplined coder—not to mention that he joined the Akka team before any 
> other current member including myself. I am very grateful that I had the 
> chance to be part of this amazing team for the past 4.5 years and I have no 
> desire to leave this awesome community anytime soon.
>
> Regards,
>
> Roland
>
>
> Lightbend – Reactive apps on the JVM.
> twitter: @rolandkuhn
> 
>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: [akka java 2.4.2] creating a flow sending elements of the stream to given actorRef and pushing results back to stream

2016-03-08 Thread paweł kamiński
one more thing that is not working for me right now

this is a code handling incoming connection and requests

receive(ReceiveBuilder
.match(IncomingConnection.class, connection -> {
log.info("Established new connection from {}.", 
connection.remoteAddress());
Flow handler = 
handleUpdateRequest(materializer);
connection.handleWith(handler, materializer);
})


and the handleUpdateRequest method


private Flow 
handleUpdateRequest(ActorMaterializer materializer) {
return Flow
.of(HttpRequest.class)
.mapAsync(1, request -> {
log.debug("Handling request. {}", request.getUri());

String mime = request.getHeader(Accept.class)
.map(HttpHeader::value)
.orElse("application/json");

Query query = uri.query();
Optional idOp = query.get("id");
if (!idOp.isPresent()) {
return createResponse(StatusCodes.BAD_REQUEST);
}

String id = idOp.get();

ActorRef updater = getUpdater(id, materializer.system());

log.info("Using updater for {} - {}.", id, updater);


 return asResponseFromScalaFuture(ask(updater, bidderId, new Timeout(
RESPONSE_WAIT_DURATION)));

});
}


public Updater() {
HashSet refs = Sets.newHashSet();
receive(ReceiveBuilder
.match(String.class, request -> {
log.info("{} : Received from {} new update request {}.", 
self(), sender(), request);
   context().setReceiveTimeout(Duration.apply(3, TimeUnit.SECONDS));
refs.add(sender());
})
.match(ReceiveTimeout.class, timeout -> {
log.info("{} : Sending response.", self());
refs.stream()
.forEach(ref -> {
log.info("{} : Sending response to {}.", self(), 
ref);
ref.tell(createFakeResponse(), self());
});
refs.clear();
})
.build());
}


everything works when there is only one connection. request is sent to 
updater (actorRef) and response is converted from scala future back to java 
future and httpResponse is passed back to flow.

but when there is more than one connection I can see in logs that only one 
actor (updater) is responding, while investigating I noticed that *ask* 
sends messages to only one updater even though I use right actorRef and 
there is unique updaters for each connection.

2016-03-08 18:10:33.949 DEBUG 69545 --- 
[akka-system-akka.actor.default-dispatcher-9] actors.RequestRouter : 
Handling request. http://localhost/budgets?id=B1
2016-03-08 18:10:33.949  INFO 69545 --- 
[akka-system-akka.actor.default-dispatcher-9] actors.RequestRouter : 
Using updater for B1 - Actor[akka://akka-system/user/B1#857515287].
2016-03-08 18:10:33.949 DEBUG 69545 --- 
[akka-system-akka.actor.default-dispatcher-4] actors.RequestRouter : 
Handling request. http://localhost/budgets?id=B12
2016-03-08 18:10:33.949  INFO 69545 --- 
[akka-system-akka.actor.default-dispatcher-14] actors.Updater: 
Actor[akka://akka-system/user/B1#857515287] : Received from 
Actor[akka://akka-system/temp/$r0] new update request 'B1'
2016-03-08 18:10:33.949  INFO 69545 --- 
[akka-system-akka.actor.default-dispatcher-4] actors.RequestRouter : 
Using updater for B12 - Actor[akka://akka-system/user/B12#-1049418234].
2016-03-08 18:10:33.949  INFO 69545 --- 
[akka-system-akka.actor.default-dispatcher-20] actors.Updater: 
Actor[akka://akka-system/user/B1#857515287] : Received from 
Actor[akka://akka-system/*deadLetters*] new update request 'B12'

[INFO] [03/08/2016 18:34:28.709] 
[akka-system-akka.actor.default-dispatcher-5] [akka://akka-system/user/B1] 
Message [akka.actor.ReceiveTimeout$] from 
Actor[akka://akka-system/deadLetters] to 
Actor[akka://akka-system/user/B1#385306581] was not delivered. [2] dead 
letters encountered. 
[INFO] [03/08/2016 18:34:28.709] 
[akka-system-akka.actor.default-dispatcher-5] [akka://akka-system/user/B1] 
Message [akka.actor.ReceiveTimeout$] from 
Actor[akka://akka-system/deadLetters] to 
Actor[akka://akka-system/user/B1#385306581] was not delivered. [3] dead 
letters encountered. 

I wonder why I get message from *deadLetters *and why it is sent to* B1 *actor. 
the result is that computed messages for B12 will be never sent back. also 
requested timeouts messages are not delivered :/ I ve messed this up :)

On Tuesday, 8 March 2016 14:20:16 UTC+1, paweł kamiński wrote: 

> ok, I was playing around with this yest. there is no way to do that. 
>
> only mapAsync is a way to create a flow that pushes elements of the stream 
> to 3rd party components 

Re: [akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-08 Thread paweł kamiński
OK, thanks, any hints how to work this around?

I ll create an issue.

On Tuesday, 8 March 2016 17:37:48 UTC+1, Konrad Malawski wrote:
>
> Seems we might be missing some factory methods on the MediaTypes trait, 
> the scaladsl has methods for returning more specific types, such as 
> `applicationWithCharset` etc.
>
> Would you please open a ticket about "feature parity of creating 
> MediaTypes for JavaDSL"?
> Thanks in advance!
>
> Please note that we're reworking the Java Routing DSL nowadays and 
> focusing on such missing bits is definitely something we'll do next up,
> please keep the feedback coming, thanks!
>
>
>
> -- 
> Cheers,
> Konrad 'ktoso’ Malawski
> Akka  @ Lightbend 
> 
>
> On 8 March 2016 at 17:14:17, paweł kamiński (kam...@gmail.com 
> ) wrote:
>
> I try to force my http server (using only http-core) to respond with 
> headers. 
>
> I get from request Accept header 
>
> String mime = request.getHeader(Accept.class)
> .map(HttpHeader::value)
> .orElse("application/json");
>
>
>  but then it is not clear to me how to create custom Content-Type header. 
> I cannot use RawHeader as it is ignored (as documentation suggested). using 
> HttpEntity.create is just pain in java
> to convert my mime back to ContentType I need to decide whether it is 
> binary or not. I tried
>
> ContentTypes.create(MediaTypes.custom()) // but it creates MediaType rather 
> than Binary, WithFixedCharset ..
>
>
>  then I tried 
>
>
>  ContentType.WithFixedCharset contentType = ContentTypes.create(
> 
> akka.http.scaladsl.model.MediaType.applicationWithFixedCharset("my-own", ?, 
> ?));
>
>
> but it suddenly is a scaladsl and I need to pass some scala collection / 
> charsets ... and there is no equivalent in javadsl (or maybe I am missing it).
>
>
> what I am looking for is a way to convert Accept header into ContentType. I 
> dont know why this is so complicated. why ContentTypes.create isn't just 
> consume string???
>
> none http frameworks are making creating response so complicated. Or maybe 
> only javadsl is immature.
>
>
>  (I dont want to offend anyone, I am just tired)
>
>
>  thanks for any help
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+...@googlegroups.com .
> To post to this group, send email to akka...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] akka-http proxy support

2016-03-08 Thread Michi
Hi Konrad,

thanks for the quick answer. Fortunately it is only a small part of our 
code that needs that. I will use Apache HttpClient for now, which does 
everything we need.

Best regards,
Michael

On Tuesday, March 8, 2016 at 5:37:01 PM UTC+1, Konrad Malawski wrote:
>
> Correct, HTTPS Proxies are not supported yet, see ticket: 
> https://github.com/akka/akka/issues/16153
> Sadly we're not sure when we'll get the chance to work on this yet.
>
> For the time being you may want to try Play's WS library, though I'm not 
> sure if they support this feature hm...
> (They're backed by the Ning Async Http Client).
>
> -- 
> Cheers,
> Konrad 'ktoso’ Malawski
> Akka  @ Lightbend 
> 
>
> On 8 March 2016 at 15:31:28, Michi (michael...@physik.tu-muenchen.de 
> ) wrote:
>
> Hi,
>
> we need to access a REST interface using HTTPS which is behind a proxy. 
> The akka-http documentation states that proxy support for HTTPS connections 
> is currently unsupported. Is there any way to use a HTTPS proxy with 
> akka-http? If not, can someone recommend a good (Java) https client library 
> that supports https proxies for accessing REST interfaces?
>
> Thanks,
> Michael
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: 
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+...@googlegroups.com .
> To post to this group, send email to akka...@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-08 Thread Konrad Malawski
Seems we might be missing some factory methods on the MediaTypes trait, 
the scaladsl has methods for returning more specific types, such as 
`applicationWithCharset` etc.

Would you please open a ticket about "feature parity of creating MediaTypes for 
JavaDSL"?
Thanks in advance!

Please note that we're reworking the Java Routing DSL nowadays and focusing on 
such missing bits is definitely something we'll do next up,
please keep the feedback coming, thanks!



-- 
Cheers,
Konrad 'ktoso’ Malawski
Akka @ Lightbend

On 8 March 2016 at 17:14:17, paweł kamiński (kami...@gmail.com) wrote:

I try to force my http server (using only http-core) to respond with headers.

I get from request Accept header 

String mime = request.getHeader(Accept.class)
.map(HttpHeader::value)
.orElse("application/json");


but then it is not clear to me how to create custom Content-Type header. I 
cannot use RawHeader as it is ignored (as documentation suggested). using 
HttpEntity.create is just pain in java
to convert my mime back to ContentType I need to decide whether it is binary or 
not. I tried

ContentTypes.create(MediaTypes.custom()) // but it creates MediaType rather 
than Binary, WithFixedCharset ..


then I tried


ContentType.WithFixedCharset contentType = ContentTypes.create(

akka.http.scaladsl.model.MediaType.applicationWithFixedCharset("my-own", ?, ?));

but it suddenly is a scaladsl and I need to pass some scala collection / 
charsets ... and there is no equivalent in javadsl (or maybe I am missing it).

what I am looking for is a way to convert Accept header into ContentType. I 
dont know why this is so complicated. why ContentTypes.create isn't just 
consume string???

none http frameworks are making creating response so complicated. Or maybe only 
javadsl is immature.



(I dont want to offend anyone, I am just tired)


thanks for any help
--
>> Read the docs: http://akka.io/docs/
>> Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] akka-http proxy support

2016-03-08 Thread Konrad Malawski
Correct, HTTPS Proxies are not supported yet, see ticket: 
https://github.com/akka/akka/issues/16153
Sadly we're not sure when we'll get the chance to work on this yet.

For the time being you may want to try Play's WS library, though I'm not sure 
if they support this feature hm...
(They're backed by the Ning Async Http Client).

-- 
Cheers,
Konrad 'ktoso’ Malawski
Akka @ Lightbend

On 8 March 2016 at 15:31:28, Michi (michael.tha...@physik.tu-muenchen.de) wrote:

Hi,

we need to access a REST interface using HTTPS which is behind a proxy. The 
akka-http documentation states that proxy support for HTTPS connections is 
currently unsupported. Is there any way to use a HTTPS proxy with akka-http? If 
not, can someone recommend a good (Java) https client library that supports 
https proxies for accessing REST interfaces?

Thanks,
Michael
--
>> Read the docs: http://akka.io/docs/
>> Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> Search the archives: https://groups.google.com/group/akka-user
---
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] akka 2.4.2 java - How to create custom ContentType

2016-03-08 Thread paweł kamiński
I try to force my http server (using only http-core) to respond with 
headers.

I get from request Accept header 

String mime = request.getHeader(Accept.class)
.map(HttpHeader::value)
.orElse("application/json");


but then it is not clear to me how to create custom Content-Type header. I 
cannot use RawHeader as it is ignored (as documentation suggested). using 
HttpEntity.create is just pain in java
to convert my mime back to ContentType I need to decide whether it is 
binary or not. I tried

ContentTypes.create(MediaTypes.custom()) // but it creates MediaType rather 
than Binary, WithFixedCharset ..


then I tried 


ContentType.WithFixedCharset contentType = ContentTypes.create(

akka.http.scaladsl.model.MediaType.applicationWithFixedCharset("my-own", ?, ?));


but it suddenly is a scaladsl and I need to pass some scala collection / 
charsets ... and there is no equivalent in javadsl (or maybe I am missing 
it).


what I am looking for is a way to convert Accept header into ContentType. I 
dont know why this is so complicated. why ContentTypes.create isn't just 
consume string???

none http frameworks are making creating response so complicated. Or maybe only 
javadsl is immature.


(I dont want to offend anyone, I am just tired)


thanks for any help

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-08 Thread Johan Andrén
Here is an adaptation of the Scala sample, but in Java:

import akka.NotUsed;
import akka.actor.*;
import akka.http.javadsl.model.ws.Message;
import akka.http.javadsl.model.ws.TextMessage;
import akka.http.javadsl.server.HttpApp;
import akka.http.javadsl.server.Route;
import akka.japi.pf.ReceiveBuilder;
import akka.stream.OverflowStrategy;
import akka.stream.javadsl.Flow;
import akka.stream.javadsl.Sink;
import akka.stream.javadsl.Source;

import java.util.Optional;

public class WebSocketServer {
  private static final class Router extends HttpApp {

private final ActorSystem system;

public Router(ActorSystem system) {
  this.system = system;
}

public Route createRoute() {
  return route(
path("test").route(
  get(handleWebSocketMessages(createWebSocketFlow()))
)
  );
}

private Flow createWebSocketFlow() {
  ActorRef actor = system.actorOf(Props.create(AnActor.class));

  Source source = Source.actorRef(5, 
OverflowStrategy.fail())
.map((outgoing) -> (Message) TextMessage.create(outgoing.message))
.mapMaterializedValue(destinationRef -> {
  actor.tell(new OutgoingDestination(destinationRef), 
ActorRef.noSender());
  return NotUsed.getInstance();
});

  Sink sink = Flow.create()
.map((msg) -> new Incoming(msg.asTextMessage().getStrictText()))
.to(Sink.actorRef(actor, PoisonPill.getInstance()));


  return Flow.fromSinkAndSource(sink, source);
}

  }




public static void main(String[] args) {
ActorSystem actorSystem = ActorSystem.create();

Router router = new Router(actorSystem);
router.bindRoute("127.0.0.1", 8082, actorSystem);
}

  static class Incoming {
public final String message;
public Incoming(String message) {
  this.message = message;
}
  }

  static class Outgoing {
public final String message;
public Outgoing(String message) {
  this.message = message;
}
  }

  static class OutgoingDestination {
public final ActorRef destination;
OutgoingDestination(ActorRef destination) {
  this.destination = destination;
}
  }

  static class AnActor extends AbstractActor {

private Optional outgoing = Optional.empty();

public AnActor() {
  receive(ReceiveBuilder.match(
OutgoingDestination.class, (msg) -> outgoing = 
Optional.of(msg.destination)
  ).match(
Incoming.class, (in) -> outgoing.ifPresent((out) -> out.tell(new 
Outgoing("got it"), self()))
  ).build());
}
  }
}


Hope this helps.

--
Johan Andrén
Akka Team, Lightbend Inc.

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] akka-http proxy support

2016-03-08 Thread Michi
Hi,

we need to access a REST interface using HTTPS which is behind a proxy. The 
akka-http documentation states that proxy support for HTTPS connections is 
currently unsupported. Is there any way to use a HTTPS proxy with 
akka-http? If not, can someone recommend a good (Java) https client library 
that supports https proxies for accessing REST interfaces?

Thanks,
Michael

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-08 Thread code . patrol
It also may be helpful to check this blog post 
http://blog.scalac.io/2015/07/30/websockets-server-with-akka-http.html and 
its source code https://github.com/ScalaConsultants/wsug-akka-websockets

On Tuesday, February 23, 2016 at 3:33:18 PM UTC+3, Guido Medina wrote:
>
> Hi,
>
> Has anyone been able to write an Akka HTTP websockets server that 
> delegates/relays the established connection to an existing or newly created 
> actor?
> where messages sent from that connection comes to an actor and messages to 
> another actor? (I'm not sure how is this done behind the scenes if 1 or 2 
> actors for Source/Sink)
>
> I was given this example 
> https://github.com/johanandren/scala-stockholm-cluster-message-broker/blob/solution/src/main/scala/WebServer.scala
> But I can't make reproduce that code in Java so I'm stuck.
>
> I have been wanting/asking this since version 1.0 of Akka HTTP, am I blind 
> or something that can't figure this out?
> It makes me wonder if Java is that helpless in the Akka world.
>
> Any Java example even pieces that can lead me to it will be of great help,
>
> Guido.
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Android chat

2016-03-08 Thread livetouch
Hi all,

I am using Akka to create a chat application.

I start the TCP socket using StartTcpConnectionActor and after a new 
connnetion is established I start the TcpConnectionActor for each 
connnection.

My android client, uses the Socket class to connect to the server and 
everything works ok.

But I have some problems to finish the connection.

In my client, if I call socket.close() , I receive Tcp.PeerClosed on my 
server, so I can finish the connection.

But if the user turn Off the Wifi on his device, the server didn´t receive 
any error. 

The onReceive() method on my TcpConnectionActor is not even called.. So in 
my server, Akka doesnt know that my user is offline without any Wifi 
connection...

Is this the expected behavior? If the device turns the Wifi Off, it should 
break the socket connection, or not?

thank you

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.
package br.livetouch.livecom.chatAkka.actor;

import java.net.InetSocketAddress;

import org.apache.log4j.Logger;

import akka.actor.ActorRef;
import akka.actor.Props;
import akka.actor.UntypedActor;
import akka.io.Tcp;
import akka.io.TcpMessage;
import br.infra.util.Log;

public class StartTcpConnectionActor extends UntypedActor {

	private static Logger log = Log.getLogger("TcpConnectionActor");

	public static class Start {
		public int port;

		public Start(int port) {
			this.port = port;
		}
	}

	@Override
	public void onReceive(Object msg) throws Exception {
		if (msg instanceof Start) {
			// Faz start do AKKA server
			log.debug("Akka Server - Bind to socket:" + ((Start) msg).port);
			final ActorRef tcp = Tcp.get(getContext().system()).manager();

			tcp.tell(TcpMessage.bind(getSelf(), new InetSocketAddress(((Start) msg).port), 100), getSelf());

		} else if (msg instanceof Tcp.Connected) {
			// Cliente conectou o socket
			log.error("Akka Server - Ator conectado: " + getSender());
			
			// Cria o ator para leitura TCP do Socket
			ActorRef tcpUserActor = getContext().actorOf(Props.create(TcpConnectionActor.class, getSender()));

			ActorRef connectionActor = getSender();
			connectionActor.tell(TcpMessage.register(tcpUserActor), getSelf());
		} else if (msg instanceof Tcp.CommandFailed) {
			log.error("Akka Server - Error to bind to port");
			getContext().stop(self());
		} else {
			log.error("StartTcpConnectionActor ERROR! " + msg);
			System.err.println("StartTcpConnectionActor ERROR! " + msg);
		}
	}
}
package br.livetouch.livecom.chatAkka.actor;

import java.io.UnsupportedEncodingException;

import org.apache.log4j.Logger;

import akka.actor.ActorRef;
import akka.actor.ActorSelection;
import akka.actor.UntypedActor;
import akka.io.Tcp;
import akka.io.Tcp.Received;
import akka.io.Tcp.Write;
import akka.util.ByteString;
import br.infra.util.Log;
import br.livetouch.livecom.chatAkka.actor.UserActor.Stop;
import br.livetouch.livecom.chatAkka.protocol.AkkaJson;
import br.livetouch.livecom.chatAkka.protocol.JsonRawMessage;
import br.livetouch.livecom.chatAkka.protocol.RawMessage;

/**
 * Ator para escrever no socket.
 * 
 * Faz o loop de leitura das mensagens e envia pro UserMessageRouter
 * 
 * @author rlech
 *
 */
public class TcpConnectionActor extends UntypedActor {

	private static Logger log = Log.getLogger("TcpConnectionActor");

	public enum State {
		Idle, StartReadHeader, StartReadMsg;
	}

	private boolean continueToReadSplitMessage = false;
	private ByteString msgPartsContinue = null;
	private int sizeContinue = 0;
	private int totalBytesReaded = 0;

	public ActorSelection userMessageRouter;
	/**
	 * UserActor criado quando fez a conexão TCP.
	 * É o UserActor que contém várias conexões.
	 */
	public ActorRef userActorWhenLogged;
	public Long userId;
	public String userSo;

	/**
	 * Ator da conexão. Contém o socket para escrever.
	 */
	public ActorRef tcpConnection;
	private int nextPercent;

	/**
	 * Construtor chamado por reflexão
	 * 
	 * @param connection
	 */
	public TcpConnectionActor(ActorRef connection) {
		this.tcpConnection = connection;
	}

	@Override
	public void preStart() throws Exception {
		userMessageRouter = AkkaFactory.getUserMessageRouter(getContext());
		super.preStart();
	}

	@Override
	public void onReceive(Object msg) throws Exception {
		try {
			if (msg instanceof Received) {

ByteString data = ((Received) msg).data();
receiveData(data);
return;

			} else if (msg instanceof 

Re: [akka-user] An equivalent of ReactiveX `PublishSubject` in akka-streams

2016-03-08 Thread Oleg Ilyenko
Hi Johan,

Thanks a lot for the reply and for sharing this information! It is good to 
know that you already discussed this. Looking forward to progress in this 
direction.

What I ended up doing is I created an `ActorPublisher` and then I subscribe 
to it like this:

 val eventStore = system.actorOf(Props[MemoryEventStore])
  val eventStorePublisher =
Source.fromPublisher(ActorPublisher[Event](eventStore))
  .runWith(Sink.asPublisher(fanout = true))

// For every connected client:

Source.fromPublisher(eventStorePublisher)
  .buffer(100, OverflowStrategy.fail)
  .collect {
case event if 
schema.subscriptionFieldName(event).fold(false)(fields.contains)  ⇒
  preparedQuery.execute(root = event) map (result ⇒
ServerSentEvent(result.compactPrint))
  }
  .mapAsync(1)(identity)
  .recover {
case NonFatal(error) ⇒
  logger.error(error, "Unexpected error during event stream 
processing.")
  ServerSentEvent(error.getMessage)
  }

As far as I saw, any client errors or disconnects are not propagated to 
publisher actor. Also `buffer(100, OverflowStrategy.fail)` detaches every 
client from the backpressure chain and kicks out slow clients without 
influence on any other client or event store.

The code is 
here: 
https://github.com/OlegIlyenko/sangria-subscriptions-example/blob/master/src/main/scala/Server.scala#L64-L77

Kind regards,
Oleg

On Tuesday, March 8, 2016 at 11:35:51 AM UTC+1, Akka Team wrote:
>
> Hi Oleg,
>
> You are right that "Subscriber" is very low level (and "Processor" is as 
> well) and hard to get right, it is meant for libraries to implement for 
> interop rather than end user implementations.
>
> There isn't any component that supports dynamic subscription in 
> akka-streams, so that is why you didn't find anything in the docs. Most, if 
> not all, built in stages are for the case where you have a static stream 
> topology. We have talked a bit about providing something like what you 
> describe out of the box but nothing planned yet.
>
> I'd say either a custom GraphStage or an Actor (or some combination of 
> both) is the way to go to implement your own dynamic hub where you can 
> register subscribers dynamically. It will probably be a bit complicated so 
> make sure you really understand how streams works and think about back 
> pressure vs subscribers before you dive into it.
>
> -- 
> Johan
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: change of Tech Lead

2016-03-08 Thread 何品
best wishes for all:)

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: [akka java 2.4.2] creating a flow sending elements of the stream to given actorRef and pushing results back to stream

2016-03-08 Thread paweł kamiński
ok, I was playing around with this yest. there is no way to do that. 

only mapAsync is a way to create a flow that pushes elements of the stream 
to 3rd party components such as actors. 
this is a bit confusing as there is a ActorPublisher that would be good fit 
here if only Flow had a construct like Source.actorPublisher() / Sink.
actorRef(). this way we could pass Props of publisher which would transform 
incoming messages into something else.

On Monday, 7 March 2016 11:28:03 UTC+1, paweł kamiński wrote:
>
> yep, i'm now thinking about duplex flow so I can push incoming messages to 
> actorRef sink and then such actor would be a source. 
>
> I must say that constructing right flow is not an easy task if you do it 
> occasionally! :)
> maybe I ll share my findings once I get it working
>
> On Monday, 7 March 2016 10:43:26 UTC+1, Rafał Krzewski wrote:
>>
>> W dniu poniedziałek, 7 marca 2016 10:08:23 UTC+1 użytkownik paweł 
>> kamiński napisał:
>>
>>> thanks for response.
>>>
>>> well ask pattern is a way to go but I thought I could avoid it and use 
>>> only flow's connection.
>>>
>>> Akka gives you a rich choice of communication primitives and it's OK to 
>> mix and match them in a way that solves the problem at hand in most 
>> convenient way :)
>>  
>> Happy hacking!
>> Rafał
>>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: change of Tech Lead

2016-03-08 Thread Andrew Gaydenko
Roland,

Thanks for your help here, in the group! - for some magic reason you are 
just the best in understanding my ugly, vague questions. Good luck!

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-08 Thread Viktor Klang
I'll volunteer to review :)

On Tue, Mar 8, 2016 at 12:26 PM, Konrad Malawski 
wrote:

> Here's the ticket, you'd like to contribute these operations (it's pretty
> easy to contribute, one can look at mapAsync and see how it differs from
> map):
> https://github.com/akka/akka/issues/18603
>
> Thanks in advance if someone steps up to contribute!
>
> On Tue, Mar 8, 2016 at 12:12 PM, Viktor Klang 
> wrote:
>
>> I'd like to repeat that a scanAsync and a foldAsync would be very welcome
>> additions :)
>>
>> On Tue, Mar 8, 2016 at 12:01 AM, Andrew Gaydenko <
>> andrew.gayde...@gmail.com> wrote:
>>
>>> Giovanni, hi!
>>>
>>> Thanks! - have played with this test. In fact, I started tests with
>>> -Xmx=128M, and range up to 20M. The first two variants resulted in OOME, as
>>> Roland predicted, and the last one with own Graph resulted in the rather
>>> quick answer with small RAM footprint during execution (~100MB on system
>>> monitor) - as you waned :)
>>>
>>> --
>>> >> Read the docs: http://akka.io/docs/
>>> >> Check the FAQ:
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >> Search the archives:
>>> https://groups.google.com/group/akka-user
>>> ---
>>> You received this message because you are subscribed to the Google
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send
>>> an email to akka-user+unsubscr...@googlegroups.com.
>>> To post to this group, send email to akka-user@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>>
>> --
>> Cheers,
>> √
>>
>> --
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ:
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>> >> Search the archives: https://groups.google.com/group/akka-user
>> ---
>> You received this message because you are subscribed to the Google Groups
>> "Akka User List" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to akka-user+unsubscr...@googlegroups.com.
>> To post to this group, send email to akka-user@googlegroups.com.
>> Visit this group at https://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> --
> Cheers,
> Konrad 'ktoso' Malawski
> Akka  @ Lightbend 
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
√

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] change of Tech Lead

2016-03-08 Thread Filippo De Luca
Congratulations to both of you, good luck with your new adventure Roland.

On 7 March 2016 at 17:37, Roland Kuhn  wrote:

> Dear fellow hakkers,
>
> as of today I am passing on the baton of Akka Tech Lead @ Lightbend to
> Patrik Nordwall. Don’t worry, I will stay around and keep working on Akka,
> but it will no longer be my day job come April: I am co-founding actyx
> —a new start-up in Munich that aims at bringing
> reactive design principles to the IT behind industrial manufacturing—where
> I will build and lead the engineering organization. It was always my plan
> to solve concrete customer challenges once I have collected enough
> experience with building the tools, and while I had not yet started looking
> for an opportunity I could also not pass this one up when it presented
> itself.
>
> Akka will be in good hands with Patrik and the rest of the team, he is as
> passionate about distributed systems as I am and he is a much more
> disciplined coder—not to mention that he joined the Akka team before any
> other current member including myself. I am very grateful that I had the
> chance to be part of this amazing team for the past 4.5 years and I have no
> desire to leave this awesome community anytime soon.
>
> Regards,
>
> Roland
>
>
> Lightbend – Reactive apps on the JVM.
> twitter: @rolandkuhn
> 
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 


[image: --]
Filippo De Luca
[image: http://]about.me/FilippoDeLuca


-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: How to? - Sink.foldM[U, T](zero: U)(f: (U, T) ⇒ Future[U]): Sink[T, Future[U]]

2016-03-08 Thread Viktor Klang
I'd like to repeat that a scanAsync and a foldAsync would be very welcome
additions :)

On Tue, Mar 8, 2016 at 12:01 AM, Andrew Gaydenko 
wrote:

> Giovanni, hi!
>
> Thanks! - have played with this test. In fact, I started tests with
> -Xmx=128M, and range up to 20M. The first two variants resulted in OOME, as
> Roland predicted, and the last one with own Graph resulted in the rather
> quick answer with small RAM footprint during execution (~100MB on system
> monitor) - as you waned :)
>
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ:
> http://doc.akka.io/docs/akka/current/additional/faq.html
> >> Search the archives: https://groups.google.com/group/akka-user
> ---
> You received this message because you are subscribed to the Google Groups
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to akka-user+unsubscr...@googlegroups.com.
> To post to this group, send email to akka-user@googlegroups.com.
> Visit this group at https://groups.google.com/group/akka-user.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Cheers,
√

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] An equivalent of ReactiveX `PublishSubject` in akka-streams

2016-03-08 Thread Akka Team
Hi Oleg,

You are right that "Subscriber" is very low level (and "Processor" is as
well) and hard to get right, it is meant for libraries to implement for
interop rather than end user implementations.

There isn't any component that supports dynamic subscription in
akka-streams, so that is why you didn't find anything in the docs. Most, if
not all, built in stages are for the case where you have a static stream
topology. We have talked a bit about providing something like what you
describe out of the box but nothing planned yet.

I'd say either a custom GraphStage or an Actor (or some combination of
both) is the way to go to implement your own dynamic hub where you can
register subscribers dynamically. It will probably be a bit complicated so
make sure you really understand how streams works and think about back
pressure vs subscribers before you dive into it.

-- 
Johan

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Re: Akka.NET or Alternative

2016-03-08 Thread Roland Kuhn
Ah, this reminds me: together with the core Orleans developers I did a 
comparison of the two approaches, take a look at 
https://github.com/akka/akka-meta/blob/master/ComparisonWithOrleans.md 
 for 
in-depth information.

Regards,

Roland

> 8 mar 2016 kl. 11:20 skrev Jamie Allen :
> 
> One thing to remember with Orleans - it makes completely different guarantees 
> than Akka.  Where Akka and Erlang focus on the lowest possible costs so that 
> you choose when to pay them, Orleans loads them in up front.  That can make 
> it easier on developers, but likely not as efficient.
> 
> Good luck!
> 
> On Monday, March 7, 2016 at 9:01:20 PM UTC, Andy Czerwonka wrote:
> Hello All,
> 
> I've been asked to port our Java stack to .NET.  We use Akka to facilitate 
> the distribution of our optimization/computation load across cores and 
> eventually a cluster or nodes. I'm looking into Akka.NET and just wondering 
> if the community this this is a viable port? Are there other products in the 
> .NET ecosystem that I should consider for this use case?
> 
> -andy
> 
> -- 
> >> Read the docs: http://akka.io/docs/ 
> >> Check the FAQ: 
> >> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >> 
> >> Search the archives: https://groups.google.com/group/akka-user 
> >> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to akka-user@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/akka-user 
> .
> For more options, visit https://groups.google.com/d/optout 
> .



Dr. Roland Kuhn
Akka Tech Lead
Typesafe  – Reactive apps on the JVM.
twitter: @rolandkuhn
 

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] change of Tech Lead

2016-03-08 Thread Roland Kuhn

> 8 mar 2016 kl. 11:03 skrev Rafał Krzewski :
> 
> Twitter, very soon: "They told him to work on this new enterprise Java 
> framework, so he flipped his s* and left! Death of Scala AND Akka imminent! 
> Let's run around flailing our arms in panic!"

No, I don’t think so, especially because this is so definitely untrue :-)

> Seriously though, many thanks to Roland and best of luck with the new job!

Thanks!

> 
> Cheers,
> Rafał 
> 
> W dniu poniedziałek, 7 marca 2016 18:42:32 UTC+1 użytkownik rkuhn napisał:
> Dear fellow hakkers,
> 
> as of today I am passing on the baton of Akka Tech Lead @ Lightbend to Patrik 
> Nordwall. Don’t worry, I will stay around and keep working on Akka, but it 
> will no longer be my day job come April: I am co-founding actyx 
> —a new start-up in Munich that aims at bringing 
> reactive design principles to the IT behind industrial manufacturing—where I 
> will build and lead the engineering organization. It was always my plan to 
> solve concrete customer challenges once I have collected enough experience 
> with building the tools, and while I had not yet started looking for an 
> opportunity I could also not pass this one up when it presented itself.
> 
> Akka will be in good hands with Patrik and the rest of the team, he is as 
> passionate about distributed systems as I am and he is a much more 
> disciplined coder—not to mention that he joined the Akka team before any 
> other current member including myself. I am very grateful that I had the 
> chance to be part of this amazing team for the past 4.5 years and I have no 
> desire to leave this awesome community anytime soon.
> 
> Regards,
> 
> Roland
> 
> 
> Lightbend – Reactive apps on the JVM.
> twitter: @rolandkuhn
>  
> 
> 
> -- 
> >> Read the docs: http://akka.io/docs/ 
> >> Check the FAQ: 
> >> http://doc.akka.io/docs/akka/current/additional/faq.html 
> >> 
> >> Search the archives: https://groups.google.com/group/akka-user 
> >> 
> --- 
> You received this message because you are subscribed to the Google Groups 
> "Akka User List" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to akka-user+unsubscr...@googlegroups.com 
> .
> To post to this group, send email to akka-user@googlegroups.com 
> .
> Visit this group at https://groups.google.com/group/akka-user 
> .
> For more options, visit https://groups.google.com/d/optout 
> .



Dr. Roland Kuhn
Akka Tech Lead
Typesafe  – Reactive apps on the JVM.
twitter: @rolandkuhn
 

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


Re: [akka-user] Akka.NET or Alternative

2016-03-08 Thread Jamie Allen
Here's an analysis of Orleans 
 I 
wrote when it was announced.

On Tuesday, March 8, 2016 at 1:08:25 AM UTC, Andy Czerwonka wrote:
>
> Thanks Vitor - Orleans looks promising.
>
> On Monday, March 7, 2016 at 2:29:43 PM UTC-7, Vitor Vieira wrote:
>>
>> Hi Andy,
>>
>> I highly recommend the Orleans project, https://github.com/dotnet/orleans 
>> as a Akka.NET substitute if you have any reason to don't use it.
>>
>> If the team responsible to execute the porting have some experience with 
>> functional programming, or have previous exposure to the Akka framework,  I 
>> recommend to use F# together with Akka.NET or Orleans(avoid C# if you can).
>>
>> It is a very powerful combination
>>
>> Rgds,
>>
>> Vitor Vieira
>> @notvitor
>>
>>
>> 2016-03-07 17:58 GMT-03:00 Andy Czerwonka :
>>
>>> Hello All,
>>>
>>> I've been asked to port our Java stack to .NET.  We use Akka to 
>>> facilitate the distribution of our optimization/computation load across 
>>> cores and eventually a cluster or nodes. I'm looking into Akka.NET and just 
>>> wondering if the community this this is a viable port? Are there other 
>>> products in the .NET ecosystem that I should consider for this use case?
>>>
>>> -andy
>>>
>>> -- 
>>> >> Read the docs: http://akka.io/docs/
>>> >> Check the FAQ: 
>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>> >> Search the archives: 
>>> https://groups.google.com/group/akka-user
>>> --- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Akka User List" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to akka-user+...@googlegroups.com.
>>> To post to this group, send email to akka...@googlegroups.com.
>>> Visit this group at https://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka.NET or Alternative

2016-03-08 Thread Jamie Allen
One thing to remember with Orleans - it makes completely different 
guarantees than Akka.  Where Akka and Erlang focus on the lowest possible 
costs so that you choose when to pay them, Orleans loads them in up front. 
 That can make it easier on developers, but likely not as efficient.

Good luck!

On Monday, March 7, 2016 at 9:01:20 PM UTC, Andy Czerwonka wrote:
>
> Hello All,
>
> I've been asked to port our Java stack to .NET.  We use Akka to facilitate 
> the distribution of our optimization/computation load across cores and 
> eventually a cluster or nodes. I'm looking into Akka.NET and just wondering 
> if the community this this is a viable port? Are there other products in 
> the .NET ecosystem that I should consider for this use case?
>
> -andy
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: change of Tech Lead

2016-03-08 Thread Rafał Krzewski
Twitter, very soon: "They told him to work on this new enterprise Java 
framework, so he flipped his s* and left! Death of Scala AND Akka imminent! 
Let's run around flailing our arms in panic!"

Seriously though, many thanks to Roland and best of luck with the new job!

Cheers,
Rafał 

W dniu poniedziałek, 7 marca 2016 18:42:32 UTC+1 użytkownik rkuhn napisał:
>
> Dear fellow hakkers,
>
> as of today I am passing on the baton of Akka Tech Lead @ Lightbend to 
> Patrik Nordwall. Don’t worry, I will stay around and keep working on Akka, 
> but it will no longer be my day job come April: I am co-founding actyx 
> —a new start-up in Munich that aims at bringing 
> reactive design principles to the IT behind industrial manufacturing—where 
> I will build and lead the engineering organization. It was always my plan 
> to solve concrete customer challenges once I have collected enough 
> experience with building the tools, and while I had not yet started looking 
> for an opportunity I could also not pass this one up when it presented 
> itself.
>
> Akka will be in good hands with Patrik and the rest of the team, he is as 
> passionate about distributed systems as I am and he is a much more 
> disciplined coder—not to mention that he joined the Akka team before any 
> other current member including myself. I am very grateful that I had the 
> chance to be part of this amazing team for the past 4.5 years and I have no 
> desire to leave this awesome community anytime soon.
>
> Regards,
>
> Roland
>
>
> Lightbend – Reactive apps on the JVM.
> twitter: @rolandkuhn
> 
>
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.


[akka-user] Re: Akka HTTP Websockets Java with Actor

2016-03-08 Thread Alan Klikic
Hi Guido,

this post helped me allot. Thanks.
How can I send message from the Actor to the "connected" websocket?
As a response to initial message received from websocket and as a 
standalone/push message from Actor to websocket?

Thank you in advance.

Br,
Alan

Dana srijeda, 24. veljače 2016. u 13:36:17 UTC+1, korisnik Guido Medina 
napisao je:
>
> While Akka HTTP is accessible to Java 8 users I decided to go for an 
> alternative which I was trying to avoid but at least I know is of high 
> performance and it fits right my needs.
> When a connection is upgraded to websocket it is passed to an actor, also 
> every message sent is forwarded to an Actor, Java 8 code snippet below:
>
>   vertx.createHttpServer().requestHandler(request -> {
> if ("/signal".equals(request.path())) {
>   final ServerWebSocket socket = request.upgrade();
>   final ActorRef actorRef = context().system().actorOf(
> // Using an internal non-blocking bounded mailbox with 
> capacity reserved (similar to LMAX)
> Props.create(new SignalWebsocketCreator(SourceSupervisor.this, 
> socket)).withMailbox("bounded-mailbox-1024")
>   );
>   socket.setWriteQueueMaxSize(1024).
> handler(event -> actorRef.tell(event, noSender())).
> closeHandler(event -> actorRef.tell(PoisonPill.getInstance(), 
> noSender()));
>   log.info("Websocket connection from '{}' to {} established.", 
> socket.remoteAddress(), socket.localAddress());
> } else {
>   request.response().setStatusCode(400).end();
> }
>   }).listen(config.getInt("http.port"), config.getString("http.host"
> ));
>
>
> Hope it helps some Java fellows that are stuck on this matter, not ideal 
> if you want to strictly stick to Akka like I wanted though it is still a 
> quick, simple and efficient solution,
>
> Guido.
>

-- 
>>  Read the docs: http://akka.io/docs/
>>  Check the FAQ: 
>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>  Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
Visit this group at https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.