Search icon CANCEL
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
PHP Microservices

You're reading from   PHP Microservices Transit from monolithic architectures to highly available, scalable, and fault-tolerant microservices

Arrow left icon
Product type Paperback
Published in Mar 2017
Publisher Packt
ISBN-13 9781787125377
Length 392 pages
Edition 1st Edition
Languages
Arrow right icon
Authors (2):
Arrow left icon
Carlos Pérez Sánchez Carlos Pérez Sánchez
Author Profile Icon Carlos Pérez Sánchez
Carlos Pérez Sánchez
Pablo Solar Vilariño Pablo Solar Vilariño
Author Profile Icon Pablo Solar Vilariño
Pablo Solar Vilariño
Arrow right icon
View More author details
Toc

Table of Contents (13) Chapters Close

Preface 1. What are Microservices? FREE CHAPTER 2. Development Environment 3. Application Design 4. Testing and Quality Control 5. Microservices Development 6. Monitoring 7. Security 8. Deployment 9. From Monolithic to Microservices 10. Strategies for Scalability 11. Best Practices and Conventions 12. Cloud and DevOps

Chapter 1. What are Microservices?

Good projects need good solutions; this is why developers are always looking for better ways to do their jobs. There is no best solution for all projects because every single project has different needs and the architect (or the developer) has to find the best solution for that specific project.

Microservices are maybe a good approach to solve problems; in the last few years, companies such as Netflix, PayPal, eBay, Amazon, and Spotify have chosen to use microservices in their own development teams because they believed them to be the best solution for their projects. To understand why they chose microservices and understand the kinds of projects you should use them in, it is necessary to know what a microservice is.

Firstly, it is essential to understand what a monolithic application is, but basically, we can define a microservice as an extended Service Oriented Architecture. In other words, it is a way to develop an application by following the required steps to turn it into various little services. Each service will execute itself and communicate with others through requests, usually using APIs on HTTP.

To further understand what microservices are, we first need to understand what a monolithic application is. It is the typical application that we have been developing for the last few years, for example in PHP, using a framework like Symfony; in other words, all the applications we have been developing are divided into different parts, such as frontend, backend, and database, and also use the Model-View-Controller (MVC) pattern. It is important to differentiate between MVC and microservices. MVC is a design pattern and microservices are a way to develop an application; therefore, applications developed using MVC could still be monolithic applications. People may think that if we split our application into different machines and divide the business logic from the model and the view, the application is then based on microservices, but this is not correct.

However, using a monolithic architecture still has its advantages. There are also various huge web applications, such as Facebook, that use it; we just need to know when we need to use a monolithic architecture and when we need to use microservices.

You have been reading a chapter from
PHP Microservices
Published in: Mar 2017
Publisher: Packt
ISBN-13: 9781787125377
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime