Re: [Plastic-devs] Some ideas
Brought to you by:
johndavidtaylor,
thomasboch
|
From: John T. <jon...@gm...> - 2006-04-27 13:51:56
|
Hi Pierre, Good to hear from you. Pierre Fernique wrote: > Dear Plastic developers, > > I'm playing with the last Plastic developements/implementations and I > must say that I am really positively surprise by the result. > > Just one point about the Plastic Hub. I wonder if it is not too > difficult for a user to understand : if and why he has to launch a Hub > ? which one ? if and why he has to register each collaborative > applications ? If and how he can stop the current plastic Hub ? > > I) One solution could be : > -------------------------- > A) When a Plastic compatible application starts: > 1) If it has an inside plastic hub capability, it launchs it, but > only if there is not another Hub already runnning > 2) Systematically it registers itself > B) When this application stops: > if it is the last registered application, it tries to stop the hub > if it can. > > The B) point means that it could be interesting to have a PLASTIC > message asking to the PLASTIC hub to stop itself. > Or we can imagine that the PLASTIC HUB should stop itself when the > last client unregisters. > I think you're right that we need to make things easier to understand for the user, but I believe that how we do it is best left to the individual application developers, rather than prescribed by the plastic spec. I'd certainly agree that no application should "bump" another hub by launching its own internal hub when another one is running. But whether an application registers itself automatically or automatically starts a hub is probably best left in the hands of the individual applications, since they know their users best. As for shutting down hubs, I see no reason why we can't give applications the power to leave the system as they found it. If the application didn't start the hub, it probably is polite not to shut it down. If the application DID start the hub, then yes it could request that it shuts down. So, in my opinion we can agree on a message that requests hub shutdown. How an individual application uses it is up to that application's authors. How an individual hub implements it (ignore it? prompt the user? shut down without question?) is probably a decision for the hub author, in consultation with users. I don't _think_ it needs to mandated as part of the spec. I should point out that any application that can control the system browser (e.g. a java web started application) can start the AR hub automatically by requesting a particular URL. This functionality is built in to the AR's Finder class. I have a Java library that uses this and allows the application developer to construct a policy for how he wants to deal with starting Plastic: e.g. do nothing/wait (blocking) for a hub/start the AR-hub automatically. If anyone's interested it's on the website. > We can also imagine that a plastic hub implementation should remove a > registered client if it can not contact it (crash...). > Again this is an implementation detail. In the AR-hub there already is a facility to manually "purge" dead applications. I didn't make it automatic as I wasn't sure if there could be transient effects that would occasionally cause an application to not respond, but actually to be alive and well. Do people want me to make it automatic (one strike and you're out?)? > II) Another solution could be: > ------------------------------ > A) When a Plastic compatible application starts, it does a > pre-registration. I mean, it writes somewhere (.plastic dir) > that it is running and what is its plastic address (?) > B) When a Plastic Hub starts, it will register automatically all > "pre-registered" applications. > C) Whend a Plastic compatible application wants to publish data > 1) If there is no running plastic hub, it tries to launch one if it > can > 2) it publishs its data > > For the stop phase, we can follow the same rules that in I) proposition > > > The second proposition is certainly the better (the hub is running > only if it is required). But it could imply a complex plastic address > negociation between a "pre-registered" application and a new running hub. > > Some comments ? I think these are interesting ideas and best addressed by the application writers (though there's nothing wrong with us publishing our experiences and "best practice" to help new folk along.) Of the apps I've written, most of them use the library referred to above, and simply wait for a Plastic connection. e.g. http://plastic.sourceforge.net/multiproject/tabstat/tabstat.jnlp will just sit there waiting for you to start Plastic, and then connect automatically. On the other hand this application: http://plastic.sourceforge.net/multiproject/vast/vast.jnlp NEEDs the A(C)R to do anything, and so will automatically start the AR (after humbly prompting the user). John |