Re: [akka-user] Akka Remote Message delivered despite wrong configuration ...

2015-08-07 Thread Patrik Nordwall
You have not enabled remoting with configururation akka.actor.provider = "akka.remote.RemoteActorRefProvider" Cheers, Patrik On Tue, Aug 4, 2015 at 12:42 AM, wrote: > Hi all, > > I am new to Akka, I have successfully written a simple Akka application > that runs on single machine. Now I want

Re: [akka-user] akka streams 1.0 - actor publisher do not receive demand

2015-08-07 Thread paweł kamiński
totally agree, the second solution would work perfectly. BUT then I dont need custom publisher. I look at publishers as a way to integrate with legacy systems that push events and of course maybe I need to tune buffer limit a bit. I thought consumer will signal greater demand at some point, wi

[akka-user] Is it ok to use Apache CXF with Akka?

2015-08-07 Thread akkanex
I'm familiar with Apache CXF to build REST services. I implemented some Akka service which I want to expose via REST. I know Akka has built akka-http but why should I use it if I can simply implement a REST service with Appache CXF and AsyncReponse? (See example below) Any hint is welcome. -

Re: [akka-user] How do I mix typed and untyped actors?

2015-08-07 Thread Patrik Nordwall
You can create a typed.ActorSystem and from the guardian typed actor you can create an untyped actor with ActorContext's actorOf. Then you have an untyped actor and access to its system with context.system, which can be used for Akka streams. I don't see a way to do it the other way around, becaus

Re: [akka-user] Re: Play + Akka Cluster Aware Routing?

2015-08-07 Thread Patrik Nordwall
When using Akka Cluster there are several ways of sending messages without knowing the address of the destinations. See these topics in the documentation: - Routers - Distributed PubSub

Re: [akka-user] ShardRegion vs EventBus

2015-08-07 Thread Patrik Nordwall
On Tue, Jul 21, 2015 at 10:56 PM, Richard Rodseth wrote: > I'd love a little more input on this, being a complete neophyte when it > comes to Akka cluster. > > To recap, let's call this entity ChannelMonitor. There are many many > ChannelMonitors underneath a ChannelMonitorSupervisor. > Currently

Re: [akka-user] Removing persistence events and snapshots

2015-08-07 Thread Patrik Nordwall
Can't you use deleteMessages and deleteSnapshots with maxSequenceNr = Long.MaxValue ? (do you really need snapshots for user sessions?) /Patrik On Fri, Jul 17, 2015 at 1:26 AM, Christopher Oman wrote: > I am struggling somewhat with the documentation on sequence number and > snapshot sequence

Re: [akka-user] Solr SolrCloud Zookeeper client actor

2015-08-07 Thread Patrik Nordwall
On Mon, Jul 13, 2015 at 11:53 PM, wrote: > I have a simple solr client using SolrJ. The configuration is on my dev > box. BTW - I am a newbie to Scala and Akka, but experienced with Solr and > java. > Java 8 > Scala 2.11.6 > Akka 2.11-2.3.11 actor and cluster (scala) > Solr 5.2.1 (simple with 1 r

Re: [akka-user] ConsistentHash Router - Determine destination node for message based on current cluster configuration

2015-08-07 Thread Patrik Nordwall
I don't see a way to do that with consistent hashing routers. Perhaps you can use Cluster Sharding instead? Regards, Patrik On Thu, Jul 16, 2015 at 5:01 PM, Henning Els wrote: > I make use of a cluster configuration with consis

Re: [akka-user] Cluster startup

2015-08-07 Thread Patrik Nordwall
On Mon, Jun 29, 2015 at 12:14 PM, Idar Borlaug wrote: > Hi > > I am migrating my cluster to a 3 node setup from two nodes. What i noticed > now is that if the first noe starts before the two other nodes have evicted > him, he starts a new cluster. > > Is this because he is the first node in the s

Re: [akka-user] akka streams - costs for creating materializers

2015-08-07 Thread Endre Varga
On Tue, Jul 14, 2015 at 2:18 PM, wrote: > I could not find anything about the costs for creating an > ActorMaterializer. > Is it a cheap operation so I can have individual materializers per stream > or is it more heavy weight so I should share them between streams? > Why would you like to creat

[akka-user] Re: Need help for implementing Server Sent Events with Akka HTTP (and Streams)

2015-08-07 Thread Maxymilian Śmiech
That library nicely answers my first question, thanks. Still, my second question is more general: how do I create Source backed by an Actor? My SSE events come from an Actor. I am really new to Akka Streams (just because of handling SSE in Akka HTTP). Now I have implemented my custom ActorPubli

[akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread akkanex
I'm an Akka beginner - so even if it's a stupid idea it would be great if I would know why. Am Freitag, 7. August 2015 09:43:39 UTC+2 schrieb akk...@gmail.com: > > I'm familiar with Apache CXF to build REST services. I implemented some > Akka service which I want to expose via REST. > > I know A

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread Konrad Malawski
Hi there, in general the answer is somewhat along the lines of: Because Akka is built from the ground up around asynchronous processing, it's a better match for building such systems. If other tools "add some async stuff", yet it is not really the core of what they do you'll find some mismatches

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread akkanex
Hi Konrad I watched the video and I totally agree with what you said in the video, I like and use Akka for my asynchronous projects. But, my question was about to use Apache CXF *together *with Akka in an asynchronous way (see example code) and if this ok from a technical perspective? Cheers

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread Konrad Malawski
But, my question was about to use Apache CXF together with Akka in an asynchronous way (see example code) and if this ok from a technical perspective? Should just work I guess :-) Not the optimal setup but should just work, yeap. -- Konrad -- >> Read the docs: http://akka.io/doc

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread akkanex
Thanks for your help. Cheers Rob Am Freitag, 7. August 2015 15:29:40 UTC+2 schrieb Konrad Malawski: > > But, my question was about to use Apache CXF *together* with Akka in an > asynchronous way (see example code) and if this ok from a technical > perspective? > > Should just work I guess :-) >

Re: [akka-user] How does Akka avoid Live Lock?

2015-08-07 Thread kraythe
It runs on the normal mechanism for completable futures in Java locally by calling submitToKey on a hazelcast map or sumbitToOwer will be put in an executor configure in hazelcast. It's these executors that are often getting deadlocked. So we have a strategy of using an executor per call type an

Re: [akka-user] Re: Play + Akka Cluster Aware Routing?

2015-08-07 Thread kraythe
I wrote a router that leverages hazelcast logic to execute the action local to the key and it works but it relies on storing routing information in a hazelcast map and cleaning it up afterward which in the case of node failure could have some problems. Obviously we wouldn't want to be sending me

Re: [akka-user] Re: Akka Streams and OAuth 2.0

2015-08-07 Thread Lance Arlaus
David- Excellent call on using an agent. It's a nice fit for this situation. My only hesitation would be ensuring that the agent is properly initialized with a valid token before you start slinging requests. The flow I originally posted ensures that by way of the Access Token source, but it ca

[akka-user] Re: Need help for implementing Server Sent Events with Akka HTTP (and Streams)

2015-08-07 Thread Johan Andrén
Either by implementing ActorPublisher like you have done or by using Source.actorRef. Read more about both those here: http://doc.akka.io/docs/akka-stream-and-http-experimental/1.0/scala/stream-integrations.html#Source_actorRef Note that you will have to make sure to handle back pressure yoursel

Re: [akka-user] Re: Coordinator in cluster sharding: No oldest node

2015-08-07 Thread Yifei
Thanks Patrik, Can i define multiple roles in akka.contrib.cluster.sharding.role? If I have a dispatcher shard region, which starts multiple different proxies and dispatches messages to those shardregions via the proxy, how should I define the akka.contrib.cluster.sharding.role? If I understa

Re: [akka-user] Best strategy for zero-downtime cluster upgrades with changed messages

2015-08-07 Thread Arne Claassen
Brice, thanks for sample. I will give that a try. I'm also tempted to just serialize to/from JSON, since it's more forgiving and has worked pretty well in the previous HTTP service interconnect. But I think what really saved us there was that network boundaries were quite a bit more explicit,

Re: [akka-user] Re: Akka Streams and OAuth 2.0

2015-08-07 Thread Patrick Li
Hi Lance, Nice to meet you, I am working with David on this problem, so let me jump in while he is sleeping :) I think one scenario of having an expired token (even with the constant refresh happening in the background), is if the system goes down for a period of time (either planned or otherw

Re: [akka-user] Re: Coordinator in cluster sharding: No oldest node

2015-08-07 Thread Patrik Nordwall
You can only specify one role in Akka 2.3.x. In 2.4-M2 you can use different settings for each entity type. E.g. User enities can run on nodes with roleX and ShoppingCart enities can run on nodes with roleY. fre 7 aug 2015 kl. 17:33 skrev Yifei : > Thanks Patrik, > > Can i define multiple roles in

Re: [akka-user] Removing persistence events and snapshots

2015-08-07 Thread Christopher Oman
After having thought about it a little bit, I realized that was the appropriate thing to do and realized it was a silly question to ask in the first place. Thanks for responding. On Friday, August 7, 2015 at 5:09:17 AM UTC-4, Patrik Nordwall wrote: > > Can't you use deleteMessages and deleteSnap

Re: [akka-user] Re: Akka Streams and OAuth 2.0

2015-08-07 Thread Lance Arlaus
Hi Patrick- Nice to meet you as well. Can you help me understand what would start with an expired token? If possible, this would seem to be a design flaw in the token publisher, not the subscriber. The Access Token publisher should *always* be publishing valid tokens, if at all possible. There

[akka-user] Re: Need help for implementing Server Sent Events with Akka HTTP (and Streams)

2015-08-07 Thread Chad Retz
I have an example of a chat server that uses web sockets and SSE at https://github.com/cretz/scala-web-ideal/tree/master/server/src/main/scala/webideal/chat (specifically ChatRoom.scala) which is basically taken from https://github.com/jrudolph/akka-http-scala-js-websocket-chat and added SSE.

Re: [akka-user] Re: Is it ok to use Apache CXF with Akka?

2015-08-07 Thread Konrad Malawski
Happy hakking! :-) On Fri, Aug 7, 2015 at 3:46 PM, wrote: > Thanks for your help. > > Cheers > Rob > > > Am Freitag, 7. August 2015 15:29:40 UTC+2 schrieb Konrad Malawski: >> >> But, my question was about to use Apache CXF *together* with Akka in an >> asynchronous way (see example code) and if