Hi,

You are right that you shouldn't use the journal as a database. If you want to 
use event sourcing to model the changes on the client, then I would use a View 
to populate a query model (maybe in a SQL database) that fits your queries.

B/

On 14 May 2014 at 13:15:51, 何品 ([email protected]) wrote:

I want an actor which represent an android phone connected via GPRS or WIFI,and 
I get it's IP address and then save it's GEO position via akka persistence.

and I want to provide a rest API to retrieve the position. I will notify other 
system an message with an persistence seqNr,and them can later using it to 
retrieve information anytime.

for the current API,I think I can only do this Via view or Processor ,and build 
a map or a list from the message right?

If I want to keep all my message in my map then many memory will be used ,If I 
don't then I will mismatch some key.

If I want to get an specified message ,how should I do?maybe my exposing of the 
SeqNr is not a good idea.



and ,another thinking is,If I have some operation need to be done,then I save 
an PendingEvent in EP,and split the work to work actor,and when the work done,
I delete the PendingEvent and save a new DoneEvent.

maybe I should not using it like a db.


在 2014年5月14日星期三UTC+8下午6时48分13秒,Björn Antonsson写道:
You still haven't told me why you want that method, or which problem you are 
trying to solve.

B/

On 14 May 2014 at 12:33:46, 何品 ([email protected]) wrote:

yes.
I want some method like get(seqNr) to get an message ,could that be done?
now,I need to save them in a Map

在 2014年5月14日星期三UTC+8下午6时29分27秒,Björn Antonsson写道:
Hi,

I'm not sure that I understand what you are trying to achieve. The Persistent 
messages that you send to an Processor, or in the case of the 
EventsourcedProcessor the events it persists, are  meant for the Processor. The 
sequence numbering is internal to the Processor and used for recovery. Why 
would you want to get a specific message with a specific sequence number from 
the outside?

B/

On 13 May 2014 at 19:15:17, 何品 ([email protected]) wrote:

Hi,currently there is no war to retrieve one specified message from the 
processor, the only way i think is using an hashmap to keep it on Recover right?

and the EP's persist(message ,callback) ,I think the callback should provide 
the persistence message's seqNr too,currently I need to use the lastSeqNr or 
getCurrentPersistenceMessage.seqNr to get It,I don't know is that right.but On 
my test ,the next persistence message will be lastSeqNr +1.

so If I can't retrieve message from the processor,so I need a db or somewhat 
right?and can only use the processor to store state, but not whole information?
--
>>>>>>>>>> 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.
-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

JOIN US. REGISTER TODAY!
Scala
Days
June 16th-18th,
Berlin

--
>>>>>>>>>> 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.
-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

JOIN US. REGISTER TODAY!
Scala
Days
June 16th-18th,
Berlin

--
>>>>>>>>>> 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.
-- 
Björn Antonsson
Typesafe – Reactive Apps on the JVM
twitter: @bantonsson

JOIN US. REGISTER TODAY!
Scala
Days
June 16th-18th,
Berlin

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