Showing posts from 2016

How to improve PHP web performance

By improving PHP web performance, we mean the achievement of minimum loading time of web application so that it is loaded quickly and imparts a user-friendly experience. So, this requires us to take a number of important steps:
One of the important things we should keep in mind for this is that we should avoid using for each loops and instead of it, make use of array_mappings and other predefined functionalities.Also, we should reduce the number of executables in one particular loop.In addition to this, the database design and database structure are also critical factors affecting the website loading time. So, the database needs to be designed absolutely according to the requirement taking care to include neither any extra tables nor any extra columns.Another important step is to check for the memory usage in normal and peak usage conditions with the provided PHP functionalities.This is followed by checking whether the variable holding resources objects and large datasets…

Developing scalable PHP applications using MongoDB

What is NoSQL?NoSQL is a kind of database that, unlike most relational databases, does not provide a SQL interface to manipulate data. NoSQL databases usually organize the data in a different way other than tables.

NoSQL databases are divided into three categories: column-oriented, key-value pairs, and document-oriented databases. This article focus document-oriented databases, as it seems to be best solution for many Web sites.

SQL based relational databases do not scale well when they are distributed over multiple cluster nodes. Data partition is not an easy to implement solution when the applications use join queries and transactions. 

NoSQL databases are not new. Actually, there were key-value pair based databases before relational database became popular.
What is a document-oriented database?For document-oriented databases, a document is a data structure that has variable number of properties. Each property has a value that can be scalar (number, string, etc.) or a vector (arrays or …

MySQL in the Cloud in PHP

MySQL Everywhere As a PHP developer, chances are that you use MySQL with your applications. Being a Free and Open Source database, MySQL is one of the most widely used databases today, particularly for Web applications. As more and more applications are being migrated to the cloud, MySQL has come to rule the virtualized environment as well. MySQL Challenges in the Cloud Maintaining scalability and high availability of your MySQL database is challenging even in your physical data center, let alone in the dynamic environment of the cloud. While scaling an application (by adding more servers and load balancers) is pretty much a no-brainer, on the database tier things are very different. Scaling a database in general is no trivial task, and in the cloud it is way more difficult because of the need to quickly adjust to changing requirements in load. Scaling a database is tedious, painful and potentially risky in the sense that it can cause a temporary denial of service.  Furthermore, you o…

Basic UNIX commands

Filesls — lists your files
ls -l — lists your files in ‘long format’, which contains lots of useful information, e.g. the exact size of the file, who owns the file and who has the right to look at it, and when it was last modified.
ls -a — lists all files, including the ones whose filenames begin in a dot, which you do not always want to see.
There are many more options, for example to list files by size, by date, recursively etc.more filename — shows the first part of a file, just as much as will fit on one screen. Just hit the space bar to see more or q to quit. You can use /pattern to search for a pattern.emacs filename — is an editor that lets you create and edit a file. See the emacs filename1 filename2 — moves a file (i.e. gives it a different name, or moves it into a different directory (see below)cp filename1 filename2 — copies a filerm filename — removes a file. It is wise to use the option rm -i, which will ask you for confirmation before actually deleting anything. Yo…