New topic: Web deployment question (standalone/cgi)
<http://forums.realsoftware.com/viewtopic.php?t=47848> Page 1 of 1 [ 5 posts ] Previous topic | Next topic Author Message jpaaltonen Post subject: Web deployment question (standalone/cgi)Posted: Sat May 11, 2013 6:09 am Joined: Sat May 11, 2013 5:41 am Posts: 2 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 Bob Keeney Post subject: Re: Web deployment question (standalone/cgi)Posted: Sat May 11, 2013 4:03 pm Joined: Fri Sep 30, 2005 11:48 am Posts: 3539 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 taylor-design Post subject: Re: Web deployment question (standalone/cgi)Posted: Sat May 11, 2013 4:45 pm Joined: Wed Mar 22, 2006 11:15 am Posts: 676 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 jpaaltonen Post subject: Re: Web deployment question (standalone/cgi)Posted: Sun May 12, 2013 8:29 am Joined: Sat May 11, 2013 5:41 am Posts: 2 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 taylor-design Post subject: Re: Web deployment question (standalone/cgi)Posted: Sun May 12, 2013 1:19 pm Joined: Wed Mar 22, 2006 11:15 am Posts: 676 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 Display posts from previous: All posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost timeSubject AscendingDescending Page 1 of 1 [ 5 posts ] -- Over 1500 classes with 29000 functions in one REALbasic plug-in collection. The Monkeybread Software Realbasic Plugin v9.3. http://www.monkeybreadsoftware.de/realbasic/plugins.shtml [email protected]
