Hi Patrik,

Sorry for the late response, I must've missed the notification about your 
reply or something.
Anyway, I'll open an issue for this and try to see if I can do it myself.

Thanks,
Tal


On Monday, October 19, 2015 at 1:31:01 PM UTC+3, Patrik Nordwall wrote:
>
> SharedLeveldbJournal.setStore must be done once, when the actor system is 
> started. I agree that this can probably be simplified. We have that 
> initialization code in several of the activator templates (e.g. Akka 
> Cluster Sharding with Scala 
> <http://typesafe.com/activator/template/akka-cluster-sharding-scala?_ga=1.141713594.924914305.1394398072>
> ) and that boilerplate is also an indication that this should be made 
> easier. I guess we have not payed much attention to SharedLeveldbJournal 
> since it's only a demo/test toy.
>
> Please create an issue <https://github.com/akka/akka/issues> (and 
> contributions are also very welcome).
>
> Regards
> Patrik
>
> On Wed, Oct 14, 2015 at 1:06 PM, Tal Pressman <kir...@gmail.com 
> <javascript:>> wrote:
>
>> Hi,
>>
>> Now that Akka 2.4 is released with the new persistence-query APIs, we 
>> upgraded Akka in our application. After doing some searching, I couldn't 
>> find any persistence-query plugins yet, so in the meantime I switched to 
>> the shared LevelDB plugin.
>>
>> So functionally, everything works now, and I can get all my different 
>> nodes to share persistence queues, and it's great. However, I have a couple 
>> of questions with regards to injecting the shared store ActorRef.
>>
>> According to the docs, the recommended way of injecting the reference is 
>> having actors look do an actorSelection and Identify in their preStart, and 
>> then call SharedLeveldbJournal.setStore when they get a response. It also 
>> says that "Internal journal commands (sent by persistent actors) are 
>> buffered until injection completes". I understood that to mean that I 
>> can do the injection from my PersistentActor/PersistentView, but that 
>> didn't work (the actors failed to recover properly). So what I've done 
>> instead is add a simple 'ask' after initializing my ActorSystem that does 
>> the injection.
>>
>> This brings me to the actual questions:
>>
>>    1. Am I misreading the documentation? Should the injection work when 
>>    done from the actual PersistentActor/PersistentView (or rather 
>>    UntypedPersistentActor)?
>>    2. Why doesn't the plugin do this process on its own when 
>>    initialized? The path to the store can be added to the plugin's 
>>    configuration and, when it's initialized, it can perform the 
>> actorSelection 
>>    and the injection itself. This would also make switching to/from the 
>> plugin 
>>    a mere configuration change, and not actual code changes.
>>
>> Thanks,
>> Tal
>>
>> -- 
>> >>>>>>>>>> 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