[jmmc-tech-group] Internal SAMP Hub ?
Sylvain LAFRASSE
sylvain.lafrasse at obs.ujf-grenoble.fr
Wed Jan 18 06:20:50 PST 2012
Hello,
Following our previous discussions around internal hubs tracking and shutdown problems, our patch do:
- add a new HubTracker singleton to track all hubs, then being able to check if any hub is still currently running inside the executing JVM;
- properly handle shutdown hooks (only one central hook for the whole jSAMP stack, that ensure ordered clients cleanup first, then hubs shutdown at last, and should avoid zombie client/hub issues - maybe WeakReferences would be one step beyond).
Best regards,
------------------------------------------------------------------------------------------------------------------------
Sylvain LAFRASSE
Tel : +33 (0)4 76 63 55 30 Fax : +33 (0)4 76 44 88 21
IPAG 414, rue de la Piscine
Domaine Universitaire de Saint-Martin-d'Hères BP 53
France 38041 Grenoble cedex 9
------------------------------------------------------------------------------------------------------------------------
On 16 janv. 2012, at 16:44, Mark Taylor wrote:
> Sylvain,
>
> I took a quick look, but I'm not thinking much about JSAMP at the moment.
> Can you remind me what problems these fixes are solving for you, and how
> important it is to you to get them included?
>
> Mark
>
> On Mon, 16 Jan 2012, Sylvain LAFRASSE wrote:
>
>> Helo Mark,
>>
>> First the JMMC team would like to wish you a happy new year, as we are not that late in january :)
>> Did you have the time to take a look at our 2 late-2011 SAMP patches by the way ?
>>
>> Amicalement,
>> Sylvain
>>
>>
>> On 20 déc. 2011, at 11:52, Sylvain LAFRASSE wrote:
>>
>>> And in the same way, a new snowy patch on an idea of Laurent (also containing the former one), to only have one shutdown hook doing the cleanup in a predictable order (i.e shutting down clients first, hubs last).
>>>
>>> And Merry Christmass !
>>> Sylvain
>>>
>>> <Archive.zip>
>>>
>>>
>>> On 16 déc. 2011, at 14:57, Sylvain LAFRASSE wrote:
>>>
>>>> Dear Mark,
>>>>
>>>> Here is a patch we developed to come over multiple hubs situation, while still fulfilling our primary need.
>>>> I hope it will make its way in your next release...
>>>> In the mean time, we wish you a pleasing year end !
>>>>
>>>> <Archive.zip>
>>>>
>>>> Amicalement,
>>>> Sylvain LAFRASSE
>>>>
>>>>
>>>> On 13 déc. 2011, at 15:01, Mark Taylor wrote:
>>>>
>>>>> Hi Laurent,
>>>>>
>>>>> although I think that in the large majority of practical cases there will
>>>>> not be a requirement for multiple hubs to run simultaneously, singleton
>>>>> doesn't sound quite right to me. For one thing, the singleton pattern
>>>>> suggests that only one instance of a class ever exists
>>>>> in the runtime environment, whereas here you might have different
>>>>> instances at different times. Also it is conceivable that you might
>>>>> want to run multiple hubs simultaneously with different profiles.
>>>>> I agree that it is rather a specialised requirement, but I think that
>>>>> enforcing it at the API level would be unnecessary and suggest
>>>>> an architectural constraint which does not exist.
>>>>>
>>>>> Mark
>>>>>
>>>>> On Tue, 13 Dec 2011, Laurent Bourges wrote:
>>>>>
>>>>>> Dear mark,
>>>>>>
>>>>>> I started to do it yesterday and I gave up as Sylvain was arguing that it
>>>>>> should be done in JSamp directly.
>>>>>>
>>>>>> I will now code a new patch on your latest code 1.3.2 to provide:
>>>>>> - Hub singleton pattern: runHub methods return a new Hub instance without
>>>>>> keeping any reference on created Hub instances: I think "we" should use the
>>>>>> singleton pattern here
>>>>>> - HubAction already uses Hub.runHub() methods so using the singleton pattern
>>>>>> should solve our issue
>>>>>>
>>>>>> What's your opinion ? Is there any reason not to apply the singleton pattern
>>>>>> i.e. is it possible to have two Hub instances running at the same time
>>>>>> (profiles ...) ?
>>>>>>
>>>>>> Laurent
>>>>>>
>>>>>> Le 13/12/2011 11:17, Mark Taylor a écrit :
>>>>>>> I see what you mean, but I don't want to make another release
>>>>>>> straight away. To solve this problem I suggest you copy the
>>>>>>> source code from the GuiHubConnector class to make a suitable
>>>>>>> action, and keep track of any hubs it creates in your code.
>>>>>>>
>>>>>>> Mark
>>>>>>>
>>>>>>> On Mon, 12 Dec 2011, Sylvain LAFRASSE wrote:
>>>>>>>
>>>>>>>> ….but ! Something is still missing :-/
>>>>>>>>
>>>>>>>> If I use the action provided by GuiHubConnector::createHubAction(false, …)
>>>>>>>> to start a new hub from within my JNLP application, I am still not able to
>>>>>>>> retrieve whether the current hub is running internally or not…
>>>>>>>> A static boolean (with its public getter) in the Hub class is definitly
>>>>>>>> missing.
>>>>>>>>
>>>>>>>> Best regards,
>>>>>>>> Sylvain
>>>>>>>>
>>>>>>>>
>>>>>>>> On 12 déc. 2011, at 14:28, Sylvain LAFRASSE wrote:
>>>>>>>>
>>>>>>>>> On 12 déc. 2011, at 13:59, Mark Taylor wrote:
>>>>>>>>>
>>>>>>>>>> On Tue, 22 Nov 2011, Sylvain LAFRASSE wrote:
>>>>>>>>>>
>>>>>>>>>>> On 22 nov. 2011, at 13:43, Mark Taylor wrote:
>>>>>>>>>>>
>>>>>>>>>>>> On Tue, 22 Nov 2011, Sylvain LAFRASSE wrote:
>>>>>>>>>>>>
>>>>>>>>>>>>>>>>> Do you have any idea when we can reasonably expect a
>>>>>>>>>>>>>>>>> final release for distribution ?
>>>>>>>>>>>>>>>> what are your constraints/requirements/wishes?
>>>>>>>>>>>>>>> As always with bug fixes, the sooner the better!
>>>>>>>>>>>>>>> But we surely could live without it for a few weeks...
>>>>>>>>>>>>>>> What were your initial plan release-wise ?
>>>>>>>>>>>>>> Depends how it goes, but probably I was going to wait and see
>>>>>>>>>>>>>> what
>>>>>>>>>>>>>> issues came up with the current release once people start to
>>>>>>>>>>>>>> test
>>>>>>>>>>>>>> and deploy a few Web Profile clients, and perhaps make a
>>>>>>>>>>>>>> release
>>>>>>>>>>>>>> when SAMP 1.3 makes RECOMMENDATION, hopefully about March.
>>>>>>>>>>>>>> If you're keen though I might be persuaded to release
>>>>>>>>>>>>>> something
>>>>>>>>>>>>>> earlier.
>>>>>>>>>>>>> March seems a bit (too) far from now for us, as we are eager to
>>>>>>>>>>>>> push a first beta of AppLauncher to IVOA mailing lists...
>>>>>>>>>>>>> Maybe a little 1.3.2 with Laurent's fix and the 2 new methods
>>>>>>>>>>>>> could make its way earlier ?
>>>>>>>>>>>>>
>>>>>>>>>>>>> Anyway I know all this is on best effort mode, so keep up the
>>>>>>>>>>>>> good work for us ;)
>>>>>>>>>>>>> Sylvain
>>>>>>>>>>>> OK I can probably do something, I'll try to get back to you in the
>>>>>>>>>>>> next week or two with an update. If you don't hear by the end of
>>>>>>>>>>>> the year, you can remind me.
>>>>>>>>>>> Yeah !!!
>>>>>>>>>> voila!
>>>>>>>>>>
>>>>>>>>>> http://software.astrogrid.org/doc/jsamp/
>>>>>>>>> :) :) :)
>>>>>>>>>
>>>>>>>>>> --
>>>>>>>>>> Mark Taylor Astronomical Programmer Physics, Bristol University,
>>>>>>>>>> UK
>>>>>>>>>> m.b.taylor at bris.ac.uk +44-117-928-8776
>>>>>>>>>> http://www.star.bris.ac.uk/~mbt/
>>>>>>>>
>>>>>>> --
>>>>>>> Mark Taylor Astronomical Programmer Physics, Bristol University, UK
>>>>>>> m.b.taylor at bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
>>>>>>
>>>>>>
>>>>>> --
>>>>>> Laurent Bourgès
>>>>>> Software engineer
>>>>>> (Short-term Contract)
>>>>>> +33 4 76 63 55 19
>>>>>> JMMC, IPAG - CNRS
>>>>>> France
>>>>>>
>>>>>>
>>>>>
>>>>> --
>>>>> Mark Taylor Astronomical Programmer Physics, Bristol University, UK
>>>>> m.b.taylor at bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
>>>>
>>>
>>
>>
>
> --
> Mark Taylor Astronomical Programmer Physics, Bristol University, UK
> m.b.taylor at bris.ac.uk +44-117-928-8776 http://www.star.bris.ac.uk/~mbt/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/apps-samp/attachments/20120118/760ca83c/attachment-0002.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Archive.zip
Type: application/zip
Size: 26691 bytes
Desc: not available
URL: <http://www.ivoa.net/pipermail/apps-samp/attachments/20120118/760ca83c/attachment-0001.zip>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.ivoa.net/pipermail/apps-samp/attachments/20120118/760ca83c/attachment-0003.html>
More information about the apps-samp
mailing list