Thanks Patrik. I was going through the same yesterday. Now, I have another 
question. Is there a way to implement a transaction like behavior with 
this? If 
second step fails, this should lead system to rollback.

Thanks,
Roshan

On Thursday, March 26, 2015 at 7:52:33 PM UTC+5:45, Patrik Nordwall wrote:
>
> Hi Roshan,
>
> There are several ways.
>
> 1. ask-map-pipeTo 
> <http://doc.akka.io/docs/akka/2.3.9/scala/actors.html#Ask__Send-And-Receive-Future>
> 2. spawn a separate actor 
> <http://jaxenter.com/tutorial-asynchronous-programming-with-akka-actors-105682.html>
>  
> that handles the interaction
> 3. the Aggregator Pattern 
> <http://doc.akka.io/docs/akka/2.3.9/contrib/aggregator.html>
>
> Cheers,
> Patrik
>
>
> On Wed, Mar 25, 2015 at 11:35 AM, ROSHAN SHARMA <[email protected] 
> <javascript:>> wrote:
>
>> Example Scenario:
>> 1. Client will create a command *MakePayment*(clientId: Int, amount: Int)
>> 2. There are two actors: *ClientActor* and *FinanceActor*
>> 3. First verify if clientId is correct from ClientActor, which will 
>> return *Client*(id: Int, name: String, paymentStatus: Boolean)
>> 4. If we get verified Client, create a payment: *Payment*(clientId: Int, 
>> amount: Int, date: Date) from FinanceActor and return current balance
>> 5. Update the payment status of the client to true and return client 
>> information
>>
>> Now, I want to have following aggregated Tupled output for these 
>> operations:
>> *Balance(client: Client, total: Int)*
>>
>> Someone please suggest how to achieve this using Actors.
>>
>> Thanks,
>> Roshan
>>
>> -- 
>> >>>>>>>>>> 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 [email protected] <javascript:>.
>> To post to this group, send email to [email protected] 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>
>
> -- 
>
> Patrik Nordwall
> Typesafe <http://typesafe.com/> -  Reactive apps on the JVM
> Twitter: @patriknw
>
>  

-- 
>>>>>>>>>>      Read the docs: http://akka.io/docs/
>>>>>>>>>>      Check the FAQ: 
>>>>>>>>>> http://doc.akka.io/docs/akka/current/additional/faq.html
>>>>>>>>>>      Search the archives: https://groups.google.com/group/akka-user
--- 
You received this message because you are subscribed to the Google Groups "Akka 
User List" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to