Hi Andrew,

On Sat, Nov 22, 2014 at 7:06 PM, Andrew Easter <[email protected]>
wrote:

> Hi Konrad - see comments below...
>
> On Saturday, 22 November 2014 10:23:45 UTC, Akka Team wrote:
>>
>> Yeah this is one way to do this - to use the view as "the read side".
>> On the other hand, you could use the view to put it into some query
>> optimised database or journal - this is also a good way to use
>> akka-persistence,
>>
>
> I'm interested in this use case scenario for a PersistentView (will be
> infinitely more applicable to a DDD/CQRS approach following the upcoming
> read side rewrite). Just some questions about it...
>
> Forgive me if I'm misunderstanding something, but if using a
> PersistentView to update some query optimised database, it's likely that
> the following criteria would be desirable:
>
>    - The ability to apply only new events to the external read model. On
>    restart of a PersistentView, assuming the external model itself has not
>    been purged, It's not going to be necessary to  replay all events, only
>    events that haven't yet been written to the external model. I'm thinking
>    here something analogous to consumer offsets in Kafka.
>
> It is possible to store the event sequence number in the external read
model, and upon startup of the PersistentView read back the latest sequence
number from the external read model. Then the PersistentView can discard
all replayed events with a lower sequence number.

>
>    - A way to reliably update the read model - i.e. something akin to
>    at-least-once-delivery semantics with regard to writing to the external
>    model. In case of some failure/crash or whatever, it seems applicable that,
>    unless we have acknowledgement that we've successfully written an event to
>    the external model, we'd try again after restart of the PersistentView.
>
> I think this is solved by the same thing as I outlined above.

/Patrik


> I could be talking nonsense, but if you are able to decipher where I'm
> coming from, I'd be interested in your views on this :-)
>
>
>> but for your case it seems persistent view may just be enough.
>>
>> PS: Just making sure that you're aware of our upcoming read side rewrite:
>> letitcrash.com/post/96687159512/akka-persistence-on-the-query-side-the-
>> conclusion
>>
>> -- konrad
>>
>> On Fri, Nov 21, 2014 at 9:08 AM, <[email protected]> wrote:
>>
>>> I am trying to build a system to manage configuration values with
>>> akka-persistence. I would like to view all changes that has happened to a
>>> particular value in the configuration. I have the entire configuration as
>>> state in a PersistentActor and when someone queries for changes. I create a
>>> new PersistentView with what configuration key i need in the props and
>>> replay history on it to filter out the changes not needed and then query
>>> the filter changes and kill it with PoisonPill. All these happens in the
>>> query part of PersistentActor. Is this rightway to do it? Is there any
>>> simpler way to create a view out of the history in akka-persistence
>>>
>>>  --
>>> >>>>>>>>>> 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.
>>>
>>
>>
>>
>> --
>> Akka Team
>> Typesafe - The software stack for applications that scale
>> Blog: letitcrash.com
>> Twitter: @akkateam
>>
>  --
> >>>>>>>>>> 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.
>



-- 

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