Re: [akka-user] Unpersist a processor

2014-03-24 Thread Heiko Seeberger
Konrad,

Got it; thanks.

A use case that comes to my mind is user registration: There's a
UserProfile actor, of course with a unique username, which could be used as
actor name and/or processor id. Once a user decides to unregister, the user
profile might have to be deleted for privacy reasons and it should also be
possible to reuse the now free username. Does that make sense?

Heiko


On Sun, Mar 23, 2014 at 7:07 PM, Konrad Malawski ktos...@gmail.com wrote:

 Hello Heiko,

 This can be achieved but at expense of having to delete all messages
 stored in the journal for a given processor id.

 This can be done from within the Processor by calling 
 deleteMessages(toSequenceNr
 = Long.MaxValue, permanent: Boolean = …), where permanent deletion is
 optional - soft deleted messages won't be replayed anyway, so it will
 seam as-if it's a fresh Processor.

 Hope this helps to answer the general question :-) If it's more of a
 real-world-app question, let's maybe check out an example scenario, because
 in general it feels a bit weird to re-use these ids (at least to me), as it
 might complicate reasoning about the system's state at some point in time…


 --
 Konrad Malawski
 geecon.org / java.pl / krakowscala.pl / gdgkrakow.pl

 From: Heiko Seeberger heiko.seeber...@gmail.com
 Reply: akka-user@googlegroups.com akka-user@googlegroups.com
 Date: 23 March 2014 at 12:21:38
 To: akka-user@googlegroups.com akka-user@googlegroups.com
 Subject:  [akka-user] Unpersist a processor

  Hi,

 Is it possible to remove a processor from the journal, so its id can be
 reused as a fresh processor later?

 Thanks
 Heiko
  --
  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.




-- 

Heiko Seeberger
Twitter: @hseeberger
Blog: blog.heikoseeberger.name

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


Re: [akka-user] Unpersist a processor

2014-03-24 Thread Konrad Malawski
Oh, yeah I can see that as a valid reason to reuse an id I guess - if
that's the apps requirements.
If one would want to have multiple users with the same username, an simple
id could be appended to the username I guess - both flows easily supported
by akka-persistence :-)

-- 
Cheers,
Konrad Malawski
blog.project13.pl | java.pl | geecon.org  | gdgkrakow.pl | krakowscala.pl


2014-03-24 7:17 GMT+00:00 Heiko Seeberger heiko.seeber...@gmail.com:

 Konrad,

 Got it; thanks.

 A use case that comes to my mind is user registration: There's a
 UserProfile actor, of course with a unique username, which could be used as
 actor name and/or processor id. Once a user decides to unregister, the user
 profile might have to be deleted for privacy reasons and it should also be
 possible to reuse the now free username. Does that make sense?

 Heiko


 On Sun, Mar 23, 2014 at 7:07 PM, Konrad Malawski ktos...@gmail.comwrote:

 Hello Heiko,

 This can be achieved but at expense of having to delete all messages
 stored in the journal for a given processor id.

 This can be done from within the Processor by calling 
 deleteMessages(toSequenceNr
 = Long.MaxValue, permanent: Boolean = …), where permanent deletion is
 optional - soft deleted messages won't be replayed anyway, so it will
 seam as-if it's a fresh Processor.

 Hope this helps to answer the general question :-) If it's more of a
 real-world-app question, let's maybe check out an example scenario, because
 in general it feels a bit weird to re-use these ids (at least to me), as it
 might complicate reasoning about the system's state at some point in time…


 --
 Konrad Malawski
 geecon.org / java.pl / krakowscala.pl / gdgkrakow.pl

 From: Heiko Seeberger heiko.seeber...@gmail.com
 Reply: akka-user@googlegroups.com akka-user@googlegroups.com
 Date: 23 March 2014 at 12:21:38
 To: akka-user@googlegroups.com akka-user@googlegroups.com
 Subject:  [akka-user] Unpersist a processor

  Hi,

 Is it possible to remove a processor from the journal, so its id can be
 reused as a fresh processor later?

 Thanks
 Heiko
  --
  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.




 --

 Heiko Seeberger
 Twitter: @hseeberger
 Blog: blog.heikoseeberger.name


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


[akka-user] Unpersist a processor

2014-03-23 Thread Heiko Seeberger
Hi,

Is it possible to remove a processor from the journal, so its id can be 
reused as a fresh processor later?

Thanks
Heiko

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


Re: [akka-user] Unpersist a processor

2014-03-23 Thread Konrad Malawski
Hello Heiko,

This can be achieved but at expense of having to delete all messages stored in 
the journal for a given processor id.

This can be done from within the Processor by calling 
deleteMessages(toSequenceNr = Long.MaxValue, permanent: Boolean = …), where 
permanent deletion is optional - soft deleted messages won't be replayed 
anyway, so it will seam as-if it's a fresh Processor.

Hope this helps to answer the general question :-) If it's more of a 
real-world-app question, let's maybe check out an example scenario, because in 
general it feels a bit weird to re-use these ids (at least to me), as it might 
complicate reasoning about the system's state at some point in time…


-- 
Konrad Malawski
geecon.org / java.pl / krakowscala.pl / gdgkrakow.pl

From: Heiko Seeberger heiko.seeber...@gmail.com
Reply: akka-user@googlegroups.com akka-user@googlegroups.com
Date: 23 March 2014 at 12:21:38
To: akka-user@googlegroups.com akka-user@googlegroups.com
Subject:  [akka-user] Unpersist a processor  

Hi,

Is it possible to remove a processor from the journal, so its id can be reused 
as a fresh processor later?

Thanks
Heiko
--
 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.

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