On Tue, Aug 19, 2014 at 5:07 PM, delasoul <michael.ham...@gmx.at> wrote:

> Then the PersistentView is not used as  a "middle-man" to replicate events
> to the read side, but it is the read side(meaning if a client sends a query
> a PersistentView creates the response)?
> That's how I understood PersistentViews until now - but maybe that was
> wrong, so I' am asking...
>

That is one possible way of using a PersistentView, but not how I would use
it in a large system. I would use it to consume the events and save a
representation that is optimized for the queries in a separate database (or
other type of product). Queries go directly (or via some other actor) to
the database.

/Patrik


>
>
thank's for your answer
>
> On Tuesday, 19 August 2014 16:11:33 UTC+2, Patrik Nordwall wrote:
>
>>
>>
>>
>> On Tue, Aug 19, 2014 at 2:33 PM, delasoul <michael...@gmx.at> wrote:
>>
>>> "and therefore we provide PersistentView as a simple way to replicate
>>> events to the read side, and then a de-normalized representation can be
>>> stored..."
>>>
>>> If I understand this right, this means:
>>> PersistenActor persists event
>>> PersistentView queries EventStore e.g.: every second and forwards new
>>> events to the read side, e.g.: EventListener which then updates the
>>> ReadModel
>>>
>>> What is the advantage of using the PersistenView here, instead of just
>>> emitting the event to the read side from the PersistentActor directly?
>>>
>>
>> The PersistentView (read side) can process the events in its own pace, it
>> is decoupled from the write side. It can be down without affecting the
>> write side, and it can be started later and catch up.
>> Also, you can have multiple PersistentView instances consuming the same
>> stream of events, maybe doing different things with them.
>> /Patrik
>>
>>
>>>
>>> thanks,
>>>
>>> michael
>>>
>>
>>   --
> >>>>>>>>>> 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 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 akka-user+unsubscr...@googlegroups.com.
To post to this group, send email to akka-user@googlegroups.com.
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