Re: [akka-user] Correct way to "wait" for polling elements from a Source in Akka Streams

2016-12-30 Thread Drew Kutcharian
2016, at 2:53 PM, Konrad Malawski > wrote: > > Read the docs about GraphStage and custom stream processing elements. It had > all the utilities needed for this. We also explained them on the Akka blog: > Akka.io/blog so check that out :) > > On Dec 30, 2016 23:29

Re: [akka-user] Correct way to "wait" for polling elements from a Source in Akka Streams

2016-12-30 Thread Drew Kutcharian
stream processing elements. It had > all the utilities needed for this. We also explained them on the Akka blog: > Akka.io/blog so check that out :) > > On Dec 30, 2016 23:29, "Drew Kutcharian" <mailto:d...@venarc.com>> wrote: > Hi, > > I have a use case

[akka-user] Correct way to "wait" for polling elements from a Source in Akka Streams

2016-12-30 Thread Drew Kutcharian
Hi, I have a use case where I poll a datasource for items and as long as there are items present I process them as quickly as possible, but when there are no items, I would like to poll every X seconds. Is there a built-in construct in Akka Streams that I can use? I'm currently using `Source.u

[akka-user] akka-kafka-stream "Offset Storage in Kafka" question/clarification

2016-08-26 Thread Drew Kutcharian
Hi, In the "Offset Storage in Kafka” on http://doc.akka.io/docs/akka-stream-kafka/current/consumer.html#offset-storage-in-kafka there is the following example: .groupedWithin(10, 5.seconds) .map(group =>

Re: [akka-user] How to "scatter-gather" with Akka Stream?

2016-08-24 Thread Drew Kutcharian
rtition> > > http://doc.akka.io/api/akka/2.4/?_ga=1.252408265.1579561034.1353497989#akka.stream.scaladsl.Merge > > <http://doc.akka.io/api/akka/2.4/?_ga=1.252408265.1579561034.1353497989#akka.stream.scaladsl.Merge> > > On Wed, Aug 24, 2016 at 8:44 PM, Drew Kutcharian <mailto

Re: [akka-user] How to "scatter-gather" with Akka Stream?

2016-08-24 Thread Drew Kutcharian
Source class doesn’t have partition/merge functions. Am I missing something? - Drew > On Aug 24, 2016, at 1:08 AM, Viktor Klang wrote: > > Partition + merge? > > On Wed, Aug 24, 2016 at 8:58 AM, Drew Kutcharian <mailto:d...@venarc.com>> wrote: > Hi Guys, > >

[akka-user] How to "scatter-gather" with Akka Stream?

2016-08-23 Thread Drew Kutcharian
Hi Guys, How can I do scatter-gather with Akka streams. Basically: 1. I’m reading messages from Kafka using akka-stream-kafka 2. Then I group the messages using “groupedWithin” 3. Then I need to split the resulting batch into multiple groups (1 per logical shard) 4. I want to be able to process

[akka-user] akka-stream SynchronousFilePublisher and FileNotFoundException

2015-09-24 Thread Drew Kutcharian
Hi Guys, In the following simple file copy code: object TestStreams extends App { implicit val system = ActorSystem("akka-stream") implicit val materializer = ActorMaterializer() val source = SynchronousFileSource(new File(“/path/to/non/existing/file")) val sin

[akka-user] Akka Cluster Actor Failover and Rebalancing, is it possible?

2015-02-06 Thread Drew Kutcharian
Hi, I’m looking to see if Akka can be used as a cluster manager instead of say Mesos for my use case. Simply put, my use case is as following: 1. I have 10 physical machines. 2. I need to have 10 *singleton* stateless actors running on each one of these machines. 1 actor per server. 3. If one o

Re: [akka-user] How to avoid Await here (Mixing blocking and non-blocking methods)

2014-03-14 Thread Drew Kutcharian
(): Unit) > } andThen { case _ => lock.release() } > } else throw StaleLockException(s"Zookeeper lock has > expired. Connection state is ${curatorManager.connectionState}") > } > } > > > On Fri, Ma

[akka-user] How to avoid Await here (Mixing blocking and non-blocking methods)

2014-03-14 Thread Drew Kutcharian
Hey Guys, I have the following code https://gist.github.com/kutchar/9553112 which I would really love if I could get rid of the Await.result. Background, this is a method that tries to insert a user into Cassandra, using Zookeeper/Curator to lock the "table" so we can enforce uniqueness of the