|Re: ECF Clients/Servers questions [message #621626 is a reply to message #621625]
||Thu, 14 February 2008 16:35
| Scott Lewis
Registered: July 2009
Patrick Dempsey wrote:
> I have two questions about ECF.
> My first question has to do with an understanding of how the concept of
> clients and servers work, using the
> org.eclipse.ecf.examples.remoteservices.client and .server as the
> example. Both the .client and the .server are really
> ECF_GENERIC_CLIENTS, and need an ECF Server to be up and running in
> order to work. The default server is at
> ecftcp://ecf.eclipse.org:3283/server The
> org.eclipse.ecf.examples.remoteservices.server is not a stand alone
> server that org.eclipse.ecf.examples.remoteservices.clients can connect
> to. Is that correct?
Yes. That's correct. The
org.eclipse.ecf.examples.remoteservices.server is a server WRT the
service provided (IRemoteEnvironmentInfo)...but you are correct that it
is a client in a pub/sub group hosted at
This was a design choice, however...not imposed by ECF at all. It is
just as possible to connect directly to a given target (not a pub/sub
group), and proceed with using the remote services API as shown in this
example. In fact, other providers have other characteristics in this
regard...in the case of r_OSGi as a provider, for example, the connect
target is a peer (rather than a pub/sub group).
> Do you have an example or thoughts on the pattern to use for
> reconnecting clients. I have a simple ecf client/server based on the
> org.eclipse.ecf.examples.remoteservices. examples, and run them on my
> local machine with the server bundle running in the same runtime as my
> ecf generic server on my local machine. Sometimes the ecf generic
> server starts after my server which causes my server to not be able to
> connect and it throws a org.eclipse.ecf.core.ContainerConnectException.
> Do you just recommend spawning a thread, trying to connect catching the
> connect exception, waiting some period of time and trying again?
For this use case (timing issues on startup) I believe a good answer is
'yes' . You will have to define some simple rule for giving up that
makes sense with your environment (i.e. after 5 minutes of trying give
up) but if you expect to have your server be reliable then the strategy
you define should be OK.
BTW, there are real/known limits to the generic server's scalability.
It wasn't intended or designed to be truly scalable. If you are
intending to do a more serious messaging server implementation I would
suggest using one of the jms or jgroups providers available at
or use another, commercial implementation and create your own provider
(e.g. tibco, etc., etc). If you do so, please consider sharing it with
Powered by FUDForum
. Page generated in 0.03644 seconds