Microservices patterns: with examples in Java
Gespeichert in:
1. Verfasser: | |
---|---|
Format: | Buch |
Sprache: | English |
Veröffentlicht: |
Shelter Island, NY
Manning
[2019]
|
Schlagworte: | |
Online-Zugang: | Inhaltsverzeichnis |
Beschreibung: | Auf dem Cover: "With examples in Java" |
Beschreibung: | xxvii, 490 Seiten Illustrationen |
ISBN: | 9781617294549 1617294543 |
Internformat
MARC
LEADER | 00000nam a2200000 c 4500 | ||
---|---|---|---|
001 | BV044244174 | ||
003 | DE-604 | ||
005 | 20210325 | ||
007 | t | ||
008 | 170327s2019 a||| |||| 00||| eng d | ||
020 | |a 9781617294549 |9 978-1-61729-454-9 | ||
020 | |a 1617294543 |9 1-61729-454-3 | ||
035 | |a (OCoLC)1101125676 | ||
035 | |a (DE-599)BVBBV044244174 | ||
040 | |a DE-604 |b ger |e rda | ||
041 | 0 | |a eng | |
049 | |a DE-898 |a DE-473 |a DE-83 |a DE-1049 |a DE-824 |a DE-859 |a DE-573 |a DE-N2 |a DE-634 | ||
084 | |a ST 250 |0 (DE-625)143626: |2 rvk | ||
084 | |a ST 230 |0 (DE-625)143617: |2 rvk | ||
100 | 1 | |a Richardson, Chris |e Verfasser |0 (DE-588)1185195254 |4 aut | |
245 | 1 | 0 | |a Microservices patterns |b with examples in Java |c Chris Richardson |
246 | 1 | 3 | |a Microservice patterns |
264 | 1 | |a Shelter Island, NY |b Manning |c [2019] | |
264 | 4 | |c © 2019 | |
300 | |a xxvii, 490 Seiten |b Illustrationen | ||
336 | |b txt |2 rdacontent | ||
337 | |b n |2 rdamedia | ||
338 | |b nc |2 rdacarrier | ||
500 | |a Auf dem Cover: "With examples in Java" | ||
650 | 0 | 7 | |a Softwarearchitektur |0 (DE-588)4121677-5 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Softwareentwicklung |0 (DE-588)4116522-6 |2 gnd |9 rswk-swf |
650 | 0 | 7 | |a Mikroservice |0 (DE-588)1073948900 |2 gnd |9 rswk-swf |
689 | 0 | 0 | |a Softwareentwicklung |0 (DE-588)4116522-6 |D s |
689 | 0 | 1 | |a Mikroservice |0 (DE-588)1073948900 |D s |
689 | 0 | 2 | |a Softwarearchitektur |0 (DE-588)4121677-5 |D s |
689 | 0 | |5 DE-604 | |
856 | 4 | 2 | |m Digitalisierung UB Bamberg - ADAM Catalogue Enrichment |q application/pdf |u http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029649427&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |3 Inhaltsverzeichnis |
999 | |a oai:aleph.bib-bvb.de:BVB01-029649427 |
Datensatz im Suchindex
_version_ | 1804177407691718656 |
---|---|
adam_text | brief contents
1 m Escaping monolithic hell 1
2 ■ Decomposition strategies 33
3 ■ Interprocess communication in a microservice
architecture 65
4 ■ Managing transactions with sagas 110
5 m Designing business logic in a microservice
architecture 146
6 ■ Developing business logic with event sourcing 183
7 ■ Implementing queries in a microservice architecture 220
8 ■ External API patterns 253
9 ■ Testing microservices: Part 1 292
10 ■ Testing microservices: Part 2 318
11 ■ Developing production-ready services 348
12 ■ Deploying microservices 383
13 m Refactoring to microservices 428
vii
contents
preface xvii
acknowledgments xx
about this book xxii
about the cover illustration xxvi
Escaping monolithic hell 1
1.1 The slow march toward monolithic hell 2
The architecture of the FTGO application 3 * The benefits of the
monolithic architecture 4 * Living in monolithic hell 4
1.2 Why this book is relevant to you 7
1.3 What you’ll learn in this book 7
1.4 Microservice architecture to the rescue 8
Scale cube and microservices 8 * Microservices as a form of
modularity 11 ■ Each service has its own database 12
The FTGO microservice architecture 12* Comparing the
microservice architecture and SOA 13
1.5 Benefits and drawbacks of the microservice
architecture 14
Benefits of the microservice architecture 14 * Drawbacks of the
microservice architecture 17
ix
CONTENTS
1.6 The Microservice architecture pattern language 19
Microservice architecture is not a silver bullet 19 ■ Patterns and
pattern languages 20 ■ Overview of the Microservice architecture
pattern language 23
1.7 Beyond microservices: Process and organization 29
Software development and delivery organization 29 ■ Software
development and delivery process 30 ■ The human side of
adopting microservices 31
Decomposition strategies 33
2.1 What is the microservice architecture exactly? 34
What is software architecture and why does it matter? 34
Overview of architectural styles 37 ■ The microservice architecture
is an architectural style 40
2.2 Defining an application’s microservice architecture 44
/ Identifying the system operations 45 ■ Defining services by
applying the Decompose by business capability pattern 51
Defining services by applying the Decompose by sub-domain
pattern 54 ■ Decomposition guidelines 56 ■ Obstacles to
decomposing an application into services 57 ■ Defining service
APIs 61
Interprocess communication in a microservice architecture 65
3.1 Overview of interprocess communication in a microservice
architecture 66
Interaction styles 67 ■ Defining APIs in a microservice
architecture 68 ■ Evolving APIs 69 ■ Message formats 71
3.2 Communicating using the synchronous Remote
procedure invocation pattern 72
Using REST 73 ■ Using gRPC 76 ■ Handling partial failure
using the Circuit breaker pattern 77 * Using service discovery 80
3.3 Communicating using the Asynchronous messaging
pattern 85
Overview of messaging 86 ■ Implementing the interaction styles
using messaging 87 1 Creating an API specification for a
messaging-based service API 89 ■ Using a message broker 90
Competing receivers and message ordering 94 ■ Handling
duplicate messages 95 ■ Transactional messaging 97
Libraries and frameworks for messaging 100
CONTENTS
3.4 Using asynchronous messaging to improve
availability 103
Synchronous communication reduces availability 103
Eliminating synchronous interaction 104
Managing transactions with sagas 110
4.1 Transaction management in a microservice
architecture 111
The need for distributed transactions in a microseruice
architecture 112 ■ The trouble with distributed
transactions 112 ■ Using the Saga pattern to maintain
data consistency 114
4.2 Coordinating sagas 117
Choreography-based sagas 118 ■ Orchestration-based sagas 121
4.3 Handling the lack of isolation 126
Overview of anomalies 127 ■ Countermeasures for handling the
lack of isolation 128
4.4 The design of the Order Service and
the Create Order Saga 132
The OrderService class 133 ■ The implementation of the Create
Order Saga 135 ■ The OrderCommandHandlers class 142
The OrderServiceConjiguration class 143
Designing business logic in a microservice architecture 146
5.1 Business logic organization patterns 147
Designing business logic using the Transaction script pattern 149
Designing business logic using the Domain model pattern 150
About Domain-driven design 151
5.2 Designing a domain model using the
DDD aggregate pattern 152
The problem with fuzzy boundaries 153 ■ Aggregates have
explicit boundaries 154 ■ Aggregate rules 155 ■ Aggregate
ganularity 158 ■ Designing business logic with aggregates 159
5.3 Publishing domain events 160
Why publish change events ? 160 ■ What is a domain
event? 161 ■ Event enrichment 161 * Identifying domain
events 162 * Generating and publishing domain events 164
Consuming domain events 167
CONTENTS
5.4 Kitchen Service business logic 168
The Ticket aggregate 169
5.5 Order Service business logic 173
The Order Aggregate 175 ■ The OrderService class 180
Developing business logic with event sourcing 183
6.1 Developing business logic using event sourcing 184
The trouble with traditional persistence 185 * Overview of event
sourcing 186 ■ Handling concurrent updates using optimistic
locking 193 ■ Event sourcing and publishing events 194
Using snapshots to improve performance 195 ■ Idempotent
message processing 197 ■ Evolving domain events 198
Benefits of event sourcing 199 ■ Drawbacks of event
sourcing 200
6.2 Implementing an event store 202
/ How the Eventuate Local event store works 203 ■ The Eventuate
client framework for Java 205
6.3 Using sagas and event sourcing together 209
Implementing choreography-based sagas using event sourcing 210
Creating an orchestration-based saga 211 ■ Implementing an
event sourcing-based saga participant 213 ■ Implementing saga
orchestrators using event sourcing 216
Implementing queries in a microservice architecture 220
7.1 Querying using the API composition pattern 221
The ftndOrderQ query operation 221 ■ Overview of the API
composition pattern 222 ■ Implementing the findOrderQ query
operation using the API composition pattern 224 ■ API
composition design issues 225 ■ The benefits and drawbacks
of the API composition pattern 22 7
7.2 Using the CQRS pattern 228
Motivations for using CQRS 229 ■ Overview of CQRS 232
The benefits of CQRS 235 ■ The drawbacks of CQRS 236
7.3 Designing CQRS views 236
Choosing a view datastore 237 ■ Data access module design 239
Adding and updating CQRS views 241
7.4 Implementing a CQRS view with AWS DynamoDR 242
The OrderHistoryEventHandlers module 243
Data modeling and query design with DynamoDB 244
The OrderHistoryDaoDynamoDb class 249
CONTENTS
xiii
External API patterns 253
8.1 External API design issues 254
API design issues for the FTGO mobile client 255 9 API design
issues for other kinds of clients 258
8.2 The API gateway pattern 259
Overview of the API gateway pattern 259 9 Benefits and
drawbacks of an API gateway 267 9 Netflix as an example
of an API gateway 267 ■ API gateway design issues. 268
8.3 Implementing an API gateway 271
Using an off-the-shelf API gateway product/service 2 71
Developing your own API gateway 273 9 Implementing an
API gateway using GraphQL 279
Testing microservices: Part 1 292
9.1 Testing strategies for microservice architectures 294
Overview of testing 294 9 The challenge of testing
microservices 299 9 The deployment pipeline 305
9.2 Writing unit tests for a service 307
Developing unit tests for entities 309 9 Writing unit tests for value
objects 310 9 Developing unit tests for sagas 310 9 Writing
unit tests for domain services 312 9 Developing unit tests for
controllers 313 ■ Writing unit tests for event and message
handlers 315
Testing microservices: Part 2 318
10.1 Writing integration tests 319
Persistence integration tests 321 ■ Integration testing REST-based
request/response style interactions 322 9 Integration testing
publish/subscribe-style interactions 326 9 Integration contract
tests for asynchronous request/response interactions 330
10.2 Developing component tests 335
Defining acceptance tests 336 * Writing acceptance tests using
Gherkin 337 9 Designing component tests 339 9 Writing
component tests for the FTGO Order Service 340
10.3 Writing end-to-end tests 345
Designing end-to-end tests 345 9 Writing end-to-end tests 346
Running end-to-end tests 346
CONTENTS
Developing production-ready services 348
11.1 Developing secure services 349
Overview of security in a traditional monolithic application 350
Implementing security in a microservice architecture 353
11.2 Designing configurable services 360
Using push-based externalized configuration 362 9 Using pull-
based externalized configuration 363
11.3 Designing observable services 364
Using the Health check API pattern 366 9 Applying the Log
aggregation pattern 368 ■ Using the Distributed tracing
pattern 370 9 Applying the Application metrics pattern 373
Using the Exception tracking pattern 376 9 Applying the Audit
logging pattern 377
11.4 Developing services using the Microservice chassis
pattern 378
Using a microservice chassis 379 9 From microservice chassis to
service mesh 380
Deploying microservices 383
12.1 Deploying services using the Language-specific packaging
format pattern 386
Benefits of the Service as a language-specific package pattern 388
Drawbacks of the Service as a language-specific package
pattern 389
12.2 Deploying services using the Service as a virtual machine
pattern 390
The benefits of deploying services as VMs 392 9 The drawbacks of
deploying services as VMs 392
12.3 Deploying services using the Service as a container
pattern 393
Deploying services using Docker 395 9 Benefits of deploying
services as containers 398 9 Drawbacks of deploying services
as containers 399
12.4 Deploying the FTGO application with Kubernetes 399
Overview of Kubernetes 399 9 Deploying the Restaurant service
on Kubernetes 402 9 Deploying the API gateway 405
Zero-downtime deployments 406 9 Using a service mesh
to separate deployment from release 407
CONTENTS
12.5 Deploying services using the Serverless deployment
pattern 415
Overview of serverless deployment with A WS Lambda 416
Developing a lambda function 417 ■ Invoking lambda
functions 417 ■ Benefits of using lambda functions 418
Drawbacks of using lambda functions 419
12.6 Deploying a RESTful service using AWS Lambda
and AWS Gateway 419
The design of the AWS Lambda version of Restaurant Service 419
Packaging the service as ZIP file 424 ■ Deploying lambda
functions using the Serverless framework 425
Refactoring to microservices 428
13.1 Overview of refactoring to microservices 429
Why refactor a monolith ? 429 ■ Strangling the monolith 430
13.2 Strategies for refactoring a monolith to
microservices 433
Implement new features as services 434 ■ Separate presentation
tier from the backend 436 ■ Extract business capabilities into
services 437
13.3 Designing how the service and the monolith
collaborate 443
Designing the integration glue 444 ■ Maintaining data
consistency across a service and a monolith 449 ■ Handling
authentication and authorization 453
13.4 Implementing a new feature as a service: handling
misdelivered orders 455
The design of Delayed Delivery Service 456 ■ Designing the
integration glue for Delayed Delivery Service 45 7
13.5 Breaking apart the monolith: extracting delivery
management 459
Overview of existing delivery management functionality 460
Overview of Delivery Service 462 ■ Designing the Delivery Service
domain model 463 ■ The design of the Delivery Service integration
glue 465 ■ Changing the FTGO monolith to interact with Delivery
Service 467
index 473
|
any_adam_object | 1 |
author | Richardson, Chris |
author_GND | (DE-588)1185195254 |
author_facet | Richardson, Chris |
author_role | aut |
author_sort | Richardson, Chris |
author_variant | c r cr |
building | Verbundindex |
bvnumber | BV044244174 |
classification_rvk | ST 250 ST 230 |
ctrlnum | (OCoLC)1101125676 (DE-599)BVBBV044244174 |
discipline | Informatik |
format | Book |
fullrecord | <?xml version="1.0" encoding="UTF-8"?><collection xmlns="http://www.loc.gov/MARC21/slim"><record><leader>01748nam a2200421 c 4500</leader><controlfield tag="001">BV044244174</controlfield><controlfield tag="003">DE-604</controlfield><controlfield tag="005">20210325 </controlfield><controlfield tag="007">t</controlfield><controlfield tag="008">170327s2019 a||| |||| 00||| eng d</controlfield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">9781617294549</subfield><subfield code="9">978-1-61729-454-9</subfield></datafield><datafield tag="020" ind1=" " ind2=" "><subfield code="a">1617294543</subfield><subfield code="9">1-61729-454-3</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(OCoLC)1101125676</subfield></datafield><datafield tag="035" ind1=" " ind2=" "><subfield code="a">(DE-599)BVBBV044244174</subfield></datafield><datafield tag="040" ind1=" " ind2=" "><subfield code="a">DE-604</subfield><subfield code="b">ger</subfield><subfield code="e">rda</subfield></datafield><datafield tag="041" ind1="0" ind2=" "><subfield code="a">eng</subfield></datafield><datafield tag="049" ind1=" " ind2=" "><subfield code="a">DE-898</subfield><subfield code="a">DE-473</subfield><subfield code="a">DE-83</subfield><subfield code="a">DE-1049</subfield><subfield code="a">DE-824</subfield><subfield code="a">DE-859</subfield><subfield code="a">DE-573</subfield><subfield code="a">DE-N2</subfield><subfield code="a">DE-634</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 250</subfield><subfield code="0">(DE-625)143626:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="084" ind1=" " ind2=" "><subfield code="a">ST 230</subfield><subfield code="0">(DE-625)143617:</subfield><subfield code="2">rvk</subfield></datafield><datafield tag="100" ind1="1" ind2=" "><subfield code="a">Richardson, Chris</subfield><subfield code="e">Verfasser</subfield><subfield code="0">(DE-588)1185195254</subfield><subfield code="4">aut</subfield></datafield><datafield tag="245" ind1="1" ind2="0"><subfield code="a">Microservices patterns</subfield><subfield code="b">with examples in Java</subfield><subfield code="c">Chris Richardson</subfield></datafield><datafield tag="246" ind1="1" ind2="3"><subfield code="a">Microservice patterns</subfield></datafield><datafield tag="264" ind1=" " ind2="1"><subfield code="a">Shelter Island, NY</subfield><subfield code="b">Manning</subfield><subfield code="c">[2019]</subfield></datafield><datafield tag="264" ind1=" " ind2="4"><subfield code="c">© 2019</subfield></datafield><datafield tag="300" ind1=" " ind2=" "><subfield code="a">xxvii, 490 Seiten</subfield><subfield code="b">Illustrationen</subfield></datafield><datafield tag="336" ind1=" " ind2=" "><subfield code="b">txt</subfield><subfield code="2">rdacontent</subfield></datafield><datafield tag="337" ind1=" " ind2=" "><subfield code="b">n</subfield><subfield code="2">rdamedia</subfield></datafield><datafield tag="338" ind1=" " ind2=" "><subfield code="b">nc</subfield><subfield code="2">rdacarrier</subfield></datafield><datafield tag="500" ind1=" " ind2=" "><subfield code="a">Auf dem Cover: "With examples in Java"</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Softwarearchitektur</subfield><subfield code="0">(DE-588)4121677-5</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Softwareentwicklung</subfield><subfield code="0">(DE-588)4116522-6</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="650" ind1="0" ind2="7"><subfield code="a">Mikroservice</subfield><subfield code="0">(DE-588)1073948900</subfield><subfield code="2">gnd</subfield><subfield code="9">rswk-swf</subfield></datafield><datafield tag="689" ind1="0" ind2="0"><subfield code="a">Softwareentwicklung</subfield><subfield code="0">(DE-588)4116522-6</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="1"><subfield code="a">Mikroservice</subfield><subfield code="0">(DE-588)1073948900</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2="2"><subfield code="a">Softwarearchitektur</subfield><subfield code="0">(DE-588)4121677-5</subfield><subfield code="D">s</subfield></datafield><datafield tag="689" ind1="0" ind2=" "><subfield code="5">DE-604</subfield></datafield><datafield tag="856" ind1="4" ind2="2"><subfield code="m">Digitalisierung UB Bamberg - ADAM Catalogue Enrichment</subfield><subfield code="q">application/pdf</subfield><subfield code="u">http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029649427&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA</subfield><subfield code="3">Inhaltsverzeichnis</subfield></datafield><datafield tag="999" ind1=" " ind2=" "><subfield code="a">oai:aleph.bib-bvb.de:BVB01-029649427</subfield></datafield></record></collection> |
id | DE-604.BV044244174 |
illustrated | Illustrated |
indexdate | 2024-07-10T07:47:35Z |
institution | BVB |
isbn | 9781617294549 1617294543 |
language | English |
oai_aleph_id | oai:aleph.bib-bvb.de:BVB01-029649427 |
oclc_num | 1101125676 |
open_access_boolean | |
owner | DE-898 DE-BY-UBR DE-473 DE-BY-UBG DE-83 DE-1049 DE-824 DE-859 DE-573 DE-N2 DE-634 |
owner_facet | DE-898 DE-BY-UBR DE-473 DE-BY-UBG DE-83 DE-1049 DE-824 DE-859 DE-573 DE-N2 DE-634 |
physical | xxvii, 490 Seiten Illustrationen |
publishDate | 2019 |
publishDateSearch | 2019 |
publishDateSort | 2019 |
publisher | Manning |
record_format | marc |
spelling | Richardson, Chris Verfasser (DE-588)1185195254 aut Microservices patterns with examples in Java Chris Richardson Microservice patterns Shelter Island, NY Manning [2019] © 2019 xxvii, 490 Seiten Illustrationen txt rdacontent n rdamedia nc rdacarrier Auf dem Cover: "With examples in Java" Softwarearchitektur (DE-588)4121677-5 gnd rswk-swf Softwareentwicklung (DE-588)4116522-6 gnd rswk-swf Mikroservice (DE-588)1073948900 gnd rswk-swf Softwareentwicklung (DE-588)4116522-6 s Mikroservice (DE-588)1073948900 s Softwarearchitektur (DE-588)4121677-5 s DE-604 Digitalisierung UB Bamberg - ADAM Catalogue Enrichment application/pdf http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029649427&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA Inhaltsverzeichnis |
spellingShingle | Richardson, Chris Microservices patterns with examples in Java Softwarearchitektur (DE-588)4121677-5 gnd Softwareentwicklung (DE-588)4116522-6 gnd Mikroservice (DE-588)1073948900 gnd |
subject_GND | (DE-588)4121677-5 (DE-588)4116522-6 (DE-588)1073948900 |
title | Microservices patterns with examples in Java |
title_alt | Microservice patterns |
title_auth | Microservices patterns with examples in Java |
title_exact_search | Microservices patterns with examples in Java |
title_full | Microservices patterns with examples in Java Chris Richardson |
title_fullStr | Microservices patterns with examples in Java Chris Richardson |
title_full_unstemmed | Microservices patterns with examples in Java Chris Richardson |
title_short | Microservices patterns |
title_sort | microservices patterns with examples in java |
title_sub | with examples in Java |
topic | Softwarearchitektur (DE-588)4121677-5 gnd Softwareentwicklung (DE-588)4116522-6 gnd Mikroservice (DE-588)1073948900 gnd |
topic_facet | Softwarearchitektur Softwareentwicklung Mikroservice |
url | http://bvbr.bib-bvb.de:8991/F?func=service&doc_library=BVB01&local_base=BVB01&doc_number=029649427&sequence=000002&line_number=0001&func_code=DB_RECORDS&service_type=MEDIA |
work_keys_str_mv | AT richardsonchris microservicespatternswithexamplesinjava AT richardsonchris microservicepatterns |