Book description
Build robust microservice-based applications that are distributed, fault tolerant, and always available
About This Book- Learn to build message-driven services for effective communication
- Design microservices API using Reactive programming design patterns
- Deploy, scale and monitor microservices for consistent high performance
This book is for JavaScript developers seeking to utilize their Node.js and Typescript skills to build microservices and move away from the monolithic architecture. Prior knowledge of TypeScript and Node.js is assumed.
What You Will Learn- Get acquainted with the fundamentals behind microservices.
- Explore the behavioral changes needed for moving from monolithic to microservices.
- Dive into reactive programming, Typescript and Node.js to learn its fundamentals in microservices
- Understand and design a service gateway and service registry for your microservices.
- Maintain the state of microservice and handle dependencies.
- Perfect your microservice with unit testing and Integration testing
- Develop a microservice, secure it, deploy it, and then scale it
In the last few years or so, microservices have achieved the rock star status and right now are one of the most tangible solutions in enterprises to make quick, effective, and scalable applications. The apparent rise of Typescript and long evolution from ES5 to ES6 has seen lots of big companies move to ES6 stack. If you want to learn how to leverage the power of microservices to build robust architecture using reactive programming and Typescript in Node.js, then this book is for you.
Typescript Microservices is an end-to-end guide that shows you the implementation of microservices from scratch; right from starting the project to hardening and securing your services. We will begin with a brief introduction to microservices before learning to break your monolith applications into microservices. From here, you will learn reactive programming patterns and how to build APIs for microservices. The next set of topics will take you through the microservice architecture with TypeScript and communication between services. Further, you will learn to test and deploy your TypeScript microservices using the latest tools and implement continuous integration. Finally, you will learn to secure and harden your microservice.
By the end of the book, you will be able to build production-ready, scalable, and maintainable microservices using Node.js and Typescript.
Style and approachThis book will be a step by step easy to follow guide with focused examples for building microservices with Typescript.
Table of contents
- Title Page
- Copyright and Credits
- Packt Upsell
- Contributors
- Preface
-
Debunking Microservices
- Debunking microservices
- Key considerations while adopting microservices
- Microservice FAQs
- Twelve-factor application of microservices
- Microservices in the current world
- Microservice design aspects
- Microservice design patterns
- Summary
- Gearing up for the Journey
- Exploring Reactive Programming
-
Beginning Your Microservice Journey
- Overview of shopping cart microservices 
- Architecture design of our system 
- Design aspects involved
- Schema design and database selection 
- Microservice predevelopment aspects
- Developing some microservices for a shopping cart 
-
Microservice design best practices
- Setting up proper microservice scope 
- Self-governing functions 
- Polyglot architecture 
- Size of independent deployable component 
- Distributing and scaling services whenever required
- Being Agile 
- Single business capability handler
- Adapting to shifting needs
- Handling dependencies and coupling
- Deciding the number of endpoints in a microservice
- Communication styles between microservices
- Specifying and testing the microservices contract 
- Number of microservices in a container 
- Data sources and rule engine among microservices 
- Summary
- Understanding API Gateway
- Service Registry and Discovery
- Service State and Interservice Communication
- Testing, Debugging, and Documenting
- Deployment, Logging, and Monitoring
-
Hardening Your Application
- Questions you should be asking while applying security
-
Security best practices for individual services/applications
- Checking for known security vulnerabilities
- Preventing brute force attacks or flooding by adding rate limiters
- Protecting against evil regular expressions
- Blocking cross-site request forgeries
- Tightening session cookies and effective session management
- Adding helmet to configure security headers
- Avoiding parameter pollution
- Securing transmission
- Preventing command injection/SQL injection
- TSLint/static code analyzers
- Security best practices for containers
- Security checklist
- Scalability
- Summary
- Other Books You May Enjoy
Product information
- Title: TypeScript Microservices
- Author(s):
- Release date: May 2018
- Publisher(s): Packt Publishing
- ISBN: 9781788830751
You might also like
book
TypeScript Quickly
TypeScript is JavaScript with an important upgrade! By adding a strong type system to JavaScript, TypeScript …
book
Learn TypeScript 3 by Building Web Applications
Learn TypeScript and many of its features by building state of art web applications from scratch …
book
Full-Stack React, TypeScript, and Node
Discover the current landscape of full-stack development and how to leverage modern web technologies for building …
book
Hands-On Functional Programming with TypeScript
Discover the power of functional programming, lazy evaluation, monads, concurrency, and immutability to create succinct and …