SAMP draft document introduction

Alasdair Allan aa at astro.ex.ac.uk
Thu May 1 06:26:36 PDT 2008


Mark Taylor wrote:
> that would be great - it would certainly go a long way towards  
> testing whether there are things we've forgotten to think about or  
> to write down.

The initial thing I've just hit is that when you start up a Hub, it  
should obviously check to see if one is already running.  It  
initially looks for a ~/.samp file, but if it finds one it should try  
to connect to the already running hub to see if its died without  
cleaning up the lock file. Now, it's a total waste of time to  
register the new hub, which is probably just about to die again, as a  
new SAMP client...

So I'm guess (since it doesn't need a client-id) I can just directly  
call getRegisteredClients() or getHubId() to check that we have a  
running hub rather than having to register and get a client-id first?

I've got a feeling this is going to be controversial, but it's a hack  
that I've used before with PLASTIC to build a Dashboard Widget  
(http://www.estar.org.uk/software/plastic_monitor_widget.zip) that  
does PLASTIC status monitoring.

The specification is vague on this point, so I'm hoping for wiggle  
room here...?

On the flip side is it a deliberate design decision that you have to  
register with the Hub to make any SAMP calls? This wasn't the case  
with PLASTIC and could come in handy at times.

Cheers,
Al.



More information about the apps-samp mailing list