Re: [akka-user] Re: Akka Streams: Best business case to implement

2017-06-13 Thread KonradktosoMalawski
If you’re looking for companies / descriptions of projects who used Akka or
any of those other technologies and how it worked out for them then perhaps
you’ll enjoy the collection of customer whitepapers collected on
https://www.lightbend.com/learn

These are written by Lightbend customers, and are most of the time writeups
of real projects and how Akka/Play/Scala helped them achieve their goals.

Hope this helps

— Konrad


On June 13, 2017 at 11:34:43 PM, Rambabu Posa (rambabu.p...@gmail.com)
wrote:

Thanks Martijn. Is it as part of your client application? Or some sample
application tried for your self-learning?

Many thanks,
Ram

On Tuesday, June 13, 2017 at 2:28:41 PM UTC+1, Martijn Lindhout wrote:
>
> Hi,
>
> I used those technologies to implement a mailing microservice that sends
> large amounts of template based emails. Used Play for the management/admin
> UI, Scala/Akka persistent actors for the templates, mails sent are streamed
> to ElasticSearch for fulltext search.
>
>
> On Tuesday, June 13, 2017 at 11:44:09 AM UTC+2, Rambabu Posa wrote:
>>
>> Hi
>> Would like to implement one Data Streaming application using Akka
>> Streams. Have gone through Akka Streams doc and some online resources,
>> books and found that most of the people are using Twitter business case to
>> experiment Akka Streams.
>>
>> I would like to implement one web application using
>>
>>- Play
>>- Scala
>>- Akka
>>- Akka Streams
>>
>> to dirty my hands with something best suitable business use-case.
>>
>> Please suggest me some suitable/best use-case.
>>
>> Many thanks,
>> Ram
>>
> --
>> 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] A custom loop in a BidiGraph

2017-06-13 Thread KonradktosoMalawski
No, that would break semantics upon which all of the guarantees Akka
Streams (and Reactive Streams) provide.
Basically if you can not push, you need to keep the element somewhere, and
await being pulled from that side again.


On June 14, 2017 at 9:51:03 AM, Hussachai Puripunpinyo (hussac...@gmail.com)
wrote:

Hi
I'm trying to add a retry logic to a BidiGraph. I already have 2 working
approaches, but I'd like to explore one more.
The first approach is not to use Akka Stream at all which is simplest and I
think it possibly be the best.
The second approach is to add some more graphs (merge, partition, flow) to
an existing BidiFlow to form a feedback retry loop.
I'm exploring the third approach because the second one seems to be too
complicated.

Here is basically what I want to do.
https://gist.github.com/hussachai/a3266d3a4298493f857f593c304c9388#file-badbidiflow-scala-L48
The problem I got here is this error "requirement failed: Cannot push port
(out0) twice"

Is it possible to push an element to a port more than once in a
GraphState[BidiShape]?

Thank you!
Huss
--
>> 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] Send null message to cluster receptionist

2017-06-16 Thread KonradktosoMalawski
Why are you sending null messages? That’s illegal - end of topic on that
point.
Regarding the other one - no idea without you providing more details what
your system actually is.

— Konrad


On June 16, 2017 at 11:47:00 PM, prateek singhal (prateek.itm...@gmail.com)
wrote:

Hi,

I am getting following exception when I send null message to cluster
receptionist.

*final ActorRef actor =
system.actorOf(ClusterClient.props(ClusterClientSettings.create(system)),
"client");*
*actor.tell(new ClusterClient.Send("/user/worker", null),
ActorRef.noSender());*

Moreover any further (non-null) messages send to cluster will pass to
*dead-letters.*
*actor.tell(new ClusterClient.Send("/user/worker", "non-null message"),
ActorRef.noSender());*

Please help me in preventing the same?

Thanks in advance.

Exception:
[info] [ERROR] [06/14/2017 21:55:18.433]
[ClusterSystem-akka.actor.default-dispatcher-3]
[akka://ClusterSystem/system/distributedPubSubMediator] null
[info] scala.MatchError: null
[info]  at akka.cluster.pubsub.DistributedPubSubMediator$Internal$$anonfun$
wrapIfNeeded$1.apply(DistributedPubSubMediator.scala:400)
[info]  at akka.cluster.pubsub.DistributedPubSubMediator$$
anonfun$receive$1.applyOrElse(DistributedPubSubMediator.scala:550)
[info]  at akka.actor.Actor$class.aroundReceive(Actor.scala:497)
[info]  at akka.cluster.pubsub.DistributedPubSubMediator.aroundReceive(
DistributedPubSubMediator.scala:479)
[info]  at akka.actor.ActorCell.receiveMessage(ActorCell.scala:526)
[info]  at akka.actor.ActorCell.invoke(ActorCell.scala:495)
[info]  at akka.dispatch.Mailbox.processMailbox(Mailbox.scala:257)
[info]  at akka.dispatch.Mailbox.run(Mailbox.scala:224)
[info]  at akka.dispatch.Mailbox.exec(Mailbox.scala:234)
[info]  at scala.concurrent.forkjoin.ForkJoinTask.doExec(
ForkJoinTask.java:260)
[info]  at scala.concurrent.forkjoin.ForkJoinPool$WorkQueue.
runTask(ForkJoinPool.java:1339)
[info]  at scala.concurrent.forkjoin.ForkJoinPool.runWorker(
ForkJoinPool.java:1979)
[info]  at scala.concurrent.forkjoin.ForkJoinWorkerThread.run(
ForkJoinWorkerThread.java:107)
[info]
[info] [INFO] [06/14/2017 21:55:28.418]
[ClusterSystem-akka.actor.default-dispatcher-2]
[akka://ClusterSystem/system/distributedPubSubMediator] Message
[java.lang.String] from Actor[akka://ClusterSystem/
system/receptionist/akka.tcp%3A%2F%2FClusterClientSystem%
40127.0.0.1%3A57123%2FdeadLetters#1581143769] to Actor[akka://Cluste
rSystem/system/distributedPubSubMediator#1686240614] was not delivered. [6]
dead letters encountered. This logging can be turned off or adjusted with
configuration
settings 'akka.log-dead-letters' and 'akka.log-dead-letters-during-
shutdown'.
--
>> 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] Strange java.lang.VerifyError with ActorSystem initialization

2017-06-20 Thread KonradktosoMalawski
It’s rather unlikely that Akka itself is at fault here.
You could try using the latest version of the lib etc, however I don’t
think that’s it…
Do other java apps work in your env (are you sure it’s not weird / broken)?


On June 19, 2017 at 10:36:34 PM, Matlik (james.mat...@gmail.com) wrote:

I'm encountering this issue which I've never seen before, and was wondering
if someone could point me in the right direction.  I have some Akka streams
2.4.10 code (with Scala 2.11.8) that is embedded into a GlassFish 4.0
server running Oracle Java 1.8.0_131-b11.  All this is wrapped into a
Docker container for deployment that uses the Ubuntu as the base image.
Things were all working great for a while, but something appears to have
changed that is causing us some grief.

The docker image is built with the latest Oracle Java 8 JDK and base OS
(Ubuntu 14.04).  When we needed to rebuild the image with a minor
configuration change, we are now consistently getting the following error:

 [#|2017-06-19T19:15:09.770+|WARNING|glassfish
4.0|javax.enterprise.web|_ThreadID=45;_ThreadName=http-listener-1(1);_TimeMillis=1497899709770;_LevelValue=900;|
   StandardWrapperValve[TimeSeriesServlet]: Servlet.service() for servlet
TimeSeriesServlet threw exception
 java.lang.VerifyError: Stack map does not match the one at exception
handler 98
 Exception Details:
   Location:

 akka/dispatch/Envelope.(Ljava/lang/Object;Lakka/actor/ActorRef;)V
@98: athrow
   Reason:
 Current frame's flags are not assignable to stack map frame's.
   Current Frame:
 bci: @0
 flags: { flagThisUninit }
 locals: { uninitializedThis, 'java/lang/Object', 'akka/actor/ActorRef'
}
 stack: { 'java/lang/Throwable' }
   Stackmap Frame:
 bci: @98
 flags: { }
 locals: { top, 'java/lang/Object', 'akka/actor/ActorRef' }
 stack: { 'java/lang/Throwable' }
   Bytecode:
 0x000: 2a2b b500 322a 2cb5 0037 2ab7 0085 014e
 0x010: b200 8703 3201 0105 bd00 0859 032a 5359
 0x020: 0405 bd00 0859 032b 5359 042c 5353 b900
 0x030: 8d04 004e a700 053a 052a b800 932d c600
 0x040: 232d 1295 0105 bd00 0859 0311 00b1 bb00
 0x050: 975a 5fb7 009a 5359 0401 53b9 008d 0400
 0x060: 57b1 bf
   Exception Handler Table:
 bci [16, 52] => handler: 55
 bci [0, 98] => handler: 98
   Stackmap Table:

 full_frame(@55,{Object[#6],Object[#8],Object[#120],Object[#8]},{Object[#130]})
 same_frame(@57)
 same_frame(@97)
 full_frame(@98,{Top,Object[#8],Object[#120]},{Object[#130]})

at akka.dispatch.Envelope$.apply(AbstractDispatcher.scala:27)
at akka.actor.Cell$class.sendMessage(ActorCell.scala:295)
at akka.actor.ActorCell.sendMessage(ActorCell.scala:374)
at
akka.actor.RepointableActorRef.$bang(RepointableActorRef.scala:171)
at akka.actor.ActorRef.tell(ActorRef.scala:128)
at
akka.pattern.AskableActorRef$.internalAsk$extension(AskSupport.scala:295)
at
akka.pattern.AskableActorRef$.$qmark$extension1(AskSupport.scala:281)
at
akka.event.LoggingBus$class.akka$event$LoggingBus$$addLogger(Logging.scala:181)
at
akka.event.LoggingBus$$anonfun$4$$anonfun$apply$4.apply(Logging.scala:116)
at
akka.event.LoggingBus$$anonfun$4$$anonfun$apply$4.apply(Logging.scala:115)
at scala.util.Success$$anonfun$map$1.apply(Try.scala:237)
at scala.util.Try$.apply(Try.scala:192)
at scala.util.Success.map(Try.scala:237)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:115)
at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:112)
at
scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:683)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at
scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at
scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:682)
at
akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:112)
at
scala.collection.TraversableLike$WithFilter$$anonfun$map$2.apply(TraversableLike.scala:683)
at scala.collection.Iterator$class.foreach(Iterator.scala:893)
at scala.collection.AbstractIterator.foreach(Iterator.scala:1336)
at
scala.collection.IterableLike$class.foreach(IterableLike.scala:72)
at scala.collection.AbstractIterable.foreach(Iterable.scala:54)
at
scala.collection.TraversableLike$WithFilter.map(TraversableLike.scala:682)
at
akka.event.LoggingBus$class.startDefaultLoggers(Logging.scala:112)
at akka.event.EventStream.startDefaultLoggers(EventStream.scala:28)
at akka.actor.LocalActorRefProvider.init(ActorRefProvider.scala:667)
at akka.actor.ActorSystemImpl.liftedTree2$1(ActorSystem.scala:648)
at
akka.actor.ActorSystemImpl._start$l

Re: [akka-user] Strange java.lang.VerifyError with ActorSystem initialization

2017-06-20 Thread KonradktosoMalawski
These crazy things are best debugged locally to be honest.
Try cleaning your ivy caches, maybe the jar file got corrupted somehow etc?


On June 20, 2017 at 2:28:26 PM, Matlik (james.mat...@gmail.com) wrote:

I find it strange that it would be Akka, but this does appear to only
impact the Akka/Scala code in my project.  It is effectively a Java
application that wraps the Akka/Scala functionality for part of it.  The
plain Java functionality appears to be unaffected by this bug.

I was hoping someone who understands this stack trace output might be able
to shed some light on what exactly it means.  I've been working with the
JVM for over 15 years and have never before seen this output.  My
inclination is to think I've somehow got a different and incompatible
version of a lib being used at runtime than what is used at compile time,
but I've been unsuccessful at identifying anything like that with Akka's
JARs in my build.  Is there enough information to poinpoint exactly what
the disconnect is?

On Tuesday, June 20, 2017 at 3:04:40 AM UTC-4, Konrad Malawski wrote:
>
> It’s rather unlikely that Akka itself is at fault here.
> You could try using the latest version of the lib etc, however I don’t
> think that’s it…
> Do other java apps work in your env (are you sure it’s not weird / broken)?
>
>
> On June 19, 2017 at 10:36:34 PM, Matlik (james@gmail.com) wrote:
>
> I'm encountering this issue which I've never seen before, and was
> wondering if someone could point me in the right direction.  I have some
> Akka streams 2.4.10 code (with Scala 2.11.8) that is embedded into a
> GlassFish 4.0 server running Oracle Java 1.8.0_131-b11.  All this is
> wrapped into a Docker container for deployment that uses the Ubuntu as the
> base image. Things were all working great for a while, but something
> appears to have changed that is causing us some grief.
>
> The docker image is built with the latest Oracle Java 8 JDK and base OS
> (Ubuntu 14.04).  When we needed to rebuild the image with a minor
> configuration change, we are now consistently getting the following error:
>
>  [#|2017-06-19T19:15:09.770+|WARNING|glassfish
> 4.0|javax.enterprise.web|_ThreadID=45;_ThreadName=http-
> listener-1(1);_TimeMillis=1497899709770;_LevelValue=900;|
>StandardWrapperValve[TimeSeriesServlet]: Servlet.service() for servlet
> TimeSeriesServlet threw exception
>  java.lang.VerifyError: Stack map does not match the one at exception
> handler 98
>  Exception Details:
>Location:
>  akka/dispatch/Envelope.(Ljava/lang/Object;Lakka/actor/ActorRef;)V
> @98: athrow
>Reason:
>  Current frame's flags are not assignable to stack map frame's.
>Current Frame:
>  bci: @0
>  flags: { flagThisUninit }
>  locals: { uninitializedThis, 'java/lang/Object',
> 'akka/actor/ActorRef' }
>  stack: { 'java/lang/Throwable' }
>Stackmap Frame:
>  bci: @98
>  flags: { }
>  locals: { top, 'java/lang/Object', 'akka/actor/ActorRef' }
>  stack: { 'java/lang/Throwable' }
>Bytecode:
>  0x000: 2a2b b500 322a 2cb5 0037 2ab7 0085 014e
>  0x010: b200 8703 3201 0105 bd00 0859 032a 5359
>  0x020: 0405 bd00 0859 032b 5359 042c 5353 b900
>  0x030: 8d04 004e a700 053a 052a b800 932d c600
>  0x040: 232d 1295 0105 bd00 0859 0311 00b1 bb00
>  0x050: 975a 5fb7 009a 5359 0401 53b9 008d 0400
>  0x060: 57b1 bf
>Exception Handler Table:
>  bci [16, 52] => handler: 55
>  bci [0, 98] => handler: 98
>Stackmap Table:
>  full_frame(@55,{Object[#6],Object[#8],Object[#120],
> Object[#8]},{Object[#130]})
>  same_frame(@57)
>  same_frame(@97)
>  full_frame(@98,{Top,Object[#8],Object[#120]},{Object[#130]})
>
> at akka.dispatch.Envelope$.apply(AbstractDispatcher.scala:27)
> at akka.actor.Cell$class.sendMessage(ActorCell.scala:295)
> at akka.actor.ActorCell.sendMessage(ActorCell.scala:374)
> at akka.actor.RepointableActorRef.$bang(
> RepointableActorRef.scala:171)
> at akka.actor.ActorRef.tell(ActorRef.scala:128)
> at akka.pattern.AskableActorRef$.internalAsk$extension(
> AskSupport.scala:295)
> at akka.pattern.AskableActorRef$.$qmark$extension1(AskSupport.
> scala:281)
> at akka.event.LoggingBus$class.akka$event$LoggingBus$$
> addLogger(Logging.scala:181)
> at akka.event.LoggingBus$$anonfun$4$$anonfun$apply$4.
> apply(Logging.scala:116)
> at akka.event.LoggingBus$$anonfun$4$$anonfun$apply$4.
> apply(Logging.scala:115)
> at scala.util.Success$$anonfun$map$1.apply(Try.scala:237)
> at scala.util.Try$.apply(Try.scala:192)
> at scala.util.Success.map(Try.scala:237)
> at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:115)
> at akka.event.LoggingBus$$anonfun$4.apply(Logging.scala:112)
> at scala.collection.TraversableLike$WithFilter$$
> anonfun$map$2.apply(TraversableLike.scala:683)
> at scala.collection.Iterator$

Re: [akka-user] Dependency injection in Akka Http

2017-06-22 Thread KonradktosoMalawski
Hi there Amer,
DI is one thing, but “DI frameworks” is quite another.
I for one am not a big fan of frameworks taking much control over this,
however any tool/framework you want to use will “just work”,
it’s just creating objects after all - Akka is very simple in that sense,
no magical registries or anything.

I would recommend reading this too: di-in-scala.github.io

Hope this helps

— Konrad



On June 22, 2017 at 11:10:50 AM, Amer Zildzic (amer.zild...@gmail.com)
wrote:

Hi guys,

I'm looking for a way to inject config in various classes/traits in Akka
HTTP application. Config is loaded from various files (there is custom
logic for it) and it should be used in all classes. Is there any other way
to do this beside guice? And BTW, do you recommend using Guice in Akka
HTTP? Question is more general. I'm relatively new to Scala and any
comments on the topic are welcome.

Thanks,

Amer
--
>> 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-streams: what causes the downstream to be "cancelled"/onDownstreamFinish called?

2017-06-26 Thread KonradktosoMalawski
Could you share the full snippet?
The code as pasted above would not cancel (downstream cancels, but a
Sink.ignore never would cancel).
Are you sure you’re not terminating the app or something else that would
cause the stream to stop?
— Konrad


On June 27, 2017 at 3:23:04 AM, Josh F (jof...@gmail.com) wrote:

Hi all,

I am new to akka-streams - I've just set up a basic pipeline which consumes
from a messaging queue and then does some processing on the stream.
But after running for a while, the application ceases to process messages,
apparently because the downstream has been "cancelled" and
onDownstreamFinish has been called on the source.

I just want to know what the reason for this might be? What would cause the
downstream to be cancelled?

For context, my pipeline is very simple - it looks like this:

def source: Source[MyMessage, NotUsed] = 
def messageHandler(message: MyMessage): Future[Unit] = {
  val result =  // Some code here which processes the message and
returns a Future[Unit]
  result.recoverWith {
case _ => Future.successful()
  }
}
def pipeline = source.mapAsync(10)(messageHandler)
pipeline.runWith(Sink.ignore)

Note that the use of recoverWith means that the message handler will always
return a future which completes successfully - even if an exception is
thrown somewhere.

Is anyone able to offer some advice / insight into what might be happening?

Thanks,
Josh



--
>> 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] Max number of cluster nodes

2017-06-29 Thread KonradktosoMalawski
We’re currently preparing for such large-scale scalability test on the new
remoting.
How many nodes are you expecting more or less from memory per user
estimates etc?

— Konrad


On 30 June 2017 at 02:43:43, Eduardo Fernandes (edu...@gmail.com) wrote:

Hi all.

I'm starting a new project and I'm wondering about what is the recommended
max number of nodes in an Akka cluster. I've read numbers around 2400 in this
test

but
with the new Artery architecture, based on UDP, I suppose that such limit
should change.
If we manage standard machines on a cloud environment it would be nice to
have an idea of about how many nodes we could manage in a single Akka
cluster.

Many thanks in advance for any help on this.

Regards.

--
>> 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] Max number of cluster nodes

2017-06-29 Thread KonradktosoMalawski
Are those in different data centers or one?
We’re also working on multi-dc features, which limit the chatty-ness
between datacenters, allowing for even greater scalability.

The interesting question to ask if they are indeed one logical unit and
clustering them all indeed is the thing to do or not.
I would be interested in understanding your use case in more detail, can
you talk about it openly or would you prefer to talk in private,
if so please ping me on kt...@lightbend.com, thanks!

— Konrad


On 30 June 2017 at 02:59:12, Eduardo Fernandes (edu...@gmail.com) wrote:

Hi Konrad. Thanks for the quick answer.

We're managing from 20.000 up to 50.000 nodes with 8 to 16 Gigs of RAM. In
fact we could adapt the architecture depending of Akka capacity but the
upper limiter in a cluster could oblige us to develop a kind of
inter-cluster communication channel or similar.

Thanks again.

El jueves, 29 de junio de 2017, 19:45:45 (UTC+2), Konrad Malawski escribió:
>
> We’re currently preparing for such large-scale scalability test on the new
> remoting.
> How many nodes are you expecting more or less from memory per user
> estimates etc?
>
> — Konrad
>
>
> On 30 June 2017 at 02:43:43, Eduardo Fernandes (edu...@gmail.com) wrote:
>
> Hi all.
>
> I'm starting a new project and I'm wondering about what is the recommended
> max number of nodes in an Akka cluster. I've read numbers around 2400 in this
> test
> 
>  but
> with the new Artery architecture, based on UDP, I suppose that such limit
> should change.
> If we manage standard machines on a cloud environment it would be nice to
> have an idea of about how many nodes we could manage in a single Akka
> cluster.
>
> Many thanks in advance for any help on this.
>
> Regards.
>
> --
> >> 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.

-- 
>>  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] How to download and install newest Akka

2017-07-08 Thread KonradktosoMalawski
Akka is just a Scala/Java library, you’d use it like any other Scla/Java
library.
So you could add it as dependency in your maven file, or first learn how to
use sbt: http://www.scala-sbt.org/ and to the same there.

Akka dependencies are listed on http://akka.io/docs/

Happy hakking

— Konrad


On 8 July 2017 at 16:59:30, Eras Rasmuson (eras.rasmu...@gmail.com) wrote:


Ok. I would want to use Akka with Scala and its tools (like sbt), but i am
a novice with Scala.

Is it possible to get Akka from GitHub ?
https://github.com/akka/akka


Eras


lauantai 8. heinäkuuta 2017 0.01.18 UTC+3 Justin du coeur kirjoitti:
>
> I think you're misunderstanding what Akka is -- there's nothing that you
> "download and install", at least not usually.  It's a library, that you use
> in the context of a larger program.  How you link it into that program
> depends on how you're writing that program -- what language and tools you
> are going to be using.  But the download process is generally handled by
> your build tools: it's quite rare to download Akka manually...
>
> On Fri, Jul 7, 2017 at 4:38 PM, Eras Rasmuson  wrote:
>
>> Hi
>>
>> I have not found a clear guidance how to download and install newest
>> (full) version of Akka (to Windows).
>>
>> Could anyone give a hint how to do that ?
>>
>> PS. I have only found:
>> http://dev.lightbend.com/start/?group=akka&project=akka-quickstart-scala
>>
>> 
>> Eras
>>
>> --
>> >> 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.

-- 
>>  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 http -ERROR :Substream Source cannot be materialized more than once If Payload size increased

2017-07-09 Thread KonradktosoMalawski
I’d recommend using the search function on the docs:
http://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/directives/basic-directives/extractStrictEntity.html#extractstrictentity
The search function on the left would get you to this directive as well as
the toStrict method.

Also read this:
http://doc.akka.io/docs/akka-http/current/scala/http/implications-of-streaming-http-entity.html#implications-of-the-streaming-nature-of-request-response-entities

which
explains why / how these things work.


Happy hakking!

— Konrad

On 10 July 2017 at 00:46:10, vishal.ve...@exadatum.com (
vishal.ve...@exadatum.com) wrote:

I came across the post that says akka flushes the entity if not declated
strict, If thats right can any one help me as to how do i declare my
jobDetailsEntity as `strict `

On Sunday, July 9, 2017 at 9:14:14 PM UTC+5:30, vishal...@exadatum.com
wrote:
>
>
>
> down votefavorite
> 
>
> I am working with Akka Http, where I have defined a route as
>
> val route = (path(HttpConstants.CreateJob) & post) {
> (entity(as[JobDetailsEntity]) & entity(as[JobEntity])) {
>   (jobDetailsEntity: JobDetailsEntity, jobEntity: JobEntity) =>
> val updatedJobEntity = jobEntity.copy(runningSince = 
> DateTime.now().getMillis)
> val updatedJobDetailsEntity = jobDetailsEntity.copy(runningSince = 
> DateTime.now().getMillis).copy(modify_date = DateTime.now().getMillis)
> complete {
>   createJobDetails(updatedJobDetailsEntity).map(_.asJson)
>   createJob(updatedJobEntity).map(_.asJson)
> }
> }
>
> Here I am trying to unmarshal two entites in the same POST call which
> works when my json Payload id small i.e few bytes then its works fine , as
> soon as the payload size increases i.e around 10-20 kb it throws error :
>
> Substream Source cannot be materialized more than once
>
>

*DISCLAIMER:*
This message contains confidential information and is intended only for the
individual named. If you are not the named addressee, you should not
disseminate, distribute or copy this email. Please notify the sender
immediately by email if you have received this email by mistake and delete
this email from your system. Email transmission cannot be guaranteed to be
secure or error-free, as information could be intercepted, corrupted, lost,
destroyed, arrive late or incomplete, or contain viruses. The sender,
therefore, does not accept liability for any errors or omissions in the
contents of this message which arise as a result of email transmission. If
verification is required, please request a hard-copy version. --
>> 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: Akka Typed and MDC

2017-07-10 Thread Konrad 'ktoso'; Malawski
Akka Typed is still not quite "done" so missing or undecided upon APIs may 
still be here and there.
That's one of them, so I opened a ticket to discuss and decide what to do 
about it in Typed.

https://github.com/akka/akka/issues/23326

Having that said, you can always just directly use the logging library that 
you're using (and in fact this may be what we'll end up recommending with 
Typed... we'll see).

-- Konrad

On Saturday, July 8, 2017 at 4:15:01 AM UTC+9, Qux wrote:
>
> Hi,
>
> Whats the best way to get a DiagnosticActorLogging for Typed Actors?
>
> For untyped Actors we have this:
>
> public abstract class ActorBase extends AbstractActor {
> protected final DiagnosticLoggingAdapter logger = Logging.getLogger(this);
>
>
> @Override
> public void aroundReceive(PartialFunction receive, 
> Object msg) {
> try {
> ActorLoggingHelper.setMdc(msg, logger);
> super.aroundReceive(receive, msg);
> } finally {
> ActorLoggingHelper.clearMdc(logger);
> }
> }
> }
>
>
> Would be great if something similar is possible for the new Typed Actors 
> as well.
>
> Samuel
>

-- 
>>  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 Typed and MDC

2017-07-10 Thread Konrad 'ktoso'; Malawski
Once I wrote the response I though that for using the library directly 
you'll also want to know about the possibility to implement:


/**
 * Extension point for implementing custom behaviors in addition to the existing
 * set of behaviors available through the DSLs in [[akka.typed.scaladsl.Actor]] 
and [[akka.typed.javadsl.Actor]]
 */
abstract class ExtensibleBehavior[T] extends Behavior[T] {
  /**
   * Process an incoming [[Signal]] and return the next behavior. This means
   * that all lifecycle hooks, ReceiveTimeout, Terminated and Failed messages
   * can initiate a behavior change.
   *
   * The returned behavior can in addition to normal behaviors be one of the
   * canned special objects:
   *
   *  * returning `stopped` will terminate this Behavior
   *  * returning `same` designates to reuse the current Behavior
   *  * returning `unhandled` keeps the same Behavior and signals that the 
message was not yet handled
   *
   * Code calling this method should use [[Behavior$]] `canonicalize` to replace
   * the special objects with real Behaviors.
   */
  @throws(classOf[Exception])
  def receiveSignal(ctx: ActorContext[T], msg: Signal): Behavior[T]

  /**
   * Process an incoming message and return the next behavior.
   *
   * The returned behavior can in addition to normal behaviors be one of the
   * canned special objects:
   *
   *  * returning `stopped` will terminate this Behavior
   *  * returning `same` designates to reuse the current Behavior
   *  * returning `unhandled` keeps the same Behavior and signals that the 
message was not yet handled
   *
   * Code calling this method should use [[Behavior$]] `canonicalize` to replace
   * the special objects with real Behaviors.
   */
  @throws(classOf[Exception])
  def receiveMessage(ctx: ActorContext[T], msg: T): Behavior[T]

}


In which way you should be able to "wrap" any other behaviour and to the 
MDC clear in the right place hm...

Anyway, like I said, not a solved problem yet.

-- Konrad

-- 
>>  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 Typed and MDC

2017-07-10 Thread KonradktosoMalawski
The "power mode” ;-)


On 11 July 2017 at 00:02:12, Justin du coeur (jduco...@gmail.com) wrote:

Oh, sweet -- ExtensibleBehavior looks enormously useful...

On Mon, Jul 10, 2017 at 9:29 AM, Konrad 'ktoso' Malawski 
wrote:

> Once I wrote the response I though that for using the library directly
> you'll also want to know about the possibility to implement:
>
>
> /**
>  * Extension point for implementing custom behaviors in addition to the 
> existing
>  * set of behaviors available through the DSLs in 
> [[akka.typed.scaladsl.Actor]] and [[akka.typed.javadsl.Actor]]
>  */
> abstract class ExtensibleBehavior[T] extends Behavior[T] {
>   /**
>* Process an incoming [[Signal]] and return the next behavior. This means
>* that all lifecycle hooks, ReceiveTimeout, Terminated and Failed messages
>* can initiate a behavior change.
>*
>* The returned behavior can in addition to normal behaviors be one of the
>* canned special objects:
>*
>*  * returning `stopped` will terminate this Behavior
>*  * returning `same` designates to reuse the current Behavior
>*  * returning `unhandled` keeps the same Behavior and signals that the 
> message was not yet handled
>*
>* Code calling this method should use [[Behavior$]] `canonicalize` to 
> replace
>* the special objects with real Behaviors.
>*/
>   @throws(classOf[Exception])
>   def receiveSignal(ctx: ActorContext[T], msg: Signal): Behavior[T]
>
>   /**
>* Process an incoming message and return the next behavior.
>*
>* The returned behavior can in addition to normal behaviors be one of the
>* canned special objects:
>*
>*  * returning `stopped` will terminate this Behavior
>*  * returning `same` designates to reuse the current Behavior
>*  * returning `unhandled` keeps the same Behavior and signals that the 
> message was not yet handled
>*
>* Code calling this method should use [[Behavior$]] `canonicalize` to 
> replace
>* the special objects with real Behaviors.
>*/
>   @throws(classOf[Exception])
>   def receiveMessage(ctx: ActorContext[T], msg: T): Behavior[T]
>
> }
>
>
> In which way you should be able to "wrap" any other behaviour and to the
> MDC clear in the right place hm...
>
> Anyway, like I said, not a solved problem yet.
>
> -- Konrad
> --
> >>>>>>>>>> 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 a topic in the
Google Groups "Akka User List" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/akka-user/TmzMVgZjdnU/unsubscribe.
To unsubscribe from this group and all its topics, 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] Re: withSupervisionStrategy passed a japi Function but compiler complains that its expecting a scala Function1

2017-07-11 Thread KonradktosoMalawski
As I replied above, it has been fixed in later versions of Akka - you have
not stated what version you’re using.
Please upgrade to the latest, they’re all binary backwards compatible so
you can bump the Akka version.

— Konrad


On 26 October 2016 at 21:31:29, Konrad Malawski (
konrad.malaw...@lightbend.com) wrote:

Well that's exactly the thing we fixed.
As you've found in the docs.

We'll release a stable this week, please upgrade then.

-- 
Konrad `ktoso` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 26 October 2016 at 13:29:52, murtuza chhil (chil...@gmail.com) wrote:

Still looking for an answer to this, if anyone can point out whats wrong
and how to get it done.
I was looking at some HTTP docs and there was a fix in there and wonder if
the problem is related

http://doc.akka.io/docs/akka-http/current/java/http/migration-guide/migration-guide-2.4.x-3.0.x.html#akka-http-2-4-11-3-0-0

"The Java DSL for the following directives pathPrefixText,
rawPathPrefixTest, rawPathPrefix, pathSuffix
accidentally used the Scala function type instead of the
java.util.function.Function"

-chhil

On Thursday, October 20, 2016 at 10:33:03 PM UTC+5:30, murtuza chhil wrote:
>
> Having trouble setting up withSupervisionStrategy for the materializer.
>
> I get a compile time error of
>
>   Error:(30, 23) java: no suitable method found for 
> withSupervisionStrategy(akka.japi.function.Function)
> method 
> akka.stream.ActorMaterializerSettings.withSupervisionStrategy(scala.Function1)
>  is not applicable
>   (argument mismatch; 
> akka.japi.function.Function
>  cannot be converted to 
> scala.Function1)
> method 
> akka.stream.ActorMaterializerSettings.withSupervisionStrategy(akka.japi.function.Function)
>  is not applicable
>   (argument mismatch; 
> akka.japi.function.Function
>  cannot be converted to 
> akka.japi.function.Function)
>
> It for some reason is confusing the method that would be used for scala
> (expecting a function1).
> How do I get this to compile using java?
>
> import akka.NotUsed;import akka.actor.ActorSystem;import 
> akka.actor.SupervisorStrategy;import akka.japi.function.Function;import 
> akka.stream.ActorAttributes;import akka.stream.ActorMaterializer;import 
> akka.stream.IOResult;import akka.stream.Supervision;import 
> akka.stream.javadsl.*;import akka.util.ByteString;import scala.Function1;
> import java.io.File;import java.util.concurrent.CompletionStage;
> /**
>  * Created by Murtuza on 10/19/2016.
>  */public class EventFilter {
>
> public static void main(String[] args) {
>
> State filteredState = new State("ok");
> ActorSystem system = ActorSystem.create("system");
> ActorMaterializer mat = ActorMaterializer.create(system);
> Function decider = thr 
> ->SupervisorStrategy.resume();
>
> mat.settings().withSupervisionStrategy(decider);
>
> }
>
> Below supervisionStrategy expects a Function1 unlike for the mat which
> expects a japi function
>
>
> Flow parse = Flow.of(String.class)
> .map(x -> {
> //System.out.println(LogStreamProcessor.parseLineEx(x).get());
> return LogStreamProcessor.parseLineEx(x).get();
>
> }).withAttributes(ActorAttributes.supervisionStrategy(...));
>
> So I am kinda confused on passing the strategy.
>
> Any help will be greatly appreciated.
>
> -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.


Re: [akka-user] Re: Akka Camel and Akka Streams

2017-07-11 Thread KonradktosoMalawski
And it is listed under Alpakka projects too :-)
http://developer.lightbend.com/docs/alpakka/current/external-connectors.html#camel


— Konrad


On 12 July 2017 at 15:06:01, 'Martin Krasser' via Akka User List (
akka-user@googlegroups.com) wrote:

Hi Andreas,

the replacement for akka-camel is the Streamz
 project with its Camel DSL for Akka
Streams
.
It allows you to use any Camel component
 with Akka Streams for both
inbound and outbound message exchanges. There is a Scala and Java API.

Best Regards,
Martin

Am Dienstag, 11. Juli 2017 14:26:09 UTC+2 schrieb Andreas Gies:
>
> Hello HAkkers,
>
> we are maintaining an integration framework (OSGi) project built on top of
> ActiveMQ, Spray and Camel implemented in Scala [1]
>
> Most of our internal API's rely on Akka and some also on the Akka-Camel
> integration.
>
>
> With the next major release we plan to upgrade our Spray routes to
> Akka-Http. Now that I have started looking at the concrete
> steps I have noticed that Akka-Camel is also deprecated and to be replaced
> with alpakka.
>
> I had a look through the Alpakka project. So far I haven't found the
> replacement for the Akka-Camel efforts in there.
> Perhaps I have overlooked something or is the replacement just on the
> roadmap ?
>
> Also I did have a look at the JMS part of Alpakka. It seems that this
> implementation currently only supports TextMessages
> and ignores any properties within the message. If I understand the
> implementation correctly, it would fail the stream in case
> of any JMSException and also when the buffer has been filled up ?
>
> On a broader level I was wondering if the implementation should be in the
> form that the inbound stream fails if and only if
> the connection is irrecoverably broken and in other cases the Stream
> should reconnect transparently.
>
> Also on a broader level I have noticed, that the messages are acknowledged
> as soon as they pushed. Coming from a JMS
> background that feels a bit strange to me, but that might be because I am
> unfamiliar with the streaming API. In our world
> a message is normally acknowledged when it has been processed successfully
> (which is normally it has been written to
> the file system, forwarded to another JMS destination or triggered some
> execution in the database).
>
> If the container crashes before it has acknowledged the message, the
> message will be redelivered. In cases we encounter
> an error we pass the message to an error handling destination or a retry
> destination.
>
>
> Apparently the architecture and the acceptance level of message loss
> changes when switching to a streaming approach.
>
>
> For now I have some concrete questions:
>
> 1) Have I missed the Camel replacement in Alpakka and if so, where is it
> located within Alpakka ?
> 2) How are others coping with the "window of potential message loss" when
> migrating from pure JMS flows to streams ?
> 3) Any pointers to good hands-on white papers are much appreciated. I have
> read through some and also through most
> of the streams documentation, but I guess I need to get my hands dirty
> ...
> 4) I don't dare to ask, but if anyone is using Akka / AkkaHttp and / or
> AkkaStream within OSGi I would be more than happy
> to exchange experiences & ideas.
>
> [1] https://github.com/woq-blended/blended
>
>
> Thanks in advance for your attention
> Best regards
> Andreas
>
--
>> 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 Streams - UDP messages

2017-07-13 Thread KonradktosoMalawski
Hi there,
you do realize that UDP, the protocol itself, does not guarantee delivery
of anything?
It absolutely may and will in practice drop packets - it is designed to do
exactly that.

Start reading about UDP here
https://en.wikipedia.org/wiki/User_Datagram_Protocol and take it from there
to networking books and articles.

In short, if you’re suprised that UDP “dropped”, you should likely not be
using UDP at all :-)

— Konrad


On 13 July 2017 at 21:34:17, Madabhattula Rajesh Kumar (mrajaf...@gmail.com)
wrote:

Hi,

I am using Akka Streams to read the messages from UDP port and write into
the filesystem. It is not able to read all messages. Some messages are
dropping.

I have found one example program in the github.

https://github.com/jpthomasset/akka-udp-stream

val source = UdpSource(new InetSocketAddress("127.0.0.1", 9876), 100)
val result = source.map(x =>
x.data.decodeString("UTF-8")).runWith(lineSink(filePath))
import system.dispatcher
result.onComplete { _ => system.terminate() }

def lineSink(filename: String): Sink[String, Future[IOResult]] = {
Flow[String]
  .map(s => ByteString(s + "\n"))
  .toMat(FileIO.toFile(new File(filename)))(Keep.right)
  }

*Do we need to increase the "maxBufferSize" to receive all messages from
UDP?*

Please let me know how to receive all messages?

Regards,
Rajesh
--
>> 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] Use of high performance bounded mail box.

2017-07-15 Thread KonradktosoMalawski
The current default, more than anything, is bound to be the default since
it was the default since the inception of Akka and going for a bounded one
by default now could make some users unhappy.

Having that said, we're actively looking forward to pick a bounded impl for
Akka Typed. Then people come to it with new expectations and it's easier
for us to justify the change.

We also have looked at a number of such impala, including benchmarks etc
and they're definitely very cool.

So it's not that we don't want to, rather it is a question when we do :)

On July 15, 2017 at 17:33:12, Unmesh Joshi (unmeshjo...@gmail.com) wrote:

> Hi,
>
> We had some custom requirements for building a logging library wrapper for
> our project. The project includes multiple subsystems, each developing
> components which are essentially actors. All modules/actors are supposed to
> be using our logging interface.
> After some research, we found neopersist library (
> https://github.com/nestorpersist/logging) which seems to fit our needs.
> One of the key aspects of this library is the use of LoggingActor which
> handles all the logging events.
> Conceptually, this should perform pretty well, and comparable to log4j
> async appender.
> We ran some performance tests similar to the ones for log4j 2 as described
> here https://logging.apache.org/log4j/2.x/performance.html.
> As we expected, the bottleneck was the unbounded mailbox for Actors. The
> performance tests with jmh were just too slow and throughput was too low
> after a few iterations.
> We changed our mailbox configuration to use  NonBlockingBoundedMailbox,
> and performance then was comparable to AsyncAppender of log4j 2.
> Log4j2 AsyncAppender uses lmax disruptor.
>
> So the question is, why isn't some variant of bounded mail default in akka?
> Was there any thought/discussion happened to use lmax disruptor based mail
> box implementation? and why was it not done?
>
> Thanks,
> Unmesh
>
> --
> >> 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 Typed API discussion

2017-07-18 Thread KonradktosoMalawski
Hi Bryan,
The forum differs a bit depending on what you want to chat about.

Do you have a few issues to talk about and they’re specific enough (and
potentially could have an actionable outcome I’d assume/hope)? Then
http://github.com/akka/akka would be the best, one ticket per specific
issue, not to get all into the same one :)

We also have http://github.com/akka/akka-meta for more abstract
discussions, ideological etc ;-)

Or here is also find, if it’s one specific thing that you think requires a
lot more discussion before it can be formulated into an more or less
actionable ticket.

Hope this helps.

I’d suggest to keep it here or on issues, from what it sounds; chat is not
as good for deeply pondering an API and well thought out debate, emails or
issues work there a bit better :)

Thanks!

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 18 July 2017 at 15:59:11, Bryan Murphy (br...@murphynet.id.au) wrote:

Where is the best place to discuss the Akka Typed API ?
I am hoping it is still open to change as I have some (reasonably lengthy)
comments and suggestions to make so I want to make sure I give them in the
correct forum.
Is it here, a gitter channel, a github issue or somewhere else ?

Thanks

Bryan
--
>> 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-Typed MutableBehavior: return type of onMessage

2017-07-18 Thread KonradktosoMalawski
Exactly the same.
Becoming an different behavior.

On July 19, 2017 at 0:16:18, Mushtaq Ahmed (mushta...@gmail.com) wrote:

> Actor.immutable returning Behaviour[T] makes sense as it uses recursion to
> return updated state or Actor.stopped etc.
>
> But in MutableBehavior, I end up using this pattern a lot.
>
> override def onMessage(msg: Msg): Behavior[Msg] = {
> msg match {
> case M1 => //unit returning action
> case M2 => //unit returning action
> }
> this
> }
>
>
> Which makes me wonder what use cases are helped by onMessage returning
> Behaviour type (instead of Unit). Any thoughts?
>
> --
> >> 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] [ANNOUNCE] ChanaMQ - an Akka based AMQP messaging broker

2017-07-27 Thread KonradktosoMalawski
Dispatchers are documented
http://doc.akka.io/docs/akka/current/scala/dispatchers.html
ForkJoinPool based.

Stages get fused so it’s a bit more tricky than that.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 28 July 2017 at 05:49:20, Caoyuan (dcaoy...@gmail.com) wrote:

BTW, Viktor, what's the implementation of the default dispatcher for TCP
IO, Flow/GraphStage? Are there any special dispatchers that are pinned to
fixed thread pool?

On Thu, Jul 27, 2017 at 1:44 PM Caoyuan  wrote:

>
>
> On Thursday, July 27, 2017 at 12:47:39 PM UTC-7, √ wrote:
>>
>> Very consistent. What's the current bottleneck?
>>
>
> Not too much so far. The major decision of ChanaMQ design is that each
> message is an actor and each queue is an actor etc. So the scalability on
> number of CPU cores or cluster nodes should be well. I can see the CPU
> cores usages are balanced very well.
>
> The only issue is the fluctuated of send/receive rate under some cases,
> I'll try to figure out whether the cause is from client side or ChanaMQ
> server side.
>
>
>
>> On Thu, Jul 27, 2017 at 7:52 PM, Caoyuan  wrote:
>>
>>> Below is the latency in ms when applying 1-publishers - 100-consumers:
>>>
>>>
>>>   "max-latency":15.044784,
>>>   "min-latency":13.960142,
>>>   "avg-latency":14.623772,
>>>   "p95-latency":14.830327,
>>>   "p99-latency":14.884950,
>>>
>>> On Monday, July 24, 2017 at 11:30:04 PM UTC-7, √ wrote:

 Cool. What does the p90 and p99 look like?

 --
 Cheers,
 √

 On Jul 25, 2017 12:19 AM, "Caoyuan"  wrote:

> I've got some preliminary benchmarks. As the maximized distributed
> design of ChanaMQ. It's bit lagging behind RabbitMQ when applying a few
> publishers/consumers, but will be on par with RabbitMQ when applying lots
> of publishers/consumers.
>
> Attached are benchmarks on my dual Intel Xeon E5620@2.4GHz
>
> ChanaMQ is designed as a plain Akka sharding cluster, so it should
> scale out well, although I do not yet take a serious test on it.
>
> --
> Cheers
> Caoyuan Deng
>
> On Monday, July 24, 2017 at 12:36:27 AM UTC-7, √ wrote:
>>
>> Cool! What kind of scalability&performance profile are you getting?
>>
>> On Fri, Jul 21, 2017 at 9:20 PM, Caoyuan  wrote:
>>
>>> Hi,
>>>
>>> We are developing an AMQP messaging broker - ChanaMQ, which is based
>>> on Akka actors and Akka streaming.
>>>
>>> It's currently under Alpha phase, but with lots of AMQP 0-9-1
>>> features implemented, including ack, persistent (Cassandra only so far) 
>>> etc.
>>>
>>> Methods/Features are not supported yet:
>>>
>>>- Connection.SecureOk
>>>- Channel.Flow
>>>- Exchange.Bind / Exchange.Unbind
>>>- Basic.Reject / Basic.Nack / Basic.RecoverAsync / Basic.Recover
>>>- Access.Request
>>>- Tx.Select / Tx.Commit / Tx.Rollback
>>>- Confirm.Select
>>>- ...
>>>
>>> For more information, please visit:
>>>
>>> https://github.com/qingmang-team/chanamq
>>>
>>> Regards,
>>>
>>> Caoyuan Deng
>>> Qingmang  - Your magazine on mobile
>>> Twitter: @dcaoyuan
>>>
>>> --
>>> >> 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.
>>>
>>
>>
>>
>> --
>> 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+...@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.goog

Re: [akka-user] Persistence Query and Sharding

2017-07-31 Thread KonradktosoMalawski
*Eventually* all events with the given tag.
Note also that that stream is infinite, unlike the “currentEventsByTag”
which is finite and whatever was currently visible by that tag when it was
reading.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 1 August 2017 at 01:26:27, Moritz Schallaböck (
moritz.schallabo...@agido.com) wrote:

Hi,

I'm wondering if a persistence query running in a sharded environment sees
the events from all shards, or just the "local" shards.

Using the Cassandra Journal Plugin.

Say I have 3 cluster shards, each (for argument's sake) running in their
own VM:
- shard 1
- shard 2
- shard 3

Furthermore I have one persistent actor each:
- shard 1: actor A
- shard 2: actor B
- shard 3: actor C

Now each actor persists an event and tags it:
- shard 1: actor A: persist(Tagged(MyEvent("A"), Set("Tag1"))
- shard 2: actor B: persist(Tagged(MyEvent("B"), Set("Tag1"))
- shard 3: actor C: persist(Tagged(MyEvent("C"), Set("Tag1"))

Now, when I run a persistence query in shard 1:
- readJournal.eventsByTag("Tag1")

Does it see "A", "B", "C"? Or just "A"? Something else entirely?

Thanks
Moritz
--
>> 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] Consuming akka-streams service via Javascript

2017-07-31 Thread KonradktosoMalawski
Hi there,
In general “streaming consumption" of such API can be simplified to “start
working with the data before the entire transfer completes.
Since it’s JSON you likely want to parse it somewhat, or select specific
elements etc.

AFAICS http://oboejs.com/examples is one of the streaming parsers available
for javascript, so you could use that for example.
I’m sure theres others too, in general what you’re looking for is “sax” or
“streaming” parsers.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 1 August 2017 at 09:43:35, B Wills (bwill...@gmail.com) wrote:

Hi,

I have created a web service that sends a response in the form of a JSON
stream, similar to the below code snippet from the akka-streams
documentation:

val route =
  path("tweets") {
// [3] simply complete a request with a source of tweets:
val tweets: Source[Tweet, NotUsed] = getTweets
complete(tweets)
  }



I would like to be able to consume the stream over http via a Node.js
client - has anyone done something like this before? I have looked at
akka.js and scala.js some, but based on my reading it sounds like this
might "just work" without any special libraries on the client-side.
--
>> 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] Persistence Query and Sharding

2017-07-31 Thread KonradktosoMalawski
Cool! Are we talking in the order of seconds here? Is it dependent on
polling with an adjustable interval?

There’s different modes:
https://github.com/akka/akka-persistence-cassandra/blob/v0.54/core/src/main/resources/reference.conf#L244


How does the offset parameter work with eventsByTag? The example in the
documentation combines eventsByTag with an offset, so apparently it works.
But it seems like there would not be any common offset between tagged
events from multiple persistence ids (from multiple shards). Having the
offset parameter work reliably is a prerequisite for any kind of snapshot
mechanism built around the query.

I don’t remember that one, would have to dig into the library, can’t do
that right now though… I recommend checking the sources for the time being,
thanks.


— konrad

-- 
>>  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-1.3.1.xsd schema location

2017-08-01 Thread KonradktosoMalawski
Hi there,
you could get them from here:
https://github.com/akka/akka.github.com/tree/968159d916d9a54c5d247c5b228398e1e0d43d68
(old version of what was the website, and had all these files).


—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 1 August 2017 at 17:36:09, francesco.malve...@unimore.it (
francesco.malve...@unimore.it) wrote:

A very old application leveraging akka-camel-1.3.1 is now failing with the
following error:

XmlBeanDefinitionReader.java:396:in `doLoadBeanDefinitions':
org.springframework.beans.factory.xml.XmlBeanDefinitionStoreException: Line
126 in XML document from class path resource [camel-context.xml] is
invalid; nested exception is org.xml.sax.SAXParseException; lineNumber:
126; columnNumber: 41; cvc-complex-type.2.4.c: il carattere jolly
corrispondente è rigoroso ma non è possibile trovare una dichiarazione per
l'elemento "akka:camel-service".


(the Italian text is about not finding declaration of "akka:camel-service"
element).

The schema definitions in the configuration file are:

http://www.springframework.org/schema/beans";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xmlns:akka="http://akka.io/schema/akka";
xmlns:camel="http://camel.apache.org/schema/spring";
xmlns:p="http://www.springframework.org/schema/p";
xsi:schemaLocation="http://www.springframework.org/schema/beans
 http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
 http://akka.io/schema/akka
 http://repo.akka.io/akka-1.3.1.xsd
 http://camel.apache.org/schema/spring
 http://camel.apache.org/schema/spring/camel-spring.xsd";>

Today the http://repo.akka.io/ site does not respond.

Is there a current location where I can find the  akka-1.3.1.xsd file?

thank you,

Francesco
--
>> 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] Consuming akka-streams service via Javascript

2017-08-01 Thread KonradktosoMalawski
Yes, since we translate reactive streams back-pressure onto TCP flow
control which has tot be handled (and is handled) by anything that speaks
TCP, which includes any HTTP call.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 2 August 2017 at 02:35:35, B Wills (bwill...@gmail.com) wrote:

Will back pressure still work over http, without a library on the
Javascript side that uses the same protocol as akka-streams?

On Monday, July 31, 2017 at 6:59:47 PM UTC-6, Konrad Malawski wrote:
>
> Hi there,
> In general “streaming consumption" of such API can be simplified to “start
> working with the data before the entire transfer completes.
> Since it’s JSON you likely want to parse it somewhat, or select specific
> elements etc.
>
> AFAICS http://oboejs.com/examples is one of the streaming parsers
> available for javascript, so you could use that for example.
> I’m sure theres others too, in general what you’re looking for is “sax” or
> “streaming” parsers.
>
> —
> Konrad `kto.so` Malawski
> Akka  @ Lightbend 
>
> On 1 August 2017 at 09:43:35, B Wills (bwil...@gmail.com) wrote:
>
> Hi,
>
> I have created a web service that sends a response in the form of a JSON
> stream, similar to the below code snippet from the akka-streams
> documentation:
>
> val route =
>   path("tweets") {
> // [3] simply complete a request with a source of tweets:
> val tweets: Source[Tweet, NotUsed] = getTweets
> complete(tweets)
>   }
>
>
>
> I would like to be able to consume the stream over http via a Node.js
> client - has anyone done something like this before? I have looked at
> akka.js and scala.js some, but based on my reading it sounds like this
> might "just work" without any special libraries on the client-side.
> --
> >> 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.

-- 
>>  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] Flow.fromSinkAndSource and backpressure

2017-08-01 Thread KonradktosoMalawski
Hi Jeff,

Alexey, that’s not correct, back-pressure works there - because it has to:
it is enforced by the reactive-streams protocol that we follow by heart in
Akka streams.

Yes, back-pressure works, the one sentence explanation would be:
“independently on each side of the newly constructed flow”.

So if the Sink you created that Flow from does not pull, no one will be
able to push data into that “Flow”.
Similarly, your Source, that created this Flow’s “output”, is not pulled
“from” it is not allowed to push data - it is being back-pressured.

Since completion was mentioned, indeed completion does not carry over from
one end to the other,
since they’re intentionally separate here. If you want to bind the
completion events use Flow.fromSinkAndSourceCoupled.

Happy hakking!

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 2 August 2017 at 15:31:16, Alexey Shuksto (seig...@gmail.com) wrote:

Nope. More so, completion of one of them would not cause completion of
another and flow itself.

-- 
>> 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] Flow.fromSinkAndSource and backpressure

2017-08-01 Thread KonradktosoMalawski
Good point, I missed that word in the question - thanks and sorry about
that :)
A full clarification was still useful I hope though, cheers!

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 2 August 2017 at 15:45:51, Alexey Shuksto (seig...@gmail.com) wrote:

Hi Konrad,

Jeff was asking about 'backpressure propagation'. From my understanding
that means that when source wasn't pulled, sink would not pull. And that's
not how it works as you already mentioned.

-- 
>> 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 and Mesos: Will it blend?

2017-08-04 Thread KonradktosoMalawski
This is great, thanks for the initiative :-)
We’ll review shortly!

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 4 August 2017 at 22:27:50, Dragos Dascalita Haut (ddrag...@gmail.com)
wrote:

FWIW, I'm reviving this thread to share that I've opened a PR with a
working example with Mesos in akka-samples [1].

I was excited to see that it's actually quite straight forward to get this
working in Mesos, thanks to its Marathon framework, and the APIs
facilitating auto-discovery of the seed-nodes.

For whoever wants to try it, the PR also contains a docker-compose for
spinning a Mesos environment locally, using docker-machine.

HTH,
dragos

[1] - https://github.com/akka/akka-samples/pull/37

On Tuesday, June 23, 2015 at 12:10:04 PM UTC+3, √ wrote:
>
> Worth noting is that ConductR also solves the aforementioned problem (of
> seeding containerized Akka Clusters).
>
> On Mon, Jun 22, 2015 at 11:40 PM, Michael Frank 
> wrote:
>
>> perhaps the Cluster Usage documentation page should be updated with a
>> section containing links to external libraries implementing this glue
>> functionality, similar to how external serializers are mentioned on the
>> Serialization page: http://doc.akka.io/docs/akka/
>> 2.3.11/scala/serialization.html#External_Akka_Serializers
>>
>> The Cluster Usage page is kind of a monster already tho...
>>
>> -Michael
>>
>>
>> On 06/22/15 03:30, i...@virgon.eu wrote:
>>
>> Hello,
>>
>> Me and my team have successfully managed to bootstrap Akka Cluster with
>> Docker and Mesos, and we're actually running automated performance tests
>> against ephemeral clusters using this combination - so it's working *that*
>> well. The thing that really made it tick (and quickly so - since this part
>> of the implementation took mere minutes) was Marathon - it's exporting
>> Mesos slave's external hostname/ip and port and from there it's really
>> typesafe config. Of course that might not be relevant to your situation,
>> but I'd still suggest that you look at how they've done it. If you're
>> interested in more details, I could prioritise writing a blog post
>> describing the setup in more detail.
>>
>> Cheers
>>
>> On Sunday, June 21, 2015 at 9:33:40 AM UTC+2, rkuhn wrote:
>>>
>>> Hi Brian & Greg,
>>>
>>> the bind-host capability does indeed not solve the whole problem, but it
>>> is what is needed from Akka to enable you to do so (as you have done,
>>> thanks for sharing!). It might make sense to create small libraries that
>>> simplify the process for the various clouds out there, but in the end such
>>> a library would not be Akka-specific: it is just needed to obtain a
>>> host:port combination from a container service so that it can then be
>>> passed to another library that makes use of the network (like
>>> akka-cluster). What I’m getting at is that the akka/akka repository does
>>> not necessarily need to contain all the code, it would be enough (or maybe
>>> even better) to document how to pass in these pieces of information
>>> obtained via other means. Of course if large benefits are to be had by
>>> closely integrating then we’ll discuss this on a case by case basis.
>>>
>>> Regards,
>>>
>>> Roland
>>>
>>> 20 jun 2015 kl. 23:16 skrev Brian Topping :
>>>
>>> Interesting responses, thanks!
>>>
>>> As a question to the core team, should the problems Greg raised be
>>> reported as issues? What would be appropriate release target if so?
>>>
>>> Greg, I'm going to be busy with a Java-land client for the next couple
>>> of weeks, but I will do my best to clone your project and build some PRs if
>>> I can.
>>>
>>> Cheers, Brian
>>>
>>> On Jun 18, 2015, at 3:04 PM, tigerfoot  wrote:
>>>
>>> Actually that's not quite right...its not nearly that simple.  These
>>> "oceans" like Mesos need to auto-assign the ports so while, yes, 2.4 gives
>>> dual binding capabilities this is only useful when you know the ports!
>>>
>>> So how do you do that?  That's much more complex.
>>>
>>> I've got a hello-world remote project in github that shows how to do
>>> this on Amazon's container service ECS, using some AWS-specific
>>> capabilities, namely to call an api from within a running Docker to find
>>> the IP of the host its running on (not the Docker-internal IP).  From there
>>> other magic is possible.  I can successfully launch a bunch of Dockers into
>>> ECS and it will figure out what's-what and bind to the dynamic ports ECS
>>> assigns, and from there I can talk to them.
>>>
>>> See here for info: https://github.com/gzoller/docker-exp/tree/remoting
>>>
>>> (NOTE: The clustering branch of this project is still in-work, and will
>>> not function properly yet, but soon will using the same principles.  My
>>> expectations is that a cluster in an ocean will need to use pub-sub or
>>> similar mechanism to identify actors "somewhere" to talk to, but we'll
>>> see...)
>>>
>>> You're going to have to adapt this for Mesos.  If you so, shoot a pull
>>> request to my project so I've got 

Re: [akka-user] [Akka-typed] Mutable Behavior testing with EffectfulActorContext

2017-08-06 Thread KonradktosoMalawski
Hi there,
this was fixed https://github.com/akka/akka/pull/23361 and will be released
(the fix) in 2.5.4 shortly.

Happy hakking

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 6 August 2017 at 23:52:11, Nishant Vishwakarma (nishant...@gmail.com)
wrote:

*EffectfulActorContext*

-- 
>>  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] Performance of Akka-Http 2.5.4

2017-08-11 Thread KonradktosoMalawski
When wanting to discuss any benchmarks, please share actual code as
otherwise it's impossible to comment on what you're actually benchmarking.
Same goes for benchmark setup, you did not explain how the benchmark was
run and what network it was on etc.

We have continuously confirmed same performance as the netty 4 backend in
play apps, as well as beating spray in performance. Also, you're not
comparing apples to apples it fbyou comprare raw netty without any DSLs to
a high level routing API that Akka provides - thus, please share code.

On August 11, 2017 at 22:53:21, Jakub Kahovec (jakub.kaho...@gmail.com)
wrote:

> Hi,
>
> we've done recently a little research regarding the performance of current
> JVM based HTTP servers (and Nginx for comparison)  and as regards the
> results of Akka-Http we were rather unpleasantly surprised.
>
> Here are the presumptions for the benchmark:
>
>- Single handler handling GET /benchmark returns HTTP 200 OK with
>payload benchmark and HTTP headers Date, Server, Content-Type and
>Content-Length.
>- Using mostly default settings, change them only when it's obvious
>that the default settings do not work well in the benchmark.
>- We are interested in the maximum number of requests per second and
>latencies.
>- Three rounds, first is warmup and the rest try to test the
>frameworks under different loads (each test 60 seconds)
>-
>   - Warmup - ./wrk -t38 -c50 -d60s --latency
>   http://benchmark-server/benchmark
>   - Round 1 - ./wrk -t38 -c500 -d60s --latency
>   http://benchmark-server/benchmark
>   - Round 2 - ./wrk -t38 -c1000 -d60s --latency
>   http://benchmark-server/benchmark
>
> Hardware : client and benchmark machines: 40 CPUs (Intel(R) Xeon(R) CPU
> E5-2630L v4 @ 1.80GHz), 64GB of RAM
>
> Results:
>
> Warmup
>
> | metric  | nginx | akka-http | colossus  | finagle   | http4s
>| netty | spring| vertx |
> |---  |---|---|---|---|---
>  |---|---|---|
> | req/s** | 377627.54 | 161957.96 | 341140.06 | 271592.28 |
> 147829.99 | 337583.43 | 149290.22 | 356968.36 |
> | latency avg | 99.18μs   | 656.77μs  | 386.72μs  | 579.93μs  |
> 8.28ms| 336.11μs  | 21.98ms   | 345.04μs  |
> | latency 75th| 98.00μs   | 255.00μs  | 115.00μs  | 149.00μs  |
> 248.00μs  | 131.00μs  | 250.00μs  | 101.00μs  |
> | latency 99th| 149.00μs  | 815.00μs  | 271.00μs  | 820.00μs  |
> 156.60ms  | 198.00μs  | 846.85ms  | 188.00μs  |
> | cpu idle %  | 90| 36| 76| 61| 13
>  | 75| 57| 76|
>
>
> Round 1
>
> | metric  | nginx | akka-http | colossus   | finagle   | 
> http4s
>| netty  | spring| vertx |
> |---  |---|---|--- |---
> |---|--- |---|---|
> | req/s   | 988019.69 | 245979.16 | 1007300.12 | 460936.09 |
> 149288.46 | 1021265.73 | 258088.17 | 990153.39 |
> | latency avg | 642.29μs  | 3.31ms| 831.16μs   | 4.49ms|
> 122.44ms  | 2.12ms | 9.57ms| 1.96ms|
> | latency 75th| 537.00μs  | 2.79ms| 572.00μ
>

-- 
>>  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 cluster on Hadoop YARN

2017-08-14 Thread KonradktosoMalawski
There has not been much interest in that from what I can cell.
Rather people are using k8s, marathon/mesos etc to run Akka applications
nowadays.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 15 August 2017 at 12:03:14, Juan Rodríguez Hortalá (
juan.rodriguez.hort...@gmail.com) wrote:

Hi all,

In a previous thread (
https://groups.google.com/forum/#!searchin/akka-user/yarn%7Csort:relevance/akka-user/ylV2tD5uuq8/8c3EN69ehrwJ)
there was a discussion about running Akka cluster on top of YARN. That
thread is quite old, and has been inactive for some years. Do you know if
someone has made progress with that?

Thanks,

Juan
--
>> 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] Respond with a partially streamed JSON object

2017-08-17 Thread KonradktosoMalawski
Nested streaming is somewhat tricky.

You could achieve the actual streaming semantics with injecting the things 
around it,
via something like `Source(the "header") concat streamingSource concat 
Source(“the ending ]]}]]}]”)`

We have tools coming for streaming nested parsing, but not rendering so far.

—
Konrad `kto.so` Malawski
Akka @ Lightbend

On 18 August 2017 at 09:55:14, na...@bigpanda.io (na...@bigpanda.io) wrote:

I am trying to respond with a JSON object which has some strict values and some 
streamed values

```
{
  "total_results": 15,
  "items": [
    // Streamed JSON objects
  ]
}
```

Is there a way to respond like this without injecting the surrounding data into 
the Source?
I am currently using Play-Json that doesn't support this option natively
--
>> 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] Pause an actor with a GraphStage -> how to validate if is open when what I have is a future?

2017-08-17 Thread KonradktosoMalawski
Share full code please.
It’s hard to guess what you’re doing from snippets.

state.map(


Looks unsafe. Is this a Future?
You’re invoking internal state methods from outside threads which is unsafe
and will not work if it is.
Read about asyncCallback in GraphStage docs if that is the case.


—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 18 August 2017 at 09:55:14, Yuliban Fernando Penagos Gómez (
yulibanpena...@seven4n.com) wrote:

Hi

I'm trying to use a Valve (which is implemented via a GraphStage). The idea
is to close the valve when some Left is raised inside a stream. That seems
working ok.

One of the thing is that I'm stuck in the onPush handler, cause before
doing a push to the Outlet port, I have to validate if the valve is open,
but to do so, I have to access the DB and look for the actual state of the
valve. Something like this:

override def onPush(): Unit = {

state.map(
  s =>
if (s == SwitchMode.Open) {
  push(*out, grab(in)*)
  }
)

}



Reading some logs, it seems to be working, but it's not. I have a test that
tries to get the message and is getting a timeout.

val probe = stream(group, topic) // this stream has a viaMat where the
graphstage is inserted
  .runWith(TestSink.probe)

probe.requestNext() // here is the timeout



Is it possible to pause the consumer having this restriction or should I
try to do it in another way?

If this is the way to go, I'm concerned about what will happen when the
Valve gets open again. If the stream has a lot of messages, will the stream
capable of manage this or should I control that some way?

Regards

--
>> 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] Speeding up actor system boot time in testing environment

2017-08-27 Thread KonradktosoMalawski
Still, why not do this in the same ActorSystem if you’re so concerned about
start time.
I’d also guess that that time is your actors or things starting, not just
the AS, so cut down on things there.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 28 August 2017 at 00:04:15, Jakub Liska (liska.ja...@gmail.com) wrote:

Why do you need to start new systems?
>

For executing tasks in forked JVM. In order to establish communication
between 2 processes, it needs TCP as retrieving results from a different
process is hard without it.

Those tasks are rather long running, so 800ms boot time doesn't matter at
all. However it matters a lot when testing these systems...
--
>> 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 cluster + kryo

2017-08-28 Thread KonradktosoMalawski
I would not encourage setting scala.Product or java.lang.Object as kryo
serialized - pick specific classes (this is also for security reasons
actually).
Or create a marker type that you’d include in your messages that are to be
serialized using kryo and use that.

Sure you can use Artery if you want to, read it’s docs about how to
configure http://doc.akka.io/docs/akka/current/scala/remoting-artery.html

PS: I’d recommend upgrading to 2.5.x, it’s fully binary compatible with
2.4.x so it will be very simple and it includes many new features and
hardening updates in Artery specifically.


—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 29 August 2017 at 01:31:55, Muthu Jayakumar (bablo...@gmail.com) wrote:

Hello there,

I am building a micro-service that uses akka-cluster. I am running into an
issue with serialization. I am using akka 2.4.16 and scala 2.11.
These warnings have started to come when I switched from default
java-serialization to kryo. I am using
"com.github.romix.akka:akka-kryo-serialization_211:0.4.2" of akka-kryo and
have added the following into the config...

kryo  {
  type = "graph"
  idstrategy = "default"
  resolve-subclasses = true
  kryo-custom-serializer-init = "com.wd.perf.scheduler.swh.utils.KryoInit"
}

serializers {
  akka-cluster = "akka.cluster.protobuf.ClusterMessageSerializer"
  java = "akka.serialization.JavaSerializer"
  kryo = "com.romix.akka.serialization.kryo.KryoSerializer"
  //proto = "akka.remote.serialization.ProtobufSerializer"
}
serialization-bindings {
  "akka.cluster.ClusterMessage" = akka-cluster
  //"akka.cluster.routing.ClusterRouterPool" = akka-cluster

  "java.io.Serializable" = none

  "java.lang.String" = kryo
  "java.lang.Boolean" = kryo

  //"com.google.protobuf.Message" = proto
  "scala.Product" = kryo
  "akka.actor.ActorRef" = kryo
  "scala.collection.immutable.TreeMap" = kryo
  "[Lscala.collection.immutable.TreeMap;" = kryo
  "scala.collection.mutable.HashMap" = kryo
  "[Lscala.collection.mutable.HashMap;" = kryo
  "scala.collection.immutable.HashMap" = kryo
  "[Lscala.collection.immutable.HashMap;" = kryo
  "scala.collection.mutable.AnyRefMap" = kryo
  "[Lscala.collection.mutable.AnyRefMap;" = kryo
  "scala.collection.immutable.LongMap" = kryo
  "[Lscala.collection.immutable.LongMap;" = kryo
  "scala.collection.mutable.LongMap" = kryo
  "[Lscala.collection.mutable.LongMap;" = kryo
  "scala.collection.immutable.HashSet" = kryo
  "[Lscala.collection.immutable.HashSet;" = kryo
  "scala.collection.immutable.TreeSet" = kryo
  "[Lscala.collection.immutable.TreeSet;" = kryo
  "scala.collection.immutable.BitSet" = kryo
  "[Lscala.collection.immutable.BitSet;" = kryo
  "scala.collection.mutable.HashSet" = kryo
  "[Lscala.collection.mutable.HashSet;" = kryo
  "scala.collection.mutable.TreeSet" = kryo
  "[Lscala.collection.mutable.TreeSet;" = kryo
  "scala.collection.mutable.BitSet" = kryo
  "[Lscala.collection.mutable.BitSet;" = kryo
  "scala.collection.immutable.Vector" = kryo
  "[Lscala.collection.immutable.Vector;" = kryo
  "[Ljava.lang.Object;" = kryo
  "[[I" = kryo
}
serialization-identifiers {
  "akka.cluster.protobuf.ClusterMessageSerializer" = 5
}


I could only get it past errors to the following warnings, after I had
added "akka-cluster" in the application.conf (which I copied from
reference.conf of akka-cluster).


[WARN] [SECURITY][08/28/2017 09:19:03.286]
[sftp-scheduler-akka.remote.default-remote-dispatcher-14]
[akka.serialization.Serialization(akka://sftp-scheduler)] Multiple
serializers found for class akka.cluster.InternalClusterAction$InitJoin$,
choosing first: Vector((interface
scala.Product,com.romix.akka.serialization.kryo.KryoSerializer@40d4d844),
(interface
akka.cluster.ClusterMessage,akka.cluster.protobuf.ClusterMessageSerializer@36ccff98
))
[WARN] [SECURITY][08/28/2017 09:19:03.355]
[sftp-scheduler-akka.remote.default-remote-dispatcher-15]
[akka.serialization.Serialization(akka://sftp-scheduler)] Multiple
serializers found for class akka.cluster.InternalClusterAction$Join,
choosing first: Vector((interface
scala.Product,com.romix.akka.serialization.kryo.KryoSerializer@40d4d844),
(interface
akka.cluster.ClusterMessage,akka.cluster.protobuf.ClusterMessageSerializer@36ccff98
))
[WARN] [SECURITY][08/28/2017 09:19:03.369]
[sftp-scheduler-akka.remote.default-remote-dispatcher-15]
[akka.serialization.Serialization(akka://sftp-scheduler)] Multiple
serializers found for class
akka.cluster.ClusterHeartbeatSender$HeartbeatRsp, choosing first:
Vector((interface
scala.Product,com.romix.akka.serialization.kryo.KryoSerializer@40d4d844),
(interface
akka.cluster.ClusterMessage,akka.cluster.protobuf.ClusterMessageSerializer@36ccff98
))

Also, I wonder if I may be able to use Remoting-Artery in-place of netty
while using clustering?

Please advice on what could be the next steps.

Thanks,
Muthu
--
>> Read the docs: http://akka.io/docs/
>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additiona

Re: [akka-user] Akka-Http - Multipart file upload - SubscriptionTimeoutException

2017-08-29 Thread KonradktosoMalawski
Please ask in one spot at the same time - it’s difficult to  track and
match all the questions-that-already-were-answered..
Please also include code when asking such questions - I have to *guess* that
you used the fileUpload directive, but that’s not the only way to handle
uploads,
so we’re left guessing that you’re probably using that, and probably seeing
https://github.com/akka/akka-http/issues/1216

More details in the ticket,

Hope this helps

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 30 August 2017 at 09:25:29, Andres Blanco (andres.bla...@o3.cr) wrote:

Hi everyone,

We developed some code that executes a file upload, it was working fine for
some test but it suddenly started failing with bigger file sizes ( >
120kb). It throws this exception:

akka.stream.impl.SubscriptionTimeoutException: Substream Source has not
been materialized in 5000 milliseconds
at akka.stream.impl.fusing.SubSource.timeout(StreamOfStreams.scala:706)
at
akka.stream.stage.GraphStageLogic$SubSourceOutlet.timeout(GraphStage.scala:1138)
at
akka.stream.impl.fusing.PrefixAndTail$PrefixAndTailLogic.onTimer(StreamOfStreams.scala:134)
at
akka.stream.stage.TimerGraphStageLogic.akka$stream$stage$TimerGraphStageLogic$$onInternalTimer(GraphStage.scala:1228)
at
akka.stream.stage.TimerGraphStageLogic$$anonfun$akka$stream$stage$TimerGraphStageLogic$$getTimerAsyncCallback$1.apply(GraphStage.scala:1217)
at
akka.stream.stage.TimerGraphStageLogic$$anonfun$akka$stream$stage$TimerGraphStageLogic$$getTimerAsyncCallback$1.apply(GraphStage.scala:1217)
at
akka.stream.impl.fusing.GraphInterpreter.runAsyncInput(GraphInterpreter.scala:443)
at
akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphInterpreter.scala:453)

We've already configured akka.http.server.parsing.max-content-length to
100m with no change, the service is hosted behind an nginx service that has
client_max_body_size = 100m.

Any ideas?
--
>> 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] Require an Untyped ActorContext in testing

2017-08-30 Thread KonradktosoMalawski
This is simply not implemented yet.
As you’ve likely noticed with the big warning on the typed docs page – it’s
in an early preview mode and not all things are implemented currently.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 24 August 2017 at 18:39:01, Saloni Vithalani (skvithal...@gmail.com)
wrote:

Hello everyone,

I am having a class that extends akka.typed.scaladsl.Actor.MutableBehavior
as follows:

class Container(ctx: ActorContext[ContainerMsg]) extends
MutableBehavior[ContainerMsg] {


  def someMethod() = {

  some code ...

  ctx.self.toUntyped

  }

}




While writing test for "someMethod" of "Container" with


val system: ActorSystem[Nothing]= ActorSystem(Actor.empty,
"container-system")

val ctx = new StubbedActorContext[ContainerMsg]("test-container", 100, system)

val container = new Container(ctx)

container.someMethod() shouldBe something


it throws an exception of

only adapted untyped ActorRefs permissible


because the "ctx" in "Container" is not created using
"akka.actor.ActorSystem". Is there any work around for this in
akka.typed.testkit?


--
>> 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 nodes gets disconnected without code interaction on virtual machines

2017-08-30 Thread KonradktosoMalawski
What are your actors doing? Are you blocking somewhere?

It should “just work”.

Please upgrade to an actually maintained version too please - 2.3 is very
ancient,
please use the current release timeline 2.5 – there should be almost no
code changes you need to do btw, it’s compatible.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 30 August 2017 at 18:47:40, Rodrigo Silva (rodrigo.si...@wazoo.com.ar)
wrote:


I'm using akka 2.3.14 and I set up to use Remote and Cluster features with
this basic set up:

akka {
  actor {
provider = "akka.cluster.ClusterActorRefProvider"
  }
  remote {
netty.tcp {
  hostname = someIP
  port = SOMEPORT
}
  }

  cluster {
seed-nodes = [
  "akka.tcp://ClusterSystem@SOMEFIXEDIP:9191"]

auto-down-unreachable-after = 120s
  }
}



I been able to start up to 40 nodes on the same machine (for testing
purposes). Same thing with 2 machines, and even with one or two virtual
machines.

The problem arises when I set up 8 virtual machines on a server, each
running one single node. There is no custom code being executed, I just
manage to start up an actor system and I see them getting connected each
other. After a while being idle, I start seeing things like this on a node:

[WARN] [08/24/2017 12:32:53.125] [ClusterSystem-akka.remote.default-remote-
dispatcher-6] 
[akka.tcp://ClusterSystem@vm-euler-04:7887/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClusterSystem%40euler%3A9191-0]
Association with remote system [akka.tcp://ClusterSystem@euler:9191] has
failed, address is now gated for [5000] ms. Reason: [Disassociated]
[WARN] [08/24/2017 12:32:53.141] [ClusterSystem-akka.remote.default-remote-
dispatcher-5] 
[akka.tcp://ClusterSystem@vm-euler-04:7887/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClusterSystem%40vm-euler-02%3A7887-2]
Association with remote system [akka.tcp://ClusterSystem@vm-euler-02:7887]
has failed, address is now gated for [5000] ms. Reason: [Disassociated]
[WARN] [08/24/2017 12:32:53.531] [ClusterSystem-akka.remote.default-remote-
dispatcher-5] 
[akka.tcp://ClusterSystem@vm-euler-04:7887/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClusterSystem%40vm-euler-01%3A7887-3]
Association with remote system [akka.tcp://ClusterSystem@vm-euler-01:7887]
has failed, address is now gated for [5000] ms. Reason: [Disassociated]
...
[ERROR] [08/24/2017 12:33:00.078] [ClusterSystem-akka.remote.default-remote-
dispatcher-25] 
[akka.tcp://ClusterSystem@vm-euler-04:7887/system/endpointManager/reliableEndpointWriter-akka.tcp%3A%2F%2FClusterSystem%40vm-euler-03%3A7887-1/endpointWriter]
AssociationError [akka.tcp://ClusterSystem@vm-euler-04:7887] ->
[akka.tcp://ClusterSystem@vm-euler-03:7887]: Error [Invalid address:
akka.tcp://ClusterSystem@vm-euler-03:7887] [
akka.remote.InvalidAssociation: Invalid address: akka.tcp:
//ClusterSystem@vm-euler-03:7887
Caused by: akka.remote.transport.Transport$InvalidAssociationException:
The remote
system has quarantined this system. No further associations to the remote
system are possible until this system is restarted.
]



What puzzles me is, first, nodes gets connected at the very begging and
second, it start failing when 8 or more VM are created and launched. And
second, log information doesn't say much.

Is there any way to get more information about what is going on
here?(log level, trace, dump...)
Do I need special set up when it comes to use virtual machines? I mean,
starting up 40 nodes on the same cpu didn't got disconnected.

--
>> 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] Auto downing and Akka Cluster

2017-08-31 Thread KonradktosoMalawski
Igor, that’s basically the thing:

- “They merge” if you *don’t* DOWN, but things are stay in UNREACHABLE
then, which could be fine in your use case.
- If you DOWN, there’s no way back. You said you never want to talk to it
again, and we’re guaranteeing that.

Docs on the state transitions are here:
http://doc.akka.io/docs/akka/current/scala/common/cluster.html

This is not because we can’t implement leader election, but because it
would be against what this state was designed for – consistency.

The Akka Cluster is designed to guarantee consistency once it has DOWNed
nodes, otherwise yeah, some node would “come back”, but it has been doing
stuff all the time,
and unlike a database, it could have been *anything*. Thus thinking in the
same terms as a database node “re-joining” its cluster, about an Akka
Cluster is not a good idea -
a database can often more easily reconsile data of a “stray” node, because
holding data is the only thing they do.

(Even databases (cassandra) “down completely” nodes after some time of
unreachability and will not attempt to treat them as the same node if they
ever come back - these things happen over inactivity over multiple days,
and not the types of failures you talk about).

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 31 August 2017 at 18:24:51, Igor Baltiyskiy (ios...@gmail.com) wrote:

> given enough time any cluster of size N with auto-down will eventually
end up as N single-node clusters. It is thus not a sustainable strategy
unless you invest the manpower to constantly manually rebuild the cluster.

Do you mean that after the netsplit heals, clusters won't merge on their
own?

Theoretically, they could: once a leader node sees another node that thinks
that it is a leader, they elect a leader among themselves, and nodes from
the loser cluster leave that cluster and join the winner cluster. It's then
up to the individual features to be able to cope with that. For instance,
I'd expect Distributed Data to able to cope with that, since the ability
merge is the central idea of CRDT. On the other hand, Akka Persistence
won't be able to cope with that.

So the way I would use Cluster in this scenario is by not using features
that are not "AP" (Akka Persistence, probably Akka Singleton --- but see
question 3 in the original post), and instead using those that are ---
Distributed Data, cluster-aware routing. The idea is that netsplits do
happen, but they are transient, so most of the time the cluster operates as
a single whole; during netsplit, it can be broken into several clusters,
each of which will operate as before, but will need to merge once they
rejoin.

Of course, if clusters do not "merge" automatically, then it's a no-go. So
--- could you confirm that it is the case?

Regards
Igor

On Wednesday, August 30, 2017 at 9:33:16 PM UTC+3, rkuhn wrote:
>
> Another way of putting this is that given enough time any cluster of size
> N with auto-down will eventually end up as N single-node clusters. It is
> thus not a sustainable strategy unless you invest the manpower to
> constantly manually rebuild the cluster.
>
> Regards, Roland
>
> Sent from my iPhone
>
> On 30. Aug 2017, at 18:25, Justin du coeur  wrote:
>
> On Wed, Aug 30, 2017 at 11:24 AM, Igor Baltiyskiy 
> wrote:
>
>> I'd like to clarify the warning given in the documentation:
>>
>> > We recommend against using the auto-down feature of Akka Cluster in
>> production. This is crucial for correct behavior if you use Cluster
>> Singleton 
>> or Cluster Sharding
>> ,
>> especially together with Akka Persistence
>> . For Akka
>> Persistence with Cluster Sharding it can result in corrupt data in case of
>> network partitions.
>> (http://doc.akka.io/docs/akka/2.5/scala/cluster-usage.html#
>> auto-downing-do-not-use-)
>>
>> This passage raises several questions:
>>
>> 1. Does it mean that auto-downing is *always* a bad idea? Or is it only
>> a bad idea when using Cluster Singleton and Cluster Sharding, so that if
>> I'm not using them, using auto-downing in production is perfectly fine?
>>
>
> It's a more or less *guaranteed* disaster in the long run with Cluster
> Sharding; it's only a *likely* disaster without, depending on what your app
> is doing.  But personally, I think it should never, ever be used.
>
> Look at it this way: the problem with auto-down is that it is likely, in
> the long run, that you will eventually wind up in a Split Brain situation,
> with two or more disconnected clusters, each of which thinks that it is The
> One True Cluster and Source of Truth.  This will usually happen in a
> realistic network, due to the vagaries of network traffic and the
> fundamental dumbness of the auto-down algorithm.
>
> Now, ask yourself: if this is acceptable -- if it is okay to sometimes
> *not* be a

Re: [akka-user] Auto downing and Akka Cluster

2017-08-31 Thread KonradktosoMalawski
Let’s stick to Akka terminology as otherwise it gets confusing :-)

Simply put: there is no re-join. You simply never DOWN, the node will “come
back (from UNREACHABLE)” state, and things will just work - when using only
AP features such as DData.

Yeah, perhaps we could spell out that certain features value C or A over
the other, as indeed they are designed specifically to favour one more over
the other, I’ll ticketify this feedback - thanks :)

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 1 September 2017 at 01:42:48, Igor Baltiyskiy (ios...@gmail.com) wrote:

Thanks, Konrad, that clears things up for me! I indeed somehow missed the
idea that a downed node never comes back. Perhaps the docs on auto-downing
could stress this point.

> Thus thinking in the same terms as a database node “re-joining” its
cluster, about an Akka Cluster is not a good idea -
a database can often more easily reconsile data of a “stray” node, because
holding data is the only thing they do.

Well, looks like Distributed Data should be able to re-join nicely, right?
That was my point --- if I designed the application with re-joining in
mind, and avoiding features that break during re-joining, then I'd be fine.
So, roughly speaking, you might separate Akka features into the "CP" and
"AP" camp, with most things (Akka Cluster included) historically in the
"CP" one.

Thanks
Igor

On Thursday, August 31, 2017 at 12:38:05 PM UTC+3, Konrad Malawski wrote:
>
> Igor, that’s basically the thing:
>
> - “They merge” if you *don’t* DOWN, but things are stay in UNREACHABLE
> then, which could be fine in your use case.
> - If you DOWN, there’s no way back. You said you never want to talk to it
> again, and we’re guaranteeing that.
>
> Docs on the state transitions are here: http://doc.akka.io/docs/
> akka/current/scala/common/cluster.html
>
> This is not because we can’t implement leader election, but because it
> would be against what this state was designed for – consistency.
>
> The Akka Cluster is designed to guarantee consistency once it has DOWNed
> nodes, otherwise yeah, some node would “come back”, but it has been doing
> stuff all the time,
> and unlike a database, it could have been *anything*. Thus thinking in the
> same terms as a database node “re-joining” its cluster, about an Akka
> Cluster is not a good idea -
> a database can often more easily reconsile data of a “stray” node, because
> holding data is the only thing they do.
>
> (Even databases (cassandra) “down completely” nodes after some time of
> unreachability and will not attempt to treat them as the same node if they
> ever come back - these things happen over inactivity over multiple days,
> and not the types of failures you talk about).
>
> —
> Konrad `kto.so` Malawski
> Akka  @ Lightbend 
>
> On 31 August 2017 at 18:24:51, Igor Baltiyskiy (ios...@gmail.com) wrote:
>
> > given enough time any cluster of size N with auto-down will eventually
> end up as N single-node clusters. It is thus not a sustainable strategy
> unless you invest the manpower to constantly manually rebuild the cluster.
>
> Do you mean that after the netsplit heals, clusters won't merge on their
> own?
>
> Theoretically, they could: once a leader node sees another node that
> thinks that it is a leader, they elect a leader among themselves, and nodes
> from the loser cluster leave that cluster and join the winner cluster. It's
> then up to the individual features to be able to cope with that. For
> instance, I'd expect Distributed Data to able to cope with that, since the
> ability merge is the central idea of CRDT. On the other hand, Akka
> Persistence won't be able to cope with that.
>
> So the way I would use Cluster in this scenario is by not using features
> that are not "AP" (Akka Persistence, probably Akka Singleton --- but see
> question 3 in the original post), and instead using those that are ---
> Distributed Data, cluster-aware routing. The idea is that netsplits do
> happen, but they are transient, so most of the time the cluster operates as
> a single whole; during netsplit, it can be broken into several clusters,
> each of which will operate as before, but will need to merge once they
> rejoin.
>
> Of course, if clusters do not "merge" automatically, then it's a no-go. So
> --- could you confirm that it is the case?
>
> Regards
> Igor
>
> On Wednesday, August 30, 2017 at 9:33:16 PM UTC+3, rkuhn wrote:
>>
>> Another way of putting this is that given enough time any cluster of size
>> N with auto-down will eventually end up as N single-node clusters. It is
>> thus not a sustainable strategy unless you invest the manpower to
>> constantly manually rebuild the cluster.
>>
>> Regards, Roland
>>
>> Sent from my iPhone
>>
>> On 30. Aug 2017, at 18:25, Justin du coeur  wrote:
>>
>> On Wed, Aug 30, 2017 at 11:24 AM, Igor Baltiyskiy 
>> wrote:
>>
>>> I'd like to clarify the warning given in the documentation:
>>>
>>> 

Re: [akka-user] Problem of routing different java objects with same id to same actor

2017-08-31 Thread KonradktosoMalawski
For reference - cluster sharding can also be used on just a single node
(weird, but true ;-)).

It handles the situation well and also creates actors for ids that don’t
yet have an actor running etc.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 30 August 2017 at 22:19:50, Wei Guo (SH-LTS) (wei@hkfdt.com) wrote:



On Wednesday, August 30, 2017 at 8:33:00 PM UTC+8, Justin du coeur wrote:
>
> I'd recommend looking into Akka Cluster Sharding.  Even if you're not on a
> cluster, this is usually the most straightforward way to get messages
> routed consistently based on a key...
>
> On Wed, Aug 30, 2017 at 5:37 AM, Wei Guo (SH-LTS) 
> wrote:
>
>> Hi everyone,
>>
>> I'm a newbie for Akka, for load balance consideration, I created 5 actors
>> to handle the incoming requests, but one important requirement is that
>> different types of objects with same key(Symbol of Quote/Trade/RefData in
>> my code below) should be routed to same actor, after searching Akka doc, 
>> ConsistentHashingRoutingLogic
>> is a choice
>>
>> After running code with testing data, same type of objects were routed to
>> same actor, but for different types of objects(Quote,Trade, RefData with
>> same Symbol),  it doesn't work as i expected, they were routed to different
>> actors
>> eg:
>> Quote quote1,quote2;
>> quote1.setSymbol("001");// quote1 & quote2 were routed to
>> same actor(h0)-- no issue
>> quote2.setSymbol("001");
>>
>> Trade trade;
>> trade.setSymbol("001");  // trade was sent to different actor (h1)
>>  -- problem
>>
>> RefData refData;
>> refData.setSymbol("001");// refData was sent to different actor (h2)
>>   -- problem
>>
>> Can anyone provide any suggestion to route them into same actor ? Thanks
>> a lot.
>>
>> int nOfHisActor = 5;
>>
>> actorSystem = ActorSystem.create("lunar");
>> String[] pathArray = new String[nOfHisActor];
>> for (int i = 0; i < nOfHisActor; i++) {
>> String path = "h" + i;
>> pathArray[i] = "/user/" + path;
>> actorSystem.actorOf(Props.create(HisMarketDataActor.class), path);
>> }
>> List paths = Arrays.asList(pathArray);
>> hisInfoActor = actorSystem.actorOf(new 
>> ConsistentHashingGroup(paths).withHashMapper(o -> {
>> if (o instanceof Quote) {
>> return ((Quote) o).getSymbol();
>> } else if (o instanceof Trade) {
>> return ((Trade) o).getSymbol();
>> } else if (o instanceof RefData) {
>> return ((RefData) o).getSymbol();
>> }
>> return null;
>> }).props(), "price");
>>
>> --
>> >> 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.
>>
>
>
Thanks for your quick reply, Justin
In fact, the reason i use Akka here is just to replace the mode in our one
exiting Java-muti-thread project, I'll also look it Akka Cluster Sharding

And I just got an idea to solve this issue, I created the other object(with
key to save symbol, Object to save different type of class) to wrap these
different object, in each actor, parse each object with instanceof, which
solves my problem, event it is not good solution

// ConsistentHashingLogic

hisInfoActor = actorSystem.actorOf(new
ConsistentHashingGroup(paths).withHashMapper(o -> {
if (o instanceof ActorMessage) {
return ((ActorMessage) o).getKey();
}
return null;
}).props(), "price");



// new class to wrap these types of class

public ActorMessage(String symbol, Object object) {
this.key = symbol;
this.object = object;
}


// filter them in Actor

@Override
public Receive createReceive() {
return receiveBuilder().
match(ActorMessage.class, actorMessage ->
filterActorMessage(actorMessage)).
match(MarketSessionInfo.class, marketSessionInfo ->
onMarketSessionInfo(marketSessionInfo)).
build();
}

private void filterActorMessage(ActorMessage actorMessage) {
Object actorObj = actorMessage.getObject();
if (actorObj instanceof RefData) {
onRefData((RefData) actorObj);
} else if (actorObj instanceof Quote) {
onQuote((Quote) actorObj);
} else if (actorObj instanceof DataObject) {
onQuoteExt((DataObject) actorObj);
} else if (actorObj instanceof Trade) {
onTrade((Trade) actorObj);
}
}




--
>> Read the docs: http://akka.io/docs/
>> Check the FAQ:
http://doc.akka.io/docs/akka/current/additional/faq.html
>> Sea

Re: [akka-user] Source.fromFutureSource. Error handling and return type signature

2017-09-11 Thread KonradktosoMalawski
Hi there Victor,
That’s the “materialized value” type parameter: read the docs to learn more
about it:
-
http://doc.akka.io/docs/akka/current/scala/stream/stream-flows-and-basics.html#defining-and-running-streams
-
http://doc.akka.io/docs/akka/current/scala/stream/stream-composition.html#materialized-values

Basically it’s a well-typed mechanism for stream elements to expose control
or information mechanisms.
Read also the scaladoc of the operation you just posted, it explains what
the value is in this case.

Happy hakking

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 11 September 2017 at 18:33:01, Victor Caballero (vicaba.p...@gmail.com)
wrote:

Hello,

I am intrigued by the mechanisms in which errors/exceptions in the Future
wrapped by Source.fromFutureSource are handled or if they can even be
handled. Also, the type signature of the method is:

def fromFutureSource[T, M](future: Future[Graph[SourceShape[T], M]]):
Source[T, Future[M]]

I don't understand the return type: Source[T, Future[M]]. Can anyone
explain why is the Future here? What is the use of the second type
parameter of Source[T, M]? Which is usually NotUsed?

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.

-- 
>>  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 Persistence and avoiding var in favor of context.become

2017-09-14 Thread KonradktosoMalawski
Become “should" work AFAIR, though I’d recommend using Akka 2.5 (it’s
binary compatible with 2.4, so you can just upgrade it).
I could not find if we fixed anything about become in persistent Actors,
there were fixes but a very long time ago in 2.3..

I would recommend avoiding become with PersistentActors in general, it gets
very complex.

In the Akka Typed API we’re working on for Akka Persistence become will be
*the* way to handle things and it will not be as confusing in its inner
workings as it is now.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 15 September 2017 at 05:11:07, Curt Siffert (c...@keenworks.com) wrote:

Learning akka persistence, I was initially reluctant to use vars to capture
state since we generally try to avoid vars when possible.

But when experimenting with context.become(receiveBlock(stateParam)) inside
a receiveRecover implementation, it appeared to interfere with its ability
to stash other messages. (akka 2.4.20) It tried to handle normal messages
that it didn't try to handle when I wasn't using context.become.

Is it possible and reasonable to use context.become instead of var to
capture state using Akka Persistence? At first glance, it seems like the
interplay between receiveCommand and receiveRecover could get rather
tricky, especially if your actor has initialization behavior that changes
its receiveCommand behavior - for instance, initializing receiveCommand
with an empty collection to start, i.e.

def receiveCommand: Receive = initialReceive(List.empty)

Thanks,
Curt Siffert

--
>> 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 WebSockets with separate Sink and Source

2017-09-15 Thread KonradktosoMalawski
You seem to be logging on debug level there - are you sure your logging
configuration is such that it will log/print log statements?

On September 16, 2017 at 5:18:19, Jakub Janeček (janecek.ja...@gmail.com)
wrote:

> Hello,
>
> I am trying to implement a simple WebSockets server using akka-http with
> separate Sink and Source. According to the documentation I should be using
> the handleMessagesWithSinkSource method however if I do so I am not able to
> receive any Message. I am able to send some back to the client but nothing
> sent to the server is received. Could someone help me out and spot my
> mistake? I guess it will be something obvious.
>
> import akka.actor.ActorSystem
> import akka.http.scaladsl.Http
> import akka.http.scaladsl.Http.IncomingConnection
> import akka.http.scaladsl.model.HttpMethods.GET
> import akka.http.scaladsl.model.ws.{Message, TextMessage,
> UpgradeToWebSocket}
> import akka.http.scaladsl.model.{HttpRequest, HttpResponse, Uri}
> import akka.stream.ActorMaterializer
> import akka.stream.scaladsl.{Sink, Source}
> import com.typesafe.config.ConfigFactory
> import com.typesafe.scalalogging.StrictLogging
>
> import scala.concurrent.duration.Duration
> import scala.concurrent.{Await, ExecutionContextExecutor, Promise}
>
> object Main extends StrictLogging {
>
>   def main(args: Array[String]): Unit = {
> for {
>   config <- asResource(ConfigFactory.load())
>   system <- asResource(ActorSystem("system", config), Duration("10s"))
>   materializer <- asResource(ActorMaterializer()(system))
> } {
>   implicit val s: ActorSystem = system
>   implicit val m: ActorMaterializer = materializer
>   implicit val ec: ExecutionContextExecutor = system.dispatcher
>
>   val listenAddress = config.getString("listenAddress")
>   val listenPort = config.getInt("listenPort")
>   val server = Http().bind(listenAddress, listenPort)
>
>   val requestHandler: HttpRequest => HttpResponse = {
> case req @ HttpRequest(GET, Uri.Path("/websocket"), _, _, _) =>
>   req.header[UpgradeToWebSocket] match {
> case Some(upgrade) =>
>   logger.debug(s"Upgrading: $req")
>   val inHandler = Sink.foreach[Message](x =>
> logger.debug(s"$x"))
>   upgrade.handleMessagesWithSinkSource(inHandler,
> Source.single(TextMessage("hello")))
>
> case None => HttpResponse(400, entity = "Expected 'Upgrade:
> websocket' HTTP header")
>   }
>
> case req: HttpRequest =>
>   logger.debug(s"Unexpected: $req")
>   req.discardEntityBytes() // important to drain incoming HTTP
> Entity stream
>   HttpResponse(404, entity = "URL match not found")
>   }
>
>   val connectionHandler = Sink.foreach { connection:
> IncomingConnection =>
> logger.debug(s"Connection accepted from
> ${connection.remoteAddress}")
> connection.handleWithSyncHandler(requestHandler)
>   }
>
>   val binding = server.to(connectionHandler).run()
>   binding.failed.foreach { ex =>
> logger.error(s"Server could not be bound to
> $listenAddress:$listenPort", ex)
>   }
>
>   StdIn.readLine()
> }
>   }
>
> }
>
>
> Thank you. Regards,
> Jakub Janecek
>
> --
> >> 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] How do you use Flow.log() properly? ( http://doc.akka.io/japi/akka/current/akka/stream/javadsl/Flow.html#log-java.lang.String- )

2017-09-19 Thread KonradktosoMalawski
Did you include the akka-slf4j bridge
https://www.google.com/search?q=akka-slf4j
as documented http://doc.akka.io/docs/akka/2.5.4/scala/logging.html ?

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 20 September 2017 at 08:30:53, Bwmat (bwmat.reloa...@gmail.com) wrote:

I have the following code

public static void main(String[] args) throws InterruptedException
{
final Config configuration = ConfigFactory.load(ConfigFactory.
parseString(
"akka {" +
"  loggers = [\"akka.event.slf4j.Slf4jLogger\"]\r\n" +
"  loglevel = \"DEBUG\"\r\n" +
"  logging-filter = \"akka.event.slf4j.Slf4jLoggingFilter\"\r\n"
+
"}"));
final ActorSystem system = ActorSystem.create("QuickStart",
configuration);
final Materializer materializer = ActorMaterializer.create(system);

Source.single("hello").via(Flow.of(String.class).log("Hello")).
runWith(Sink.ignore(), materializer);
Thread.sleep(1000);
}

I'm using the 'simple' (
www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html ) binding for slf4j.
When I run the program, I see only one log line printed:

QuickStart-akka.actor.default-dispatcher-2] INFO akka.event.slf4j.
Slf4jLogger - Slf4jLogger started

I expect to see more, what am I missing? I'm very new to slf4j & logging in
akka/akka-streams

Thanks,
Matthew w.
--
>> 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] How do you use Flow.log() properly? ( http://doc.akka.io/japi/akka/current/akka/stream/javadsl/Flow.html#log-java.lang.String- )

2017-09-19 Thread KonradktosoMalawski
Please post full examples when trying to debug such things ;-)
I have to guess that you didn’t configure the actual logger.
Yet you did configure the logging filter, so things will try to use the
loggers config, but there is none, so empty.

Works: http://github.com/ktoso/akka-logging-example

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 20 September 2017 at 08:30:53, Bwmat (bwmat.reloa...@gmail.com) wrote:

I have the following code

public static void main(String[] args) throws InterruptedException
{
final Config configuration = ConfigFactory.load(ConfigFactory.
parseString(
"akka {" +
"  loggers = [\"akka.event.slf4j.Slf4jLogger\"]\r\n" +
"  loglevel = \"DEBUG\"\r\n" +
"  logging-filter = \"akka.event.slf4j.Slf4jLoggingFilter\"\r\n"
+
"}"));
final ActorSystem system = ActorSystem.create("QuickStart",
configuration);
final Materializer materializer = ActorMaterializer.create(system);

Source.single("hello").via(Flow.of(String.class).log("Hello")).
runWith(Sink.ignore(), materializer);
Thread.sleep(1000);
}

I'm using the 'simple' (
www.slf4j.org/apidocs/org/slf4j/impl/SimpleLogger.html ) binding for slf4j.
When I run the program, I see only one log line printed:

QuickStart-akka.actor.default-dispatcher-2] INFO akka.event.slf4j.
Slf4jLogger - Slf4jLogger started

I expect to see more, what am I missing? I'm very new to slf4j & logging in
akka/akka-streams

Thanks,
Matthew w.
--
>> 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] Getting last message from Kafka

2017-09-20 Thread KonradktosoMalawski
Same as in “normal” Kafka, you’d have to know the offset I guess.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 21 September 2017 at 06:36:17, Zlatko Josic (zlatko.jo...@gmail.com)
wrote:

Hi,

Can I get last published message on Kafka's topic using akka stream kafka
API ?

Zlaja
--
>> 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] Question about how Akka streams handles exceptions

2017-09-20 Thread KonradktosoMalawski
It all depends on exactly what operations you’re doing… Please share a
minimised reproducer so we could advice.
Error handling works as documented and is “forward propagated” through a
stream, and operators are free to handle it in any way they want.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 20 September 2017 at 11:49:58, Bwmat (bwmat.reloa...@gmail.com) wrote:

I'm doing a PoC in akka streams, and I just had to track down a case where
the mapping functor in an instance of Flow.map() threw an exception. This
seems to simply close the stream, but _not_ report it anywhere. Other
stages were getting completed implicitly because of it, but the error
didn't seem to propagate.

The end of my graph was a SinkQueueWithCancel created with Sink.queue(),
and I had a thread blocked in a call to
sinkQueue.pull().toCompletableFuture().get(). I would have expected the
graph's failure to cause this to throw?

Also, I had logging set up as described in
https://groups.google.com/forum/#!topic/akka-user/rJHu7C8D3KQ , but I
didn't see any messages about an uncaught exception, which I would have
expected. (makes me think even more that I messed up the configuration
somehow?)

Thanks,
Matthew w.
--
>> 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] Re: Where to download installer for latest Akka for Windows?

2017-09-21 Thread KonradktosoMalawski
The dependencies are listed here: http://akka.io/docs/
Please use some form or widely accepted built tool, like sbt, gradle or
maven to build akka projects.

If you really insist on downloading jar files, you can do so directly via
searching maven central http://search.maven.org/#search|ga|1|akka-actor_2.12




—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 22 September 2017 at 15:20:20, Johan Andrén (johan.and...@typesafe.com)
wrote:

Hi,

We do not build a zip with all artifacts anymore as they are all published
to Maven central.

The "normal" way of using the library is through a build tool such as
Maven, SBT or Gradle that will handle downloading the artefacts for you.

--
Johan
Akka Team

On Friday, September 22, 2017 at 8:11:57 AM UTC+2, axy...@gmail.com wrote:
>
> Hello ...  This is dumb, but after an hour of Googling™ around, I cannot
> find any Windows install file for the latest Akka (for Scala), which
> appears to be 2.5.4 .  If there's a link to it on the release announcement
>   http://akka.io/blog/news/2017/08/10/akka-2.5.4-released  then I'm
> missing it.  I'm coming back to Akka after a while, my old installer was
>  akka_2.11-2.4.1.zip  from late 2015.
>
> Thanks!!
>
> --
>> 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 memory leak suspect

2017-09-25 Thread KonradktosoMalawski
What are you doing in the app ;-)
Sounds to me like you’re starting tons of things that are never stopped.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 25 September 2017 at 17:38:57, Bartosz Jankiewicz (
bartosz.jankiew...@gmail.com) wrote:

I have been running an app with Akka Http 1.0.9.

It had only single endpoint respoding with JSON. The service returned the
value as future therefore I used onComlete semantics.

The app was consistently running into OoM issues. Heap dump analysis has
led me to 1,536,693 instances of akka.actor.ActorCell. Along with
accompanying objects (scala.collection.immutable.RedBlackTree$BlackTree)
 it saturated the heap. All ActorCell objects seem to be related to
Akka-Streams - their names are: StreamSupervisor-xx

Has anyone fallen into a similar issue?
--
>> 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 memory leak suspect

2017-09-25 Thread KonradktosoMalawski
Please share a reproducer if you indeed think it’s a leak in here.
Investigate *which* cells are, and *what* they contain; very likely it’s
not “akka leaks”, but somewhere you’re starting and not stopping things.

—
Konrad `kto.so` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 25 September 2017 at 19:34:16, Bartosz Jankiewicz (
bartosz.jankiew...@gmail.com) wrote:

Precisely - I simplified the solution to eliminate all possible causes. As
mentioned, I don't use actors anywhere except for this endpoint and
instances of ActorCell pollute the heap. I've tried profiling and the
observation is the same.

On Mon, 25 Sep 2017 at 12:29 Konrad Malawski 
wrote:

> This code seems unlikely to be the cause, likely somewhere else - run your
> app while profiling to find the leak.
>
> On Mon, Sep 25, 2017 at 7:26 PM, Bartosz Jankiewicz <
> bartosz.jankiew...@gmail.com> wrote:
>
>> Indeed, this is what it looks like :)
>>
>> The only place where I use actors is in Akka Http routes. The service I'm
>> using returns a future. The only clue I had was that the Future results
>> returned from my service never evaluate could cause the stream workers to
>> stack. But in such case I should also spot large number of Future objects
>> on the heap but I don't observe that.
>>
>> def campaign(): Route =
>> path("campaign") {
>>   get {
>> withRequestTimeout(1 second) {
>>   parameters('cookieId, 'ip, 'debug.?) { (cookieId, ip, debug) =>
>> val verbose = debug match {
>>   case Some("missingCampaigns") => true
>>   case _ => false
>> }
>> val resultF: Future[EvaluationResult] =
>> Free.liftF(EvaluateCampaign(cookieId, ip, verbose))
>>   .foldMap(evaluationService)
>> onSuccess(resultF) { result =>
>>   complete(result)
>> }
>>   }
>> }
>>   }
>> }
>>
>>
>>
>>
>> On Monday, 25 September 2017 11:01:08 UTC+2, Konrad Malawski wrote:
>>>
>>> What are you doing in the app ;-)
>>> Sounds to me like you’re starting tons of things that are never stopped.
>>>
>>> —
>>> Konrad `kto.so` Malawski
>>> Akka <http://akka.io> @ Lightbend <http://lightbend.com>
>>>
>>> On 25 September 2017 at 17:38:57, Bartosz Jankiewicz (
>>> bartosz.j...@gmail.com) wrote:
>>>
>>> I have been running an app with Akka Http 1.0.9.
>>>
>>> It had only single endpoint respoding with JSON. The service returned
>>> the value as future therefore I used onComlete semantics.
>>>
>>> The app was consistently running into OoM issues. Heap dump analysis has
>>> led me to 1,536,693 instances of akka.actor.ActorCell. Along with
>>> accompanying objects (scala.collection.immutable.RedBlackTree$BlackTree)
>>>  it saturated the heap. All ActorCell objects seem to be related to
>>> Akka-Streams - their names are: StreamSupervisor-xx
>>>
>>> Has anyone fallen into a similar issue?
>>> --
>>> >>>>>>>>>> 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.
>

Re: [akka-user] Akka Stream - Framing silently swallows exceptions?

2017-09-25 Thread KonradktosoMalawski
On 26 September 2017 at 10:47:44, Fabio Tiriticco (fabio.eur...@gmail.com)
wrote:

Hi all,
I noticed that the Framing flow of Akka Streams tends to stop the stream
without letting the outer world know. In essence, the stream just stops and
supervision is not triggered.

It propagates errors through the stream, as defined by the reactive-streams
spec as well as documented in the docs.

http://doc.akka.io/docs/akka/2.5.4/scala/general/stream/stream-design.html#the-difference-between-error-and-failure


Error handling examples are documented here, and I think we should add
.log() as an example there which I’ll do now:
http://doc.akka.io/docs/akka/2.5.4/scala/stream/stream-error.html (first
sentence)


I agree though that it can be confusing to newcomers to streaming
libraries, and there is a ticket about it
https://github.com/akka/akka/issues/23501 feel free to read through and
comment or provide a PR if you’d like to help getting this shipped.


The details of my findings are here:
https://stackoverflow.com/questions/46319846/akka-streams-framing-exceptions-silently-swallowed-how-to-debug

This link does not work.


Is this behaviour desired? I am either missing something or this seems to
make the system a little less reactive ;)

It is desired. Failures are propagated *through* the stream, and if you
want to log things, do so using the log() element, as as in my proposal
above, terminal stages or an option are currently being considered to
enable more verbose logging.

In practice logging at every stage that is failing would be overly verbose,
and we’ve had this in the past, where stream tear-down would cause users to
panic, while the tear-down was expected and completely fine.


I would like to ask you to refrain from such sarcasm when asking for help,
as a) this has nothing to do with something being reactive or not and b)
I’m not sure being sarcastic will help you receive the help you’re asking
for in a public forum. Being polite will get you more help, and make this a
nicer space to collaborate in, thanks.


—
Konrad `kto.so` 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.


Re: [akka-user] Stopping of PersistentActor

2017-09-26 Thread KonradktosoMalawski
Don’t use PoisonPill, but your protocol level messages to signal “plz
stop”, which is best practice anyway,

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 26 September 2017 at 17:25:43, Yaroslav Klymko (t3h...@gmail.com) wrote:

Hi Guys,

Do I understand correctly that there is high chance to have events
persisted without handlers performed if persistent actor stopped?

ref ! cmd
  journal ! WriteMessages
ref ! PoisonPill
  deadLetters <- WriteMessagesSuccess


Is it intendant? Are there any plans to fix or improve this ?

--
>> 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] Stopping of PersistentActor

2017-09-26 Thread KonradktosoMalawski
Sure Konrad, that's more like an example.

The example is very specific, and not the recommended way.

But even using own custom message and then calling context.stop will give
similar effect.

No, it’s different since it’s not an auto handled message.

You can do whatever you want in response to your own message;

Looks like there is no standard mechanism to stop actor gracefully without
loosing side effects.

Not sure what you mean by "loosing side effects”, that’s what they are;

If you want you can “store them somewhere”, but without context what you
mean specifically there’s no way to advice more specifically, could you
elaborate what your case is?


—
Konrad `kto.so` 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.


Re: [akka-user] Anyone can take a look at http://doc.akka.io/ ? it is down

2017-09-26 Thread KonradktosoMalawski
Thanks for reporting (and numerous others via twitter ;-)).

We’re aware of the issue, and have fixed it for now.

We’ll investigate some more though.
The vm hosting the docs got corrupted and stopped being able to serve the
docs.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 27 September 2017 at 10:38:35, Jing Xiao (jing.xiao...@gmail.com) wrote:

It has been down for a while.
--
>> 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] Why does Flow.mapConcat() need an Iterable, vs. an Iterator?

2017-09-26 Thread KonradktosoMalawski
Are multiple iterators ever needed to be requested from it?

I'm kind of tempted to do
Flow.>create().mapConcat(iter -> new Iterable() {
@Override
public Iterator iterator()
{
return iter;
}}).grouped(chunkSize).map(list -> list.iterator())


That’s what “multiple materializations of the same stream pipeline” are, so
yes.

If returning the same iterator is what you want there then feel free to do
so; It means though that if you start 2 streams using a part of that
mapConcat would end up accessing the same iterator potentially concurrently.

— Konrad

-- 
>>  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] Is there an Akka stream mapAsync equivalent for yielding a Source?

2017-09-27 Thread KonradktosoMalawski
flatMapConcat / flatmapMerge ;-)

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 28 September 2017 at 15:28:49, Christopher Hunt (hunt...@gmail.com)
wrote:

Hey everyone,

Given that mapAsync yields a Future, I was looking for a similar type of
stage that yields a Source instead. My goal is to direct the flow's input
to an in-process actor and then have that actor feedback its reply as a
Source (the reply is most certainly a stream).

Thanks for any guidance.

Kind regards,
Christopher
--
>> 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] Tunning default dispatcher seems to have no effect

2017-09-28 Thread KonradktosoMalawski
This is now how a fork-join pool works basically.

Please read the docs about managing blocking:
https://doc.akka.io/docs/akka/2.5/scala/dispatchers.html#blocking-needs-careful-management

Tuning the default dispatcher like you’re attempting to here would not have
a positive effect by the way.
Please simply separate blocking or other behaviours on a different
dispatcher, make it a thread-pool one etc.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 28 September 2017 at 17:35:19, Kilic Ali-Firat (kilic.alifi...@gmail.com)
wrote:

Scala version : 2.11.7
Akka version : 2.4.17

-

Hi Akka Team,

I'm writing an Akka application using Akka Cluster, Akka Actors and Akka
Stream. I have a cluster of 3 nodes : 2 workers and 1 node consuming data
from a source.

I want three configs files : application.conf, node.worker.conf and
node.source.conf. I limit the scope of this message to application.conf and
node.worker.conf.

Below you can find the content of node.worker.conf and application.conf :

akka.cluster.roles = [workers]


akka {
  loglevel = "INFO"
  loglevel = ${?FGS_AKKA_LOG_LEVEL}

  actor {
provider = "akka.cluster.ClusterActorRefProvider"

default-dispatcher {
  # This will be used if you have set "executor = "fork-join-executor""
  fork-join-executor {
# Min number of threads to cap factor-based parallelism number to
parallelism-min = 1

# The parallelism factor is used to determine thread pool size
using the
# following formula: ceil(available processors * factor). Resulting
size
# is then bounded by the parallelism-min and parallelism-max values.
parallelism-factor = 1

# Max number of threads to cap factor-based parallelism number to
parallelism-max = 8
  }
  throughput = 1024
}

  }


  remote {
enabled-transports = ["akka.remote.netty.tcp"]
netty.tcp {
  hostname = ${clustering.node-ip}
  port = ${clustering.node-port}




  bind-hostname = "0.0.0.0"
  bind-port = ${clustering.node-port}
}
  }


  cluster {
seed-nodes =
  [
"akka.tcp://"${clustering.cluster.name}"@"${clustering.fst-seed-node
-ip}":"${clustering.fst-seed-node-port}
"akka.tcp://"${clustering.cluster.name}"@"${clustering.snd-seed-node
-ip}":"${clustering.snd-seed-node-port}
  ]
  }
}


clustering {
  # Choose the same need port for the seed nodes. Seed nodes must be on
  # different machines.
  fst-seed-node-port = 2551
  fst-seed-node-port = ${?FGS_FIRST_SEED_NODE_PORT}

  snd-seed-node-port = 2552
  snd-seed-node-port = ${?FGS_SECOND_SEED_NODE_PORT}

  fst-seed-node-ip="localhost"
  fst-seed-node-ip=${?FGS_FIRST_SEED_NODE_IP}

  snd-seed-node-ip="localhost"
  snd-seed-node-ip=${?FGS_SECOND_SEED_NODE_IP}


//  Must be the public IP
  node-ip = ${?FGS_CLUSTER_NODE_IP}
  node-port = ${?FGS_CLUSTER_NODE_PORT}
  cluster.name = "FGS"
}


I tried to tune some settings of my default-dispatcher : I want to limit
the number of threads in the thread pool to 8. My laptop has 8 cores, this
is why I put the parallelism-factor to 1.0

But looking with jvisualm the number allocated threads, I got more than
expected (I attached a screenshot). When I expected to have only 8 threads,
I get it 21.

This is how I create my ActorSystem :

val akkaConfig = ConfigFactory.load()


  val actorSystemConfig =
(ConfigFactory parseResources "node.worker.conf")
.withFallback(akkaConfig)
.resolve()




lazy val actorSystemName = akkaConfig getString clusterNamePath


implicit val system = ActorSystem(actorSystemName, actorSystemConfig)

Am I wrong when creating my Actor System ?
--
>> 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] Re: GraphStageActor and ActorGraphInterpreter

2017-09-28 Thread KonradktosoMalawski
This is explained in this blog post:
https://akka.io/blog/2016/07/06/threading-and-concurrency-in-akka-streams-explained
and the docs:
https://doc.akka.io/docs/akka/current/scala/stream/stream-parallelism.html#pipelining-and-parallelism


Thanks for sharing your repo, I think it’s a bit weird to guide beginners
to raw sockets and raw actors and responding with raw http messages in
strings onto sockets… I would rather recommend exposing people to the
simple quickstart:
http://developer.lightbend.com/guides/akka-http-quickstart-scala/

Hope this helps

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 29 September 2017 at 02:09:49, Unmesh Joshi (unmeshjo...@gmail.com)
wrote:

Thanks, this makes it clear.
Btw, one thing I am trying to understand is, when will be the stream not
'fused'?  When 'async' boundaries are inserted?

On a separate note, I am trying to create a very thin slice through Akka
HTTP, Akka Streams, Akka IO and Java NIO. A very simple Http server which
handles only GET requests to return Hello World response. The aim is to
give developers minimal executable code (< 20) to look at and experiment
with to understand Akka Streams, Http and Akka IO.

I am hoping to improve it with some documentation. Please let me know if
you think this will be helpful.
https://github.com/unmeshjoshi/reactiveio



On Thursday, 28 September 2017 17:25:33 UTC+5:30, johannes...@lightbend.com
wrote:
>
> Correct, it will limit parallelism. I usually see the streams
> infrastructure more as a control channel that makes sure that data flows
> correctly. These kind of control things shouldn't require much overall CPU
> share so it should not matter so much. If you want to do CPU-intensive work
> you need to decide where and how to run it anyway (run it asynchronously
> with `mapAsync`, insert extra async boundaries in the stream, use extra
> dispatchers, etc).
>
> In the end, the streams infrastructure introduces "just another" layer of
> CPU scheduling infrastructure into what you have anyways:
>
>  * OS thread scheduler
>  * Fork-Join-Pool task scheduler
>  * Actor mailbox
>  * and now the GraphInterpreter event execution queue
>
> The latter ones are not preemptive which can lead to thread starvation
> issues when threads (or ActorGraphInterpreters) are blocked. Also fairness
> can be an issue. An ActorGraphInterpreter has a mailbox but also an
> internal queue, the mailbox has a throughput setting which defines how long
> to work on messages before allowing other actors to do other work.
> Similarly the GraphInterpreter has an "event horizon" which is basically
> the same but for stream signals.
>
> Regarding Akka HTTP, this should not be a problem because data traffic on
> a single HTTP connection is usually pretty linear: first a request needs to
> be parsed, then it needs to be handled, then the response needs to be sent
> out. All of those happen one after each other. But you are right that e.g.
> for HTTP/2 things can be different. On the other hand, introducing extra
> asynchronous boundaries for parallelism has a cost, and often it is better
> to spent that cost on the big picture, e.g. parallelize over multiple
> connections instead of processing within a single connection.
>
> There's a related tricky question whether we should surround all user code
> with async boundaries to avoid unexpected deadlocks.-
>
> Johannes
>
>
> On Thursday, September 28, 2017 at 1:37:22 PM UTC+2, Unmesh Joshi wrote:
>>
>> Yeah. I meant ActorRef for GraphStage. My only question then is, if
>> messages to all the GraphStage Actors get serialized to
>> ActorGraphInterpreter,  will that potentially limit the possible parallel
>> execution? e.g. If HttpRequestParserStage and HttpResponseRendererStage
>> both receive actor messages, they will get executed sequentially where it
>> was potentially possible to handle them in parallel.  Its hard to say how
>> much of benefit this gives, but conceptually, thinking of each graph stage
>> as a separate actor is simpler as opposed to thinking of a graph of stages
>> backed by an Actor.
>>
>> On Thursday, 28 September 2017 15:59:53 UTC+5:30,
>> johannes...@lightbend.com wrote:
>>>
>>> Hi Unmesh,
>>>
>>> On Wednesday, September 27, 2017 at 3:01:24 PM UTC+2, Unmesh Joshi
>>> wrote:

 I was trying to go through the code to understand how GraphStages
 receive actor messages. I see that GraphStageActor is a actor not created
 like normal actors. I looks like all the messages to GraphStageActors are
 wrapped in AsyncInput and passed to ActorGraphInterpreter. This means
 messages to all the graph stages will essentially be executed by a single
 ActorGraphInterpreter actor. Is this understanding true? If so, is there is
 any specific reason for create GraphStageActor the way it is?

>>>
>>> I guess you mean the ActorRef created when calling `getStageActor` in a
>>> GraphStage. Yes, your understanding is correct here. The basic re

Re: [akka-user] [akka-streams] Shared Materializer in akka extensions

2017-09-29 Thread KonradktosoMalawski
Have users pass it in ;)

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 30 September 2017 at 10:04:48, Jeff (jknight12...@gmail.com) wrote:

I am building an akka extension, but there doesn't seem to be an elegant
way to pass in a shared Materializer. What would be the suggested way to
use a shared materializer between akka extensions and the main application?
--
>> 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-streams] Shared Materializer in akka extensions

2017-09-29 Thread KonradktosoMalawski
When they use it;

def use(...)(implicit m: Materializer)

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 30 September 2017 at 11:18:16, Jeff (jknight12...@gmail.com) wrote:

How, exactly. You only have access to an ExtendedActorSystem inside of
createExtension()

-- 
>> 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-streams] Shared Materializer in akka extensions

2017-09-29 Thread KonradktosoMalawski
Again: what are you building? ;-)
It’s very hard to provide answers if you don’t provide context.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 30 September 2017 at 11:23:19, Jeff (jknight12...@gmail.com) wrote:

That's what I was leaning towards as well, since materialzers are fairly
lightweight. However, I've seen that statement prefaced with, "...right
now" so I wanted to make sure there wasn't some other way to share.

-- 
>> 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-streams] Shared Materializer in akka extensions

2017-09-29 Thread KonradktosoMalawski
So rather unlikely people will want access to your materialiser there.
The sharing of materializer is most important for lifecycle - killing a
materializer kills all streams it hosts,
so in your case it’s unlikely you want to bind your streams to random other
people’s streams lifecycles.

I suggest you have a separate separate materializer in the extension.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 30 September 2017 at 11:29:15, Jeff (jknight12...@gmail.com) wrote:

A Consul like service discovery client built on top of akka-http

-- 
>> 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 Cluster with different seed node sequence

2017-10-04 Thread KonradktosoMalawski
Hi Prateek,
No, this is a misunderstanding of how seed-nodes work.

The first node in that list MUST be the same node if using the seed-nodes
process.

What you did by making each node have it’s own address as the first in
their seed node list is form 3 independent clusters.
This works as intended; The first node in this list must be the same on all
nodes, only for the need of consistency of the initial cluster creation.

A node which sees “oh, I’m the first node in the seed nodes list” will join
“itself” and form the cluster.
This is why the first node in the list is special. The other’s order does
not matter; The first one has to be the same though.


—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 4 October 2017 at 11:08:31, prateek singhal (prateek.itm...@gmail.com)
wrote:

Hi,

As per the documentation under cluster seed nodes (https://doc.akka.io/docs/
akka/2.5.4/scala/cluster-usage.html#joining-to-seed-nodes), We can start
seed node in any sequence, but the node configured as the first element in
seed-nodes configuration list must be started when initially starting a
cluster.

In my case I have 3 servers with following seed-codes configuration

Server A : (host1:2552)
akka.cluster.seed-nodes = ["akka.tcp://ClusterSystem@host1:2552",
"akka.tcp://ClusterSystem@host2:2552", "akka.tcp://ClusterSystem@host3:2552"
]

Server B : (host2:2552)
akka.cluster.seed-nodes = ["akka.tcp://ClusterSystem@host2:2552",
"akka.tcp://ClusterSystem@host3:2552", "akka.tcp://ClusterSystem@host1:2552"
]

Server C  : (host3:2552)
akka.cluster.seed-nodes = ["akka.tcp://ClusterSystem@host3:2552",
"akka.tcp://ClusterSystem@host1:2552", "akka.tcp://ClusterSystem@host2:2552"
]


First element of seed-nodes list of each server is its own address, In this
way i don't have to start particular server first when initially starting a
cluster, I can start any of the 3 server of seed-node list in any order
irrespective of which one is first element.

Configuration for rest of the node in cluster:
Server D : (host4:2552)
akka.cluster.seed-nodes = ["akka.tcp://ClusterSystem@host1:2552",
"akka.tcp://ClusterSystem@host2:2552", "akka.tcp://ClusterSystem@host3:2552"
]

Is above configuration and understanding is correct or it will create
different cluster island.

Thanks,
--
>> 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] Changed osgi.ee requirement in Akka 2.5.6

2017-10-07 Thread KonradktosoMalawski
Hi there,
Its not an intended change as far as I can see.
Could you open a ticket please? ( GitHub.com/Akka/Akka )

We’ve been upgrading plugins to enable publishing with jdk9 recently so
something must have happened to abt-Osgi during that

On October 7, 2017 at 8:16:40, Oliver Heger (oheg...@gmail.com) wrote:

> Hi,
>
> I am using Akka in an OSGi environment with Apache Felix. After updating
> from version 2.5.4 to 2.5.6, the bundles can no longer be resolved due to a
> change in the osgi.ee requirement. I get the following error message:
>
> org.osgi.framework.BundleException: Unable to resolve
> com.typesafe.akka.actor [5](R 5.0): missing requirement
> [com.typesafe.akka.actor [5](R 5.0)] osgi.ee; 
> (&(osgi.ee=JavaSE)(version=1.8.0_141))
> Unresolved requirements: [[com.typesafe.akka.actor [5](R 5.0)] osgi.ee;
> (&(osgi.ee=JavaSE)(version=1.8.0_141))]
>
> Note the very specific version number 1.8.0_141. Earlier versions of Akka
> required the more generic version 1.8. Obviously, my OSGi framework cannot
> deal with this specific requirement out of the box.
>
> Was this an intended change?
>
> Thanks
> Oliver
>
> --
> >> 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] yourkit CPU ignore list

2017-10-10 Thread KonradktosoMalawski
ForkJoin noice mostly – people sometimes panic about ForkJoinPool#scan
specifically (which shows up when there’s nothing to do, so it spins
looking for work).


—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 10 October 2017 at 18:47:37, Sam Halliday (sam.halli...@gmail.com) wrote:

Hi all,

Yourkit's CPU profiler has the ability to hide classes / symbols.

There is typically a lot of CPU noise when profiling an akka application
(Thread.sleep, ForkJoinPool, etc etc), does anybody have a good "ignore
list" of methods that shouldn't matter?

Best regards,
Sam
--
>> 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] yourkit CPU ignore list

2017-10-10 Thread KonradktosoMalawski
Well, it’s stream materialization, it takes time, you may want to know ;)

—
Konrad `kto.so` Malawski
Akka <http://akka.io> @ Lightbend <http://lightbend.com>

On 10 October 2017 at 19:32:21, Sam Halliday (sam.halli...@gmail.com) wrote:

What about PhasedFusingActorMaterializer.materialize? Or does that
indicate a problem with the way play is setup?



On 10 October 2017 at 10:49, Konrad “ktoso” Malawski
 wrote:
> ForkJoin noice mostly – people sometimes panic about ForkJoinPool#scan
> specifically (which shows up when there’s nothing to do, so it spins
looking
> for work).
>
>
> —
> Konrad `kto.so` Malawski
> Akka @ Lightbend
>
> On 10 October 2017 at 18:47:37, Sam Halliday (sam.halli...@gmail.com)
wrote:
>
> Hi all,
>
> Yourkit's CPU profiler has the ability to hide classes / symbols.
>
> There is typically a lot of CPU noise when profiling an akka application
> (Thread.sleep, ForkJoinPool, etc etc), does anybody have a good "ignore
> list" of methods that shouldn't matter?
>
> Best regards,
> Sam
> --
>>>>>>>>>>> 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] Uncaught error from thread - ContentType$WithMissingCharset

2017-10-10 Thread KonradktosoMalawski
The exception is pretty clear about something being wrong with dependencies:

> java.lang.NoClassDefFoundError:
akka/http/scaladsl/model/ContentType$WithMissingCharset

How do you configure this project?
What’s your dependencies / build file / build system?

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 11 October 2017 at 10:02:49, bordec...@gmail.com (bordec...@gmail.com)
wrote:

Hello,

I'm receiving below exception in my application , *It is still showing me
the result once though* and application crashes :
This is my code : This failing at *complete :*

Can someone help me on this :


val resFuture = requests.map(x => (getFutureResp(req)))




 I'm making `complete` on the above resFuture onComplete event.

///


def getFutureResp(req: HttpRequest)  = {

  val responseFuture =
Source.single(Http().singleRequest(req)).runWith(Sink.head).flatMap{
resultFuture => checkRespEntity(resultFuture)
  }

  responseFuture

}


futureFlags

}


def checkRespEntity(responseFuture: Future[HttpResponse]):
Future[Option[Int]] = {

  val futureFlags : Future[Option[Int]] = responseFuture.flatMap {
res =>
  res.status match {
case StatusCodes.OK =>
  Unmarshal(res.entity).to[String] map {
info =>
  info.length
  }
  else {
res.entity.dataBytes.runWith(Sink.ignore)

None
  }
  }

case _ =>  {
  res.entity.dataBytes.runWith(Sink.ignore)
  Future{ None }
}
  }

}


*Uncaught error from thread [myactor-akka.actor.default-dispatcher-5]
shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for
ActorSystem[myactor]*
*java.lang.NoClassDefFoundError:
akka/http/scaladsl/model/ContentType$WithMissingCharset*
*at
akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$2(Marshal.scala:51)*
*at scala.Option.flatMap(Option.scala:171)*
*at
akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$1(Marshal.scala:50)*
*at akka.http.scaladsl.util.FastFuture$.$anonfun$map$1(FastFuture.scala:23)*
*at
akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)*
*at
akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)*
*at akka.http.scaladsl.util.FastFuture$.map$extension(FastFuture.scala:23)*
*at akka.http.scaladsl.marshalling.Marshal.toResponseFor(Marshal.scala:42)*
*at
akka.http.scaladsl.marshalling.ToResponseMarshallable.apply(ToResponseMarshallable.scala:17)*
*at
akka.http.scaladsl.marshalling.ToResponseMarshallable.apply$(ToResponseMarshallable.scala:16)*
*at
akka.http.scaladsl.marshalling.ToResponseMarshallable$$anon$1.apply(ToResponseMarshallable.scala:22)*
*at
akka.http.scaladsl.server.RequestContextImpl.complete(RequestContextImpl.scala:42)*
*at
akka.http.scaladsl.server.directives.RouteDirectives.$anonfun$complete$1(RouteDirectives.scala:47)*
*at
akka.http.scaladsl.server.StandardRoute$$anon$1.apply(StandardRoute.scala:19)*
*at
akka.http.scaladsl.server.StandardRoute$$anon$1.apply(StandardRoute.scala:19)*
*at
akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWith$2(BasicDirectives.scala:67)*
*at
akka.http.scaladsl.server.directives.ExecutionDirectives.handle$1(ExecutionDirectives.scala:51)*
*at
akka.http.scaladsl.server.directives.ExecutionDirectives.$anonfun$handleRejections$4(ExecutionDirectives.scala:60)*
*at
akka.http.scaladsl.server.directives.BasicDirectives$$anonfun$recoverRejectionsWith$1.applyOrElse(BasicDirectives.scala:91)*
*at
akka.http.scaladsl.server.directives.BasicDirectives$$anonfun$recoverRejectionsWith$1.applyOrElse(BasicDirectives.scala:91)*
*at
akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWithPF$1(BasicDirectives.scala:79)*
*at
akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)*
*at
akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)*
*at
akka.http.scaladsl.util.FastFuture$.flatMap$extension(FastFuture.scala:26)*
*at
akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWith$2(BasicDirectives.scala:67)*
*at
akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$textract$2(BasicDirectives.scala:154)*
*at
akka.http.scaladsl.server.directives.ExecutionDirectives.$anonfun$handleExceptions$2(ExecutionDirectives.scala:32)*
*at
akka.http.scaladsl.server.Route$.$anonfun$asyncHandler$1(Route.scala:79)*
*at akka.stream.impl.fusing.MapAsync$$anon$23.onPush(Ops.scala:1172)*
*at
akka.stream.impl.fusing.GraphInterpreter.processPush(GraphInterpreter.scala:499)*
*at
akka.stream.impl.fusing.GraphInterpreter.processEvent(GraphInterpreter.scala:462)*
*at
akka.stream.impl.fusing.GraphInterpreter.execute(GraphInterpreter.scala:368)*
*at
akka.stream.impl.fusing.GraphInterpreterShell.runBatch(ActorGraphInterpreter.scala:571)*
*at
akka.stream.impl.fusing.GraphInterpreterShell$AsyncInput.execute(ActorGraphI

Re: [akka-user] Uncaught error from thread - ContentType$WithMissingCharset

2017-10-10 Thread KonradktosoMalawski
Actually depend on akka-http 10.0.10 and akka 2.5.6 ;-)

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 11 October 2017 at 10:15:34, bordec...@gmail.com (bordec...@gmail.com)
wrote:

Thanks for quick reply, Konrad.

Actually, I'm using - these json parsing dependencies in Gradle.

compile group: 'org.json4s', name: 'json4s-native_2.12', version: '3.2.11'
compile group: 'org.json4s', name: 'json4s-jackson_2.12', version: '3.5.0.RC1'
compile group: 'de.heikoseeberger', name: 'akka-http-json4s_2.12',
version: '1.17.0'


And, I modified the function actually, where I'm using
*jackson.parseJson(info)* like this -

Unmarshal(res.entity).to[String] map {
info =>
  jackson.parseJson(info).children.length

Am I doing something wrong here?  or something wrong in Parsing using
*json4s*?

Regards,
Aditya Borde


On Tuesday, October 10, 2017 at 9:04:22 PM UTC-4, Konrad Malawski wrote:
>
> The exception is pretty clear about something being wrong with
> dependencies:
>
> > java.lang.NoClassDefFoundError: akka/http/scaladsl/model/
> ContentType$WithMissingCharset
>
> How do you configure this project?
> What’s your dependencies / build file / build system?
>
> —
> Konrad `kto.so` Malawski
> Akka  @ Lightbend 
>
> On 11 October 2017 at 10:02:49, bord...@gmail.com (bord...@gmail.com)
> wrote:
>
> Hello,
>
> I'm receiving below exception in my application , *It is still showing me
> the result once though* and application crashes :
> This is my code : This failing at *complete :*
>
> Can someone help me on this :
>
>
> val resFuture = requests.map(x => (getFutureResp(req)))
>
>
> 
>
>  I'm making `complete` on the above resFuture onComplete event.
>
> ///
>
>
> def getFutureResp(req: HttpRequest)  = {
>
>   val responseFuture = 
> Source.single(Http().singleRequest(req)).runWith(Sink.head).flatMap{
> resultFuture => checkRespEntity(resultFuture)
>   }
>
>   responseFuture
>
> }
>
>
> futureFlags
>
> }
>
>
> def checkRespEntity(responseFuture: Future[HttpResponse]): 
> Future[Option[Int]] = {
>
>   val futureFlags : Future[Option[Int]] = responseFuture.flatMap {
> res =>
>   res.status match {
> case StatusCodes.OK =>
>   Unmarshal(res.entity).to[String] map {
> info =>
>   info.length
>   }
>   else {
> res.entity.dataBytes.runWith(Sink.ignore)
>
> None
>   }
>   }
>
> case _ =>  {
>   res.entity.dataBytes.runWith(Sink.ignore)
>   Future{ None }
> }
>   }
>
> }
>
>
> *Uncaught error from thread [myactor-akka.actor.default-dispatcher-5]
> shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for
> ActorSystem[myactor]*
> *java.lang.NoClassDefFoundError:
> akka/http/scaladsl/model/ContentType$WithMissingCharset*
> *at
> akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$2(Marshal.scala:51)*
> *at scala.Option.flatMap(Option.scala:171)*
> *at
> akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$1(Marshal.scala:50)*
> *at
> akka.http.scaladsl.util.FastFuture$.$anonfun$map$1(FastFuture.scala:23)*
> *at
> akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)*
> *at
> akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)*
> *at akka.http.scaladsl.util.FastFuture$.map$extension(FastFuture.scala:23)*
> *at akka.http.scaladsl.marshalling.Marshal.toResponseFor(Marshal.scala:42)*
> *at
> akka.http.scaladsl.marshalling.ToResponseMarshallable.apply(ToResponseMarshallable.scala:17)*
> *at
> akka.http.scaladsl.marshalling.ToResponseMarshallable.apply$(ToResponseMarshallable.scala:16)*
> *at
> akka.http.scaladsl.marshalling.ToResponseMarshallable$$anon$1.apply(ToResponseMarshallable.scala:22)*
> *at
> akka.http.scaladsl.server.RequestContextImpl.complete(RequestContextImpl.scala:42)*
> *at
> akka.http.scaladsl.server.directives.RouteDirectives.$anonfun$complete$1(RouteDirectives.scala:47)*
> *at
> akka.http.scaladsl.server.StandardRoute$$anon$1.apply(StandardRoute.scala:19)*
> *at
> akka.http.scaladsl.server.StandardRoute$$anon$1.apply(StandardRoute.scala:19)*
> *at
> akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWith$2(BasicDirectives.scala:67)*
> *at
> akka.http.scaladsl.server.directives.ExecutionDirectives.handle$1(ExecutionDirectives.scala:51)*
> *at
> akka.http.scaladsl.server.directives.ExecutionDirectives.$anonfun$handleRejections$4(ExecutionDirectives.scala:60)*
> *at
> akka.http.scaladsl.server.directives.BasicDirectives$$anonfun$recoverRejectionsWith$1.applyOrElse(BasicDirectives.scala:91)*
> *at
> akka.http.scaladsl.server.directives.BasicDirectives$$anonfun$recoverRejectionsWith$1.applyOrElse(BasicDirectives.scala:91)*
> *at
> akka.http.scaladsl.server.directives.BasicDirectives.$anonfun$mapRouteResultWithPF$1(BasicDirectives.scala

Re: [akka-user] Uncaught error from thread - ContentType$WithMissingCharset

2017-10-10 Thread KonradktosoMalawski
Weird indeed;

With regards to versions, please always use the latest - esp when reporting
issues like this.
Please try 10.0.10 and 2.5.6 as I suggested above.

Can you post a reproducer (repository) where we could reproduce this?

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 11 October 2017 at 10:22:19, bordec...@gmail.com (bordec...@gmail.com)
wrote:

Ok. I'm currently using
akkaHttp: "10.0.7", akka: "2.5.2". Is there an issue? Or What packages I
should be using?




On Tuesday, October 10, 2017 at 9:17:49 PM UTC-4, Konrad Malawski wrote:
>
> Actually depend on akka-http 10.0.10 and akka 2.5.6 ;-)
>
> —
> Konrad `kto.so` Malawski
> Akka  @ Lightbend 
>
> On 11 October 2017 at 10:15:34, bord...@gmail.com (bord...@gmail.com)
> wrote:
>
> Thanks for quick reply, Konrad.
>
> Actually, I'm using - these json parsing dependencies in Gradle.
>
> compile group: 'org.json4s', name: 'json4s-native_2.12', version: '3.2.11'
> compile group: 'org.json4s', name: 'json4s-jackson_2.12', version: '3.5.0.RC1'
> compile group: 'de.heikoseeberger', name: 'akka-http-json4s_2.12', version: 
> '1.17.0'
>
>
> And, I modified the function actually, where I'm using
> *jackson.parseJson(info)* like this -
>
> Unmarshal(res.entity).to[String] map {
> info =>
>   jackson.parseJson(info).children.length
>
> Am I doing something wrong here?  or something wrong in Parsing using
> *json4s*?
>
> Regards,
> Aditya Borde
>
>
> On Tuesday, October 10, 2017 at 9:04:22 PM UTC-4, Konrad Malawski wrote:
>>
>> The exception is pretty clear about something being wrong with
>> dependencies:
>>
>> > java.lang.NoClassDefFoundError: akka/http/scaladsl/model/
>> ContentType$WithMissingCharset
>>
>> How do you configure this project?
>> What’s your dependencies / build file / build system?
>>
>> —
>> Konrad `kto.so` Malawski
>> Akka  @ Lightbend 
>>
>> On 11 October 2017 at 10:02:49, bord...@gmail.com (bord...@gmail.com)
>> wrote:
>>
>> Hello,
>>
>> I'm receiving below exception in my application , *It is still showing
>> me the result once though* and application crashes :
>> This is my code : This failing at *complete :*
>>
>> Can someone help me on this :
>>
>>
>> val resFuture = requests.map(x => (getFutureResp(req)))
>>
>>
>> 
>>
>>  I'm making `complete` on the above resFuture onComplete event.
>>
>> ///
>>
>>
>> def getFutureResp(req: HttpRequest)  = {
>>
>>   val responseFuture = 
>> Source.single(Http().singleRequest(req)).runWith(Sink.head).flatMap{
>> resultFuture => checkRespEntity(resultFuture)
>>   }
>>
>>   responseFuture
>>
>> }
>>
>>
>> futureFlags
>>
>> }
>>
>>
>> def checkRespEntity(responseFuture: Future[HttpResponse]): 
>> Future[Option[Int]] = {
>>
>>   val futureFlags : Future[Option[Int]] = responseFuture.flatMap {
>> res =>
>>   res.status match {
>> case StatusCodes.OK =>
>>   Unmarshal(res.entity).to[String] map {
>> info =>
>>   info.length
>>   }
>>   else {
>> res.entity.dataBytes.runWith(Sink.ignore)
>>
>> None
>>   }
>>   }
>>
>> case _ =>  {
>>   res.entity.dataBytes.runWith(Sink.ignore)
>>   Future{ None }
>> }
>>   }
>>
>> }
>>
>>
>> *Uncaught error from thread [myactor-akka.actor.default-dispatcher-5]
>> shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for
>> ActorSystem[myactor]*
>> *java.lang.NoClassDefFoundError:
>> akka/http/scaladsl/model/ContentType$WithMissingCharset*
>> *at
>> akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$2(Marshal.scala:51)*
>> *at scala.Option.flatMap(Option.scala:171)*
>> *at
>> akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$1(Marshal.scala:50)*
>> *at
>> akka.http.scaladsl.util.FastFuture$.$anonfun$map$1(FastFuture.scala:23)*
>> *at
>> akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)*
>> *at
>> akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)*
>> *at
>> akka.http.scaladsl.util.FastFuture$.map$extension(FastFuture.scala:23)*
>> *at
>> akka.http.scaladsl.marshalling.Marshal.toResponseFor(Marshal.scala:42)*
>> *at
>> akka.http.scaladsl.marshalling.ToResponseMarshallable.apply(ToResponseMarshallable.scala:17)*
>> *at
>> akka.http.scaladsl.marshalling.ToResponseMarshallable.apply$(ToResponseMarshallable.scala:16)*
>> *at
>> akka.http.scaladsl.marshalling.ToResponseMarshallable$$anon$1.apply(ToResponseMarshallable.scala:22)*
>> *at
>> akka.http.scaladsl.server.RequestContextImpl.complete(RequestContextImpl.scala:42)*
>> *at
>> akka.http.scaladsl.server.directives.RouteDirectives.$anonfun$complete$1(RouteDirectives.scala:47)*
>> *at
>> akka.http.scaladsl.server.StandardRoute$$anon$1.apply(StandardRoute.scala:19)*
>> *at
>> akka.http.scaladsl.server.StandardRoute$$an

Re: [akka-user] [akka-http] Virtual hosts

2017-10-10 Thread KonradktosoMalawski
What’s the actual use case?

By itself no.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 11 October 2017 at 14:44:59, Slowaner (turchaninov.nik...@gmail.com)
wrote:

Is there any feature to bind many virtual hosts at one interface with same
listening IP and Port?
--
>> 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] Virtual hosts

2017-10-10 Thread KonradktosoMalawski
Simply Http().bind two times given the same routes ;)

Though in reality people would hide akka-http behind ngnix or something
similar and do the tls things there very often.

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 11 October 2017 at 15:10:34, Slowaner (turchaninov.nik...@gmail.com)
wrote:

I need two different sites at one machine with default listening ports.
I can extract requested domain name from RequestContext and configure
routes with extracted value. The problem is how configure different SSL
certificates for different domains?

среда, 11 октября 2017 г., 13:45:38 UTC+8 пользователь Konrad Malawski
написал:
>
> What’s the actual use case?
>
> By itself no.
>
> —
> Konrad `kto.so` Malawski
> Akka  @ Lightbend 
>
> On 11 October 2017 at 14:44:59, Slowaner (turchanin...@gmail.com) wrote:
>
> Is there any feature to bind many virtual hosts at one interface with same
> listening IP and Port?
> --
> >> 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.

-- 
>>  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] Uncaught error from thread - ContentType$WithMissingCharset

2017-10-11 Thread KonradktosoMalawski
Happy hakking, cheers :)

—
Konrad `kto.so` Malawski
Akka  @ Lightbend 

On 12 October 2017 at 00:27:11, bordec...@gmail.com (bordec...@gmail.com)
wrote:

Hi Konrad,

I think, the above VERSIONS resolved my issue. Thank you very much for the
response. I tested my code and it is working now.
(I'm working for a company so, hard to share the code.)


Regards,
Aditya Borde

On Wednesday, October 11, 2017 at 12:00:40 AM UTC-4, Konrad Malawski wrote:
>
> Weird indeed;
>
> With regards to versions, please always use the latest - esp when
> reporting issues like this.
> Please try 10.0.10 and 2.5.6 as I suggested above.
>
> Can you post a reproducer (repository) where we could reproduce this?
>
> —
> Konrad `kto.so` Malawski
> Akka  @ Lightbend 
>
> On 11 October 2017 at 10:22:19, bord...@gmail.com (bord...@gmail.com)
> wrote:
>
> Ok. I'm currently using
> akkaHttp: "10.0.7", akka: "2.5.2". Is there an issue? Or What packages I
> should be using?
>
>
>
>
> On Tuesday, October 10, 2017 at 9:17:49 PM UTC-4, Konrad Malawski wrote:
>>
>> Actually depend on akka-http 10.0.10 and akka 2.5.6 ;-)
>>
>> —
>> Konrad `kto.so` Malawski
>> Akka  @ Lightbend 
>>
>> On 11 October 2017 at 10:15:34, bord...@gmail.com (bord...@gmail.com)
>> wrote:
>>
>> Thanks for quick reply, Konrad.
>>
>> Actually, I'm using - these json parsing dependencies in Gradle.
>>
>> compile group: 'org.json4s', name: 'json4s-native_2.12', version: '3.2.11'
>> compile group: 'org.json4s', name: 'json4s-jackson_2.12', version: 
>> '3.5.0.RC1'
>> compile group: 'de.heikoseeberger', name: 'akka-http-json4s_2.12', version: 
>> '1.17.0'
>>
>>
>> And, I modified the function actually, where I'm using
>> *jackson.parseJson(info)* like this -
>>
>> Unmarshal(res.entity).to[String] map {
>> info =>
>>   jackson.parseJson(info).children.length
>>
>> Am I doing something wrong here?  or something wrong in Parsing using
>> *json4s*?
>>
>> Regards,
>> Aditya Borde
>>
>>
>> On Tuesday, October 10, 2017 at 9:04:22 PM UTC-4, Konrad Malawski wrote:
>>>
>>> The exception is pretty clear about something being wrong with
>>> dependencies:
>>>
>>> > java.lang.NoClassDefFoundError: akka/http/scaladsl/model/
>>> ContentType$WithMissingCharset
>>>
>>> How do you configure this project?
>>> What’s your dependencies / build file / build system?
>>>
>>> —
>>> Konrad `kto.so` Malawski
>>> Akka  @ Lightbend 
>>>
>>> On 11 October 2017 at 10:02:49, bord...@gmail.com (bord...@gmail.com)
>>> wrote:
>>>
>>> Hello,
>>>
>>> I'm receiving below exception in my application , *It is still showing
>>> me the result once though* and application crashes :
>>> This is my code : This failing at *complete :*
>>>
>>> Can someone help me on this :
>>>
>>>
>>> val resFuture = requests.map(x => (getFutureResp(req)))
>>>
>>>
>>> 
>>>
>>>  I'm making `complete` on the above resFuture onComplete event.
>>>
>>> ///
>>>
>>>
>>> def getFutureResp(req: HttpRequest)  = {
>>>
>>>   val responseFuture = 
>>> Source.single(Http().singleRequest(req)).runWith(Sink.head).flatMap{
>>> resultFuture => checkRespEntity(resultFuture)
>>>   }
>>>
>>>   responseFuture
>>>
>>> }
>>>
>>>
>>> futureFlags
>>>
>>> }
>>>
>>>
>>> def checkRespEntity(responseFuture: Future[HttpResponse]): 
>>> Future[Option[Int]] = {
>>>
>>>   val futureFlags : Future[Option[Int]] = responseFuture.flatMap {
>>> res =>
>>>   res.status match {
>>> case StatusCodes.OK =>
>>>   Unmarshal(res.entity).to[String] map {
>>> info =>
>>>   info.length
>>>   }
>>>   else {
>>> res.entity.dataBytes.runWith(Sink.ignore)
>>>
>>> None
>>>   }
>>>   }
>>>
>>> case _ =>  {
>>>   res.entity.dataBytes.runWith(Sink.ignore)
>>>   Future{ None }
>>> }
>>>   }
>>>
>>> }
>>>
>>>
>>> *Uncaught error from thread [myactor-akka.actor.default-dispatcher-5]
>>> shutting down JVM since 'akka.jvm-exit-on-fatal-error' is enabled for
>>> ActorSystem[myactor]*
>>> *java.lang.NoClassDefFoundError:
>>> akka/http/scaladsl/model/ContentType$WithMissingCharset*
>>> *at
>>> akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$2(Marshal.scala:51)*
>>> *at scala.Option.flatMap(Option.scala:171)*
>>> *at
>>> akka.http.scaladsl.marshalling.Marshal.$anonfun$toResponseFor$1(Marshal.scala:50)*
>>> *at
>>> akka.http.scaladsl.util.FastFuture$.$anonfun$map$1(FastFuture.scala:23)*
>>> *at
>>> akka.http.scaladsl.util.FastFuture$.strictTransform$1(FastFuture.scala:41)*
>>> *at
>>> akka.http.scaladsl.util.FastFuture$.transformWith$extension1(FastFuture.scala:45)*
>>> *at
>>> akka.http.scaladsl.util.FastFuture$.map$extension(FastFuture.scala:23)*
>>> *at
>>> akka.http.scaladsl.marshalling.Marshal.toResponseFor(Marshal.scala:42)*
>>> *a

Re: [akka-user] Implements CRDTs conters more than 100 000

2017-10-12 Thread KonradktosoMalawski
It’s as the docs explain:

It is not intended for *Big Data*. The number of top level entries should
not exceed 10. When a new node is added to the cluster all these
entries are transferred (gossiped) to the new node. The entries are split
up in chunks and all existing nodes collaborate in the gossip, but it will
take a while (tens of seconds) to transfer all entries and this means that
you cannot have too many top level entries. The current recommended limit
is 10. We will be able to improve this if needed, but the design is
still not intended for billions of entries.
It depends on your data architecture though.
Are you sure it would be 1 million actual top level entries?

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

On October 12, 2017 at 21:24:37, Hsnamed (hsna...@gmail.com) wrote:

Hello, how can i implement 1 million CRDTs counters to use akka without big
disadvantage ?

I have a big tree of business objects each of them contain counter and
threshold when threshold reach then object change its state.

Tree have more than 1 million objects. Does it possible to implements using
akka ?

Thanks for advices.

--
>> 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] Re: Spray->Akka-Http Migration - seeing high 99th percentile latencies post-migration

2017-10-17 Thread KonradktosoMalawski
Short lived connections are slightly more costly in Akka-HTTP than in
Spray, due to the streaming infrastructure.

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

On October 17, 2017 at 9:48:20, Gary Malouf (malouf.g...@gmail.com) wrote:

Hi Konrad,

Understand your point - not really possible to share code on a
closed-source project.  I'm more asking if akka-http does not handle
short-lived connections very well yet as opposed to how spray handled
them.  I will be profiling in the mean-time trying to get to the bottom of
the issue.

Gary

On Thursday, October 12, 2017 at 8:44:55 PM UTC-4, Konrad Malawski wrote:
>
> When asking about performance and benchmarks always include specific
> numbers, code, and benchmark methodology otherwise it’s just guessing and
> inventing numbers and reasons.
>
> Thanks
>
> --
> Konrad Malawski
>
> On October 13, 2017 at 5:36:06, Gary Malouf (malou...@gmail.com) wrote:
>
>> To be clear, 95th percentile and down are as low as before so wondering
>> if this is a new connection closing penalty being paid or if the actor
>> system needs to be tuned differently now...
>>
>> On Thursday, October 12, 2017 at 4:31:14 PM UTC-4, Gary Malouf wrote:
>>>
>>> We have a web service that we just finished migrating from spray 1.3 to
>>> Akka-Http 10.0.9.  While in most cases it is performing well, we are seeing
>>> terrible 99th percentile latencies 300-450ms range) starting from a very
>>> low request rate (10/second) on an ec2 m3.large.
>>>
>>> Our service does not do anything complicated - it does a few Map lookups
>>> and returns a response to a request.  In spray, even 99th percentile
>>> latencies were on the order of 1-3 ms, so we are definitely concerned.
>>> Connections as with many pixel-type servers are short-lived -> we actually
>>> pass the Connection: Close header intentionally in our responses.
>>>
>>> Is there any obvious tuning that should be done on the server
>>> configuration that others have found?
>>>
>> --
>> >> 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.

-- 
>>  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] Spray->Akka-Http Migration - seeing high 99th percentile latencies post-migration

2017-10-17 Thread KonradktosoMalawski
Step 1 – don’t panic ;-)
Step 2 – as I already asked for, please share actual details of the
benchmarks. It is not good to discuss benchmarks without any insight into
what / how exactly you’re measuring.

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

On October 12, 2017 at 15:31:19, Gary Malouf (malouf.g...@gmail.com) wrote:

We have a web service that we just finished migrating from spray 1.3 to
Akka-Http 10.0.9.  While in most cases it is performing well, we are seeing
terrible 99th percentile latencies 300-450ms range) starting from a very
low request rate (10/second) on an ec2 m3.large.

Our service does not do anything complicated - it does a few Map lookups
and returns a response to a request.  In spray, even 99th percentile
latencies were on the order of 1-3 ms, so we are definitely concerned.
Connections as with many pixel-type servers are short-lived -> we actually
pass the Connection: Close header intentionally in our responses.

Is there any obvious tuning that should be done on the server configuration
that others have found?
--
>> 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] Complete generate a null value in akka-http

2017-10-20 Thread KonradktosoMalawski
Don’t return null in scala code, that’s very not-scala-style.
Instead you could return empty things, or best rather even to throw an
exception and make your handler
https://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/exception-handling.html
make
it into a not found response.

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

On October 20, 2017 at 15:15:42, Samuel Heredia (heredia.sam...@gmail.com)
wrote:

Hi! , I have a Route where if a function finds a data in the DB responds a
value of type Json,
when it does not find the value it responds with null and therefore the
complete responds null.
I want to validate this so that it does not respond null, but a String that
says: "Not found", this is my route, any help? Thanks

val route = pathPrefix("auth") {
  path("signIn") {
pathEndOrSingleSlash {
  post {
entity(as[LoginPassword]) { loginPassword =>
  val a = signIn(loginPassword.login,
loginPassword.password).map(_.asJson)
   if(signIn(loginPassword.login,
loginPassword.password).map(_.asJson) == null){
 complete(states.map(_.asJson))
   }else {
 def getObject : Option[Any] =
Option(signIn(loginPassword.login,
loginPassword.password).map(_.asJson))
 val ahh = signIn(loginPassword.login,
loginPassword.password).map(_.asJson)
 if(getObject.isEmpty || getObject == null){ ///NOT FOUND
   complete("Not Found")
 }else {
   complete(complete(signIn(loginPassword.login,
loginPassword.password).map(_.asJson))
 }
 //complete(signIn(loginPassword.login,
loginPassword.password).map(_.asJson))
   }
}
  }
}
  }


--
>> 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] No shutDown on Materializer

2017-10-23 Thread KonradktosoMalawski
Hi Richard,
Saying that “using Materializer” will cause leaks is somewhat of a weird
phrasing, since that sounds just like “using ActorSystem can cause leaks” —
well sure, just like “using objects can cause leaks” :-)

Let’s step back and analyse where your colleague’s statement came from, and
perhaps how/why the misinterpretation happened.

I see someone really enjoyed Colin’s awesome talk about streams and actors
there :-)
// Likely the best talk about those two and how they fit together I’ve seen
by the way.
// You may want to read his blog
http://blog.colinbreck.com/integrating-akka-streams-and-akka-actors-part-ii/

In his talk he explains the lifecycle differences between creating an
ActorMaterializer from an ActorSystem,
vs. creating an ActorMaterializer from an ActorContext. Note that both are
possible, since they are both ActorRefFactories.

The ActorMaterializer’s lifecycle is bound to the ActorRefFactory that it
was created from.

In other words:
1) ActorMaterializer created from ActorSystem
  - will terminate all its streams if the ActorSystem terminates
2) ActorMaterializer created from ActorContext
  - will terminate all its streams if THAT actor terminates

It’s not that one is a leak and the other one isn’t.
It’s that the 1st case is good for long lived streams, and such that should
out-live an Actor if it was started in one.
Say, this is good for persistence query, or akka http, or some shared
stream many other parts of your system rely on.
The 2nd case is a good choice if the stream and actor are inherently
related to one another - say, the stream relates to some “user”, and the
actor that started that stream is also “the user”, so if the actor dies we
should also kill the stream.

Hope this clarifies things.

I also submitted a documentation improvement about it right now, so please
see here:
https://github.com/akka/akka/pull/23836

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

On October 24, 2017 at 8:04:10, Richard Rodseth (rrods...@gmail.com) wrote:

I just heard from someone who attended a talk at Reactive Summit that you
can leak resources if you are restarting a stream within a host actor, and
not shutting down the materializer.

I've written most of the stream creation logic and messages using
Materializer, not ActorMaterializer, and I see that the shutdown method is
only on ActorMaterializer.

Easy enough to change my types, but I was curious if this was a considered
decision.
--
>> 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] No shutDown on Materializer

2017-10-23 Thread KonradktosoMalawski
Adding the shutdown method to the interface you mean?
I guess it could be considered, please open a ticket.
Technically it would be breaking to do so, but materializers are somewhat
special “internal” one might say.

-- 
Cheers,
Konrad 'ktoso <http://kto.so>' Malawski
Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>

On October 24, 2017 at 14:20:41, Richard Rodseth (rrods...@gmail.com) wrote:

Hi Konrad. I don't believe I used that phrase, but thanks for elaborating.
I will digest what you wrote and discuss it.
Any thoughts on having a lifecycle method on Materializer vs
ActorMaterializer?

On Mon, Oct 23, 2017 at 7:39 PM, Konrad “ktoso” Malawski <
konrad.malaw...@lightbend.com> wrote:

> Hi Richard,
> Saying that “using Materializer” will cause leaks is somewhat of a weird
> phrasing, since that sounds just like “using ActorSystem can cause leaks” —
> well sure, just like “using objects can cause leaks” :-)
>
> Let’s step back and analyse where your colleague’s statement came from,
> and perhaps how/why the misinterpretation happened.
>
> I see someone really enjoyed Colin’s awesome talk about streams and actors
> there :-)
> // Likely the best talk about those two and how they fit together I’ve
> seen by the way.
> // You may want to read his blog http://blog.colinbreck.
> com/integrating-akka-streams-and-akka-actors-part-ii/
> In his talk he explains the lifecycle differences between creating an
> ActorMaterializer from an ActorSystem,
> vs. creating an ActorMaterializer from an ActorContext. Note that both are
> possible, since they are both ActorRefFactories.
>
> The ActorMaterializer’s lifecycle is bound to the ActorRefFactory that it
> was created from.
>
> In other words:
> 1) ActorMaterializer created from ActorSystem
>   - will terminate all its streams if the ActorSystem terminates
> 2) ActorMaterializer created from ActorContext
>   - will terminate all its streams if THAT actor terminates
>
> It’s not that one is a leak and the other one isn’t.
> It’s that the 1st case is good for long lived streams, and such that
> should out-live an Actor if it was started in one.
> Say, this is good for persistence query, or akka http, or some shared
> stream many other parts of your system rely on.
> The 2nd case is a good choice if the stream and actor are inherently
> related to one another - say, the stream relates to some “user”, and the
> actor that started that stream is also “the user”, so if the actor dies we
> should also kill the stream.
>
> Hope this clarifies things.
>
> I also submitted a documentation improvement about it right now, so please
> see here:
> https://github.com/akka/akka/pull/23836
>
> --
> Cheers,
> Konrad 'ktoso <http://kto.so>' Malawski
> Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>
>
> On October 24, 2017 at 8:04:10, Richard Rodseth (rrods...@gmail.com)
> wrote:
>
> I just heard from someone who attended a talk at Reactive Summit that you
> can leak resources if you are restarting a stream within a host actor, and
> not shutting down the materializer.
>
> I've written most of the stream creation logic and messages using
> Materializer, not ActorMaterializer, and I see that the shutdown method is
> only on ActorMaterializer.
>
> Easy enough to change my types, but I was curious if this was a considered
> decision.
> --
> >>>>>>>>>> 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] No shutDown on Materializer

2017-10-23 Thread KonradktosoMalawski
Thanks Richard, sorry if I misread the phrasing you used, read it before
coffee time… :)
Hope the explanation helps though.

-- 
Cheers,
Konrad 'ktoso <http://kto.so>' Malawski
Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>

On October 24, 2017 at 14:34:07, Richard Rodseth (rrods...@gmail.com) wrote:

Here you go

https://github.com/akka/akka/issues/23837



On Mon, Oct 23, 2017 at 10:22 PM, Konrad “ktoso” Malawski <
konrad.malaw...@lightbend.com> wrote:

> Adding the shutdown method to the interface you mean?
> I guess it could be considered, please open a ticket.
> Technically it would be breaking to do so, but materializers are somewhat
> special “internal” one might say.
>
> --
> Cheers,
> Konrad 'ktoso <http://kto.so>' Malawski
> Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>
>
> On October 24, 2017 at 14:20:41, Richard Rodseth (rrods...@gmail.com)
> wrote:
>
> Hi Konrad. I don't believe I used that phrase, but thanks for elaborating.
> I will digest what you wrote and discuss it.
> Any thoughts on having a lifecycle method on Materializer vs
> ActorMaterializer?
>
> On Mon, Oct 23, 2017 at 7:39 PM, Konrad “ktoso” Malawski <
> konrad.malaw...@lightbend.com> wrote:
>
>> Hi Richard,
>> Saying that “using Materializer” will cause leaks is somewhat of a weird
>> phrasing, since that sounds just like “using ActorSystem can cause leaks” —
>> well sure, just like “using objects can cause leaks” :-)
>>
>> Let’s step back and analyse where your colleague’s statement came from,
>> and perhaps how/why the misinterpretation happened.
>>
>> I see someone really enjoyed Colin’s awesome talk about streams and
>> actors there :-)
>> // Likely the best talk about those two and how they fit together I’ve
>> seen by the way.
>> // You may want to read his blog http://blog.colinbreck.co
>> m/integrating-akka-streams-and-akka-actors-part-ii/
>> In his talk he explains the lifecycle differences between creating an
>> ActorMaterializer from an ActorSystem,
>> vs. creating an ActorMaterializer from an ActorContext. Note that both
>> are possible, since they are both ActorRefFactories.
>>
>> The ActorMaterializer’s lifecycle is bound to the ActorRefFactory that it
>> was created from.
>>
>> In other words:
>> 1) ActorMaterializer created from ActorSystem
>>   - will terminate all its streams if the ActorSystem terminates
>> 2) ActorMaterializer created from ActorContext
>>   - will terminate all its streams if THAT actor terminates
>>
>> It’s not that one is a leak and the other one isn’t.
>> It’s that the 1st case is good for long lived streams, and such that
>> should out-live an Actor if it was started in one.
>> Say, this is good for persistence query, or akka http, or some shared
>> stream many other parts of your system rely on.
>> The 2nd case is a good choice if the stream and actor are inherently
>> related to one another - say, the stream relates to some “user”, and the
>> actor that started that stream is also “the user”, so if the actor dies we
>> should also kill the stream.
>>
>> Hope this clarifies things.
>>
>> I also submitted a documentation improvement about it right now, so
>> please see here:
>> https://github.com/akka/akka/pull/23836
>>
>> --
>> Cheers,
>> Konrad 'ktoso <http://kto.so>' Malawski
>> Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>
>>
>> On October 24, 2017 at 8:04:10, Richard Rodseth (rrods...@gmail.com)
>> wrote:
>>
>> I just heard from someone who attended a talk at Reactive Summit that you
>> can leak resources if you are restarting a stream within a host actor, and
>> not shutting down the materializer.
>>
>> I've written most of the stream creation logic and messages using
>> Materializer, not ActorMaterializer, and I see that the shutdown method is
>> only on ActorMaterializer.
>>
>> Easy enough to change my types, but I was curious if this was a
>> considered decision.
>> --
>> >>>>>>>>>> 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

Re: [akka-user] Akka TCP and Slow Start Restart

2017-10-24 Thread KonradktosoMalawski
That’s one of the reasons the new remoting is Aeron (and thus UDP, with
TCP-like delivery semantics) based… :-)

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

On October 24, 2017 at 3:59:30, Alan McSherry (alanmcshe...@gmail.com)
wrote:

One of the building blocks of TCP is "slow start" and "slow start restart"


https://hpbn.co/building-blocks-of-tcp/#slow-start

In particular for bursty applications "slow start restart" could be
hampering the performance of an Akka app by not using the full bandwidth
available at the time of the 'bursty' traffic.

(I do not have any evidence that this is an issue for my scenario, it's
still in the design stage.)


1. Anyone got links to case studies of this effect in their app? (Either
related to Akka TCP or Akka in general)

2. Are there any settings or machinery in Akka under the hood that directly
effect this "slow start restart"?

I'm trying to determine is this a known handled thing or something we know
about and accept or something we don't need to worry about because I've
misunderstood it?

Much thanks for reading!

Alan.




--
>> 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 TCP and Slow Start Restart

2017-10-24 Thread KonradktosoMalawski
What do you mean exactly?
Switch to using Artery (the “new” remoting)? You could, sure.

Just remember that it’s not encrypted so going over internet may be a bad
idea if it has secure data.
We’re working on a TLS-ed version of Artery, but it would likely be over
TCP again.

Though we know it should be faster than the previous implementation in any
case.

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

On October 24, 2017 at 3:59:30, Alan McSherry (alanmcshe...@gmail.com)
wrote:

One of the building blocks of TCP is "slow start" and "slow start restart"


https://hpbn.co/building-blocks-of-tcp/#slow-start

In particular for bursty applications "slow start restart" could be
hampering the performance of an Akka app by not using the full bandwidth
available at the time of the 'bursty' traffic.

(I do not have any evidence that this is an issue for my scenario, it's
still in the design stage.)


1. Anyone got links to case studies of this effect in their app? (Either
related to Akka TCP or Akka in general)

2. Are there any settings or machinery in Akka under the hood that directly
effect this "slow start restart"?

I'm trying to determine is this a known handled thing or something we know
about and accept or something we don't need to worry about because I've
misunderstood it?

Much thanks for reading!

Alan.




--
>> 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 cluster or Kubernetes

2017-10-25 Thread KonradktosoMalawski
They’re completely different.

Kubernetes is where you run apps. It shedules entire apps onto a set of
nodes.
Akka cluster IS the app. It runs on a set of nodes, and leverages health
mechanisms to be able to smartly balance load and actors across them.

Akka cluster apps are the apps that kubernetes would schedule.
Akka cluster then does more fine-grained things internally. For k8s though,
it’s “an app”.

Please read our guide on the subject:
https://developer.lightbend.com/guides/akka-cluster-kubernetes-k8s-deploy/

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

On October 26, 2017 at 4:10:52, Rum (droidit@gmail.com) wrote:

I am trying to understand when I have to use Akka cluster and it is
significance. Is it same as Kubernetes?
--
>> 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 TCP and Slow Start Restart

2017-10-25 Thread KonradktosoMalawski
You’re right, akka-remoting still isn’t designed to be exposed to public
internet.
It’s something we’ll keep thinking about our multi-datacenter support work
though.

-- 
Cheers,
Konrad 'ktoso <http://kto.so>' Malawski
Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>

On October 26, 2017 at 4:36:55, Alan McSherry (alanmcshe...@gmail.com)
wrote:

HmmmI could handle the encrypting. But ...

https://stackoverflow.com/questions/22576020/akka-remote-over-the-internet

... I wonder if there are too many security holes or possible DDOS vectors
in Akka, it's not really designed to operate in a hostile
environment...(right ?)

An attacker could 'lookup' or try to create remote actors at a rate I can't
handle, and I want previously unknown nodes to be able to connect in order
to perform a handshake and if they fail I can close the connection. I have
a similar DDOS problem with Akka TCP but I know less about how friendly
Akka remoting is to attackers.

Ever come across someone using Akka remoting in an open internet type
service...?


On Wed, Oct 25, 2017 at 4:26 AM, Konrad “ktoso” Malawski <
konrad.malaw...@lightbend.com> wrote:

> What do you mean exactly?
> Switch to using Artery (the “new” remoting)? You could, sure.
>
> Just remember that it’s not encrypted so going over internet may be a bad
> idea if it has secure data.
> We’re working on a TLS-ed version of Artery, but it would likely be over
> TCP again.
>
> Though we know it should be faster than the previous implementation in any
> case.
>
> --
> Cheers,
> Konrad 'ktoso <http://kto.so>' Malawski
> Akka <http://akka.io/> @ Lightbend <http://lightbend.com/>
>
> On October 24, 2017 at 3:59:30, Alan McSherry (alanmcshe...@gmail.com)
> wrote:
>
> One of the building blocks of TCP is "slow start" and "slow start restart"
> 
>
> https://hpbn.co/building-blocks-of-tcp/#slow-start
>
> In particular for bursty applications "slow start restart" could be
> hampering the performance of an Akka app by not using the full bandwidth
> available at the time of the 'bursty' traffic.
>
> (I do not have any evidence that this is an issue for my scenario, it's
> still in the design stage.)
>
>
> 1. Anyone got links to case studies of this effect in their app? (Either
> related to Akka TCP or Akka in general)
>
> 2. Are there any settings or machinery in Akka under the hood that
> directly effect this "slow start restart"?
>
> I'm trying to determine is this a known handled thing or something we know
> about and accept or something we don't need to worry about because I've
> misunderstood it?
>
> Much thanks for reading!
>
> Alan.
>
>
>
>
> --
> >>>>>>>>>> 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] Timer of GroupedWithin (akka-stream-kafka) does not seem to be working

2017-10-27 Thread KonradktosoMalawski
Please report in one space at the same time.
This was already reported on the issue tracker by yourself.

This is to avoid wasting cycles and time. Thanks.

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

On October 27, 2017 at 17:34:02, MK G (gant...@gmail.com) wrote:

Timer of GroupedWithin does not seem to be working. In this example, I am
not getting any messages even after expiry of duration (10 seconds) even
though 7 items are available in Kafka. If I produce 3 more items, then I am
getting the entire desired batch (10 items). Please see the snippet below.


akka & akka streams Version = "2.4.19"

akka-stream-kafka Version = "0.17"


Am I missing anything? Thank you.


val consumerSettings: ConsumerSettings[Array[Byte], String] =
ConsumerSettings(ActorSystemContainer.system, new
ByteArrayDeserializer, new StringDeserializer)
  .withBootstrapServers(rsbProps.serverUrl)
  .withGroupId(rsbProps.groupId)
  .withProperty(ConsumerConfig.AUTO_OFFSET_RESET_CONFIG, "earliest")

Consumer.committableSource(consumerSettings, Subscriptions.topics("topic-1"))
  .groupedWithin(10, 10.seconds)
  .mapAsync(1) { group =>
val msgs =  group.toList.map(_.record.value())
saveToDB(msgs )
  }
  .map(group => group.foldLeft(CommittableOffsetBatch.empty) { (batch,
elem) =>
  batch.updated(elem.committableOffset)
  })
  .mapAsync(3)(_.commitScaladsl())

--
>> 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] ActorSystem FatalError Handling

2017-11-02 Thread KonradktosoMalawski
When such errors are thrown all bets are off basically, in any app, not
just akka.

You can turn off the system automatically terminating — check
reference.conf, though as I said — all bets are off then anyway because
runtime is in potentially “bad state"

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

On November 2, 2017 at 22:08:39, Mücahit Kantepe (mucahitkant...@gmail.com)
wrote:

If any Actor in ActorSystem throws a fatal error(StackOverFlowError,
OutOfMemoryError etc.) akka.actor.ActorSystemImpl shutdowns JVM or
shutdowns only ActorSystem. In configuration we can only change the
shutdown JVM behavior but I want to do some custom things before shutting
down the JVM, like pushing memory dump to somewhere when fatal error
occurs. As far as I see there is no option like onFatalErrorHook.

Configuring as not to shutdown JVM when fatal error occurs, only shutdowns
ActorSystem but since there is no flag for termination reason(I do shutdown
ActorSystem for some reasons), I could not found any way to trigger some
procedure after fatal error occurs.

Am I missing something?
--
>> 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] ActorRef proxy - had somebody implemented?

2017-11-06 Thread KonradktosoMalawski
Normally you’d simple have an Actor do this, instead of hacking into the
internals as proposed in your snippet :-)
Have an actor who’d keep messages and forward to the target once it’s
received it.

Having that said, we have the concept of such “FutureRef” defined and
implemented in AkkaTyped,
it’s not ported over to Akka classic yet AFAIR.
https://github.com/akka/akka/blob/master/akka-typed/src/main/scala/akka/typed/ActorRef.scala#L69

Note that there is a akka.actor.pattern that someone contributed in Akka
but that’s not what this is.
I actually wonder if that one should remain or be removed hm…

You can investigate that semantics and if it is you can open a ticket about
porting it to classic Akka, I think we don’t have such ticket yet.
I opened a related ticket, in which we should perhaps remove or
disambiguate the current akka.pattern one, since it has same name but
different mechanics nowadays https://github.com/akka/akka/issues/23924


Hope this helps.

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

On November 6, 2017 at 6:30:50, Alexandr Sova (sovaalexa...@gmail.com)
wrote:

Hello, Akka community!

Sometimes there are situations when you don't have an ActorRef instance but
you know where to ask for it. It may be because actor is still haven't
being created and actor creation procedure requires some long-running tasks
to be completed for instance your application requires actor A that have a
dependency on component B which in turn depends on resource C that may not
be retrieved on application startup... or any other precondition where
actor could not exist...
But you have to give this ActorRef out of ActorSystem for example to Play!
controller or some different service (let's call it "client D"), whatever
but you don't want to show the implementation detail about actor still does
not exist, you just want to pass ActorRef as a constructor parameter. What
would you do?
In traditional systems I'd solve it with some kind of ProxyActorRef that'd
look something like that:


class ProxyActorRef(provider: () => Future[ActorRef]) extends ActorRef
with ScalaActorRef {
  private val futureRef = provider()
  override def path: ActorPath = ???

  override def !(message: Any)(implicit sender: ActorRef): Unit =
futureRef.onComplete({
case Success(ref) => ref.tell(message, sender)
case _ => // do nothing
  })
}


but with current akka implementation I just can't do it because
of ProxyActorRef does not confirm to InternalActorRef and InternalActorRef
is private[akka]
Usually akka have a way to solve most of problems that could happen - *do
anyone knows how to solve this kind of problem?*

And to have separate actor in front of actor A is not a solution because
actor A can be Router.fromConfig and nesting all the calls to distinct
actor:

   - makes all effort on building configurable proxy worthless
   - can have a performance impact
   



any way if performance could be sacrificed than simple router

with routing logic at actor rather than at actorRef would be much better
solution, but what if that is not a case and performance is significant?

And also to have componentB/resourceC acquire logic separate at actor A
also couldn't be an answer because that way you couldn't expect componentB
as a constructor dependency so actor starts at a state when it just can't
do the work which it supooses to so your actor A should become a FSM and
this approach is rather overhead/overcomplicated.

And to wrap expectation for ActorRef into another object which is not
instanceof ActorRef (couldn't be used with akka.patterns._ for example) is
also not a solution because you don't want to show your implementation
detail about that dependency may not ready when "clientC" gets created.

Do anyone have any idea around it? Or may be pull request to akka with such
functionality can be a good thing?
--
>> 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

Re: [akka-user] Streaming proxy/tunel on top of akka-http

2017-11-07 Thread KonradktosoMalawski
Akka-HTTP does support completely streaming things, that’s pretty much it’s
main use case.
Please share code and or specifics about what does not work.

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

On November 8, 2017 at 12:05:15, Jozsef Zsido (zsjo...@gmail.com) wrote:

Hi,

I'm trying to write an akka-http based service which tunels some of the
requests through a given (ip,port).
The basics are working propely but I have problem when I try to download
large files. akka-http tries to load the complete response as Entity and
does not streams trully.
My expectation would be that the flow handler to read only the headers of
the response and to copy the content bytes in reactive way.
It should support large downloads, media streaming and chunked transfer.

Doeas have akka-http implementation support for these?
If yes, how should I set-up the flow?

Thanks,
Jozsef
--
>> 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] FSMs and Akka Streams

2017-11-13 Thread KonradktosoMalawski
Hi John,
your problem description is a bit abstract so not quite sure what to advice
there,
however: please do bear in mind that Streams do not replace Actors.
They complement them. Streams are nice for linear things,
though Actors are nice for dynamic and distributed settings.

It depends on your exact problem.

Yes, if it’s a more-or-less static processing pipeline you can model it as
a stream (akka http is for example all streams).
You can take a look at building custom GraphStages (search the docs for
that keyword).

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

On November 11, 2017 at 11:13:32, John Antypas (janty...@busygeeks.com)
wrote:

Good evening all

I'm learning my Akka, or rather learning to do it better.  I'm looking at
writing a lightweight protocol stack.  In the old Java world, I'd write a
rather large FSM that would handle all states and events.. but that was the
old days.  I assume today, I'd want to use Akka streams.  Assume I had
something like this:

FSM-Main:
 Handles main protocol states (Connected, Setup, Authentication,
Running)
Under each state, I have an FSM just for that state.  For example, under
the Auth state, I have a sub FSM that handles the various authentication
FSM.
I assume this is legal.

Now, in streams, where does this fit in with Akka streams -- I assume each
stream element would have its own FSM?
--
>> 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] Older version of Akka framework

2017-11-13 Thread KonradktosoMalawski
Hi Jani,
Use your dependency management tool such as sbt, maven or gradle to
download dependencies.
They’re all hosted on maven central.

No actively maintained version of Akka is compatible with JDK6.
You can use a not-maintained version of 2.3.x though — though we strongly
discourage that since it’s ancient (2015).

Akka is a toolkit, not a framework :-)

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

On November 14, 2017 at 16:07:22, Jani Lillkåll (jlmailer2...@gmail.com)
wrote:

  Hi !

 Is there a place to download older version of Akka framework,  that would
compile with Java JDK 1.6 ?  Thanks for any info you can give. yours
Jani
--
>> 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] Android client connecting to Akka cluster via sockets

2017-11-19 Thread KonradktosoMalawski
We’re working on an ClusterClient replacement that would use HTTP(2) or
GRPC as it’s transport,
this would be more or less what you’re after and also allow to keep the
convenience of Actor messaging.

I’d strongly discourage reverse engineering the protocol as such impl will
be rather brittle, and is bound to miss some intricacies in it.

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

On November 20, 2017 at 1:34:39, Roland Kuhn (goo...@rkuhn.info) wrote:

Hi Tom,

the core feature of Akka Cluster is location transparency: all Actors
within the cluster can seamlessly communicate via their ActorRefs.
Including something that is not really part of the cluster, or that can at
least not fully participate in the location transparent setting, will
likely lead to impedance mismatch down the road—and quite possibly some
pain and suffering.

Why don’t you communicate between your Android device and some cluster
members using an established protocol suite like HTTP? That way you will
not have trouble telling different kinds of ActorRefs apart regarding their
semantic limitations.

Regards,

Roland

Skickat från min iPad

15 nov. 2017 kl. 18:50 skrev Tomasz Ratajczak :

Hi,

how difficult would it be to develop socket based Android client for Akka
cluster without the Akka client libraries? I would like to have the
flexibility of Android network libraries and the power of Akka cluster
without going into the incompatibilities of Akka Java and Android Java. Do
not see a need for actors on Android device, only need for interaction with
the cluster actors.

This basically would involve reversing the Akka remote protocol and as such
may be a maintenance nightmare. Can this be done though?

It seems to me that frontending the Akka cluster with a custom, stateless
proxy that would act as a cluster client would be a much better alternative.

Thank you,
Tom
--
>> 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.

-- 
>>  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] Parsing Configuration

2017-11-26 Thread KonradktosoMalawski
Hard to tell without knowing exactly what you’re doing there, but usually
an explicit resolve is not needed.

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

On November 27, 2017 at 13:02:41, Joseph Mansigian (
joseph.c.mansig...@gmail.com) wrote:

Hello All,

I am working with some legacy Scala with Akka code.
The application.conf file makes use of substitutions.
Instead of receiving an automatic parse of the
application.conf file the code explicitly parses the file
and resolves the substitutions as thus:

val config_raw = ConfigFactory.parseFile(new File("application.conf"))
val config = config_raw.resolve

and subsequently uses config when creating an ActorSystem.

I understand that explicit parsing and resolving was necessary at one time
if there were substitutions in application.conf.  If this is no longer
necessary
I would like to drop the explicit parsing and resolving.  Can I ?

I am using Play Framework 2.6.6, Scala 2.12.2, Akka 2.5.4

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.

-- 
>>  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] Overriding onUpstreamFinish behaviour for FlowOps

2017-11-26 Thread KonradktosoMalawski
What kind of Flow exactly. What does it do?
See this too
https://doc.akka.io/docs/akka/current/stream/stream-error.html?language=scala#delayed-restarts-with-a-backoff-stage
other
than supervision which isn’t generic.



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

On November 27, 2017 at 14:14:33, Christopher Hunt (hunt...@gmail.com)
wrote:

Hi there.

I've got a requirement for a flow to keep going when its upstream input
completes/fails. I could write a custom flow stage and override
onUpstreamFinish, but I was wondering if there were a means to express this
just using the FlowOps API. FlowOps.detach got me excited, but that isn't
quite what I expected. Also, buffer(0, OverflowStrategy.backpressure)
looked as though it could do the job, but the buffer size must be positive.

Thanks for any assistance.

Kind regards,
Christopher
--
>> 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 Typed and stack safety

2017-11-28 Thread KonradktosoMalawski
That’d only be the case in completely synchronous execution. And the
behaviours body would actually execute on that line — but it doesn’t.
Here once you returned a new behaviour, control is given back to whoever is
invoking things (in great simplification, “the actor system”).

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

On November 28, 2017 at 19:11:54, Julien R. (jul...@richard-foy.fr) wrote:

I’ve tried Akka Typed and so far it looks nice. I’m just wondering if there
might be issues with stack-safety and memory leaks. Consider for instance
the following behavior definition given in the documentation:

private def chatRoom(sessions: List[ActorRef[SessionEvent]]):
Behavior[Command] =
  Actor.immutable[Command] { (ctx, msg) ⇒
msg match {
  case GetSession(screenName, client) ⇒
val wrapper = ctx.spawnAdapter {
  p: PostMessage ⇒ PostSessionMessage(screenName, p.message)
}
client ! SessionGranted(wrapper)
chatRoom(client :: sessions)
  case PostSessionMessage(screenName, message) ⇒
val mp = MessagePosted(screenName, message)
sessions foreach (_ ! mp)
Actor.same
}
  }

The chatRoom function is not tail-recursive, therefore each time the
behavior receives a message it will create a new frame, right?

--
>> 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 persistence in production - recommended journals?

2017-11-29 Thread KonradktosoMalawski
LevelDB is not, in any case, intended for production systems.

Production ready journals would be:
- the cassandra one, maintained by the akka team, it is most mature and has
most features
- the jdbc one, community maintained but seems to work well
- we’ve heard of people using the mongo one, but I can’t say if that’s a
good idea, likely not?

Happy hakking

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

On November 30, 2017 at 1:13:58, Dobrin Ivanov (dobrin.iva...@gmail.com)
wrote:

Hi,

I'm trying to investigate whether to use akka persistence in production
using java.

I've been looking at https://doc.akka.io/docs/akka/snapshot/persistence.html

And also tried this example :
https://github.com/akka/akka-samples/tree/2.5/akka-sample-persistence-java

The article refers to (native LevelDB)
https://github.com/fusesource/leveldbjni while the example refers to (some
java LevelDB port)  https://github.com/dain/leveldb ... not sure why?

Simply changing to use the native one in the example does not work:
java.lang.NoClassDefFoundError: org/iq80/leveldb/impl/Iq80DBFactory




Q1: So if I do not need a cluster/failover/replication (or i my want to do
it myself for example) then can I use LevelDB in production? And if yes - I
guess it should be the native one?


Q2: Then the article recommends replicated journals. So does anybody use
akka-persistence-jdbc OR okumin/akka-persistence-sql-async in production
for example?
Are there any recommendations?
I guess they can be used in java too and not only in scala but please
correct me if I'm wrong.

Thanks!
(inexperienced akka user)

--
>> 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 Cluster Bootstrap ?

2017-12-03 Thread KonradktosoMalawski
What do you want to know, that’s a pretty generic question ;-)
We’re working on it. It works, it’s not done yet, will have to be
cleaned-up quite a bit and documented.

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

On December 4, 2017 at 10:32:55, Gytis G (gy...@fmu1.net) wrote:

Hi,

can someone shed a light on progress with "Akka Cluster Bootstrap" [1] and
this demo [2]  ? Looks really promising!

Thanks!

[1]
https://developer.lightbend.com/docs/akka-management/current/bootstrap.html
[2] https://github.com/akka/akka-management/tree/master/joining-demo

--
>> 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] Last IntelliJ update (2017.3) breaks developing with Akka / Scala on Java

2017-12-05 Thread KonradktosoMalawski
Hi Tomer,
Thanks for reporting it to the IntelliJ team.
Could you post a working link to the issue? The one posted does not seem to
work.

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

On December 5, 2017 at 21:49:14, Tomer Rothschild (roto...@cloudshare.com)
wrote:

Hi all,

The last IntelliJ update (2017.3) introduced regression that brakes
developing with Akka / Scala on Java.

The regression is that IntelliJ shows false error highlighting in Java when
subclassing Scala classes that had traits mixed in (all AbstractActor
classes for example - AbstractActor,
AbstractPersistentActor, AbstractPersistentActorWithAtLeastOnceDelivery,
etc'..).
IntelliJ forces you to either declare the new sub class as abstract, or
implement all the methods of all the mixins.
Needless to say, the project compiles and runs perfectly.


















I opened the following ticket with Jetbrains - ticket 1166142
,
and created the following repository that reproduces the false errors -
intellij-mixin-issue .

Please consider weighing in to the discussion so that the issue gets proper
prioritization in JetBrains.

Regards,
Tomer R.
--
>> 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] Is it easy to use akka-http to build ...?

2017-12-07 Thread KonradktosoMalawski
It’s pretty much as simple as using this directive:
https://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/directives/file-and-resource-directives/getFromDirectory.html

https://doc.akka.io/docs/akka-http/current/scala/http/routing-dsl/directives/file-and-resource-directives/getFromResource.html

or it’s similar versions (explore the docs).

For basics of building an app read:
http://developer.lightbend.com/guides/akka-http-quickstart-scala/

happy hakking!

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

On December 8, 2017 at 12:15:30, Thai (lgoptimusv...@gmail.com) wrote:

Hi All,

Is it easy to use akka-http to build a web app that can serve static files
(only 1 html file but it has many 

Re: [akka-user] Re: How to measure performance of Actor Message from one actor reaching to another actor

2017-12-16 Thread KonradktosoMalawski
Since you’d be measuring remoting there, on the boundary between nodes,
I highly recommend making use of its “new” (has been out there quite a few
months)
implemenation: Artery, see docs here:
https://doc.akka.io/docs/akka/2.4/scala/remoting-artery.html

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

On December 16, 2017 at 17:05:37, kpri...@thoughtworks.com (
kpri...@thoughtworks.com) wrote:

I am interested in throughput (msg/s) and latency (us).
As shown in this diagram, Actors will be running in different JVM's on
different machines.
Messages will be remote and serialization/deserialization will be included.
In this diagram, Actor B acts as supervisor and one of the role it plays as
to validate (domain specific validations) all the messages it receives and
forwards it to Actor C.

Currently my benchmark looks like this CommandServiceBenchmark.scala

which
waits for acknowledgment from Actor C to Actor A.
Eventually this benchmark will support running actors in different JVM's.

Ideally what I want is my timer clock should start at Actor A when it sends
message to Actor B and clock should stop when Actor C receives message.












On Saturday, December 16, 2017 at 1:09:42 PM UTC+5:30, √ wrote:
>
> Also, is serialization/deserialization included? At what point does the
> timer clock start, and when does it stop?
>
> --
> Cheers,
> √
>
> On Dec 15, 2017 20:31, "Patrik Nordwall"  wrote:
>
>> What are you interested in? Throughput (msg/s) or latency (us)? Remote or
>> local? What will the results of the benchmarks be used for?
>>
>> /Patrik
>> fre 15 dec. 2017 kl. 12:23 skrev Akka Team :
>>
>>> I think the floodPipe benchmark may do what you want, commented out but
>>> you could easily uncomment and run locally:
>>>
>>> https://github.com/akka/akka/blob/master/akka-bench-jmh/
>>> src/main/scala/akka/actor/ForkJoinActorBenchmark.scala#L92
>>>
>>> --
>>> Johan
>>> Akka Team
>>>
>>> On Fri, Dec 15, 2017 at 11:20 AM,  wrote:
>>>
 Ok, I just looked at TellOnlyBenchmark.scala
 
  closely and it just drops all the message and does not take into
 consideration of time taken by message to reach receiving actor.


 On Friday, December 15, 2017 at 2:54:55 PM UTC+5:30,
 kpr...@thoughtworks.com wrote:
>
> Hello,
>
> I want to measure a performance of following use case using jmh.
>
>
>
>
> 1.
> Actor A sends Msg A to Actor B
> 2. On receiving Msg A, Actor B sends Same Msg A to Actor C
>
> I just want to measure performance of Msg A from Actor A reaching to
> Actor C (Do not want to consider acknowledgment).
> Is there any way i can measure this performance?
>
> I was going through Akka jmh benchmarks and found this
> TellOnlyBenchmark.scala
> 
>
> But not sure it just measures the performance of sending messages or
> it considers time required to reach message to Echo Actor?
>
>
> Thanks
>
>
> --
 >> 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+...@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 m

  1   2   3   >