I have a service that relies on path dependent types for its protocol such 
that:

class Service[P <: Protocol] extends PersistentActor  {
   type Request = P#Request

   sealed trait RequestEvent
   case class RequestAccepted(id: RequestId, request: Request) extends 
RequestEvent

   override def receiveCommand: Receive = {
      case request: Request => persist(RequestAccepted(request.id, request)) 
{event => ...}
   }
}

The request type is a base type such that any implementation simply extends 
it 

case class RequestA(id: RequestId, somethingA:Any) extends Request

case class RequestB(id: RequestId, somethingB:Any, processId: String) 
extends Request

How would one go persisting path dependent types with Protobuff in this 
case?  

Since 

a) *RequestAccepted* case class cannot be in an object since *Request* is 
not known outside of Service class

b) *Request *is only the base type.  How do I ensure it persists 
the implementation type instead?  
=> I read something about extensions and unions, but doesn't it request the 
*RequestAccepted* case class to specify the implement type instead?


-- 
>>>>>>>>>>      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 https://groups.google.com/group/akka-user.
For more options, visit https://groups.google.com/d/optout.

Reply via email to