Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

PHP LiteSpeed SAPI + Phalcon C-extension Framework

Hello,

It's great to know about Phalcon high performance framework. My website's production server is using LiteSpeed webserver, they come with LSPHP5 (http://litespeedtech.com/php-litespeed-sapi.html). I think that LSPHP just working like normal PHP, but not sure about the compatible of its and Phalcon framework.

Is there any problem between normal PHP and LSPHP?

Thank you, Tung.

There should not be any issues, as far as I can tell.

Did you hear about HipHop Virtual Machine of Facebook? I know this project last 2 years, but at that time it wasn't mature enough. It seem they have changed the approach. I'm doing some searches about Phalcon and suddenly recall it. Is there any pros and cons in terms of performance and features between HHVM and Phalcon? Can I use both of them at the same time? Sorry for asking too much, but I'm preparing for a new project, which requires a lot of performance concerns. I have code some pages in Symfony2 framework, this is the right time for me if I want to switch to Phalcon or another.



83.0k

@Tung What kind of task will your application address?



19.7k
Accepted
answer

The HipHop virtual machine will execute your code with its Just In Time compiler. That will make in theory your app faster (depending on how compatible your app is with HipHop's implementation). Yes you will achieve a performance increase at that point and you won't have to change your application (significantly) to make it work. Installation of HipHop will be an issue but it won't be an insurmountable one.

Phalcon takes a totally different approach. Phalcon is a PHP framework. Nothing more, nothing less. It offers tools that you can use to write your application with and because of its design and it being constantly in memory it delivers unsurpassed performance from the framework side.

The decision is up to you if you want to use Phalcon or not. Your decision must weigh in the pros and cons of your approach and meet your requirements. Perhaps Phalcon is not going to be good for you or it might be that it is perfect for you. It is up to you to decide as I wrote.

Note the following benchmarks as far as performance is concerned

http://www.techempower.com/benchmarks/#section=data-r6&hw=i7&test=db&l=sg

You will have to do the same thing with a hiphop VM to see which one is faster of the two.

@Phalcon: It's a media sharing website, has basic Youtube like tasks and some back-end processing (update views stats in batch, logs, search suggestion logs). I see that I'm over-optimizing at starting point because maybe my site won't reach very high traffic level. But I really want to pursue the terms "High Performance" + "Efficiency", and further more, I can minimize the server costs which is very expensive in my country.

@Nikolaos Dimopoulos: thank you for your answer. I have recently tried to install HipHop VM, it's require some time-consuming workaround for upgrading gcc compiler to a new version even if I want to use pre-built packages. I just not quite sure about moving from Symfony2 to Phalcon. Symfony2 has a large community, and stable bugs tracking, fixing process. And after a couple months study about it. I know it can allow me to easy develop my application's future features. Phalcon is quite new to me, fortunately its syntax is quite similar to Symfony2. Now, I just wonder, is there any lacking common features compare to symfony2? Or something that I should notice when moving current Symfony2 codebase to Phalcon?

@Tung I used to work with Laravel, that is a very good framework. It is built with a lot of tools that help you to be at the TOP of productivity. Just the same as Symfony2. By the way, most of its components came from Symfony2.

We decided to use Phalcon in this new project and as far as I can tell I haven't miss anything from Laravel. Phalcon has everything I need with a plus of being a PHP extension, which makes memory consumption much lower.

If you're worried about not knowing the much you need about it now, it won't be a problem. The community is awesome. I've got every help I need so far, and pretty fast.

No regrets!

@Philippe Thanks for your answer. I have recently read Phalcon team's new blog post -> http://blog.phalconphp.com/post/57161129440/phalcon-2-0-the-future I really like this move of Phalcon team. Feel confident now :)