[kepler-dev] best practices for minimizing process start-up latency?

Rich Morin rdm at cfcl.com
Thu Jan 9 18:26:04 PST 2014


I have some programs (eg, PDE solvers, FEM tools) that I'm interested
in using as part of a Kepler application.  Looking in the Kepler docs,
it appears that I can use fairly arbitrary command-line programs as
actors, either for control or processing.  Works for me!

However, I'm not sure what behavior and features I can depend on.  I
am an old hand at Unix, but quite new to Java and its ecology, aside
from playing around with Clojure.  (Any other Clojurists here? :-)

More generally, I'm hoping that many of the things I'll need to do are
covered by best practices, helpers, etc.  So, if anyone here can offer
advice, caveats, pointers, or other comments, please do!

-r


The following questions all have to do with the facility that allows
command-line programs (etc) to be run as actors.

Q:  Is it based on something like the system(2) call?

    If so, the command string cannot use shell extensions
    (eg, aliases, functions, shell variables, wildcards).

Q:  Can shell scripts be used as actors?

        :
        echo 'Hello from Bash'

Q:  Can interpreted (eg, shebang-based) scripts be used as actors?:

        #!/usr/bin/env ruby
        puts 'Hello from Ruby'

    FWIW, a quick test using time(1) on a 2.8 MHz Mac Pro indicates
    that the above script takes 0.137 seconds on the first run, but
    only 0.007 seconds thereafter.

Q:  Is MoML all that is needed (in general) to specify the command
    name, parameters, I/O mappings, etc?


The following questions have to do with the inter-actor "piping"
and best practices for command debugging and optimization.

Q:  Can I add recording and/or archiving as attributes to a pipe?

    So, for example, could I tell Kepler to turn on recording for
    particular pipes, without needing to explicitly add an actor?
    (This could be used for "tracing" key paths in an app.)

Q:  What is the Best Practice for using a server (farm)?

    If a command has a substantial internal start-up time, I may
    want to run it on a server, but still access it as an actor.

    At the PII conference, there was a talk about using REST to
    access servers.  Is this the current Best Practice?  FWIW,
    a Ruby script could also interrogate a daemon, but there may
    be some built-in (eg, MoML) facility I'm simply missing.

Q:  If you have read this far, you are probably fairly expert at
    Kepler and/or Ptolemy.  If this is the case, and you are open
    to occasional consulting, please drop me a line, offlist.

 -- 
http://www.cfcl.com/rdm           Rich Morin           rdm at cfcl.com
http://www.cfcl.com/rdm/resume    San Bruno, CA, USA   +1 650-873-7841

Software system design, development, and documentation




More information about the Kepler-dev mailing list