Hi RIchard, that works, yeah - if you have a simple architecture and simple read model. Basically your view would be hit by user requests, for simple things this may be enough. It can have it's custom snapshotting cycle etc.
On the other hand, if the query side is complex, you should consider (well, in general you should consider this option, as it's one of the gains of CQRS) putting the data "projected" by the view into a separate database that is optimised for reads. It could be redis or some sql database, so then you'd be able to run more complex user-land queries on it. In this case the view serves not user requests, but projections into the read-side which then is highly optimised for serving query traffic. Both styles can make sense (though the 2nd one is the one to go for in a complex system). Having that said, new views are coming up so we hope to improve the read-side within akka itself soon (which could utilise specialised queries within the backing database, for example eventstore etc). Hope this helps! On Sat, Oct 18, 2014 at 1:00 AM, Richard Rodseth <[email protected]> wrote: > Thanks for the link. > > If I wanted to implement a "show history" api for a specific persistent > actor, I assume I could create a "per-request" view just for that one actor > and customize the replay settings? > > Like everyone else, I am anxiously awaiting the new streams-based stuff :) > > On Fri, Oct 17, 2014 at 3:45 PM, Konrad Malawski <[email protected]> > wrote: > >> Hello there Richard, >> while it’s very low level API, it is publicly accessible if you want to >> talk to it. >> Access it like this: >> >> val journalActor: ActorRef = >> Persistence(system).journalFor("persistence-id-something") >> >> In theory this is ready to support multiple journals in the same actor >> system, although we have not implemented this yet (there is a ticket for >> it)- you’ll get the same one back all the time (in Akka 2.3.6). >> Having that said, I think for auditing I’d advertise using Views, or well >> – our upcoming (in a few months I guess) new views API, which is covered in >> detail here: >> >> http://letitcrash.com/post/96687159512/akka-persistence-on-the-query-side-the-conclusion >> >> >> On Sat, Oct 18, 2014 at 12:38 AM, Richard Rodseth <[email protected]> >> wrote: >> >>> I feel sure this must have been covered, but my searches are coming up >>> blank. >>> >>> The benefits in terms of write-throughput are clear to me, but "free" >>> auditing is often touted as a benefit of event sourcing, and one that can >>> help sell the concept. >>> >>> So, are there supported APIs to get access to the Akka persistence >>> journal, or would I have to read the relevant Cassandra or Postgres >>> table(s) and deserialize the events? >>> >>> Or, if the answer is to use a Persistent View, then does that imply that >>> 1000 Persistent Actors would need 1000 Persistent views? >>> >>> Thanks >>> >>> -- >>> >>>>>>>>>> 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. >>> >> >> >> >> -- >> Cheers, >> Konrad 'ktoso' Malawski >> hAkker @ Typesafe >> >> <http://typesafe.com> >> >> -- >> >>>>>>>>>> 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. >> > > -- > >>>>>>>>>> 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. > -- Cheers, Konrad 'ktoso' Malawski hAkker @ Typesafe <http://typesafe.com> -- >>>>>>>>>> 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.
