Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Lipiec, 2015

Facebook HipHop Open Source Blog: Under the hood: Box’s HHVM migration

Facebook HipHop Open Source Blog: Under the hood: Box’s HHVM migration

The Facebook HipHop Open Source blog has posted a case study from Box about their migration to HHVM and some of the challenges and benefits that came along with it.

Reducing latency and increasing the capacity of our infrastructure have always been top priorities at Box. We strive to deliver the best possible user experience in the most efficient manner, and historically our choice of PHP hasn’t aligned well with these goals. I’m very happy to report that we’ve recently made very significant strides toward these two ideals by successfully deploying HHVM (the HipHop Virtual Machine) as the exclusive engine that serves our PHP codebase. In the rest of this post, I will detail how we use PHP, how HHVM works, the challenges we faced migrating to HHVM, and the remarkable performance wins it provides.

The post talks about how central PHP is to their overall technology stack and how, despite the work being put in, the processing of requests was starting to be a bit too much. In came the HHVM and some discussion about how it might be used there at Box. They started a yearlong effort to migrate their entire stack to HHVM especially since HHVM has almost reached parity with the PHP language itself. They talk some about the differences in design between the two and how the migration changed their deployment process. They also cover some of the other interesting things that come with a major migration including phased rollout and host-based conversion methods. Finally they share some of the statistics around the performance of the end result, including the better response times and reduced CPU graphs.

Link: https://code.facebook.com/posts/1607907626123431/under-the-hood-box-s-hhvm-migration/
Source: http://www.phpdeveloper.org/news/22958

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Facebook HipHop Open Source Blog: Under the hood: Box’s HHVM migration

Facebook HipHop Open Source Blog: Under the hood: Box’s HHVM migration

The Facebook HipHop Open Source blog has posted a case study from Box about their migration to HHVM and some of the challenges and benefits that came along with it.

Reducing latency and increasing the capacity of our infrastructure have always been top priorities at Box. We strive to deliver the best possible user experience in the most efficient manner, and historically our choice of PHP hasn’t aligned well with these goals. I’m very happy to report that we’ve recently made very significant strides toward these two ideals by successfully deploying HHVM (the HipHop Virtual Machine) as the exclusive engine that serves our PHP codebase. In the rest of this post, I will detail how we use PHP, how HHVM works, the challenges we faced migrating to HHVM, and the remarkable performance wins it provides.

The post talks about how central PHP is to their overall technology stack and how, despite the work being put in, the processing of requests was starting to be a bit too much. In came the HHVM and some discussion about how it might be used there at Box. They started a yearlong effort to migrate their entire stack to HHVM especially since HHVM has almost reached parity with the PHP language itself. They talk some about the differences in design between the two and how the migration changed their deployment process. They also cover some of the other interesting things that come with a major migration including phased rollout and host-based conversion methods. Finally they share some of the statistics around the performance of the end result, including the better response times and reduced CPU graphs.

Link: https://code.facebook.com/posts/1607907626123431/under-the-hood-box-s-hhvm-migration/
Source: http://www.phpdeveloper.org/news/22958

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Facebook HipHop Open Source Blog: Under the hood: Box’s HHVM migration

Facebook HipHop Open Source Blog: Under the hood: Box’s HHVM migration

The Facebook HipHop Open Source blog has posted a case study from Box about their migration to HHVM and some of the challenges and benefits that came along with it.

Reducing latency and increasing the capacity of our infrastructure have always been top priorities at Box. We strive to deliver the best possible user experience in the most efficient manner, and historically our choice of PHP hasn’t aligned well with these goals. I’m very happy to report that we’ve recently made very significant strides toward these two ideals by successfully deploying HHVM (the HipHop Virtual Machine) as the exclusive engine that serves our PHP codebase. In the rest of this post, I will detail how we use PHP, how HHVM works, the challenges we faced migrating to HHVM, and the remarkable performance wins it provides.

The post talks about how central PHP is to their overall technology stack and how, despite the work being put in, the processing of requests was starting to be a bit too much. In came the HHVM and some discussion about how it might be used there at Box. They started a yearlong effort to migrate their entire stack to HHVM especially since HHVM has almost reached parity with the PHP language itself. They talk some about the differences in design between the two and how the migration changed their deployment process. They also cover some of the other interesting things that come with a major migration including phased rollout and host-based conversion methods. Finally they share some of the statistics around the performance of the end result, including the better response times and reduced CPU graphs.

Link: https://code.facebook.com/posts/1607907626123431/under-the-hood-box-s-hhvm-migration/
Source: http://www.phpdeveloper.org/news/22958

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

SitePoint PHP Blog: Validating your data with Respect Validation

SitePoint PHP Blog: Validating your data with Respect Validation

The SitePoint PHP blog has posted a tutorial showing you how to validate your data with Respect (well, their validation library) and ensure the data you’re getting is exactly what you’re expecting.

Validation is an important aspect of every application’s interaction with data. Instead of reinventing the wheel every time, the community collaborated on some useful packages like Symfony, Laravel, Zend, etc. In this article, we’re going to introduce a lesser known package called Respect Validation, which provides some nice new features.

He starts by mentioning some of the other popular validation packages used widely in the PHP community including the Symfony Validator and Laravel’s Illuminate package. For each of these he shows code validating an email address, each with their own slight differences. Using this same example he shows how to implement it in the Respect library, first making use of their custom “email” validator class then via custom chained rules. He also shows how to set custom error messages and provides a more “real world” example with a simple Laravel application. His application takes in user data including username, password and credit card information and uses Respect’s library to validate it via a full set of rules. He ends the post with a quick look at creating your own custom rule classes and how to “cross pollinate” them with Zend or Symfony validators.

Link: http://www.sitepoint.com/validating-your-data-with-respect-validation/
Source: http://www.phpdeveloper.org/news/22957

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Tideways.io: 5 Ways to optimize Symfony Baseline Performance

Tideways.io: 5 Ways to optimize Symfony Baseline Performance

On the Tideways.io blog there’s a post sharing five performance optimizations you can make to your Symfony application that can help improve its baseline performance.

We will continue our performance series with Symfony (previously on Doctrine ORM and PHP). This blog post describes some of the fundamental aspects that affect Symfony performance at the core of HttpKernel request lifecycle. These complement the Symfony Performance docs, which mentions general tips such as Bytecode Caching and Autoloader Optimizations.

Their list of five suggestions touch several different aspects of the framework’s functionality:

  • Reducing Expensive Service Construction
  • Slow Kernel Event Listeners
  • Excessive Usage of Internal Subrequests
  • Not Delaying Work to the Background
  • Increasing “Framework Overhead” with Tons of Libraries and Bundles

Each of the items on the list includes a brief summary of why the change will increase the overall performance of the request. They also include a screenshot of the profiler showing where the performance issue actually lies.

Link: https://tideways.io/profiler/blog/5-ways-to-optimize-symfony-baseline-performance
Source: http://www.phpdeveloper.org/news/22956

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Freek Van der Herten: Speed up a Laravel app by caching the entire response

Freek Van der Herten: Speed up a Laravel app by caching the entire response

Freek Van der Herten has written up a tutorial for his site showing the Laravel users out there how to cache their entire response to speed up the overall performance of their application.

A typical request on an dynamic PHP site can do a lot of things. It’s highly likely that a bunch database queries are performed. On complex pages executing those queries and hydrating them can slow a site down. The response time can be improved by caching the entire response. The idea is that when a user visits a certain page the app stores the rendered page.

With a little help from his package it’s easy to enable. Just install the package, add the service provider and you’re ready to go. All successful responses will be cached unless told otherwise and cache files will be written out to files by default. He does point out that caching like this, while handy and a nice “quick fix” shouldn’t be used in place of proper application tuning methods though. He also links to two other external technologies that could be used for the same purpose: Varnish and Nginx’s own cache handling.

Link: https://murze.be/2015/07/speed-up-a-laravel-app-by-caching-the-entire-response/
Source: http://www.phpdeveloper.org/news/22955

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Latest PEAR Releases for 07.20.2015

Community News: Latest PEAR Releases for 07.20.2015Latest PEAR Releases:

Source: http://www.phpdeveloper.org/news/22954

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Freek Lijten: Value objects

Freek Lijten: Value objects

Freek Lijten has written up a post looking at value objects, how he feels they’re not used enough in modern development and a few practical applications of them in action.

I would like to talk about value objects for a bit. Value objects are very underused, very powerful and general good stuff. They might not change your world but they will change, very subtle, a lot of the code you write. I hope to give the shortest possible introduction to the concept and follow up with a couple of example that make me like value objects so much.

He briefly introduces some of the basics of value objects including one of the main points: their immutability. He gives an example of working with a “10 Euro” object, pointing out that once an operation is performed using it, it becomes a different object not just one with a value changed. He also illustrates with an email address example pointing out that email addresses themselves (not the relation to the user) almost never change. He ends the post with another interesting value object scenario using IDs and making them type hint-able.

Link: http://www.freeklijten.nl/home/2015/07/16/Value-objects
Source: http://www.phpdeveloper.org/news/22946

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Freek Lijten: Value objects

Freek Lijten: Value objects

Freek Lijten has written up a post looking at value objects, how he feels they’re not used enough in modern development and a few practical applications of them in action.

I would like to talk about value objects for a bit. Value objects are very underused, very powerful and general good stuff. They might not change your world but they will change, very subtle, a lot of the code you write. I hope to give the shortest possible introduction to the concept and follow up with a couple of example that make me like value objects so much.

He briefly introduces some of the basics of value objects including one of the main points: their immutability. He gives an example of working with a “10 Euro” object, pointing out that once an operation is performed using it, it becomes a different object not just one with a value changed. He also illustrates with an email address example pointing out that email addresses themselves (not the relation to the user) almost never change. He ends the post with another interesting value object scenario using IDs and making them type hint-able.

Link: http://www.freeklijten.nl/home/2015/07/16/Value-objects
Source: http://www.phpdeveloper.org/news/22946

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Sameer Borate: Accessing WordPress data using the new REST api

Sameer Borate: Accessing WordPress data using the new REST api

Sameer Borate has posted an article showing you how to use the WordPress REST API (set up by this plugin) to access the data housed inside your WP installation.

WordPress is without doubt the most used CMS system around. Various sources peg the usage around 20-30% of all web sites. Whatever the correct figure, there is no doubt that the collective content of WordPress sites is enormously large. However almost all content is virtually held in independent WordPress sites with no way to easily access a sites content programmatically. [...] As WordPress is moving towards becoming a fully-fledged application framework, we need new APIs. At present a REST api plugin is available to access your site’s data in simple JSON format, including users, posts, taxonomies and more.

He walks you through the installation of the plugin and how to make a request to the REST API’s test endpoint to ensure everything’s functioning correctly. He also includes an example request that fetches the contents of a post by it’s ID. The tutorial wraps up with a look at authentication and how the plugin provides two kinds of handling: basic authentication (HTTP Auth) and OAuth. You can find out more about the structure and functionality of the API on the project’s website.

Link: http://www.codediesel.com/wordpress/accessing-wordpress-data-using-the-new-rest-api/
Source: http://www.phpdeveloper.org/news/22945

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>