Learn to develop efficient and scalable microservices for server-side programming in Node.js using this hands-on guide
About This Book
- Real world example explained chapter after chapter with code examples.
- Useful concepts for other languages like Java or PHP
- Easy to follow by people with little to none experience in Node.js
- Node.js Version 0.12.2 and the latest compatible versions of Seneca and PM2
Who This Book Is For
Node.js developer with basic server-side development knowledge - but no knowledge of implementing microservices in Node.js applications. Also useful for developers in other languages like Java or C#.
What You Will Learn
- Identify where the microservice oriented architectures can tackle the most common problems in the software used by the big organisations.
- Re-architecture an existing monolithic system into a microservices oriented software.
- Build robust and scalable microservices using Seneca and Node.js.
- Testing of the microservices in insolation in order to create a solid system.
- Deploy and manage microservices using PM2
- Monitoring the health of a microservice (CPU, memory, I/O?) and how the degradation of the performance in one microservice could degrade the performance of full system.
Microservices architecture is a style of software architecture. As the name suggests, microservicess refers to small services. For a large implementation, this means breaking the system into really small, independent services. Alternative to monolithic architecture (where the entire system is considered as a single big, interwoven segment), microservices approach is getting more and more popular with large, complex applications that have a very long lifecycle, which require changes at regular intervals. Microservices approach allows this type of changes with ease as only a part of the system undergoes changes and change control is easy.
An example of such large system can be an online store - includes user interface, managing product catalog, processing orders, managing customer's account. In a microservices architecture each of these tasks will be divided and into smaller services. Also, these services will be further broken down into independent services - for user interface, there will be separate services for input, output, search bar management, and so on. Similarly, all other tasks can be divided in very small and simple services.
Style and approach
This book is a comprehensive guide to developing production-ready implementation of the microservices architecture with Node.js. Each chapter builds up on the earlier one creating a strong foundation on which you create your own microservice in a distributed environment.
Table of contents
Developing Microservices with Node.js
- Table of Contents
- Developing Microservices with Node.js
- About the Author
- About the Reviewer
1. Microservices Architecture
- Need for microservices
- Key design principles
- Key benefits
- SOA versus microservices
- Why Node.js?
2. Microservices in Node.js – Seneca and PM2 Alternatives
- Need for Node.js
- Seneca – a microservices framework
- PM2 – a task runner for Node.js
- 3. From the Monolith to Microservices
4. Writing Your First Microservice in Node.js
- Micromerce – the big picture
- Product Manager – the two-faced core
- The e-mailer – a common problem
- The order manager
- The UI – API aggregation
5. Security and Traceability
- Infrastructure logical security
- Application security
6. Testing and Documenting Node.js Microservices
- The pyramid of automated testing
- Testing microservices in Node.js
- Documenting microservices
- Functional testing
- 7. Monitoring Microservices
8. Deploying Microservices
- Concepts in software deployment
- Deployments with PM2
- Docker – a container for software delivery
- Node.js event loop – easy to learn and hard to master
- Clustering Node.js applications
- Load balancing our application
- Title: Developing Microservices with Node.js
- Release date: April 2016
- Publisher(s): Packt Publishing
- ISBN: 9781785887406
You might also like
Head First Design Patterns, 2nd Edition
You know you don’t want to reinvent the wheel, so you look to design patterns—the lessons …
Node.js in Action, Second Edition
Summary Node.js in Action, Second Edition is a thoroughly revised book based on the best-selling first …
Hands-On RESTful API Design Patterns and Best Practices
Build effective RESTful APIs for enterprise with design patterns and REST framework's out-of-the-box capabilities Key Features …
Node.js Design Patterns - Second Edition
Get the best out of Node.js by mastering its most powerful components and patterns to create …