Lumen – A micro-framework by Laravel

  • As someone who develops/maintains many high-IO requirement PHP microservices (as part of a service-oriented architecture, or, SOA), I'm torn on this one.

    Laravel is one of my favorite frameworks, especially since 5.0 given its noble attempt to adhere to contract-first/interfaced development and many best practices that in some ways prevent the "worst" kinds of code from being written. It's not static typing, but it's a step in the right direction.

    This seems like it's heavily optimized over the Laravel base, and if high speed and concurrency is important enough that you'd choose Lumen, then it seems like you'd still be stopping halfway in a bit of a "if you have a hammer everything seems like a nail" situation. Unless I'm missing something Lumen still requires resources to be bootstrapped on request, and ultimately that (in the context of a framework) will lead to memory leaks in a loosely-typed language; no way around that.

    Also because disk writes will quickly become the bottleneck before your network capacity does, the two most relevant performance enhancements are to use a non-blocking event-loop (with expensive writes deferred to a tick cycle) and to completely avoid any unnecessary per-request bootstrapping--best done with raw PHP and ideally kept simple. This, combined with an optimized TCP configuration and split-per-process nginx LB at the head will give me r/s 10-50x the purported benchmarks. As much as 1000x when introducing intelligent edge-caching rules.

    Is there a situation where this would be the right tool for the job/more ideal than the base framework but not worthy of a "roll-your-own" solution?

    Either way +1 for Taylor Otwell as a developer and the general quality of his code/releases--Laravel is an ambitious project, and as a developer quite enjoyable to work with!

  • PHP frameworks have come a long way, and so has the language. The big thing that stands out, is that three of the best frameworks in the space (Laravel, Symfony and Slim) work together and feel a friendly/healthy sense of competition. They are reusing each others components and building a much more promising future for PHP.

  • Looks nice, I really like Slim Framework, this looks a lot like Slim from what I could tell. Gonna be interesting to see how (if at all) this will effect some performance focus from the Slim developers.

  • I've just created an issue [1] in our FrameworkBenchmarks project to solicit an implementation of our tests on Lumen. If anyone here is willing to contribute such an implementation, it would be greatly appreciated. The promise of performance caught my eye!

    Incidentally, Round 10 is arriving soon.

    [1] https://github.com/TechEmpower/FrameworkBenchmarks/issues/15...

  • Looks really interesting. PHP may not be the "hip" language to use (although it's getting better), but it's so popular and accessible that disregarding it as a legitimate option for new projects is myopic.

  • The drop in functionality right into the full framework is fantastic. Really like the ability to write API's with much less overhead, which was a factor that came into play for me recently. Nicely done Mr. Otwell.

  • For a micro framework, highly recommend FatFreeFramework - You can see in the upcoming benchmarks how incredibly well it performs for a drop-in (non-compiled) framework... http://www.techempower.com/benchmarks/previews/round10/#sect... ...Also I've found it much easier to learn and use than ones like laravel.

  • Also interested to see what projects use this as a core "micro framework" service or with an SOA architecture. Seems like good flexibility between framework power and lightweight.

  • I've just created a project with lumen to have a look at it and lumen and all its vendor packages (with --no-dev and without tests) contain 1522 files and 102449 lines of code – according to cloc.

    Am I doing something wrong or why does it call itself a "micro-framework". A newly created Slim project contains 7417 lines of code.

  • Where's the source for the benchmarks that are displayed as the first item on the project page for this?

  • How painless is deploying a Lumen/Laravel application? I used to use PHP back in 2006 and I remember deploying was as easy as pushing a .php file via FTP.

    Has the experience remained the same? PHP was incredibly simple to deploy.

  • They compare it to Slim 3, which isn't completed yet, sitting in a development branch...

    Slim 3 will also be PSR-7 compliant, I don't see anything about that anywhere in these Lumen docs.

  • Any thoughts on how this will compare to Silex?

  • If Lumen can use all Laravel its components, can't Laravel use Lumen its routing engine or whatever makes it that fast? What's the key difference that Lumen is considered "fast and micro" over a standard Laravel installation?

  • I'm sure this is great, but can I see some benchmarks?

    I think many frameworks allow you to include the "basic" subset of the framework, without running all the usual Inversion of Control bootstrapping.

  • Lumen is not micro, is a Slim-Laravel.

  • glad to see use of symfony/http-kernel and symfony/http-foundation .

  • Anyone still using PHP in 2015 is doing it wrong.

  • Really the biggest drawback to PHP is the lower salaries

  • looks good, only 7 years late to the game.

  • What Rails is to Laravel, Sinatra is to lumen. Nothing more than another copycat idea from the ruby/rails world.