• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
CodeIgniter or PhalconPHP ?

#11
How much time ? 1s 2s or 3s ?

Does CI 3.0 support pre-load on Ram like phalcon?
Reply

#12
phalcon is the only php framework how is loaded into ram (and maybe http://yafdev.com/)

Reply

#13
(11-14-2014, 04:41 PM)zaltanklis Wrote: btw: Have any way to put code into 2 or more severs and make it auto load balance ?

Thank for you recommend.

Don't use code.  Get a Load Balancer like: 

- KEMP LoadMaster LM-2400
- Brocade ServerIron ADX 1000

I'm currently trialing the KEMP but will probably move over to the Brocade.
Reply

#14
I have installed and try to use phalcon and it similar to codeigniter (almost 100% naked), and there are very few "stack, plugin features". I wonder have anyone here can study and use phalcon in a short time?
Reply

#15
(11-14-2014, 04:41 PM)zaltanklis Wrote: Will use mongodb as database.

If you care so much for performance and you will use mongedb, I suggest you could go with nodejs.
Reply

#16
Thank you for your suggestion. I still finding the making a best structure as possible for my next project Smile
Who don't care about performance ?
Reply

#17
I have used CI for some time, and recently started using Phalcon as well, when the future of CI was in doubt. I like both. Phalcon has some advantages over CI, and CI has some advantages over Phalcon. Some major advantages that CI has over Phalcon is that it is more portable and can run an many more server configurations due to Phalcon requiring root access and dependencies. CI is more mature and has been around longer. It's releases are quite stable. CI has more utility classes such as helpers etc which are very useful. CI has better (in terms of readability and navigation) documentation. Phalcon has the advantage of speed, but CI is still fast. Phalcon has better support for auth and ACL. Phalcon has a fast and efficient template system (volt). It's easier to use Phalcon for multi module HMVC apps. Phalcon has a more rapid development program with many more regular updates than CI while not requiring major updates to your code - having said that it looks like development on CI will be accelerating now that it has a more motivated new home. Phalcon has a good asset minification system.

Someone already touched on this, but if speed and performance is your only concern, then you can't get faster than just native PHP! Someone else also hit on the fact that it's not the framework speed you need to worry about, but the hardware you run it on. Hardware is constantly getting cheaper. I have fixed a few slow, overloading sites just by moving them to new hardware - far cheaper than recoding or porting!

Personally I found CI had a faster learning curve. Phalcon took me longer to learn and I found it frustrating trying to find the info I needed from the docs. Phalcon has multiple ways of making DB queries for example, and while that seems like a good thing, it makes it much more complicated. Also it's more difficult in Phalcon to know what is being automatically escaped and secured. On the other hand Phalcon's CSRF system is much nicer than CI's hard coded CSRF error pages that just confuse visitors. Also Phalcon's pagination is quicker and easier to setup. But then again CI's helper classes are very useful and it's DB queries are clear and more flexible.

The bottom line is this. Use which ever one you enjoy coding with most. Both Phalcon and CI are fast. Both are good. Both have advantages over the other. I'm kind of torn between the two at the moment to be honest. Phalcon seems to be good for some jobs, and CI seems to be right for others. Ideally I'd like to see both pulled and merged into PhalconIgniter - now that would be the dog's *****!
Reply

#18
(11-15-2014, 07:15 PM)alroker Wrote: Someone already touched on this, but if speed and performance is your only concern, then you can't get faster than just native PHP! Someone else also hit on the fact that it's not the framework speed you need to worry about, but the hardware you run it on. Hardware is constantly getting cheaper. I have fixed a few slow, overloading sites just by moving them to new hardware - far cheaper than recoding or porting!

If you want speed, then in some cases PHP has limits.  I've hit them and needed to surpass them.  HHVM all the way, it leaves PHP into the dust.  Cool

Hardware is getting cheaper.  But then you are completely forgetting about support.  What if you have 5, 10 or 20 servers?  Will you be supporting them?  Are you available 24/7?  Will you be supporting the firewalls, loadbalancers, switches?  I doubt it, you'll probably be wanting managed support which then costs an arm and a leg.  

Design the infrastructure and software around the problem you are trying to solve.  Are you getting a million requests now?  Are you paying up front for PPC/Adwords?  Will you just be relying on SEO, if thats the case then you will either have to do it on your own or pay someone big bucks for it and it takes time and effort to rise up the rankings.

Just developing software is one part of the picture.  There is so much more to know when delivering sites when you need millions of clicks.  I know, I've gone through the pain!  Big Grin
Reply

#19
(11-15-2014, 08:40 PM)no1youknowz Wrote:
(11-15-2014, 07:15 PM)alroker Wrote: Someone already touched on this, but if speed and performance is your only concern, then you can't get faster than just native PHP! Someone else also hit on the fact that it's not the framework speed you need to worry about, but the hardware you run it on. Hardware is constantly getting cheaper. I have fixed a few slow, overloading sites just by moving them to new hardware - far cheaper than recoding or porting!

If you want speed, then in some cases PHP has limits.  I've hit them and needed to surpass them.  HHVM all the way, it leaves PHP into the dust.  Cool

Hardware is getting cheaper.  But then you are completely forgetting about support.  What if you have 5, 10 or 20 servers?  Will you be supporting them?  Are you available 24/7?  Will you be supporting the firewalls, loadbalancers, switches?  I doubt it, you'll probably be wanting managed support which then costs an arm and a leg.  

Design the infrastructure and software around the problem you are trying to solve.  Are you getting a million requests now?  Are you paying up front for PPC/Adwords?  Will you just be relying on SEO, if thats the case then you will either have to do it on your own or pay someone big bucks for it and it takes time and effort to rise up the rankings.

Just developing software is one part of the picture.  There is so much more to know when delivering sites when you need millions of clicks.  I know, I've gone through the pain!  Big Grin

Have you tried HHVM? I've stayed clear because of the bad things I've heard and read about it. I don't think that's the answer. I agree good software and coding comes before hardware. That is you don't just create slow, bloated and inefficient software and mask it by chucking better hardware at it. That's not what the discussion is about. It's about whether Phalcon  will handle a million hits better than CI. And while it will, there's not going to be a massive difference, and if he's worried about that, then what will make the difference is hardware. As a site grows and gets busier, you need to upgrade and add hardware any way, and then there's the question of swapping hardware out as it gets old, which invariably means replacing it with more modern better stuff. So the growth of the site and the acquisition of hardware pretty much run in parallel. It doesn't make a whole world of difference in that context if your application is built on top of CodeIgniter, Phalcon or HHVM. All three of them are massively slower than plain old C, which if speed really is the issue, is what you should have used in the first place.  Smile
Reply

#20
(11-15-2014, 09:13 PM)alroker Wrote: Have you tried HHVM? I've stayed clear because of the bad things I've heard and read about it. I don't think that's the answer. I agree good software and coding comes before hardware. That is you don't just create slow, bloated and inefficient software and mask it by chucking better hardware at it. That's not what the discussion is about. It's about whether Phalcon  will handle a million hits better than CI. And while it will, there's not going to be a massive difference, and if he's worried about that, then what will make the difference is hardware. As a site grows and gets busier, you need to upgrade and add hardware any way, and then there's the question of swapping hardware out as it gets old, which invariably means replacing it with more modern better stuff. 

I have not only tried HHVM.  I have a production environment on HHVM.  I went from CI and PHP to a micro-framework (slim) and HHVM.  The performance increase was nothing but astounding.  I was able to decrease the number of boxes needed.  

Not only this, with PHP the CPU load would go up to 100% thus maxing out the web server.  On the same hardware, HHVM never dipped below 30% CPU and had double the load. At that time, I actually ran into the database/network being the bottleneck. This was running on Amazon C type servers on a 10GB virtual network. I'm now running a different setup. Smile

Personally, I couldnt care less about Phalcon.  To use HHVM is just replacing PHP.  No need for any c++ libraries or learning new stuff.  Your original code works.  Actually in future for advanced developers, there is talk of hacklang being optimised for HHVM thus rendering even more performance.  At which point I'll move over from phplang to hacklang and enjoy the benefits.

(11-15-2014, 09:13 PM)alroker Wrote: So the growth of the site and the acquisition of hardware pretty much run in parallel. It doesn't make a whole world of difference in that context if your application is built on top of CodeIgniter, Phalcon or HHVM. All three of them are massively slower than plain old C, which if speed really is the issue, is what you should have used in the first place.  Smile

It doesn't. Software can be refactored. The stack can be optimised. You can move from one framework to another and get a performance increase. You can move from PHP to HHVM and get another performance increase. Later versions of software (PHP/HHVM) come out and have optimisations. With HHVM you can go from JIT checking your files every request to what's called REPO AUTH mode and getting 20% increase further. You can go from Apache to Nginx and get more increases.

Are you getting it now? On the same hardware, you can get % boosts if you know what you are doing. After that, when you throw more hardware at the problem, you are exponentially increasing those same performance gains.

Oh and one more thing. HHVM is a JIT compiler. With Repo Auth mode, its bytecode. Facebook used to convert PHP to C++. They then came out with HHVM and Hacklang. They reached parity of HHVM/Hacklang with C++. They no longer convert and Facebook runs on HHVM and Hacklang.

Really, who needs Phalcon?
Reply


Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2020 MyBB Group.