Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9635 > unrolled thread
| Started by | Josh English <Joshua.R.English@gmail.com> |
|---|---|
| First post | 2011-07-16 10:41 -0700 |
| Last post | 2011-07-16 15:48 -0400 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
Re: Looking for general advice on complex program Josh English <Joshua.R.English@gmail.com> - 2011-07-16 10:41 -0700
Re: Looking for general advice on complex program Chris Angelico <rosuav@gmail.com> - 2011-07-17 04:14 +1000
Re: Looking for general advice on complex program Michael Hrivnak <mhrivnak@hrivnak.org> - 2011-07-16 15:48 -0400
| From | Josh English <Joshua.R.English@gmail.com> |
|---|---|
| Date | 2011-07-16 10:41 -0700 |
| Subject | Re: Looking for general advice on complex program |
| Message-ID | <70643177-77ff-4616-ae79-640e8d5e8b92@glegroupsg2000goo.googlegroups.com> |
Chris, Thank you for spelling this out. I thought about this as a solution but I don't have the skills to create this server application, and I don't know if the target network can handle this request. They can see files on a shared drive. They can't see each other's computers on the network, and I don't know if I can make a socket work. I do know they put an internal wiki in the system, and if I could figure out how to do these requests over HTTP, I may try that, but that seems to be the wrong solution. (Yes, I am a programming neophyte way over my head here.) Josh
[toc] | [next] | [standalone]
| From | Chris Angelico <rosuav@gmail.com> |
|---|---|
| Date | 2011-07-17 04:14 +1000 |
| Message-ID | <mailman.1121.1310840078.1164.python-list@python.org> |
| In reply to | #9635 |
On Sun, Jul 17, 2011 at 3:41 AM, Josh English <Joshua.R.English@gmail.com> wrote: > Chris, > > Thank you for spelling this out. I thought about this as a solution but I don't have the skills to create this server application, and I don't know if the target network can handle this request. They can see files on a shared drive. They can't see each other's computers on the network, and I don't know if I can make a socket work. > > I do know they put an internal wiki in the system, and if I could figure out how to do these requests over HTTP, I may try that, but that seems to be the wrong solution. If you can do HTTP, then that presumably means you can do TCP/IP. You can run this daemon on a high port to avoid having to run it as root (only an issue on Unix), and all you need to know is the IP address or host name of the computer that's running it. Or alternatively, you can actually do this via HTTP - if you already have a web server running and it'd be easier to do it that way. I'm more inclined to having it separate, but it might be simpler to write it as a PHP script (or whatever your web server uses). Just have it accept POST requests to update files; but in this case, be *very* sure that your security is in place - the last thing you want is a way for people out on the internet to edit your files. Check IP addresses and such, as well as a username/password check. Chris Angelico
[toc] | [prev] | [next] | [standalone]
| From | Michael Hrivnak <mhrivnak@hrivnak.org> |
|---|---|
| Date | 2011-07-16 15:48 -0400 |
| Message-ID | <mailman.1130.1310845699.1164.python-list@python.org> |
| In reply to | #9635 |
Multiple clients reading from and writing to a central collection of related data is a problem that has been largely solved. Use a database, and have the clients act on it with transactions. There's no reason to re-invent the wheel. You could have the clients connect to the database directly over the network. Usually not ideal, but still much better than trying to share XML files. Or you could write a very simple HTTP-based API, maybe even following a basic REST pattern. Heck, a tiny Django app with this REST plugin might do nearly all the work for you! http://code.google.com/p/django-rest-interface/ If you aren't a fan of database design, it's ok to keep it simple. Almost anything you do, even pickling entire XML nodes and sticking them in a text field in the database, would be better than trying to share XML files and deal with file locking over the network. This approach is also likely to involve MUCH less network traffic and consume far less resources on the clients. Michael On Sat, Jul 16, 2011 at 2:14 PM, Chris Angelico <rosuav@gmail.com> wrote: > On Sun, Jul 17, 2011 at 3:41 AM, Josh English > <Joshua.R.English@gmail.com> wrote: >> Chris, >> >> Thank you for spelling this out. I thought about this as a solution but I don't have the skills to create this server application, and I don't know if the target network can handle this request. They can see files on a shared drive. They can't see each other's computers on the network, and I don't know if I can make a socket work. >> >> I do know they put an internal wiki in the system, and if I could figure out how to do these requests over HTTP, I may try that, but that seems to be the wrong solution. > > If you can do HTTP, then that presumably means you can do TCP/IP. You > can run this daemon on a high port to avoid having to run it as root > (only an issue on Unix), and all you need to know is the IP address or > host name of the computer that's running it. > > Or alternatively, you can actually do this via HTTP - if you already > have a web server running and it'd be easier to do it that way. I'm > more inclined to having it separate, but it might be simpler to write > it as a PHP script (or whatever your web server uses). Just have it > accept POST requests to update files; but in this case, be *very* sure > that your security is in place - the last thing you want is a way for > people out on the internet to edit your files. Check IP addresses and > such, as well as a username/password check. > > Chris Angelico > -- > http://mail.python.org/mailman/listinfo/python-list >
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web