How FastCGI will improve the performance of my php application? - fastcgi

How fastCGI will improve PHP performance, is it recommended to use for my typo3 CMS. Will it produce any side effects.?

TYPO3 runs fine with FastCGI - if your server is configured correctly, you will not run into trouble.

I run PHP through fastCGI for more than 5 years now, having multiple Typo3 instances running on it. I did this out of the fact that normal CGI cluttered up my servers with that many instances. FastCGI now handles them without any problems.
Of course mod_php might be the fastest of all solutions. Yet you lose some flexibility like being able to configure each host separably or running different versions of PHP within the same LAMP stack, which is quite some advantage in days of PHP 5.2 to PHP 5.3 incompatibilities.
I have no numbers to offer here, but at least some exeperience. My suggestion, go for fastCGI if you feel confident about setting it up. Its worth it. Or try mod_php if you use Apache and don't care so much about the flexibility CGI would give you. Its very easy to setup as well.
cu
Roman

Related

Alternative to Windows and cloud for Ruby on Rails

I'm starting to learn Ruby on Rails and after a week I still cannot get the installation right. I've since moved to a cloud bases system, but it is extremely slow and rather a waste of time.
I do have a website and saw there's Ruby on Rails. Is it perhaps possible to set it up in a domain or sub domain and start and start learning/programming that way?
Any other alternatives is also welcome. I do now own a mac or Ubuntu, which makes it a little difficult.
Looking forward to your responses. In the meantime I'm installing/uninstalling and trying to see if I can somehow make it work on Windows.
Doing RoR development on Windows is a pain. I would suggest just uninstalling Windows and going for some Linux distribution if you are serious about learning RoR. Linux is free software so the only thing holding you back from having it on your computer is your self.
Developing with Ruby on Rails is say'd to be really easy for beginners but I would disagree with it. Developing on this framework requires you to actually understand the whole stack. The server, backend, client, database and ofcourse a new weird language called Ruby. Now most of this stuff is learnable and doable on every OS. But once you start messing with more advanced databases and servers, you will need some GNU utils from Linux.
For instance if you have made your first deployment to some external server, you will often need to know what is going on in there. The only way to do this is usually by going in that server with SSH and reading the logs. But doing that is difficult without a nice GUI. So now you have to learn some stuff like the tail and grep commands and Linux piping to find your info easily.
Also if the computer you use is not completely yours and you cannot do it on it, then try installing a virtual machine software like Virtual box.
With that you can install Ruby on a Linux that sits on your VM and use it like that. It will still be a bit slower but if your computer has decent hardware in it, you will still be happy with it.
Here is a guide on how you could do it: Guide for VM development

RoR + IIS. What kind of problems I would run into? [duplicate]

This question already has answers here:
Ruby on Rails on IIS?
(6 answers)
Closed 8 years ago.
It looks like that most of the time people are running RoR behind nginx/Apache web servers. Right now our workshop uses only Microsoft's products. So most natural move would be to try and run RoR using IIS 7.5.
It does look that setting up RoR and IIS is a quite a pain. However, besides problems setting up IIS I could not find anyone pointing out problems with RoR behind IIS.
Are there any issues I would definitely run into if I would choose this "lovely" path of IIS?
Sure, it's possible, but you are setting yourself up for trouble. Configuration, deployment, and troubleshooting will be constant hassles under IIS. If you really want to host internally, I'd setup an Ubuntu server in Hyper-V, use Nginx, and be done with it. On the other hand, if your shop isn't built to deal with managing a Linux server or hosting a Rails app internally, I think it would be more reasonable to consider Heroku or another PaaS before dealing with IIS.
EDIT: Coming from a background in Windows IT, I know that setting up a Linux server and managing it isn't always as easy as "do it and be done with it," so don't think I'm not sympathetic to where you're coming from. The thing is, while the "natural move" might seem like trying to do it in IIS, it is an unnatural move as far as Rails is concerned. My suggestion to anyone who isn't ready to make the plunge into both Linux and hosting their own Rails apps really is Heroku. Even with the know-how to configure Linux for Rails, I still use Heroku for all of my Ruby MRI apps.

LAMP-equivalent term for Ruby on Rails solution

LAMP is a term that defines an architecture based on Linux, Apache, MySQL and PHP.
How would you call an architecture based on Linux, ??? (Webrick?Unicorn?), PostgreSQL and Ruby?
LWPR? LUPR?
This is a silly question, but I would like to know how Rubyists using Rails describe their solution, just as LAMP solution are described as LAMP. I would like a similar "official" term.
I like to refer to it simply as Ruby on Liweunpo.
But in reality, there isn't an official designation. Too many people use all sorts of variations; the toolset is much richer today than when "LAMP" was coined, so it's much easier to pick and choose technologies and people aren't really confined to one stack anymore. Even "LAMP" applications are increasingly more likely to use things like Postgres, because at the end of the day there isn't a huge difference.
LAMP usually consists of four parts:
OS: Linux
Web server: Apache with mod_php
DB: MySQL
Back end programming language: PHP
For Rubyists, I see many people use combination as below:
OS: Linux
Web server: Nginx with Unicorn (Webrick for development environment)
DB: PostgreSQL (sqlite for development env. but better have the same db as production)
Back end programming language: Ruby (on Rails)
Can't say the combination above is the majority of what people choose. So many other options are possible for each component. But that is a good starting point if you are new. You can see many tutorials with that combination.
I learned today about MEAN: MongoDB, Express, AngularJS, Node.js (respectively: database, framework, server-side framework, client-side framework and web server).
It serves as a good example to show that you can build stack names to sound nice and memorable without having to respect any convention.

Server Environment

I am trying to develop an iOS application that stores and loads data to and from a server. The data needs of the client can be pretty much narrowed down to REST. MY question is, is REST something widely used for data/server driven iOS applications? is there a paradigm proven better or more suitable for iOS apps?
if REST is the way to go, what server environment would you choose? what server side Technology? PHP? Java? something else? We'd set up a test/dev environment at first, but eventually we are going to deploy on services like Amazon cloud or any other hosting/cloud service.
Any insight will be most welcome.
So are you writing the backend too?
Most projects that I've worked with in the past few years use REST. It's made little difference in the implementation of the iOS app (I think...). I'm more concerned about the type of data I'm consuming, which is usually JSON - and ensuring that it is as lean as possible. People writing web services should be concerned about REST.
I've also worked with projects this year that use different technologies on the backend. Java on one, and Ruby on Rails on the other.
I know another guy who uses PHP on one project, and Ruby on another.
If I was to do a backend, I'd probably use Java - solely because I know it. Not the best excuse to pick a technology - but as a full time iOS developer, I don't have time to learn something new that I won't use very often.
If you are going to deploy on a cloud based service, see what technologies they support. Maybe picking the common denominator would be a wise choice to keep your options open. Some languages tend to have more expensive server hosting costs. Java is usually more expensive than PHP to host, I guess due to the complexities of running shared java VM's instead of PHP interpreter.

Currently, is Ruby on Rails deployment a fairly practical solution?

Is it true that with passenger (mod_rails), the deployment of Rails is fairly simple? But how about how practical it is, considering it in the competitive software field? Is it true that if deploying Python or PHP framework based website, it can cost just a fraction of a Rails deployment? I am sure there will be a time when Rails deployment is very comparable to other frameworks, but I'd like to get some idea in the highly competitive software field, how competitive Rails is, compared to Python or PHP based frameworks, supporting similar concurrent user requests.
Naturally using something like PHP will require less setup, because apache/{insert_web_server_here} doesn't have to hook into a middleware just to run the application. All it needs is to load php module and it's off and running.
However, I wouldn't let that scare you away from deploying Rails applications. Passenger really makes it easy, as it literally walks you step by step via the command line, and tells you what to put in certain Apache config files etc.
Another advantage of using Passenger is that it uses REE(Ruby Enterprise Edition) in that it is significantly faster than MRI due to their enhanced garbage collection solution etc.

Resources