Scala Microservices

 
 
Packt Publishing
  • erschienen am 19. September 2017
  • |
  • 328 Seiten
 
E-Book | ePUB mit Adobe-DRM | Systemvoraussetzungen
978-1-78646-013-4 (ISBN)
 
Design, build, and run Microservices using Scala elegantlyAbout This BookBuild robust microservices using Play Framework and LagomModel your data for highly interactive applications and scale using Event Sourcing & CQRSBuild applications that are resilient to failures by using Message Passing for communicationDeploy and manage Scala Microservices for scale by using docker containers with Kubernetes for orchestrationWho This Book Is ForIt is assumed that the reader knows Scala or is proficient in a competent programming language such as Java, C#, Ruby, and so on, with some exposure to Scala. Some experience with writing web services would also be ideal but not mandatory.What You Will LearnLearn the essentials behind Microservices, the advantages and perils associated with themBuild low latency, high throughput applications using Play and LagomDive deeper with being asynchronous and understand the superiority it providesModel your complex domain data for scale and simplicity with CQRS and Event SourcingBe resilient to failures by using message passingLook at best practices of version control workflow, testing, continuous integration and deploymentsUnderstand operating system level virtualization using Linux Containers. Docker is used to explain how containers workAutomate your infrastructure with kubernetesIn DetailIn this book we will learn what it takes to build great applications using Microservices, the pitfalls associated with such a design and the techniques to avoid them.We learn to build highly performant applications using Play Framework. You will understand the importance of writing code that is asynchronous and nonblocking and how Play leverages this paradigm for higher throughput. The book introduces Reactive Manifesto and uses Lagom Framework to implement the suggested paradigms. Lagom teaches us to: build applications that are scalable and resilient to failures, and solves problems faced with microservices like service gateway, service discovery, communication and so on. Message Passing is used as a means to achieve resilience and CQRS with Event Sourcing helps us in modelling data for highly interactive applications.The book also shares effective development processes for large teams by using good version control workflow, continuous integration and deployment strategies. We introduce Docker containers and Kubernetes orchestrator. Finally, we look at end to end deployment of a set of scala microservices in kubernetes with load balancing, service discovery and rolling deployments.Style and approachThe book will step through each of the core microservice concepts in Scala, building an overall picture of their capabilities. This book adopts a systematic approach, allowing you to build upon what you've learnt in previous chapters. By the end of this book you'll have an understanding of the complex aspects of building microservices in Scala and will be able to take that knowledge with you into further projects.ng of the complex aspects of building Microservices in Scala and will be able to take that knowledge with you onto whatever project calls for it
  • Englisch
  • Birmingham
  • |
  • Großbritannien
  • Für Beruf und Forschung
  • 3,34 MB
978-1-78646-013-4 (9781786460134)
weitere Ausgaben werden ermittelt
Jatin Puri is a passionate engineer and programming language enthusiast. He holds a master's degree in mathematics. He is a Lightbend-certified Scala trainer and is involved with spreading goodness of Scala through Hyderabad Scala Meetup, Stack Overflow, training workshops, and open source contributions.
When he is not programming, he teaches meditation and stress elimination techniques under the aegis of The Art of Living foundation. Selvam Palanimalai is a Production Engineer currently working in data pipeline automation using Kubernetes and Spark in downtown Toronto. He is passionate about technology-driven problem solving, clean data, and merciless automation. He is active in the open source community on GitHub, contributing to the Statistical group (SOCR) at the University of Michigan, Ann Arbor.
  • Cover
  • Copyright
  • Credits
  • About the Authors
  • About the Reviewer
  • www.PacktPub.com
  • Customer Feedback
  • Table of Contents
  • Preface
  • Chapter 1: Introduction to Microservices
  • Business idea
  • Data collection
  • Linking users across sites
  • Rank developers
  • User interaction
  • Implementation
  • Development issues
  • Configuration and maintenance hazards
  • Difficult to get started
  • New functionality
  • Restart and update
  • Testing and deployment
  • Scalability
  • Isolation
  • Isolation in space
  • Isolation in time
  • Overview of application design till now
  • Microservices
  • Code example
  • Restructuring
  • What exactly are microservices
  • Sharing of a database
  • Defining microservice
  • Micro in microservice
  • Polyglot
  • The dark side of microservices architecture
  • Why Scala
  • Summary
  • Chapter 2: Introduction to Play Framework
  • Quick introduction to Play 2.66
  • Getting started
  • Hello world
  • Structure of the Play project
  • Routing
  • Routes
  • HTTP POST
  • Actions
  • Auth
  • Templates
  • REST
  • JSON marshalling/Unmarshalling
  • Reading JSON
  • Macro to generate Reads
  • Generating JSON
  • Macro to generate Write
  • Play production mode
  • Summary
  • Chapter 3: Asynchronous and Non-Blocking
  • Being asynchronous
  • Scenario 1 - synchronous
  • Scenario 2 - synchronous
  • Scenario 3 - asynchronous
  • Scenario 4 - waiting
  • Being asynchronous in Scala
  • ExecutionContext
  • Synchronous ExecutionContext
  • Future
  • Functional composition with Futures
  • Blocking
  • scala.concurrent.blocking
  • Non-blocking I/O
  • Blocking and synchronous, non-blocking and asynchronous
  • Work Stealing - what makes Play fast!
  • Scheduling improvements - 1
  • Scheduling improvements - 2
  • Work Stealing in Play
  • Play thread pools
  • Mixing synchronous and asynchronous code
  • Asynchronous WebService calls
  • Summary
  • Chapter 4: Dive Deeper
  • Talent search engine
  • Project structure
  • The build.sbt file
  • Brief overview of the application
  • Security
  • Inter-microservice authentication
  • The auth-app microservice explained
  • Action.async
  • Brief introduction to Slick
  • Slick evolutions
  • Slick is asynchronous
  • The web-app microservice
  • The rank-app microservice
  • The stackoverflow-app (so-app) microservice
  • github-app (github-app)
  • The commons project
  • Pitfalls
  • Summary
  • Chapter 5: Reactive Manifesto
  • Reactive hype?
  • Reactive Manifesto
  • Manifesto explained
  • Elastic
  • Resilience
  • Message-driven
  • Brief overview of Akka
  • Akka versus message brokers
  • Isolation
  • Flow control
  • Location Transparency
  • Immutability
  • Event driven versus message-driven
  • Summary
  • Chapter 6: Introduction to Lagom
  • Why Lagom?
  • Brief overview of Lagom
  • Lagom Service API
  • Minimized chirper application
  • Anatomy of a Lagom project
  • Dependency injection in Lagom
  • API and Impl
  • Defining services
  • ServiceCall
  • Brief overview of Macwire
  • Implementing friend-impl
  • Akka Streams
  • Chirp service
  • Activity Stream
  • Frontend
  • Running the application
  • Multi project builds
  • Summary
  • Chapter 7: CQRS and Event Sourcing
  • Data modelling
  • Bounded context
  • Domain-driven design
  • Event Sourcing
  • Advantages of Event Sourcing
  • Event
  • CQRS
  • CQRS example
  • Pain points with CQRS
  • Event Sourcing and CQRS
  • Conclusion
  • Lagom Persistence API
  • Getting started with setup
  • Managing Friends with CQRS
  • Command
  • Events
  • State
  • PersistentEntity
  • Implementing FriendService
  • Summary
  • Chapter 8: Effective Communication
  • Isolation
  • Isolation - part 2
  • Message brokers
  • Apache Kafka
  • Conclusion
  • Lagom Message Broker API
  • Friend Recommendation
  • build.sbt
  • Friend-api
  • The friend-recommendation-api
  • Summary
  • Chapter 9: Development Process
  • Getting to know the key ingredients
  • The feedback loop
  • Code versioning
  • Testing strategies
  • Continuous integration and deployments
  • Deployments
  • Jenkins pipelines
  • Jenkins pipeline - In action
  • Traditional deployments and machine images
  • Dependency versus package manager
  • Containers
  • Introducing hardware virtualization
  • OS-level virtualization
  • What do we expect from containers?
  • Container runtime - Docker
  • What made Docker a possibility?
  • Container images
  • Deployments with containers
  • Container concerns
  • Summary
  • Chapter 10: Production Containers
  • Distributed systems and their essentials
  • Distributed system - definition
  • Reasons to distribute
  • Components of a distributed system
  • Domain name service
  • Server automation
  • What does an automation framework look like?
  • Infrastructure as code - Ansible
  • Ansible primitives
  • Ansible - creating a Pageview counter
  • Ansible cloud modules
  • An introduction to cluster orchestration
  • Kubernetes
  • K8s internals
  • API objects
  • Config management
  • K8s setup guide
  • K8s example app
  • K8s monitoring
  • K8s security
  • Network level
  • Service level
  • Certificates
  • Authentication
  • Authorization using RBAC
  • Caveats
  • Summary
  • Chapter 11: Example Application in K8s
  • Talent search engine example
  • Dockerize
  • Creating a Docker image
  • Testing the Docker image
  • Pushing the Docker image
  • Deployment topology
  • K8s configurations
  • Auth-service
  • Installation of K8s
  • Deploy!
  • Rolling deployments
  • Persistent workloads
  • Persistent disks
  • Summary
  • Index

Dateiformat: ePUB
Kopierschutz: Adobe-DRM (Digital Rights Management)

Systemvoraussetzungen:

Computer (Windows; MacOS X; Linux): Installieren Sie bereits vor dem Download die kostenlose Software Adobe Digital Editions (siehe E-Book Hilfe).

Tablet/Smartphone (Android; iOS): Installieren Sie bereits vor dem Download die kostenlose App Adobe Digital Editions (siehe E-Book Hilfe).

E-Book-Reader: Bookeen, Kobo, Pocketbook, Sony, Tolino u.v.a.m. (nicht Kindle)

Das Dateiformat ePUB ist sehr gut für Romane und Sachbücher geeignet - also für "fließenden" Text ohne komplexes Layout. Bei E-Readern oder Smartphones passt sich der Zeilen- und Seitenumbruch automatisch den kleinen Displays an. Mit Adobe-DRM wird hier ein "harter" Kopierschutz verwendet. Wenn die notwendigen Voraussetzungen nicht vorliegen, können Sie das E-Book leider nicht öffnen. Daher müssen Sie bereits vor dem Download Ihre Lese-Hardware vorbereiten.

Bitte beachten Sie bei der Verwendung der Lese-Software Adobe Digital Editions: wir empfehlen Ihnen unbedingt nach Installation der Lese-Software diese mit Ihrer persönlichen Adobe-ID zu autorisieren!

Weitere Informationen finden Sie in unserer E-Book Hilfe.


Download (sofort verfügbar)

43,49 €
inkl. 7% MwSt.
Download / Einzel-Lizenz
ePUB mit Adobe-DRM
siehe Systemvoraussetzungen
E-Book bestellen