[akka-user] Unmarshalling failed for decode String from "text/html" HttpEntity From HttpResponse

2016-08-15 Thread Sarah Yin
Hi Akka User List,


I'm trying to get the text response from httpResponse as a string. Here's 
my http call.

> val responseFuture: Future[HttpResponse] = Http().singleRequest(
> HttpRequest(uri = uri))



However some how I did not have a lot luck in getting the body. Here are 
the methods I've tried.

responseFuture onComplete {
>   case Success(response) =>
> val timeout = 300.millis
> response.status match {
>   case StatusCodes.OK =>
> println("printing content")
> println(response.entity.dataBytes.runForeach(println))
>   case _ =>
> println("failed to get dynamic url")
> }
>   case Failure(error) =>
> println(error.toString)
> }

However this prints empty response

--


responseFuture onComplete {
>   case Success(response) =>
> val timeout = 300.millis
> response.status match {
>   case StatusCodes.OK =>
> println("printing content")
> println(response.entity.dataBytes.map(_.utf8String))
>   case _ =>
> println("failed to get dynamic url")
> }
>   case Failure(error) =>
> println(error.toString)
> }

However this returns the string of the object instead 
akka.stream.scaladsl.Source@2dae110b

--


responseFuture onComplete {
>   case Success(response) =>
> 
> val timeout = 300.millis
> response.status 
> response.status match {
>   
>   case StatusCodes.OK =>
> 
> println("printing content")
> response.entity.dataBytes.map(line => 
> response.entity.dataBytes.map(line => println(line))
>   
>   case _ =>
> 
> println("failed to get dynamic url")
> }
>   
> }
>   case Failure(error) =>
> 
> println(error.toString)
> }
> }

However this prints empty response

--


responseFuture onComplete {
> case Success(response) =>
>
> val timeout = 300.millis
> response.status 
> response.status match {
>
> case StatusCodes.OK =>
>
> println("printing content")
>
> println(response.entity.toStrict(5 seconds).map(_.data.decodeString(
> "UTF-8")))
>
> case _ =>
>
> println("failed to get dynamic url")
> }
>
> }
> case Failure(error) =>
>
> println(error.toString)
> }
> }

However this shows Error in stage [unknown-operation]: Promise already 
completed.


[default-akka.actor.default-dispatcher-47] 
[akka://default/user/StreamSupervisor-0/flow-40-0-unknown-operation] Error in 
stage [unknown-operation]: Promise already completed.
>
> java.lang.IllegalStateException: Promise already completed.
> java.lang.IllegalStateException: Promise already completed.
>
>   at scala.concurrent.Promise$class.complete(Promise.scala:55)
>   at scala.concurrent.Promise$class.complete(Promise.scala:55)
>
>   at 
> scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153)
>   at 
> scala.concurrent.impl.Promise$DefaultPromise.complete(Promise.scala:153)
>
>   at scala.concurrent.Promise$class.failure(Promise.scala:104)
>   at scala.concurrent.Promise$class.failure(Promise.scala:104)
>
>   at 
> scala.concurrent.impl.Promise$DefaultPromise.failure(Promise.scala:153)
>   at 
> scala.concurrent.impl.Promise$DefaultPromise.failure(Promise.scala:153)
>
>   at 
> akka.http.impl.util.StreamUtils$$anon$2.onUpstreamFailure(StreamUtils.scala:76)
>   at 
> akka.http.impl.util.StreamUtils$$anon$2.onUpstreamFailure(StreamUtils.scala:76)
>
>   at 
> akka.http.impl.util.StreamUtils$$anon$2.onUpstreamFailure(StreamUtils.scala:69)
>   at 
> akka.http.impl.util.StreamUtils$$anon$2.onUpstreamFailure(StreamUtils.scala:69)
>
>   at 
> akka.stream.stage.AbstractStage$PushPullGraphLogic$$anon$1.onUpstreamFailure(Stage.scala:62)
>   at 
> akka.stream.stage.AbstractStage$PushPullGraphLogic$$anon$1.onUpstreamFailure(Stage.scala:62)
>
>   at 
> akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:621)
>   at 
> akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:621)
>
>   at 
> akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:535)
>   at 
> akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:535)
>
>   at 
> akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:443)
>   at 
> akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:443)
>
>   at 
> akka.stream.impl.fusing.GraphInterpreterShell.init(ActorGraphInterpreter.scala:364)
>   at 
> akka.stream.impl.fusing.GraphInterpreterShell.init(ActorGraphInterpreter.scala:364)
>
>   at 
> akka.stream.impl.fusing.ActorGraphInterpreter.tryInit(ActorG

[akka-user] Re: Akks in Scala console

2016-08-15 Thread Sarah Yin
Awesome this works. Thanks a lot

On Friday, July 15, 2016 at 10:55:55 PM UTC-7, Sarah Yin wrote:
>
> Hi,
>
> I'm trying to run Akka in scala console
>
> Using
>
>   
> scala -cp akka-http-spray-json-experimental_2.11-2.4.8.jar 
>
>
> However when I'm trying to get the HTTP model
>
> import akka.http.scaladsl.Http
>
>
> I'm getting error msg saying
>
>
> :11: error: object Http is not a member of package 
> akka.http.scaladsl
>
>
>
>import akka.http.scaladsl.Http
>
>  
>
>   ^
>
>
> Is there any step that I'm missing? Thanks in ad!
>

-- 
>>  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] Unmarshaller not working for HttpEntity for text/html response for "Error in stage [unknown-operation]: Promise already completed"

2016-08-15 Thread Sarah Yin
Hi Akka User,

I've been trying to Unmarshall HttpResponse and decode it as a String. 
However All the method I've searched failed in "Error in stage 
[unknown-operation]: Promise already completed"

Has anyone come to this before? Thanks in ad!

Here are the Future I want to decode 

> val responseFuture: Future[HttpResponse] = 
> Http().singleRequest(HttpRequest(uri 
> = uri))

 

>
Here are some of the methods I've tried:

responseFuture onComplete {
> case Success(response) =>
> val timeout = 300.millis
> response.status match {
> case StatusCodes.OK =>
> println("printing content")
> // println(response.entity.dataBytes.runForeach(println))
> // println(response.entity.dataBytes.map(_.utf8String))
> // response.entity.dataBytes
> // .map(line => println(line))
> // println(response.entity.toStrict(5 
> seconds).map(_.data.decodeString("UTF-8")))
> // println(Unmarshal(response.entity).to[String])
> // val entity = Unmarshal(response.entity).to[String]
> // entity onComplete { entity =>
> // println(entity)
> // }
> // Unmarshaller.entityToString(response.entity)
> // 
> println(PredefinedFromEntityUnmarshallers.stringUnmarshaller(response.entity))
> // println(response.entity.toStrict(5 
> seconds).map(_.data.decodeString("UTF-8")) )
> val bs: Future[ByteString] = response.entity.toStrict(timeout).map { 
> _.data }
> // val s: Future[String] = bs.map(_.utf8String)
> println(bs)
> case _ =>
> println("failed to get dynamic url")
> }
> case Failure(error) =>
> println(error.toString)
> }



 

-- 
>>  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: Consistent Hashing Group and routee death-watch / recreation

2016-08-15 Thread Muthukumaran Kothandaraman
Just in case anybody is facing similar dilemma. This snippet is working for 
basic cases. Have not tried all failures yet


private void createCHRouterWithRoutees(){
Set routees = new HashSet();
for (int i=0;i
> Hi, 
>
> I am using akka 2.4.8 and creating CH Group as following (with my custom 
> HashMapper)
>
> Set actorPaths = new HashSet();
>
>
> for (int i=0;i ActorRef worker = getContext().actorOf(Props.create(JobWorker.class), 
> "jobworker-" + String.valueOf(i)) ;
> actorPaths.add(worker.path().toStringWithAddress());
> }
>
>
> getContext().actorOf(
> *new* ConsistentHashingGroup(actorPaths)
> .withHashMapper(new JobKeyBasedHashMapper())
> .props(),
> "jobrouter");
>
>
> Now, assuming I have a death-watch on routees and recreate the same upon 
> Terminated message, will it be added automatically to the group ? 
>
>
> If not, is there any other alternative approach using CH Group ?
>
>
> One way I could think of is to use plain Router with 
> ConsistentHashingRoutingLogic. But I could not figure out how to inject my 
> custom hashing based on message into ConsistentHashingRoutingLogic. 
>
>
> Regards
>
> Muthu
>
>
>
>
>
>
>
>
>

-- 
>>  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: Access Denied Downloading standalone akka_2.11-2.4.9-RC2.zip

2016-08-15 Thread Konrad Malawski
Thanks for reporting, re-uploaded it.
S3 was behaving weird it seems.

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 15 August 2016 at 19:02:56, murtuza chhil (chil...@gmail.com) wrote:

Its working now.

-chhil

On Monday, August 15, 2016 at 8:56:37 AM UTC+5:30, murtuza chhil wrote:
>
> Hello,
>
> Get an error  downloading  latest standalone release from page
> http://akka.io/downloads/
>
> The zip downlod link is
> http://downloads.typesafe.com/akka/akka_2.11-2.4.9-RC2.zip?_
> ga=1.68079190.614045507.1468130713
>
> Error page Content
>
>  encoding="UTF-8"?>AccessDeniedAccess 
> Denied4E93081229D790D5hTqKBgBzP1ydnHywim1E/9e/YrVnhfWyZQ+m39zdiIqoJMrd+VwOLyCBQ+pTw4DX5vByBmimSBs=
>
> ​
>
> -chhil
>
--
>> 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: Access Denied Downloading standalone akka_2.11-2.4.9-RC2.zip

2016-08-15 Thread murtuza chhil
Its working now.

-chhil

On Monday, August 15, 2016 at 8:56:37 AM UTC+5:30, murtuza chhil wrote:
>
> Hello, 
>
> Get an error  downloading  latest standalone release from page 
> http://akka.io/downloads/
>
> The zip downlod link is 
>
> http://downloads.typesafe.com/akka/akka_2.11-2.4.9-RC2.zip?_ga=1.68079190.614045507.1468130713
>
> Error page Content
>
>  encoding="UTF-8"?>AccessDeniedAccess 
> Denied4E93081229D790D5hTqKBgBzP1ydnHywim1E/9e/YrVnhfWyZQ+m39zdiIqoJMrd+VwOLyCBQ+pTw4DX5vByBmimSBs=
>
> ​
>
> -chhil
>

-- 
>>  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] Hot Standby Persistent Actor - https://github.com/akka/akka/issues/13938

2016-08-15 Thread Muthukumaran Kothandaraman
Thanks Patrik. I would like to follow this. I assume that the design 
discussions are confined to the issues link.

Are there any pointers in code for understanding how recovery is currently 
triggered for persistent actors so that I can get warmed up ? I guess that 
would be a good point for me to start with

Regards
Muthu


On Thursday, 11 August 2016 23:27:59 UTC+5:30, Patrik Nordwall wrote:
>
> The milestone of an issue is no guarantee that it will be released in that 
> version, until the issue is closed. We can't do that kind of planning.
>
> This would be a great feature for community contibution. Queries are there 
> now.
>
> /Patrik
> ons 10 aug. 2016 kl. 07:04 skrev Muthukumaran Kothandaraman <
> muthu@gmail.com >:
>
>> Hi, 
>>
>> Is this still targeted for 2.5 or it has moved further ? As I understand, 
>> this required some query-side improvements before this could be addressed. 
>>
>> Regards
>> Muthu
>>
>> -- 
>> >> 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] Consistent Hashing Group and routee death-watch / recreation

2016-08-15 Thread Muthukumaran Kothandaraman
Hi, 

I am using akka 2.4.8 and creating CH Group as following (with my custom 
HashMapper)

Set actorPaths = new HashSet();


for (int i=0;i>  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] What means of akka cluster roles leader?

2016-08-15 Thread Yutao Shuai



Thanks for your help Konrad. So the return value of this function is the 
leader of the cluster? But I read the DiffRolesLeader function in the 
ClusterEvent.scala where call the roleLeader function. This function 
traverse all roles and call the roleLeader function, What this mean? All 
nodes with specfic roles have its own leader? What difference between this 
leader and cluster leader ?


在 2016年8月15日星期一 UTC+8下午5:27:22,Konrad Malawski写道:
>
> Hi Yutao,
> look at the return type – Option, so it's a single element.
> It returns the leader of a given role (role == multiple nodes, 1 of them 
> is the leader).
> I.e. it would host the the Singleton if it were constrained to this role.
>
> -- 
> Konrad `ktoso` Malawski
> Akka  @ Lightbend 
>
> On 15 August 2016 at 04:23:26, Yutao Shuai (szq...@gmail.com ) 
> wrote:
>
>
> 
>
> What this function means? Select a nodes with specfic roles as the cluster 
> leader or every roles has its leader?
> --
> >> 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: ConductR sandbox linking to another container

2016-08-15 Thread Chris Baxter
Hey Christopher.  Thanks for getting back to me.  Glad to hear that you 
have this use case on your road map.  In the mean time, I will use the -e 
option workaround that you suggested.  Thanks again.

On Monday, August 15, 2016 at 4:04:10 AM UTC-4, Christopher Hunt wrote:
>
> Hi Chris,
>
> There's nothing built in to do this right now. Sounds like what we need to 
> do here is allow the service locator to be configured with an external 
> service. We have this on our to-do list.
>
> However you should be able to pass an environment var via the -e option 
> though and have that environment var resolve to the uri of your Cassandra 
> instance. Your Typesafe Config file could then use environment var 
> substitution in order to declare the location of your Cassandra service. 
> How does that sound?
>
> Kind regards,
> Christopher
>
> On Monday, 15 August 2016 00:13:41 UTC+10, Chris Baxter wrote:
>>
>> I don't know of any ConductR user group or forum out there, so I am 
>> asking here.  I am playing around with the ConductR sandbox on my Mac and I 
>> want to be able to have my 3 ConductR nodes communicate with Cassandra 
>> which is running in another local container.  Usually, this can be 
>> accomplished with links (--link) being established when starting up the 
>> containers.  But it seems that you cannot use the --link option when 
>> running the sandbox via "sandbox run ...".  I know you can deploy Cassandra 
>> as another bundle into ConductR but I don't want to go that route.  Does 
>> anyone have any expertise or suggestions on being able to setup a 
>> networking link between a ConductR node's container in sandbox and my 
>> Cassandra container?
>>
>

-- 
>>  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] What means of akka cluster roles leader?

2016-08-15 Thread Konrad Malawski
Duh, my bad. I keep mistaking the use of oldest and leader in this somehow.
Thanks for the correction Patrik!

On 15 Aug 2016 13:50, "Patrik Nordwall"  wrote:

>
>
> On Mon, Aug 15, 2016 at 11:27 AM, Konrad Malawski <
> konrad.malaw...@lightbend.com> wrote:
>
>> Hi Yutao,
>> look at the return type – Option, so it's a single element.
>> It returns the leader of a given role (role == multiple nodes, 1 of them
>> is the leader).
>> I.e. it would host the the Singleton if it were constrained to this role.
>>
>
> That is not correct. Singleton runs on the oldest node. The leader is
> simply the node (with given role) with the lowest address with some
> additional rules. It's not at all as strict as the singleton. It's mostly
> used to manage the cluster membership and applications typically use the
> singleton instead of the leader.
>
> /Patrik
>
>
>
>
>>
>> --
>> Konrad `ktoso` Malawski
>> Akka  @ Lightbend 
>>
>> On 15 August 2016 at 04:23:26, Yutao Shuai (szqs...@gmail.com) wrote:
>>
>>
>> 
>>
>> What this function means? Select a nodes with specfic roles as the
>> cluster leader or every roles has its leader?
>> --
>> >> Read the docs: http://akka.io/docs/
>> >> Check the FAQ: http://doc.akka.io/docs/akka/c
>> urrent/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/c
>> urrent/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.
>>
>
>
>
> --
>
> Patrik Nordwall
> Akka Tech Lead
> Lightbend  -  Reactive apps on the JVM
> Twitter: @patriknw
>
> --
> >> 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] What means of akka cluster roles leader?

2016-08-15 Thread Patrik Nordwall
On Mon, Aug 15, 2016 at 11:27 AM, Konrad Malawski <
konrad.malaw...@lightbend.com> wrote:

> Hi Yutao,
> look at the return type – Option, so it's a single element.
> It returns the leader of a given role (role == multiple nodes, 1 of them
> is the leader).
> I.e. it would host the the Singleton if it were constrained to this role.
>

That is not correct. Singleton runs on the oldest node. The leader is
simply the node (with given role) with the lowest address with some
additional rules. It's not at all as strict as the singleton. It's mostly
used to manage the cluster membership and applications typically use the
singleton instead of the leader.

/Patrik




>
> --
> Konrad `ktoso` Malawski
> Akka  @ Lightbend 
>
> On 15 August 2016 at 04:23:26, Yutao Shuai (szqs...@gmail.com) wrote:
>
>
> 
>
> What this function means? Select a nodes with specfic roles as the cluster
> leader or every roles has its leader?
> --
> >> Read the docs: http://akka.io/docs/
> >> Check the FAQ: http://doc.akka.io/docs/akka/c
> urrent/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/c
> urrent/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.
>



-- 

Patrik Nordwall
Akka Tech Lead
Lightbend  -  Reactive apps on the JVM
Twitter: @patriknw

-- 
>>  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] What means of akka cluster roles leader?

2016-08-15 Thread Konrad Malawski
Hi Yutao,
look at the return type – Option, so it's a single element.
It returns the leader of a given role (role == multiple nodes, 1 of them is
the leader).
I.e. it would host the the Singleton if it were constrained to this role.

-- 
Konrad `ktoso` Malawski
Akka  @ Lightbend 

On 15 August 2016 at 04:23:26, Yutao Shuai (szqs...@gmail.com) wrote:



What this function means? Select a nodes with specfic roles as the cluster
leader or every roles has its leader?
--
>> 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: ConductR sandbox linking to another container

2016-08-15 Thread Christopher Hunt
Hi Chris,

There's nothing built in to do this right now. Sounds like what we need to 
do here is allow the service locator to be configured with an external 
service. We have this on our to-do list.

However you should be able to pass an environment var via the -e option 
though and have that environment var resolve to the uri of your Cassandra 
instance. Your Typesafe Config file could then use environment var 
substitution in order to declare the location of your Cassandra service. 
How does that sound?

Kind regards,
Christopher

On Monday, 15 August 2016 00:13:41 UTC+10, Chris Baxter wrote:
>
> I don't know of any ConductR user group or forum out there, so I am asking 
> here.  I am playing around with the ConductR sandbox on my Mac and I want 
> to be able to have my 3 ConductR nodes communicate with Cassandra which is 
> running in another local container.  Usually, this can be accomplished with 
> links (--link) being established when starting up the containers.  But it 
> seems that you cannot use the --link option when running the sandbox via 
> "sandbox run ...".  I know you can deploy Cassandra as another bundle into 
> ConductR but I don't want to go that route.  Does anyone have any expertise 
> or suggestions on being able to setup a networking link between a ConductR 
> node's container in sandbox and my Cassandra container?
>

-- 
>>  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.