windows django server - windows

I have inherited a Windows Server and I have to deploy a django app on it.
Have anyone tried to benchmark http servers with django support on this platform?
Which one is fastest?
Use-case of my application would be:
not so much writes to db
heavy usage of admin panel
display tons of results

Have you looked at either wamp or xampp? They both deliver Apache/MySQL/PHP-and-Perl on a Windows platform. But you need more because neither includes Python. See this SO thread for how to proceed from there. Note, you may encounter problems. See this SO thread for an example.
Ps. Personally, I would just get a an account that supports Django (e.g. webfaction.com) and not screw around with this.

I run a Django site on Windows using Apache. I've posted a write up about some of the hurdles that you're going to face.

Related

What is a good framework for deploying a portable HTML/JavaScript Windows application?

I need to deploy an application onto some Windows machines for purposes of data collection from a group of people (i.e. the application will be used to gather responses to a series of survey questions). The process is interactive, alternating between displays of text and images with specific timing requirements. I have put together a prototype application using HTML and JavaScript that implements the survey. However, there are some unique constraints on the deployment environment that have me stuck:
While the machine is Internet-connected, the client requires that the survey application must run fully local to the PC that it runs on. Therefore, sending the survey results to a remote server is not permissible. Obviously, saving to a local file from a Web browser is typically not permitted for security reasons.
Installation of applications onto the machines that will run the survey is not permitted.
The configuration of the machines is not known specifically a priori, but I can assume some recent version of Windows with IE8+.
The "no remote access" requirement was a late comer, and has thrown a wrench into the plan of just writing a simple Web application that could post results to an HTTP server. I'm now looking for the easiest way forward. Two main approaches come to mind:
Use a GUI framework that provides a control that can display HTML/JavaScript; running a full-blown application on the PC would allow me to save the results to the filesystem. I've never done this, but it seems like in this day and age it shouldn't be too difficult. This would allow me to reuse much of my existing prototype implementation, but I would need some way of transferring the results (which would be stored in a JavaScript data structure) outside of the Web control to where the rest of the application could access it.
Reimplement the entire application using some GUI framework (I've used PyQt successfully before, although not on Windows). This approach is obviously less desirable than #1 due to the lack of reuse. However, it may be necessary if #1 isn't feasible.
Any recommendations for the best way to go? Ideally, I'm looking for a solution that can be run in a "portable" manner from a USB thumbdrive or similar.
Have you looked at HTML Applications (HTA)? They work in IE5+ and can use Windows Scripting Host to write to local drives and UNC shares...
Maybe you can use a portable web server with a scripting language on the server side. http://code.google.com/p/mongoose/ Mongoose, for example, you can run PHP, CGI, etc. .. scripts. Then, simply create a script to save a file to your hard drive. And let the rest of the application in the same manner.
Use a script to start the web server, and perhaps a portable web browser like K-Meleon to start the application http://kmeleon.sourceforge.net/ This is highly configurable. Or start the system explorer to your localhost URL.
The only problem may be that the user has to modify the firewall for the first time you run the server?

How Meteor works, Client vs Server?

I am really confused at to how Meteor works.
I know there's a server side where you just install it using the terminal.
But what about the client?
Does the client need to install anything?
For example, clients need to install Adobe Flash to run Flash. Are we talking about the same thing here? Or can the client just access it through a regular page without installing anything.
Thanks for the clarification.
<3 StackOverflow
Meteor is a pure javascript web-application framework.
All you need to run meteor is a JavaScript environment.
Server-side, NodeJS is the gold standard javascript environment.
Client-side, all you need is a browser that supports javascript.
There are no plugins required or other magic at work. It's just javascript.
I am assuming you mean the Meteor Http Server? In this case, you can think of it as being very similar to SignalR or node.js. Basically javascript on the client handles receiving events that come back from the server, so you will generally need to include a script on the client side.
You may want to read the following links for more information.
http://meteorserver.org/browser-techniques/
http://www.hanselman.com/blog/AsynchronousScalableWebApplicationsWithRealtimePersistentLongrunningConnectionsWithSignalR.aspx
I think the question refers to http://meteor.com, and if that is the case the client does not need to install anything.
Meteor is a framework for writing Javascript applications, and as such all modern browsers support it "out of the box". The initial request for a web site will download the HTML, CSS and Javascript and it will run just as any other web application like GMail, etc.
You can check out a series of example applications at http://madewith.meteor.com and you should be able to run them without adding any plugins, etc.

Any way to use MvcMiniProfiler on windows application? Or is there a sister application?

So I've started using MvcMiniProfiler on our websites and quite like it. We have a Windows Application component/framework that is leveraged by the website and I was wondering if it was possible to use the profiler on that. I'm assuming not, but maybe there is a subcomponent of the code that could be used? I see that there is a way to configure where the results are stored (i.e. Sql Server) so maybe it is close to possible?
We have the following flow:
Website submits job to 'broker' then returns a 'come back later' page.
Broker runs and eventually data in the websites database gets updated by the broker.
Website displays the results.
I'd be great if there was a way I could get the entire workflow profiled. If there is no way/no intentions from the developers to make MvcMiniProfiler available to Windows applications, any recommendations for similar styled profilers?
You could get this working by using SqlServerStorage, there is very little in the code base that heavily depends on ASP.NET, in fact the SQL interceptor is generalized and so it the stack used to capture the traces.
I imagine that a few changes internally need to be made, eg: use Thread.SetData as opposed to HttpContext but they are pretty superficial.
The way you would get this going is by passing the "profiling identity" into the App and then continuing tracking there. Eventually when the user hits the site after it happens, it would show up as little "chiclets" on the left side.
A patch is totally welcome here but it is not something it does in its current version.
(note to future readers, this is probably going to be out of date at some point, if it is please suggest an edit)
Yes, there's a Windows porting of MiniProfiler: http://nootn.github.io/MiniProfiler.Windows/

Load-testing a web application

How does one go about testing the server-side performance of a web application?
I'm working on a small web application (specifically, it will solely be responding to AJAX requests with database rows). I want to see how it performs under load. However, I cannot upload it to an internet host right away. The development environment is, however, part of the local intranet, so I can use as many machines as I want to hammer the development server, presumably using Python in conjunction with urllib2.
My question is, is such an approach really accurate for determining the high-load performance of a server-side script? Is there a better way to do this? Am I missing something here?
Have you tried a tool like Apache JMeter? http://jmeter.apache.org/

Session variables for classic ASP running on IIS7

Seems that lot of people already know that issue but I can not find solution.
We transferred our web app from IIS6 to IIS7. For authentication purposes and some other functions we using session variables.
While on IIS6 we did not had any problem but now all users losing their time and patience because app variables are being lost somewhere between pages being submitted and as a result users get kicked out of the app.
Server is 2008 R2 with 64 bit OS.
Default installation by Dell so it should be running on 64 bit mode.
We do not have any third party elements or modules. All developed in-house.
Database obviously MS SQL 2008 as well, on the same server (I know it is bad but we limited in resources and money).
So does anyone know what is going on and how to fix this?
Resolution of that problem is simple: do not use any other port except 80.
As soon as I moved site to separate IP with port 80 (use of header on the same IP was not tested) -- all problem gone....
Have you deployed your application as a new website or a virtual directory on the IIS ?
Remember that for the methods in the global.asa to be executed by the server you need to deploy your application as a new website not just a virtual directory under an existing web site.
I think the best way is to add logging code to trace when exactly a session variable is lost; after a post back to the server, redirection, etc... to try to narrow down the causes.
good luck.
Look here for a solution...
the intrinsic checkbox fixed my problem

Resources