0

I have project building script on Linux server which performs 10 operations within 100 seconds. Now I need to provide designers and artists of the project a way to run that script with minimal efforts from their side possible (what I think the best is "Build" button within http://ourproject.page) and being able to track building process (view result of each operation as it happens).

What's the best/easiest way to implement it?

Slaus
  • 2,086
  • 4
  • 26
  • 41
  • 1
    The implementation should be as straightforward as you are describing it: a page that allows your end-users to launch a "build", then keeps polling the server to give feedback on task-completion. If you had more technical questions in mind, you probably need to narrow the scope of your question. – b2Wc0EKKOvLPn Mar 08 '15 at 21:31
  • @ylabidi, is **polling** the only way to track script's flow? What server-side application should I choose? What fits best? Where can I find tutorial about it? Anything about these questions will be the fitful answer, I suppose. P.S. building script is written in Python, btw. – Slaus Mar 09 '15 at 11:51
  • 1
    What is it, you mean by "server-side application" ? There is no application that does what you want out of the box. If by application you mean: **technology stack**, a python-based stack, or a java-based stack, then unless you have some specific requirements that warrants using this stack over the other, the choice is more or less arbitrary and up to you. – b2Wc0EKKOvLPn Mar 09 '15 at 12:07
  • 1
    Also **polling** is not the only way to give your users feedback on the task completion. But it seems to me, the easiest and most straightforward approach given your use case (there is nothing to do other than tracking task completion). You can also use a push-based approach, where updates are initiated from the server. And here the choice of a library or a framework is tied to the technology stack you'll be using to develop your application. – b2Wc0EKKOvLPn Mar 09 '15 at 12:25
  • Never heard about **technology stack** :). What **technology stack** fits more regarding current conditions (script is on Python). Where can I find **polling** and/or **push-based** tutorial? Could you please answer on it as a normal answer so I could mark it, please? – Slaus Mar 09 '15 at 12:44

1 Answers1

1

Since you mentioned your script is written in python, and what you're interested in, is basically an example on how to implement a simple feedback between a client and a server, this is a simple implementation based on the flask web framework. This implementation was suggested in an answer to a question similar to yours. If you're not familiar with flask, you'll find tutorials on the page I linked above.

Community
  • 1
  • 1
b2Wc0EKKOvLPn
  • 2,054
  • 13
  • 15
  • As I understand from those links, **WebSockets** is the modern substitution of both **polling** and **push-based** sophisticated approaches and should be used today instead, am I right? – Slaus Mar 09 '15 at 15:11
  • 1
    Well, you can use websocket. But that would imply adding at least 2 other dependencies client-side and server-side to your application. And honestly I don't think the use case you have, warrants that complexity. – b2Wc0EKKOvLPn Mar 09 '15 at 16:24
  • so **WebSockets** is more complicated than simulating them with maintaining **polling** and/or **push-based** approaches? Wasn't diving deep yet into these topics but at least samples of both look a bit larger than of **WebSockets** ... – Slaus Mar 10 '15 at 19:01
  • 1
    I didn't say **WebSocket** is complicated. Complexity stems from the number of libraries/technologies you'll have to deal with, to satisfy a set of requirements that doesn't require such complexity. – b2Wc0EKKOvLPn Mar 11 '15 at 01:23