ok… lets break down Octoprint.
UI:
- Bootstrap/jquery (e.g. html5, CSS, javascript) web application that uses socket api and rest apis to communicate to a backend
Backend:
-
Python based websocket+restapi that communicates to the 3d printer for managing print queues, head locations, etc.
-
Firewalls are not something of concern here given this would not sit in the DMZ or public facing zone of a network being its an internal network service and even then it runs on standard 80/443 tcp. Put a WAF / Load Balancer in front of it and your good.
Sidebar on development setup
Also, need to break the myth here that one needs a “beefy” computer to develop on, exepecially with python and web apps. One can build some serious web based applications on a 2Gb netbook like the one I had for about six years, hp mini 110. Plus my tech firm where we built full production grade sits like silkfair and meterbase (an IoT management system for Realtors and Rental property management firms). These were developed on less, a Pentium 4 with 2Gb ram for the linux server and development+graphic work was done with a Dell laptop.
Just pointing out there, any computer with a text editor, decent standards compliant browser, and a good bit of knowledge can build some amazing stuff.
Now back to the octoprint stuff.
The python api (SocksJS, flask) doesn’t really have anything to do with the frontend UI other than parsing a bunch of jinja2 applications (ie server side rendered html) as one can see in https://github.com/foosel/OctoPrint/blob/master/src/octoprint/templates/index.jinja2.
So in summary, Octoprint is a restapi server built on top of python flask which is extended with web sockets via sock.js and manages print queues to a 3d printer. There’s no magic here just standard web programs (http/rest, websockets, and server side python for serial device control + html rendering).
Octoprint’s RestAPI is well documented at http://docs.octoprint.org/en/master/api/. One could anything that talks HTTP/1.1 to talk to an octoprint powered printer.