Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel or Phalcon for a heavy-traffic site [closed]

I come from a Codeigniter background. I've used it for three years and really like it. It's simplicity is great.

I've built massive sites with Codeigniter, but I'm looking for a new PHP framework to learn.

The main reason for this change is a potentially big project on the horizon. It will not have many users (perhaps 100 at most), but the outbound traffic produced by the server will be huge. The project will transmit thousands of files (ranging in size from 1mb to several hundred mb) via FTP, one after the other. It also deals with users uploading hundreds of files.

The key for this project is speed. The system needs to fly through the running of the scripts (it runs a long script every time a file is sent via FTP to gather the file, it's type and it's destination) as quickly as possible to minimize performance issues. I'm aware that the transmitting of the files will only be as quick as the server can do it, and really as quick as the slowest bottleneck, but here I'm trying to minimize the bottleneck in the code as much as possible.

After a bit of research, I like the look of Laravel and have installed it to get to grips with it. But it's could its speed be an issue as its been tested to be slower than Codeigniter? Will heavy traffic and a lot of PHP parsing slow down the I know that Phalcon is based on C thus making it the fastest framework, would Phalcon be the better choice?

Any thoughts are much appreciated :)

like image 357
Noah Goodrich Avatar asked Jul 28 '14 14:07

Noah Goodrich


People also ask

Why Phalcon?

It has better performance than any other frameworks like Lumen, Slim, etc. as it is written in C language and is supplied as a compiled PHP Extension. This simple reason makes it one of the fastest PHP framework available in the market.

Why is laravel more popular than Symfony?

Laravel vs Symfony: SpeedThe performance benchmark for Laravel is easily expandable. Laravel enables rapid development with minimal coding effort. Laravel is adaptable since it makes use of Symfony components. Compared to Laravel, Symfony is slower when it comes to complex web projects.


1 Answers

I am unsure if your question will be taken down as it being an opinion (you know according to guidelines and all)

but IMO - despite Phalcon being fast for its C build, I find (being Laravel 3 user transitioning from Codeigniter before it retired) with Laravel 4 now - it has a lot of integration with known networks and architectures.

Not to bash Phalcon as I have very minimal usage of it but here are some bullets for Laravel:

  1. Easily modular with composer: all packages can be imported in with the current PSR standards from composer for rapid deployment of dependencies which Codeigniter was lacking.

  2. It can follow any style you want it to be: PSR-0 and PSR-4. It's a natural MVC but you can easily go with TDD(or BDD), and other format. Though this is a poor bullet to some but it offers a lot of flexibility on adapting to various works.

  3. IoC is built into the APP. Its very comprehensible and extensives in order to utlize IoC

  4. Taylor Otwell is very active in adjusting and fine tuning the framework. Its a very active thriving community (Laracon NYC just passed, next up Laracon Amsterdam), so you will not be shorted with support.

  5. A lot of know application out there are pre-integrated with the framework from Queues (beanstalk, IronMQ) to mailers (swiftmailer), and even Cache systems (Redis or others). The interface is straight forward in terms of functions - worse case? just extend and you are ready to roll out.

  6. Readability: a lot of the structure and how the ORM (if you choose with the native ORM of Laravel which is called Eloquent) is all about readability of your code despite the underbelly being complex. So it will scaled right (a lot of people who switched over states the same).

Some further readings from those who switched over and wondered like you: http://www.web-and-development.com/laravel-vs-codeigniter/

and http://mulzer.tumblr.com/post/24141993116/12-reasons-you-should-switch-from-codeigniter-to

Now a bullets for Phalcon vs Laravel in speed: With Laravel + APC + a few other tweaks you can achieve something close to it while giving you all the flexibility that you gain from Laravel.

Finally if you need a side by side comparison: http://vschart.com/compare/phalconphp/vs/laravel

like image 184
azngunit81 Avatar answered Sep 24 '22 06:09

azngunit81