I was wanting to make a renderfarm that could be used over the internet and the lan, and is fully cross platform capable. I know basically how I want it to work, and after looking around, I believe that PHP/SQL for the server would be best, and python for the clients (and down the track I would like to be able to make ‘sub-servers’ in python that will be able to report to the main server online, and control all the clients on the lan. This would minimise traffic flow over the internet.).
For this, I would need to be able to learn gui design and make python files that would run on their own. So far all the tutorials I have seen have been for the gui that comes with python, or else scripting for blender.
Does anyone know where there are any good tutorials that will teach python with the aim to make stand alone programs, or any tutorials on how to pass variables and files to and from a php server?
I have done a fair bit of php/mysql, some c++, some VB and some javascript.
hi, there’s already a couple of scripts that are similar if not the same.
search this forum for renderfarm(s) should bring up a couple.
or google blender renderfarm that should bring up a couple also. then it’s just a matter of picking them apart & modifying them to your needs.
m.a.
Thanks for that, I am checking a few out. Haven’t been able to find any that use a php server though. Any tutorials anywhere on sending variables, or if possible files between python and php? I cant find any info on this.
Steps I’ll use my magically search abilites once again…Im just learning wxpython myself and have looked at PHP code before. Perhaps this might help? http://www.csh.rit.edu/~jon/projects/pip/
Thanks for that, but not really what I was looking for. This link looks to be if you wish to use python code with php on the server. I am looking for a way to have a php server (with no python) that can send and receive variables to a python program on a computer somewhere that has no php installed, just python. Is this possible?
This is possible, actually.
The python machine would have to have some sort of way to communicate with the server of course. You could use sockets, shared files, database, whatever…
Example of using sockets:
PHP machine gets a request to render. It uses PHP to connect (via TCP/IP socket) to a python script running on the remote machine. It talks to it and gives it the job description. Python then fetches whatever files, runs blender with the appropriate parmaters, etc.
Example using DB:
Any number of python machines are running custom python daemons perhaps with SQLAlchemy (an ez python database toolkit). They ping a specific table in a remote database to look for render jobs. The PHP server would merely have to write to that table.
Python is a full featured language, and can do just about anything you’d care to do. But all of that has absolutely nothing to do with blender - its all in the realm of python. Blender merely uses python as its scripting language. Python by itself is a powerful application development language, and the systems I described above have nothing to do with blender cuz they could just as easily run some other app or queue some other jobs. For that stuff, you might wanna investigate the typical python tutorials out there, rather than blender specific stuff.
Vek, thanks for that. The option that I was looking for is more along the lines of sockets. I havn’t done any socket programming yet, but am keen to learn. I have looked up some details on socket programing in python, and looks like what I want. Does anyone know of any python scripts that uses sockets for sending/receiving files? I would love to have a look at an example to see how it works, and figured that one of the scripts around here would use it.
If I find examples of sockets in python and in php, would that be enough to get them to work together? ie. is sending files/variables over sockets a standard between all languages?