python / django

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Camo.Fish
    Member
    • Jul 2008
    • 42

    python / django

    i've been coding low-level php for around over a decade, mostly on DIS.. i've just picked up py/django and am wondering if everything is all good to go? just copy the file into public_html, set up the database and bang?

    also, what about the django ability to manage multiple top level sites? i am guessing that only works if you are running in a vps/dedicated type setup?
  • ZYV
    Senior Member
    • Sep 2005
    • 315

    #2
    I am not overly familiar with Django, but to me it looks like that the only way to make it work on Dathorn is via CGI which is dead slow (take my word, when your account will be hit it will be 100% terminated for resource abuse) and will require some kludgery. Also, since the compiler is not installed on the production boxes, you'll have to install RHEL locally and create your virtualenv at home and only then upload to Dathorn (if you want to use non-native Python modules, of course).

    Other than that, yes, I run my Django stuff on dedicated or VPS and prefer nginx / fastcgi or nginx / wscgi combo.

    Comment

    • Camo.Fish
      Member
      • Jul 2008
      • 42

      #3


      Well, that's kind of a bummer!

      Comment

      • ZYV
        Senior Member
        • Sep 2005
        • 315

        #4
        So what else did you expect? You can use lightweight Python stuff such as web2py, cherrypy and friends via CGI, which will be of course slower than FCGI that is being used for PHP, but with low popularity it's fine.

        Now you want to use a full-blown application server in a non-virtualized shared environment. I tell you that there is a way to do this, but it will be slow as hell and probably only useful if you have no other platform for testing (now that there's GAE that you can have for free with a limited amount of resources it's questionable whether hacking Dathorn actually makes any sense).

        If you want to effectively run arbitrary application servers on shared hardware you need at very least the virtualization level comparable to Virtuozzo.

        Dathorn offers shared hosting on the PHP platform, there are others specialized in hosted Django application servers, Tomcat, .NET etc. Dathorn doesn't impose hard limits unless you harm others, but I think it's obvious that you have to chose the right provider for the right service.

        Comment

        • Camo.Fish
          Member
          • Jul 2008
          • 42

          #5


          Well, I suppose I still don't know that much about how Django works. I've read most of my O'Reilly Python Pocket Reference, and a bunch of stuff from the Django site a couple months ago, but I just finished a book that builds an app from beginning to end w/Django. It did cover deployment, but to a server that was, of course, already set up. I have yet to read anything that really tells me about the backend, I guess I thought it was more like adding Smarty to a PHP app than it was like running a daemon.

          I've been considering a VPS for various other reasons, like VOIP and a custom mail server, but.. resources are slim for me. However, I really enjoyed Django, though it does also seem to have its limitations as well. As I always code my own things from scratch using low-level code to build my own APIs and such, I found Django to also be a bit constrictive.. but that may just be because I am so new to it.

          Comment

          • ZYV
            Senior Member
            • Sep 2005
            • 315

            #6
            Django is more like a lightweight HTTP-based application server. You can use a front-end that passes the request along to Django processes, or you can use Django's built-in server. I have never developed anything on Django, so I have no clue about its internals, but I have an idea on how it works from the administrator's point of view.

            What do you mean by resources being slim? Virtualization overhead is negligible on modern hardware and you can get just as much power as the real hardware has. Or you are talking about the offerings of a very specific provider that your considered?

            Comment

            • Camo.Fish
              Member
              • Jul 2008
              • 42

              #7
              lol

              I meant that, personally, my resources are slim.

              I did however, manage to find a friend who hooked me up a vhost and we got Django up and running on it together. It's an interesting little app, I need to skin it and finish up a couple features and I'll post it. A different direction than the traditional PHP stuff I usually do.

              Comment

              • ZYV
                Senior Member
                • Sep 2005
                • 315

                #8
                Again, hosting on GAE is free. Do check it out.

                On the other hand, you can always buy a decommisioned xserve on eBay and install it in your toilet. You have no issues with obtaining a reasonably fast Internet connection with a static IP to set up a hosting site at home, unlike the poor souls from 3-rd world countries. All you need is to fiddle with QoS on the router a little bit, so that your site wouldn't go down on next torrent download

                Comment

                Working...