web interface

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ajar

    #1

    web interface

    Hi,

    I have a stand alone application which does some scientific
    computations. I want to provide a web interface for this app. The app
    is computationally intensive and may take long time for running. Can
    someone suggest me a starting point for me? (like pointers to the
    issues involved in this, or even better any of the existing tools for
    doing this...)

    Ajar

  • Jorge Godoy

    #2
    Re: web interface

    "Ajar" <ajartaknev@gma il.com> writes:
    [color=blue]
    > I have a stand alone application which does some scientific
    > computations. I want to provide a web interface for this app. The app
    > is computationally intensive and may take long time for running. Can
    > someone suggest me a starting point for me? (like pointers to the
    > issues involved in this, or even better any of the existing tools for
    > doing this...)[/color]

    For the long running task you might get some idea from cvsmonitor (Perl
    code). It has a long running task that is updating some repositories and
    giving feedback from time to time to the user.

    One thing is: detach all what is possible from user interface and give
    feedback from time to time to avoid browser timeout and the user thinking the
    app hanged.


    Be seeing you,
    --
    Jorge Godoy <godoy@ieee.org >

    Comment

    • Charl P. Botha

      #3
      Re: web interface

      I'm using SkunkWeb [1] for building a responsive interface to a number
      of long-running processes. See [2] for an example of running
      long-running processes in SkunkWeb and monitoring them.

      One of the advantages (to my mind) that SkunkWeb offers over many of
      the other Python application servers and web frameworks is that it's
      natively multi-processing vs. multi-threading.

      [1] http://www.skunkweb.org/
      [2] http://wiki.skunkweb.org/sw/ExampleO...RunningProcess

      --
      charl p. botha - http://cpbotha.net/

      Comment

      • John J. Lee

        #4
        Re: web interface

        Jorge Godoy <godoy@ieee.org > writes:
        [color=blue]
        > "Ajar" <ajartaknev@gma il.com> writes:
        >[color=green]
        > > I have a stand alone application which does some scientific
        > > computations. I want to provide a web interface for this app. The app
        > > is computationally intensive and may take long time for running. Can
        > > someone suggest me a starting point for me? (like pointers to the
        > > issues involved in this, or even better any of the existing tools for
        > > doing this...)[/color]
        >
        > For the long running task you might get some idea from cvsmonitor (Perl
        > code). It has a long running task that is updating some repositories and
        > giving feedback from time to time to the user.
        >
        > One thing is: detach all what is possible from user interface and give
        > feedback from time to time to avoid browser timeout and the user thinking the
        > app hanged.[/color]

        If you're using CGI:

        You usually have to start the long job by asking a separate server
        process to do it -- eg. using XML RPC. Otherwise, you'll get browser
        timeouts (and maybe web server timeouts too). Your little server
        process can then do e.g. os.fork (unix) or subprocess.Crea teProcess
        (win32) (subprocess is only available in Python 2.4) to actually start
        your long job. Use a Refresh header (use a META HTML element, or set
        up your web server appropriately) in your "waiting for job to finish"
        web page (or reload the page from JS code) to poll the server to see
        if the job has completed.


        John

        Comment

        • Tom Anderson

          #5
          Re: web interface

          On Mon, 7 Nov 2005, Ajar wrote:
          [color=blue]
          > I have a stand alone application which does some scientific
          > computations. I want to provide a web interface for this app. The app is
          > computationally intensive and may take long time for running. Can
          > someone suggest me a starting point for me? (like pointers to the issues
          > involved in this,[/color]

          You're probably best off starting a new process or thread for the
          long-running task, and having the web interface return to the user right
          after starting it; you can then provide a second page on the web interface
          where the user can poll for completion of the task, and get the results if
          it's finished. You can simulate the feel of a desktop application to some
          extent by having the output of the starter page redirect the user to the
          poller page, and having the poller page refresh itself periodically.

          What you really want is a 'push' mechanism, by which the web app can
          notify the browser when the task is done, but, despite what everyone was
          saying back in '97, we don't really have anything like that.
          [color=blue]
          > or even better any of the existing tools for doing this...)[/color]

          Pise does what you want, and much more:



          But i have no idea if it's of any use to you - it was designed for
          bioinformatics programs, and might not be easily adaptable to other tasks.

          Old-enough-to-remember-the-push-hype-ly y'rs,
          tom

          --
          Exceptions say, there was a problem. Someone must deal with it. If you
          won't deal with it, I'll find someone who will.

          Comment

          • Michele Simionato

            #6
            Re: web interface

            <snip nifty example of using Livepage>

            I have been looking for an example like this for a while, so thanks to
            J.P. Calderone.
            Unfortunately, this kind of solution is pretty much browser-dependent.
            For instance,
            I tried it and it worked with Firefox, but not with MSIE 5.01 and it
            will not work with any
            browser if you disable Javascript. So, I don't think there is a real
            solution
            for this kind of problem as of today (I would love to be wrong,
            though).

            Michele Simionato

            Comment

            Working...