[akka-user] How to convert a 'process' into a set of actors? Or what is the correct way of adding actors to this code?

2014-12-25 Thread Shahbaz Chaudhary
I've written some scala code to simulate a stock exchange (actually just the order book) at https://gist.github.com/falconair/d669cac75ecab0010e9a I wrote this just to learn scala so please don't expect production code here. I'm having trouble understanding how to convert this to use actors. Cu

[akka-user] Recording latency of operations that return a Future inside an akka stream

2014-12-25 Thread Soumya Simanta
This is related to this thread but sufficiently different that I decided to create new thread. Hope that's okay. I would like to create a histogram of latency of a large number of set operations ( set returns a Future[Boolean])

[akka-user] Running a stream inside an Actor ?

2014-12-25 Thread Soumya Simanta
My understanding is that a "running" stream is a bunch of actors underneath executing the flow. Assuming this to be true, is there any restriction or concerns of running a stream inside a normal Akka actor ? Thanks -Soumya -- >> Read the docs: http://akka.io/docs/ >>

Re: [akka-user] [akka-stream 0.9] Create Flow[A,B] from Publisher[A] and Subscriber[B]

2014-12-25 Thread Konrad 'ktoso' Malawski
Hi Mark, would you mind explaining what exact use case you’re trying to cover? Instead of dropping down to reactive streams interfaces (publisher / subscriber) which are *very low-level*, instead you could perhaps stick with our much simpler to use custom Stages. Here’s the docs on implementing cu

Re: [akka-user] Event Sourcing with eventual consistency guarantees

2014-12-25 Thread Konrad 'ktoso' Malawski
Hit command-enter too soon by accident before finishing my email - sorry! Here’s the rest. To read: And also Pet Helland’s (at that time at Amazon) legendary "Life Beyond Distributed Transactions” In general though. What you described as a transaction is in fact a series of events _plus_ a so

Re: [akka-user] Event Sourcing with eventual consistency guarantees

2014-12-25 Thread Konrad 'ktoso' Malawski
Hi Stefan, Systems like you describe definitely *are* implemented in terms of persisting events. I would highly recommend these following videos / papers as a "holiday-read”: * Eric Evans (Dad of DDD) about modeling to such constraints WITH thinking of time and WITHOUT transactions http://www.us

[akka-user] Event Sourcing with eventual consistency guarantees

2014-12-25 Thread Stefan Schmidt
Hi guys, I am currently prototyping a new app which involves transferring money between various accounts. On a very high level I have a system account (which is used to collect fees), one account for each member in the platform (many of them), and group accounts. Money needs to be moved on a f

[akka-user] Re: Broadcast messages are not working in a cluster?

2014-12-25 Thread Dmitry Semenov
Not sure if it relative to the problem you want to solve, but you can do following stuff to get all routees def guardianReceive: Actor.Receive = { case DiscoverChildren ⇒ router ! GetRoutees case Routees(routees) => routees.foreach { case ActorRefRoutee(ref) => addWorker(ref)

[akka-user] [akka-stream 0.9] Create Flow[A,B] from Publisher[A] and Subscriber[B]

2014-12-25 Thread Mark van Buskirk
Id love to see an example of two actors that are both publisher and subscriber connected. I've been trying to get that going and have been having a bunch of trouble getting it working. -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.

[akka-user] When to use thread-pool-executor

2014-12-25 Thread Leon Ma
Hi, In most cases, fork-join-executor is better than thread-pool-executor, however I'm wondering what's the best scenario to use thread-pool-executor. Thanks Leon -- >> Read the docs: http://akka.io/docs/ >> Check the FAQ: >> http://doc.akka.io/docs