Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [riena-dev] Remote EventAdmin Service

That seems to be exactly the Apple-approach you've mentioned where a client keeps a connection line open for a while. I just thought that Riena has something similar to what ECF has done with the distributed RemoteAdmin Service (http://wiki.eclipse.org/Distributed_EventAdmin_Service ). But if not it's ok, I just need to know if I can use some existing code.

Regards,
Eugen

Am Jun 15, 2009 um 17:39  schrieb Christian Campo:

Isnt just a method on the server like


public Event pushNotification(ClientId clientId, int seconds) {

       for (i=0;i<seconds;i++) {

              Event event = checkQueueForClient(clientId);
              if (event!=null) {
                     return even;
              }

        }
        return null;



And then the client runs this on a daemon thread as a remote service call


while (true) {
	Event event = pushNotification(myId, 3600);
	if (event!=null) {
		processEvent(event);
      }
}


but for some reason I am not sure if that is what you meant ?

christian



Am 13.06.2009 um 17:51 schrieb Eugen Reiswich:

Hi Christian,

What could work BTW is the model that Apple is currently following
with its push notification.

thanks a lot. That's exactly I wanted to know. I also know about the
apple etc. approach and hoped that Riena already offers an
implementation based on this idea. But if I need to implement this by
myself it would be grate to see a code snippet how this could work
with Riena.

Regards,
Eugen


Am Jun 13, 2009 um 17:40  schrieb Christian Campo:

Hi Eugen,

Riena Remote Services work like the very common Webservice pattern.
They use Hessian as the protocol (a binary protocol) but use HTTP as
transport so pretty much act like an Axis, CXF service stack. That
means that they dont keep an connection between client and server
once a call is finished. Since the clients are typically behind
firewalls, routers and so on and dont have a public IP address that
can be called a server can not call a client, only the client calls
the server.

Depending on the nature of the event of course you could add
something to the transport layer to add events in the return
envelope if you have such an event but you have to wait for the
client to call the server again. The second problem is that Riena
encourages to use the stateless webservice model (thats no
obligation but it scales much better). So if you have 5 or 10
servers to deal with your hundreds and thousands of clients each
call could get to any server instance. So you have make sure you
have the event at your hand at that server when the client calls.

If all this makes no sense (I am sorry I am doing this way too long
and went over push notification many many times) let me know and I
can maybe explain more details.

What could work BTW is the model that Apple is currently following
with its push notification. The client keeps a connected line (a web
service call) to one server instance). The call will wait for a
longer time (say 5 minutes). If you like to send an event to a
client you have to send that event to the server that keeps a line
to all the clients and this server will let the call return with a
value indicating the event.
If the 5 minutes expire the call returns with null and a new one is
started. This 5 minute (not sure if it has to be 5 minutes)
mechanism because if the software never closes the line, the lower
IP layer eventually will.
This mechanism is BTW also used by ActiveSync from Microsoft Exchange.

Hope this helps.

christian campo

Am 13.06.2009 um 12:54 schrieb Eugen Reiswich:


Hi folks,

I try to figure out how an OSGi EventAdmin Service could be realized
remote with Riena? I basically need to propagate server side events
to
all clients. If it's not possible, how can I realize a client/ server
observer pattern with Riena?

Regards,
Eugen
_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev

_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev

_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev

_______________________________________________
riena-dev mailing list
riena-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/riena-dev



Back to the top