"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?

thanks,

michael 

On Tuesday, 19 August 2014 13:49:50 UTC+2, Patrik Nordwall wrote:
>
>
>
>
> On Tue, Aug 19, 2014 at 1:46 PM, Martin Krasser <kras...@googlemail.com 
> <javascript:>> wrote:
>
>>  
>> On 19.08.14 13:40, Patrik Nordwall wrote:
>>  
>>
>>
>>
>> On Tue, Aug 19, 2014 at 1:35 PM, Martin Krasser <kras...@googlemail.com 
>> <javascript:>> wrote:
>>
>>>  
>>> On 19.08.14 13:00, Roland Kuhn wrote:
>>>  
>>>
>>>  19 aug 2014 kl. 11:28 skrev Ashley Aitken <amai...@gmail.com 
>>> <javascript:>>:
>>>
>>>  
>>>
>>> On Tuesday, 19 August 2014 16:53:46 UTC+8, Martin Krasser wrote: 
>>>>
>>>>
>>>> journal -> akka actor(s) -> read model datastore 
>>>>
>>>> when I can do this much more efficiently via 
>>>>
>>>> journal -> spark -> read model datastore
>>>>  
>>>  
>>>> directly, for example
>>>>
>>>  
>>> I am confused, are you suggesting that spark is talking to the journal 
>>> data store directly, without any involvement of Akka / Akka Persistence? 
>>>  If so, it sounds like a great solution but why would that require an 
>>> extension to the Akka Persistence design/API?
>>>  
>>>
>>>  Well, another comment is that spark uses Akka actors in its 
>>> implementation, so I don’t see why it would magically be “much more 
>>> efficient”. I think we are mixing up two concerns here, will reply later 
>>> when I can type properly again.
>>>  
>>>
>>>  This is a misunderstanding. As mentioned in my previous message, 
>>> scaling reads through a single journal actor doesn't work, it's not about 
>>> that I see a general performance issue with Akka actors. 
>>>
>>>
>>>   
>>  I think the integration "akka persistence -> kafka -> spark -> 
>> whatever" looks great, but not everybody has that infrastructure, 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 in 
>> whatever makes sense for the queries.
>>   
>>
>> Of course, that should be possible too, and as I already said, backend 
>> store providers can choose to use the very same backend for both plugins. 
>> There is absolutely no need that applications must use Spark as part of 
>> their infrastructure infrastructure. But if it is needed in large-scale 
>> applications, a seconds plugin API for on the read side would make things 
>> much more flexible. For users, who just want to have a single backend 
>> store, they just have to configure one additional line (plugin) in their 
>> application conf.
>>
>>
>>   
>>  Martin, what do you suggest? Removing PersistentView altogether? 
>>   
>>
>> No, not at all, with an additional plugin, PersistentViews should have 
>> the option to read transformed/joined/... streams from a backend store that 
>> is optimized for that. 
>>
>
> ah, now I understand what you mean. That makes sense.
> /Patrik
>  
>
>>  
>>   
>>  /Patrik
>>
>>>    
>>>  Regards, 
>>>
>>>  Roland
>>>
>>>  
>>>  
>>>  
>>>  
>>>  
>>>  -- 
>>> >>>>>>>>>> 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 <javascript:>.
>>> To post to this group, send email to akka...@googlegroups.com 
>>> <javascript:>.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>  
>>>  
>>>
>>> *Dr. Roland Kuhn*
>>> *Akka Tech Lead*
>>> Typesafe <http://typesafe.com/> – Reactive apps on the JVM.
>>> twitter: @rolandkuhn
>>>  <http://twitter.com/#%21/rolandkuhn>
>>>  
>>> -- 
>>> >>>>>>>>>> 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 <javascript:>.
>>> To post to this group, send email to akka...@googlegroups.com 
>>> <javascript:>.
>>> Visit this group at http://groups.google.com/group/akka-user.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>>
>>>   -- 
>>> Martin Krasser
>>>
>>> blog:    http://krasserm.blogspot.com
>>> code:    http://github.com/krasserm
>>> twitter: http://twitter.com/mrt1nz
>>>
>>>   -- 
>>> >>>>>>>>>> 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 <javascript:>.
>>> To post to this group, send email to akka...@googlegroups.com 
>>> <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 akka-user+...@googlegroups.com <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <javascript:>.
>> Visit this group at http://groups.google.com/group/akka-user.
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> -- 
>> Martin Krasser
>>
>> blog:    http://krasserm.blogspot.com
>> code:    http://github.com/krasserm
>> twitter: http://twitter.com/mrt1nz
>>
>>  -- 
>> >>>>>>>>>> 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 <javascript:>.
>> To post to this group, send email to akka...@googlegroups.com 
>> <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 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