Real Software Forums

The forum for Real Studio and other Real Software products.
[ REAL Software Website | Board Index ]
It is currently Sun May 28, 2017 7:23 pm
xojo

All times are UTC - 5 hours




Post new topic Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Web deployment question (standalone/cgi)
PostPosted: Sat May 11, 2013 6:09 am 
Offline

Joined: Sat May 11, 2013 5:41 am
Posts: 5
Location: Finland
Hi,

im returning user i had a few years break on realbasic but happy to get back to hobby :)

I have a project in mind, well several but i have question about possible web-app i am planning. While researching (and waiting licensing changes) i have been wondering the web deployment methods. As i understand you can either build standalone app (no iis/apache/whatever required) where you app handles the traffic directly, or you can have cgi-based method where you have iis/apache/whatever handling the webtraffic between your app and the client browsers.

Is there any performance and/or security points of views i should be aware of when choosing between these 2 methods?

This has little to no matter in my own project as it has user base of about 30-50 users. But im curious as mmh cat about this?
I'd be happy to read ready material about this as well if there is any (i could not find yet).

Kind regards, P

_________________
--
http://sudo.fi


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Sat May 11, 2013 4:03 pm 
Offline
User avatar

Joined: Fri Sep 30, 2005 11:48 am
Posts: 3554
Location: Lenexa, KS
Standalone apps will remain running until you tell it to quit while cgi applications will quit when the timeout expires after the last user leaves the app. The standalone apps will be slightly faster and do not require Apache or IIS. CGI apps will need Apache or IIS and while I've never used IIS I've heard it's considerably harder to get WE apps working with it than Apache.

30 to 50 users shouldn't be any trouble it as long as you're not doing very processor intensive things for each session. Serving up pages isn't very processor intensive - I'm thinking thinks like file processing or intense database I/O.

_________________
Bob K.

A blog about being a Real Studio/Xojo developer at http://www.bkeeneybriefs.com


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Sat May 11, 2013 4:45 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
Location: Southern California
Also: stand alone apps currently do not support SSL, although it is planned. So if you need SSL, you have to use CGI with Apache or IIS, or use something like nginx as a SSL front end to the WE stand alone app.

_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Sun May 12, 2013 8:29 am 
Offline

Joined: Sat May 11, 2013 5:41 am
Posts: 5
Location: Finland
Thanks for the replies, good information.

Has anyone done any stress-tests which is more responsive under larger web traffic, im talking about simultaneous users load? Seen couple threads people asking testing their solutions on web but fairly nothing about results of these tests. Is standalone capable serving similar loads as cgi+apache solutions?

Can you change the distribution methods if needed just by build settings, so no code changes are necessary?

Kind Regards, P

_________________
--
http://sudo.fi


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Sun May 12, 2013 1:19 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
Location: Southern California
jpaaltonen wrote:
Has anyone done any stress-tests which is more responsive under larger web traffic, im talking about simultaneous users load? Seen couple threads people asking testing their solutions on web but fairly nothing about results of these tests. Is standalone capable serving similar loads as cgi+apache solutions?


Stand alone should be able to handle just as many with better responsiveness and a lower load on the server. The Apache CGI layer adds overhead to the process which is why stand alone is faster. Apache does not launch multiple WE instances to handle the load, so any WE limitations are going to be the same.

You can run multiple stand alone WE instances behind something like nginx for load balancing. A rough guess is that one WE instance per CPU core on a server would be the most effective configuration, assuming you are not bound by RAM or disk I/O. I would say test this though.

Note: for WE CGI on a Windows Apache server, you need to install mod_perl. Without it the CPU load will shoot through the roof, and WE responsiveness drops like a rock with just a couple of users. I haven't fully investigated this on the other OSes.

Quote:
Can you change the distribution methods if needed just by build settings, so no code changes are necessary?


On the WE side, yes. On the server if you want the URL to remain the same then of course you need to take additional steps.

Note: stress testing WE can be a challenge because the normal online services do not work. They are static downloaders which do not execute the JavaScript on the page. And in WE the HTML is merely a shell for all the real data that is downloaded via AJAX. (If anyone knows of an online stress testing service that uses a full browser engine, please let me know.)

I've found that the maximum simultaneous connections from a single client machine is 5. That seems to be a client side limitation and not a WE limitation. It's also by OS, i.e. my Mac and one of my Windows VMs can hit a WE app with 5 connections each.

I have 4 machines at my disposal, 5 including a VM, so I can hit a WE app with 25 simultaneous connections. In testing I've found that this slows initial launch a bit, but not dramatically, i.e. I would definitely say WE can handle more than 25 users at once on a dedicated server or a solid VPS.

_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Sun May 12, 2013 3:30 pm 
Offline

Joined: Sat May 11, 2013 5:41 am
Posts: 5
Location: Finland
Awesome, thanks very much.

Kind regards, P

_________________
--
http://sudo.fi


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Mon May 13, 2013 7:39 am 
Offline

Joined: Sat Mar 25, 2006 7:29 am
Posts: 120
Quote:
Note: for WE CGI on a Windows Apache server, you need to install mod_perl. Without it the CPU load will shoot through the roof, and WE responsiveness drops like a rock with just a couple of users. I haven't fully investigated this on the other OSes.


Daniel, could you tell me where i can download and how i can install mod_perl on Windows? I can not find an installable binary for Windows. Could you please help?

Quote:
I've found that the maximum simultaneous connections from a single client machine is 5. That seems to be a client side limitation and not a WE limitation. It's also by OS, i.e. my Mac and one of my Windows VMs can hit a WE app with 5 connections each.


As far as i have been able to test is the 5 connection more a limitation of the browser and is a per window limit. If you, after 5 active connections, open a new window in the browser and make there again 5 connections. If you use more than one browser on the same pc, each browser can have their own active connections and in every window also again. It looks to me that the browser limits its memory for each window seperately and that that restricts the physicle connections.
I have tested this on several browsers and all act the same with only per browser the number of active connections varies from 5 (Safari) to 7-8 (Firefox and Opera) per window. Obvious Firefox and Opera are more efficient with the memory-usage OR reserve a large memoryblock per window.
By using several browsers and per browser a number of windows i was able to make more than 50 connections to a (simple) single WE-app. On that same pc the Apache server were running, the Abyss webserver and IIS. However my IIS on Windows 8 doesn't support more than 10 active connections, IIS on a Windows server doesn't have this limitation.


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Mon May 13, 2013 1:17 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
Location: Southern California
andrekui wrote:
Quote:
Note: for WE CGI on a Windows Apache server, you need to install mod_perl. Without it the CPU load will shoot through the roof, and WE responsiveness drops like a rock with just a couple of users. I haven't fully investigated this on the other OSes.


Daniel, could you tell me where i can download and how i can install mod_perl on Windows? I can not find an installable binary for Windows. Could you please help?


Try here first: http://perl.apache.org/docs/2.0/os/win32/install.html

However, I should warn you that over the years the times I've needed an Apache+mod_perl install on Windows I've either...

* Used one of the commonly available LAMP installers. (Not all of them have mod_perl.)
* A couple times I managed to find an already compiled mod_perl library that worked with the version of Apache I had, and got it setup in the config and running.

Unless you use a LAMP installer, it's not a simple matter of running a mod_perl installer and you're done. (At least not as of the last time I tried manually.) A lot of the tutorials on the web send you down the path of compiling your own mod_perl library and/or Apache!

Of course I may have missed a simple tutorial or installer somewhere. This hasn't come up often enough for me to perform an exhaustive search.

Quote:
As far as i have been able to test is the 5 connection more a limitation of the browser and is a per window limit. If you, after 5 active connections, open a new window in the browser and make there again 5 connections.


I actually didn't test that.

Quote:
If you use more than one browser on the same pc, each browser can have their own active connections and in every window also again. It looks to me that the browser limits its memory for each window seperately and that that restricts the physicle connections.


You're probably right, and that's good to know.

_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/


Top
 Profile  
 
 Post subject: Re: Web deployment question (standalone/cgi)
PostPosted: Mon May 13, 2013 2:13 pm 
Offline

Joined: Wed Mar 22, 2006 11:15 am
Posts: 712
Location: Southern California
One other note: if you're using Fast CGI I don't believe mod_perl is an issue.

_________________
Daniel L. Taylor
Custom Controls for Real Studio WE!
Visit: http://www.webcustomcontrols.com/


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 9 posts ] 

All times are UTC - 5 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group