Hi,

Are you trying to make sure that if the server goes down, is restarted and a 
client reconnects, then it will get the messages that it was supposed to get 
when it was connected to the previous server instance?

Or are you trying yo make sure that if a client disconnects from a server and 
then reconnects to the same server, it will get all the messages that where 
sent while it was disconnected?

You also say that you want the clients to receive the messages once and only 
once, which is a hard thing to guarantee, since you can crash/disconnect at any 
time during your message sends to the client or during acknowledgement. How 
would you know for sure that the message is only delivered once?

I think that it would be better if you explained what the Application is 
supposed to do (from a client and server perspective) instead of how you have 
implemented it right now.

B/

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

Hi what I am trying to do is a push server,the actor path like this:

/apps/:appId/connections/:connectionId
 
the connectionId represent a single registered device,maybe connected via 
websocket or http or sockjs or tcp,so I have
an abstraction socket actor here :

/apps/:appId/connections/:connectionId/socket

and when a client connected in with appId 1 and connectionId 1,with 
websocket.assume that I am using Play,so the websocket Actor path will be

/system/websocket/:requestId/handler

,then the handler send an message to notify the actor system and register 
it,the connection actor now at :

/apps/1/connections/1 ,will start the socket actor

/apps/1/connections/1/socket,and the socket actor will reply the websocket 
handler actor a message with it's actorRef

now the socket Actor know the websocket handler and the websocket know the 
socket handler

seems as an binding at

/apps/1/connections/1/socket <====> /system/websocket/:requestId/handler

any message comes from the socket actor will go to the websocket handler ,and 
any message comes in will send to the socket actor

the socket actor here just to keep my work more easier.Then here comes :

I using an Persistente channel in the connection Actor,and it's actor path is:

/apps/:appId/connections/:connectionId/channel

and If a connection Actor receive a message from upstream,It will send the 
message via the persistent channel to deliver it to the socket Actor via it's 
path,when the client connected in,

you know that,the socket actor will receive the message,and confirm it,the 
offline message will never receive again after the client has been received it.


the message flow likes:
web REST API
        |
       \|/
message

        |
       \|/
/apps actor

        |
       \|/
/apps/:appId actor

        |
       \|/
/apps/:appId/connections actor

        |
       \|/
/apps/:appId/connections/:connectionId actor

        |
       \|/
/apps/:appId/connections/:connectionId/channel persistent channel

        |
       \|/
/apps/:appId/connections/:connectionId/socket

        |
       \|/
/system/websocket/:requestId/handler

        |
       \|/
websocket client


did that clear now?

and the problem is the webAPI maybe send a message,that I should broadcast to 
all registered connection Actor,and maybe the connection Actor has not been 
startup now.
So If I want the message to received by all the connection actor ,what should I 
do?

for (connectionId : registeredConnections){
     new channel for this Push operation
     send via channel
}

or just start up all the connection Actor and send them the message ,and after 
some idle time,stop the connection actor,cause some device may never connected 
in again.

I want to keep that messages for an App ,will send at lest and at most once to 
the connection Actor,so it is

/apps/:appId/connections actor

        |               (1 ---- n)  [send only once,and must be send]
       \|/
/apps/:appId/connections/:connectionId actor









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

I don't follow your question. The number of channels and actors are only 
limited by your systems resources (Memory and Storage).

What are you trying to achieve? What is it that you want to shut down?

B/

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

I ,If I want to deliver a message to 1 million actor,could I create 1 million 
Channel to send the message and then shutdown?
how about when the channel  is persistent Channel?

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