Category Archive Tech

Ideal Tech Stack for small scale products

Its always a pain to choose a Tech-Stack from the huge number of the options available. Ideally PHP/Node.js and MySQL/MongoDB should cover most of the cases.

I am listing down the case study analysis done for a small shop product. Sharing it to take quick decisions

Tech Stack:

  • PHP (Codeigniter)
  • Apache
  • Redis (Cache server)

               Preferable LAMP stack

  1. PHP (Codeigniter framework)

Using PHP frameworks and components can assist developers by helping them to create clear, consistent code which complies with the latest standards. This helps to improve security and performance, while also making the process of updating the application much easier for PHP developers.

PHP makes it easy to develop websites that reflect the current state of user engagement. PHP, or Hypertext Preprocessor, is a server-side open source scripting language that is used to help improve and facilitate web development. Currently, 82% of websites use PHP as their server-side scripting language. That amounts to around 820 million websites. Why is PHP so popular to use as a server-side scripting language as opposed to languages such as ASP.NET and Ruby? Here are the top 4 reasons:

1. It’s easy.

PHP is adopted among web developers because it is easy to read and understand. Compared to other complex programming languages, PHP is very clean, eloquent, and organized. This makes it very desirable to both beginners and pros alike.

2. It gives us maximum control.

PHP provides more control over websites than any other programming language. Other languages require long tedious scripts, whereas PHP lets us complete the same functions with just a few lines of code. PHP is also open source, so it’s readily available for us to edit anything and everything quickly and easily.

PHP works well with other languages and services such as HTML, CSS, as well as various databases. PHP scripts can have tags, which makes it easy to insert and mix between HTML tags, enabling web content to be highly dynamic. Since PHP is written between tags, code and functions can be written in any order within a document.

3. It’s cost efficient.

Another reason PHP benefits web developer is that it is 100% free. There is no need for expensive software or the need to purchase licenses. PHP works out of the box with Apache, PostgreSQL, and MySQL databases. There is a very minimal cost threshold to build a successful site.

4. We have access to support.

With PHP being open source, it has a huge following and a very helpful community.  There are a lot of references and guidelines available on the web.

With PHP becoming a huge open market, the language will only continue to grow and develop. Because of its ease of use, high compatibility, wide accessibility, and cost efficiency, it’s no wonder PHP is the most popular server-side scripting language.

2.     MYSQL Database:

PHP works well when paired with a MySQL database. Soon after the PHP language was created, a few modules were written to simplify working with databases. These modules make it easy and efficient to work with MySQL databases in PHP.

Common alternatives to MySQL are PostgreSQL and MariaDB. PostgreSQL and MariaDB are different because they more closely resemble enterprise databases such as Oracle, while MySQL is built to be easy to use and has obtained wide support on numerous platforms.

  • Apache:

Apache is the most widely used web server software. Developed and maintained by Apache Software Foundation, Apache is an open source software available for free. It runs on 67% of all webservers in the world. It is fast, reliable, and secure. It can be highly customized to meet the needs of many different environments by using extensions and modules.

  • Redis Cache server:

Redis is an in-memory key value datastore written in ANSI C programming.  Redis not only supports string datatype but it also supports list, set, sorted sets, hashes datatypes, and provides a rich set of operations to work with these types. If we have worked with Memcached (an in-memory object caching system) we will find that it is very similar, but Redis is Memcached++.  Redis not only supports rich datatypes, it also supports data replication and can save data on disk.  The key advantages of Redis are:

Exceptionally Fast: Redis is very fast and can perform about 110000 SETs per second, about 81000 GETs per second. We can use the redis-benchmark utility for doing the same on our machine.

Supports Rich data types: Redis natively supports most of the datatypes that most developers already know like list, set, and sorted set, hashes. This makes it very easy to solve a variety of problems because we know which problem can be handled better by which data type.

Operations are atomic: All the Redis operations are atomic, which ensures that if two clients concurrently access Redis server will get the updated value.

MultiUtility Tool: Redis is a multi utility tool and can be used in a number of usecases like caching, messaging-queues, any short lived data in our application like web application sessions etc. 

  • Hosting options for PHP and MYSQL:

Web sites require a good hosting solution. While there are numerous cheap hosting packages available, they are typically best used for testing or for simple web sites that require few resources. For complex and demanding web sites, this can easily be scaled up to a more robust solution like AWS (Amazon Web Services) hosting, which uses a cloud solution to provide computing resources, popular databases like MYSQL, our choice of programming languages for development, and security tools to ensure that our site and applications remain safe.

When we put all of the things together that it takes to build a successful web site that will meet the specific needs of us and our customers.