µManager's BSH scripting via network

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

µManager's BSH scripting via network

Karl Bellve-3

Follow up on from my TCP/IP thread...

Update first, then questions..

I have successfully used KNIME nodes to remotely set µManager's device properties using Matt Neuro's MMRest Server. 

The next step is I need access to more of µManager's core/gui API. I could make the functions available individually, but I think that would be tedious, and sort of hard coded to a set of µManager's core/gui API. 

I think an approach is to remotely load bean shell scripts and have the remote µManager execute them. This would allow KNIME access to anything a bean shell script would have access to, without being hard coded to a particular version of µManager API. Possible? Issues?

Any comments/suggestions welcome.


Cheers

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: µManager's BSH scripting via network

Karl Bellve-3


On Thu, May 18, 2017 at 2:55 PM Karl Bellve <[hidden email]> wrote:

<snip>

I think an approach is to remotely load bean shell scripts and have the remote µManager execute them. This would allow KNIME access to anything a bean shell script would have access to, without being hard coded to a particular version of µManager API. Possible? Issues?



It is a GUI implementation but it should work for passing external scripts.
 

Cheers

Karl Bellvé
Biomedical Imaging Group
Molecular Medicine
University of Massachusetts Medical School

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
micro-manager-general mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/micro-manager-general
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: µManager's BSH scripting via network

Matthijs
In reply to this post by Karl Bellve-3
Hi Karl,
Karl Bellve-3 wrote
Follow up on from my TCP/IP thread...

The next step is I need access to more of µManager's core/gui API. I could
make the functions available individually, but I think that would be
tedious, and sort of hard coded to a set of µManager's core/gui API.
My original idea on this was to use reflection on MMCore to automatically make all functions available, but that would get quite tedious as well due to function overloading - one would have to specify parameter type in the JSON requests and deal with all the overhead. Some form of "just execute this script" sounds like a far more usable solution!

Karl Bellve-3 wrote
Any comments/suggestions welcome.
The only comment I would like to add, is that at some point security may become an issue. For the MMRestServer, I did not implement any form of authentication since it uses a non-standard port and the odds of anyone in my department abusing it are astronomical, but in theory anyone in your department may be able to get a live view of your microscope and do anything to it, within the scopes of a beanshell script.

I would not worry about it for a single use-case, but the client-server communication must implement proper authentication and ideally also encryption before it sees more widespread use.

Looking forward to seeing how this works out!

All the best,

  Matthijs
Loading...