Index

Symbols

0MQ (ZeroMQ), 183

A

acceptance tests, 59

acceptance-driven design (ATDD), 216

ACID, 3133

ActiveMQ, 183

adjusting architecture

causes of bad architecture, 110111

challenges with, 117118

changes in microservices, 111

changes to overall architecture, 111112

code reuse versus redundancy, 114115

code transfer, 113114

overview, 110

rewriting, 117

shared libraries, 112113

shared services, 115116

spawning new services, 116117

Advanced Message Queuing Protocol (AMQP), 182

advantages of microservices. See microservice advantages

aggregates, 4142

agile architecture, 7576

AJAX (Asynchronous JavaScript and XML), 170

Amazon

AWS (Amazon Web Services), 338

Cloud

CloudWatch, 340, 349

JVM-based microservices in, 338340

DynamoDB, 338

Elastic Beanstalk, 349

ElastiCache, 338

Kinesis, 338

Lambda, 347349

modernization scenario example, 1819

AMQP (Advanced Message Queuing Protocol), 182

AngularJS, 165

annotations (Hystrix), 330

@Autowired, 334

@EnableCircuitBreaker, 330

@EnableDiscoveryClient, 324325

@EnableEurekaClient, 324325, 332

@EnableEurekaServer, 326

@EnableHystrix, 330

@EnableHystrixDashboard, 331, 332

@EnableTurbine, 332

@EnableZuulProxy, 328

@HystrixCommand, 330

@RequestMapping, 307308

@RestController, 307308

@RibbonClient, 334

@SpringBootApplication, 307308

Ansible, 255

anticorruption layer, 44, 109

Apache

Kafka, 183, 338

Mesos, 265

Qpid, 182

Thrift, 180

Zookeeper, 139, 310

API keys, 157

application.properties file, 313

applications

e-commerce legacy application

migration status, 1516

team creation, 16

e-commerce legacy application scenario

Amazon example, 1819

approach, 14

challenges, 1415

feature development, 1718

general description, 1112

influence on organization, 18

microservice advantages, 1213, 17

microservices-based application example

build, 311313

communication, 327329

deployment with Docker, 313314

Docker Compose, 321324

Docker Machine, 320321

domain architecture, 304306

integration of other technologies, 335336

JVM-based microservices in Amazon Cloud, 338340

load balancing, 333334

overview, 303304

resilience with Hystrix, 329333

service discovery, 324326

Spring Framework, 306311

summary, 341342

testing, 336337

Vagrant, 314320

application-test.properties file, 229, 233

arbitrary test frameworks, 232

architecture

agile architecture, 7576

architecture management

Context Maps, 108109

cycle-free software, 104105

importance of, 107108

tools for, 104107

effect on departments, 291292

of individual microservices

CQRS (Command Query Responsibility Segregation), 195197

domain architecture, 193194

event sourcing, 197199

hexagonal architecture, 199202

microservice implementation and, 296297

resilience, 203208

stability, 203208

summary, 211212

technical architecture, 208211

macro/micro architecture

creating, 278279

definition of, 277

domain architecture, 282

extent of, 279

operations and, 281

operations challenges, 239240

responsibility for, 277278

technologies, 280281

testing, 282284

of microservice-based systems

architecture management, 104110

configuration, 139141

documentation, 159161

domain architecture, 100104

EDA (event-driven architecture), 134135

legacy application integration, 126134

load balancing, 144148

overview, 99

planning for growth, 118125

scalability, 148151

security, 151159

service discovery, 141143

summary, 161162

technical architecture, 136138

techniques to adjust architecture, 110118

refactoring, 75

requirements and, 7475

sample microservices-based application

build, 311313

communication, 327329

deployment with Docker, 313314

Docker Compose, 321324

Docker Machine, 320321

domain architecture, 304306

integration of other technologies, 335336

JVM-based microservices in Amazon Cloud, 338340

load balancing, 333334

overview, 303304

resilience with Hystrix, 329333

service discovery, 324326

Spring Framework, 306311

summary, 341342

testing, 336337

Vagrant, 314320

SOA (service-oriented architecture)

characteristics of, 8182

communication, 8384

compared to microservices, 8792

coordination, 86

interfaces, 8586

introducing, 84

landscape, 8283

orchestration, 86

services in, 8485

technologies, 8687

versioning, 85

sustainable architecture, 29

three-tier architecture, 71

artifacts, 238239

asset servers, 166167

Asynchronous JavaScript and XML (AJAX), 170

ATDD (acceptance test-driven design), 216

ATOM Feeds, 183

atomicity, 31

authentication, 329

authorization

OAuth2, 152156

Spring Cloud Security, 329

automation (deployment), 254255

AutoScaling, 339

@Autowired, 334

availability, 159

avoiding

CDMs (canonical data models), 4750

erosion of microservices, 122123

AWS (Amazon Web Services), 338

Azure Service Bus, 183

B

back-end interfaces, 174175

bad architecture, causes of, 110111

balancing load. See load balancing

batch data replication, 186

BDD (behavior-driven design), 216

BEAM (Bogdan/ Björn’s Erlang Abstract Machine), 360

behavior specification, 239

behavior-driven design (BDD), 216

benefits of microservices. See microservice advantages

Berkeley Internet Name Domain Server (BIND), 142143

big systems, starting with, 119120

BigPipe, 170171

BIND (Berkeley Internet Name Domain Server), 142143

blue/green deployment, 220, 257

blueprints (OSGi), 352

BMC Remedy, 251

Bogdan/ Björn’s Erlang Abstract Machine (BEAM), 360

bottlenecks during testing, 13

Bounded Contexts

CDMs (canonical data models), 4750

collaboration between, 4445

Context Maps, 108109

example, 4244

large-scale structure, 4647

microservices and, 4546

nanoservices and, 347

overview, 52

sample microservices-based application, 305306

breaking up code, 126127

building sample microservices-based application, 311313

bulkhead, 204205

bundles, 350353

business advantages of microservices, 6567

C

CA Opscenter, 251

cache (REST), 176

calling

Lambda functions, 348

Seneca functions, 363365

callMicroservice() function, 334

canary releasing, 220, 257

canonical data models (CDMs), avoiding, 4750

capacity tests, 59

CatalogConsumerDrivenContractTest class, 337

CDCs (consumer-driven contracts), 231

CDMs (canonical data models), avoiding, 4750

central load balancers, 145

certificates, 157

challenges of microservices

architecture, 7476

Conway’s Law, 273274

infrastructure, 7677

operations

artifacts, 238239

micro and macro architecture, 239240

templates, 240

overview, 8

summary, 78

technical challenges

code dependencies, 7172

overview, 6971

technology pluralism, 7374

unreliable communication, 73

changes of perspective, DevOps and, 288289

changing architecture. See adjusting architecture

Chef, 255

circuit breaker design

Hystrix, 329

resilience and stability, 203204

classes

CatalogConsumerDrivenContractTest, 337

CustomerConsumerDrivenContractTest, 337

OrderTestApp, 336

SpringRestDataConfig, 304305

clients

client libraries, 292293

client-based load balancing, 147148

client-level integration, 190191

Eureka, 324325

mobile clients, 172173

rich clients, 172173

cloud

Amazon Cloud

CloudWatch, 340, 349

JVM-based microservices in, 338340

Spring Cloud, 308310

Spring Cloud Netflix, 310311

Cloud Foundry, Spring Cloud for, 310

CloudWatch, 340, 349

cluster environments, 324

CMS (content management systems), 130

Coda Hale Metrics, 340

code dependencies, 7172

code ownership, collective, 273276

code reuse, 114115, 292295

code transfer, 113114

cohesion, 194

collaboration between Bounded Contexts, 4445

collectd, 252253

collective code ownership, 273276

combined deployment, 258259

Command Query Responsibility Segregation. See CQRS (Command Query Responsibility Segregation)

commands. See also functions

docker kill, 319

docker log, 318

docker ps, 319

docker rm, 319

docker run, 334

docker-compose, 323, 334

docker-machine, 320321

mvn package, 311

vagrant destroy, 319

vagrant halt, 319

vagrant provision, 319

vagrant ssh, 318

vagrant up, 319

commit phase, 59

Common Object Request Broker Architecture (CORBA), 70

communication

data replication

batch, 186

consistency, 185186

event, 186187

implementation, 186

overview, 184185

redundancy, 185186

distributed communication, 2829

between Docker containers, 263

between Erlang processes, 360361

external interfaces, 187190

internal interfaces, 187190

levels of, 163

messaging

advantages of, 180181

technologies, 182184

transactions and, 181182

REST (representational state transfer)

definition of, 175179

load balancing, 144145

RESTful-HTTP interfaces, 50

Spring Data REST, 307

sample microservices-based application, 305, 327329

in SOA (service-oriented architecture), 8384, 87

SOAP (Simple Object Access Protocol), 179180

UIs (user interfaces)

HTML-based user interfaces, 168175

SPAs (single-page apps), 164168

unreliable communication, 73

compromises, nanoservices and, 345

confidentiality, 158

configuration

Eureka, 325

Hystrix, 333

microservice-based systems, 139141

operations, 256

Spring Cloud Config, 139, 309310

Vagrant, 315317

conformist collaboration, 44

consistency

data replication, 185186

definition of, 31

problems with, 139140

size of microservices and, 3132

Consul, 143

consumer contracts, 231

consumer-driven contract tests

contract types, 230231

implementation, 231232

overview, 230

sample microservices-based application, 337

tools, 232233

containers (Docker), 262263, 318319

content enricher, 128129

content filters, 128

content management systems (CMS), 130

content-based routers, 127

Context Maps, 108109

contexts, bounded. See Bounded Contexts

continuous delivery

advantages of, 78

challenges, 7677

legacy application modernization, 12

operations

challenges of, 238240

control, 259260

deployment, 254259

infrastructure, 260266

logging, 241246

monitoring, 246253

summary, 266267

pipeline, 5960, 67

testing, 220

continuous deployment, 257

contract tests

contract types, 230231

implementation, 231232

overview, 230

control of operations, 259260

Conway, Melvin Edward, 35

Conway’s Law

challenges associated with, 273274

definition of, 35, 52, 273

as enabler, 3839

as limitation, 3638

microservices and, 3940

reasons for, 36

coordination

of deployments, 8586

microservice-based systems, 139141

pull requests for, 276

SOA (service-oriented architecture), 86

CORBA (Common Object Request Broker Architecture), 70

CoreOS, 265, 324

correlating data with events, 249

correlation IDs, 245

CORS (cross-origin resource sharing), 166167

CQRS (Command Query Responsibility Segregation)

advantages of, 196197

challenges, 197

microservices and, 196

overview, 195196

CRM (customer relationship management), 8283, 8890

cross-functional teams, 285290

cross-origin resource sharing (CORS), 166167

customer interface, 290292

customer relationship management (CRM), 8283, 8890

CustomerConsumerDrivenContractTest class, 337

customer/supplier collaboration, 44

cycle-free software, 104105

cyclic dependencies, 103104

D

dashboard (Hystrix), 331

data replication

batch, 186

consistency, 185186

event, 186187

implementation, 186

overview, 129130, 184185, 191192

redundancy, 185186

data security, 158159

data storage for sample microservices-based application, 304305

databases

Amazon DynamoDB, 338

HSQL database, 307, 319320

legacy application integration, 133134

Datensparsamkeit, 157

DDD (domain-driven design)

Bounded Contexts

CDMs (canonical data models), 4750

collaboration between, 4445

Context Maps, 108109

example, 4244

large-scale structure, 4647

microservices and, 4546

nanoservices and, 347

overview, 52

sample microservices-based application, 305306

building blocks, 4142

CDMs (canonical data models), avoiding, 4750

large-scale structure, 4647

overview, 4041, 194

strategic design, 100101

summary, 52

ubiquitous language, 41

declarative services (OSGi), 352

delegation to teams, 238239

delivery. See continuous delivery

departments

architecture leading to, 291292

microservice implementation and, 296

dependencies

code dependencies, 7172

dependency management

cyclic dependencies, 103104

overview, 101102

unintended domain-based dependencies, 102103

hidden dependencies, 133134

deployment

automation, 254255

combined versus separate, 258259

coordination of, 8586

deployment monoliths

migrating to microservices, 370371

overview, 4

problems with, 121

technical coordination, 271

deployment strategies, 256258

installation and configuration, 256

risk mitigation, 220222, 256

sample microservices-based application, 313314

separate deployment, 270271

deployment monoliths

migrating to microservices, 370371

overview, 4

problems with, 121

technical coordination, 271

desktop applications, nanoservices and, 346

Developer Anarchy, 284

development

signaling systems

challenges, 2122

general description, 1920

microservice advantages, 2021, 22

suitability of microservices for, 2223

sustainable development, 6, 57

test-driven development, 214215

DevOps, 285290

directories

docker-vagrant, 318

log-analysis, 341

distributed communication, 2829

distributed systems

distributed communication, 2829

distributed tracing, 245246

distribution by domain. See DDD (domain-driven design)

overview, 8, 20

DNS (Domain Name System), 142

Docker

cluster environments, 324

commands

docker kill, 319

docker log, 318

docker ps, 319

docker rm, 319

docker run, 334

containers, 262263, 318319

Docker Compose, 321324

Docker Machine, 320321

file system, 261263

overview, 255

registry, 264

sample microservices-based application deployment, 313314

servers, 264265

Docker Compose, 265, 321324

docker kill command, 319

docker log command, 318

Docker Machine, 265, 320321

docker ps command, 319

docker rm command, 319

docker run command, 334

Docker Swarm, 265

docker-compose command, 323, 334

Dockerfile, 313314

docker-machine command, 320321

docker-vagrant directory, 318

documentation

microservice-based system architecture, 159161

Spring Guides, 311

testing as, 214215

domain architecture

importance of, 8

of individual microservices, 193194

macro/micro architecture, 282

of microservice-based systems

dependency management, 101104

Otto GmbH example, 101

overview, 100

strategic design, 100101

sample microservices-based application, 304306

Domain Name System (DNS), 142

domain-driven design. See DDD (domain-driven design)

dpkg, 255

durability, 32

dynamic environments, monitoring in, 250

dynamic scaling, 148150

DynamoDB, 338

E

EC2 (Elastic Computing Cloud), 349

Echo Verticles (Vert.x), 358359

e-commerce legacy application scenario

Amazon example, 1819

approach, 14

challenges, 1415

feature development, 1718

general description, 1112

influence on organization, 18

microservice advantages, 1213, 17

migration status, 1516

team creation, 16

EDA (event-driven architecture), 134135

Edge Side Includes (ESI), 171172

EJB (Enterprise JavaBeans), 70

Elastic Beanstalk, 349

Elastic Computing Cloud (EC2), 349

Elastic Load Balancing (ELB), 146, 339

ElastiCache, 338

elasticity, 210

Elasticsearch, 242244

ELB (Elastic Load Balancing), 146, 339

Elixir, 363

ELK (Elasticsearch, Logstash, Kibana) stack, 242244

Ember.js, 165

@EnableCircuitBreaker, 330

@EnableDiscoveryClient, 324325

@EnableEurekaClient, 324325, 332

@EnableEurekaServer, 326

@EnableHystrix, 330

@EnableHystrixDashboard, 331, 332

enabler, Conway’s Law as, 3839

@EnableTurbine, 332

@EnableZuulProxy, 328

enabling monitoring, 252

encapsulation, 194

engines, process, 208209

Enterprise Integration Patterns, 127129

Enterprise JavaBeans (EJB), 70

entities, 41

E-Post Development GmbH, 122

Erlang, 360363

erosion of microservices, avoiding, 122123

ESI (Edge Side Includes), 171172

etcd, 139

Eureka

client, 324325

configuration, 325

overview, 143, 311, 324

server, 326

evaluation of nanoservices, 366367

Evans, Eric, 40

event-driven architecture (EDA), 134135

events

correlating data with, 249

data replication, 186187

EDA (event-driven architecture), 134135

event sourcing, 197199

evolving order, 47

example application. See sample microservices-based application

expenditures, minimizing with testing, 214

exploratorive tests, 59

Ext JS, 165

Extensible Markup Language (XML), 177178

external interfaces, 85, 187190

F

Facebook BigPipe, 170171

factories, 42

fail fast, 205

Fat JARs, 359

Feign, 311

file system (Docker), 261263

files

application.properties, 313

application-test.properties, 229, 233

Dockerfile, 313314

JAR (Java archive) files, 307, 354

log analysis, 341

MANIFEST.MF, 350351

pom.xml, 311312

Vagrantfile, 315317

WAR (web application archive), 307, 354

filters

content filters, 128

message filters, 127

Zuul filters, 329

findAll() function, 330

firewalls, 157

First Rule of Distributed Object Design, 29

flexibility (SOA), 8788

flexible transport (SOAP), 179180

front-end servers, 171172

functions. See also commands

callMicroservice(), 334

findAll(), 330

Lambda functions, 348

Seneca, 363365

G

Gentsch, Lars, 122123

George, Fred, 284

Gephi, 107

global architecture, 122

Grafana, 250

grants, authorization, 153154

Graphite, 250

Graylog, 244

growth, planning for

big systems, 119120

deployment monoliths, 121

erosion of microservices, avoiding, 122123

global architecture, 122

new functionality, incorporating, 123125

overview, 118122

replaceability, 121

small systems, 120121

H

HAL (Hypertext Application Language), 177

handshaking, 205

HAProxy, 146

Hashicorp Vault, 157158

HATEOAS (Hypermedia as the Engine of Application State), 177

Heusingfeld, Alexander, 287

hexagonal architecture

example, 201202

versus layered architecture, 200

microservices and, 201

overview, 199200

hidden dependencies, 132133

high cohesion, 102

high technological complexity, 2122

HornetQ, 183

hosts, open, 45

HP Operations Manager, 251

HSQL database, 307, 319320

HTML (Hypertext Markup Language)

HTML-based user interfaces

back end, 174175

front-end servers, 171172

JavaScript, 170171

mobile clients, 172173

organizational levels, 173

ROCA (resource-oriented client architecture), 168169

routing, 169170

overview, 178

HTTP (Hypertext Transfer Protocol)

httpd, 145

load balancing, 144145

RESTful-HTTP interfaces, 50, 175179

httpd, 145

hype versus reality, 371372

Hypermedia as the Engine of Application State (HATEOAS), 177

Hypertext Application Language (HAL), 177

Hypertext Markup Language. See HTML (Hypertext Markup Language)

Hypertext Transfer Protocol. See HTTP (Hypertext Transfer Protocol)

Hypoport AG, 258

Hystrix

annotations, 330

@Autowired, 334

@EnableCircuitBreaker, 330

@EnableDiscoveryClient, 324325

@EnableEurekaClient, 324325, 332

@EnableEurekaServer, 326

@EnableHystrix, 330

@EnableHystrixDashboard, 331, 332

@EnableTurbine, 332

@EnableZuulProxy, 328

@HystrixCommand, 330

@RequestMapping, 307308

@RestController, 307308

@RibbonClient, 334

@SpringBootApplication, 307308

circuit breaker, 329

configuration, 333

dashboard, 331

overview, 311, 329

resilience and stability, 207208

Turbine, 331332

@HystrixCommand, 330

I

IBM Tivoli, 251

Icinga, 250

IDs, correlation IDs, 245

immutable servers, 140, 255

implementation of microservices. See also benefits of microservices; organizational effects of microservices

approaches, 370371

consumer-driven contract tests, 231232

data replication, 186

external interfaces, 188189

hype versus reality, 371372

microservice implementation without organizational changes, 295297

sample microservices-based application

build, 311313

communication, 327329

deployment with Docker, 313314

Docker Compose, 321324

Docker Machine, 320321

domain architecture, 304306

integration of other technologies, 335336

JVM-based microservices in Amazon Cloud, 338340

load balancing, 333334

overview, 303304

resilience with Hystrix, 329333

service discovery, 324326

Spring Framework, 306311

summary, 341342

testing, 336337

Vagrant, 314320

summary, 372

without organizational changes, 295297

independence

independent scaling, 7, 61

technical independence, 63, 270273

infrastructure

challenges, 7677

influence on microservice size, 3031

legacy applications and, 131

overview, 260261

PaaS (platform as a service), 266

virtualization with Docker, 261265

innoQ, 47, 287

installation

deployments, 256

Docker Machine, 321

scripts, 254

tools, 140141

Vagrant, 318

installation scripts, 254

installation tools, 140141

integration

data replication

batch, 186

consistency, 185186

event, 186187

implementation, 186

overview, 184185

redundancy, 185186

external interfaces, 187190

integration platforms, 83

integration tests, 216, 226227

internal interfaces, 187190

legacy applications

breaking up code, 126127

CMS (content management systems), 130

databases, 133134

Enterprise Integration Patterns, 127129

hidden dependencies, 132133

infrastructure and, 131

limited integration, 129

overview, 5758, 67, 126127

UIs (user interfaces), 129130

levels of, 163, 190192

messaging

advantages of, 180181

technologies, 182184

transactions and, 181182

of other systems, 21

REST (representational state transfer), 175179

shared integration tests, 223224

SOAP (Simple Object Access Protocol), 179180

UIs (user interfaces)

HTML-based user interfaces, 168175

SPAs (single-page apps), 164168

integration tests, 216, 226227

integrity, 158

interfaces

control via, 260

customer interface, 290292

external interfaces, 187190

internal interfaces, 187190

Postel’s Law, 189190

separating, 188

SOA (service-oriented architecture), 8586

versioning, 192

internal interfaces, 187190

introducing

microservices

approaches, 370371

hype versus reality, 371372

summary, 372

SOA (service-oriented architecture), 84

intrusion detection, 157

isolation, 32

J

JAR (Java archive) files, 307, 354

Java

bundles, 350353

JAR (Java archive) files, 307, 354

Java EE

example, 356357

microservices with, 355356

nanoservices with, 355

overview, 354

JMS (Java Messaging Service), 183

JPA (Java Persistence API), 354

JRE (Java Runtime Environment), 307

JSF (Java ServerFaces), 354

JTA (Java Transaction API), 354

JVM-based microservices in Amazon Cloud, 7374

OSGi, 350353

Spring Framework

HSQL database, 307, 319320

Spring Boot, 307308

Spring Cloud, 308310

Spring Cloud Netflix, 310311

Spring Data REST, 307

Java EE

example, 356357

microservices with, 355356

nanoservices with, 355

overview, 354

Java Messaging Service (JMS), 183

Java Persistence API (JPA), 354

Java Runtime Environment (JRE), 307

Java ServerFaces (JSF), 354

Java Transaction API (JTA), 354

Java Virtual Machine (JVM), 7374

JavaScript

HTML-based user interfaces, 170171

JSON (JavaScript Object Notation)

JWE (JSON Web Encryption), 154155

JWT (JSON Web Token), 154155

overview, 178

Seneca, 363365

JavaScript Object Notation. See JSON (JavaScript Object Notation)

JavaScript Object Notation (JSON), 178

Jetty, 338339

JMS (Java Messaging Service), 183

JPA (Java Persistence API), 354

jQAssistant, 107

JRE (Java Runtime Environment), 307

JSF (Java ServerFaces), 354

JSON (JavaScript Object Notation)

JWE (JSON Web Encryption), 154155

JWT (JSON Web Token), 154155

overview, 178

JTA (Java Transaction API), 354

JUnit tests, 232

JVM (Java Virtual Machine), 7374

JVM-based microservices in Amazon Cloud, 338340

JWE (JSON Web Encryption), 154155

JWT (JSON Web Token), 154155

K

Kafka (Apache), 183, 338

Kerberos, 155

kernels, shared, 108

Kibana, 242244

Kinesis, 338

Kubernetes, 265, 324

L

Lambda (Amazon), 347349

landscape (SOA), 8283

languages

Elixir, 363

Erlang, 360363

HAL (Hypertext Application Language), 177

HTML (Hypertext Markup Language), 178

Java

bundles, 350353

Java EE, 354357

OSGi, 350353

published language, 45

ubiquitious language, 41

XML (Extensible Markup Language), 177178

large-scale structure, DDD (domain-driven design) and, 4647

latency, 6970

layered architecture, 200

leadership, technical, 284

leaseRenewalIntervalInSeconds property (Eureka), 325

legacy applications

development, 6

integration

breaking up code, 126127

CMS (content management systems), 130

databases, 133134

Enterprise Integration Patterns, 127129

hidden dependencies, 132133

infrastructure and, 131

limited integration, 129

overview, 5758, 67, 126127

UIs (user interfaces), 129130

modernization scenario

Amazon example, 1819

approach, 14

challenges, 1415

feature development, 1718

general description, 1112

influence on organization, 18

microservice advantages, 1213, 17

migration status, 1516

team creation, 16

levelized structure maps (LSMs), 104

levels

of independence, 271273

of integration, 163, 190192

libraries

client libraries, 292293

Coda Hale Metrics, 340

shared libraries, 112113

limitations, Conway’s Law as, 3638

limited integration, 129

lines of code (LOC), 28, 343

Linux containers, 262263

Linux servers, 264

load balancing

architecture and, 148

central load balancers, 145

client-based load balancing, 147148

ELB (Elastic Load Balancing), 146, 339

load balancers (HTTP), 176

number of load balancers, 145

REST/HTTP, 144145

sample microservices-based application, 333334

service discovery, 146147

technologies, 145146

load tests, 217

LOC (lines of code), 28, 343

log analysis, 341

logging

correlation IDs, 245

ELK (Elasticsearch, Logstash, Kibana) stack, 242244

Graylog, 244

log analysis, 341

for microservices, 241242

Splunk, 244

stakeholders, 245

Zipkin, 245246

logic layer integration, 191

Logstash, 242244

loose coupling, 102

LSMs (levelized structure maps), 104

M

macro architecture

creating, 278279

definition of, 277

domain architecture, 282

extent of, 279

operations and, 281

operations challenges, 239240

responsibility for, 277278

technologies, 280281

testing, 282284

MANIFEST.MF file, 350351

manual tests, 217

maps

Context Maps, 108109

LSMs (levelized structure maps), 104

Maven, 311313

Mesos, 265, 324

Mesosphere, 324

message filters, 127

message routers, 127

message translators, 127

message-driven components, 210

messaging

advantages of, 180181

message filters, 127

message routers, 127

message translators, 127

technologies, 182184

transactions and, 181182

metadata, 159160

metrics, monitoring. See monitoring

Metrics framework, 252

micro architecture

creating, 278279

definition of, 277

domain architecture, 282

operations challenges, 239240, 281

responsibility for, 277278

technologies, 280281

testing, 282284

microservice advantages

business advantages, 6567

choice of technologies, 7

continuous delivery, 78

independent scaling, 7

legacy application development, 6

modularization, 5

organizational benefits, 6365

overview, 45, 270

replaceability, 56

sustainable development, 6

technical benefits

choice of technologies, 7, 6263

continuous delivery, 78, 5960

independence, 63, 270273

independent scaling, 7

legacy integration, 6, 5758

microservice replacement, 5657

modularization, 5

overview, 5556

replaceability, 56

robustness, 6162

scaling, 7, 61

sustainable development, 6, 57

time to market, 67

time to market, 67

microservice challenges

architecture, 7476

of Conway’s Law, 273274

infrastructure, 7677

operations

artifacts, 238239

micro and macro architecture, 239240

templates, 240

overview, 8

summary, 78

technical challenges

code dependencies, 7172

overview, 6971

technology pluralism, 7374

unreliable communication, 73

microservice definition, 34

microservice-based systems

architecture management

Context Maps, 108109

cycle-free software, 104105

importance of, 107108

tools for, 104107

configuration, 139141

documentation, 159161

domain architecture

dependency management, 101104

Otto GmbH example, 101

overview, 100

strategic design, 100101

EDA (event-driven architecture), 134135

legacy application integration

breaking up code, 126127

CMS (content management systems), 130

databases, 133134

Enterprise Integration Patterns, 127129

hidden dependencies, 132133

infrastructure and, 131

limited integration, 129

overview, 126127

UIs (user interfaces), 129130

load balancing

architecture and, 148

central load balancers, 145

client-based load balancing, 147148

number of load balancers, 145

REST/HTTP, 144145

service discovery, 146147

technologies, 145146

overview, 99

planning for growth

big systems, 119120

deployment monoliths, 121

erosion of microservices, avoiding, 122123

global architecture, 122

new functionality, incorporating, 123125

overview, 118119

replaceability, 121

small systems, 120121

scalability

advantages of microservices, 150

dynamic scaling, 148150

sharding, 150151

throughput and response times, 151

security

availability, 159

confidentiality, 158

data security, 158159

Datensparsamkeit, 157

firewalls, 157

Hashicorp Vault, 157158

integrity, 158

intrusion detection, 157

JWT (JSON Web Token), 154155

Kerberos, 155

OAuth2, 152156

overview, 151152

service discovery, 141143

summary, 161162

technical architecture, 136138

techniques to adjust architecture

causes of bad architecture, 110111

challenges with, 117118

changes in microservices, 111

changes to overall architecture, 111112

code reuse versus redundancy, 114115

code transfer, 113114

overview, 110

rewriting, 117

shared libraries, 112113

shared services, 115116

spawning new services, 116117

middleware, uncoupling via, 206

migration status, 1516

minimizing expenditures with testing, 214

minimum size of microservices, 344345

mitigating risk, 220222, 256

mobile clients, 172173

mocks, 215216

Moco, 229

mod_include, 171

mod_proxy_balancer, 145

modernizing legacy applications

approach, 14

overview, 5758

sample scenarios

challenges, 1415

feature development, 1718

general description, 1112

influence on organization, 18

microservice advantages, 1213, 17

migration status, 1516

team creation, 16

modularization

influence on microservice size, 28

overview, 5

sample microservices-based application, 306

SPAs (single-page apps), 167168

strong modularization, 67

Möllering, Sascha, 338340

monitoring

additional metrics, 248

with Amazon CloudWatch, 340

basic information, 247

correlation with events, 249

dynamic environments, 250

enabling, 252

Erlang, 361

with Hystrix dashboard, 331

overview, 77, 246247

stakeholders, 248249

technologies for, 250253

versus testing, 249

monoliths. See deployment monoliths

mountebank, 229

Müller, Jörg, 258259

multiple services, splitting into, 116117

multiple single-page apps. See SPAs (single-page apps)

mvn package command, 311

N

Nagios, 250

nanoservices

advantages of, 344346

Amazon Lambda, 347349

definition of, 346347

Erlang, 360363

Java EE

microservices with, 355356

nanoservices with, 355

overview, 354, 355

OSGi, 350353

overview, 343

Seneca, 363365

technical evaluation, 366367

Vert.x, 357359

Netflix, 310311, 371

networking, Vagrant, 317

NewRelic, 251

nginx, 145, 171

ngx_http_ssi_module, 171

Node.js, 363364

NUMMI car factory, 279

O

OAM (operations and maintenance support), 362

OAuth2, 152156

open host services, 45

open source projects, 293295

Open Telecom Platform (OTP) framework, 360

operations

challenges

artifacts, 238239

micro and macro architecture, 239240

overview, 7677

templates, 240

control, 259260

deployment

automation, 254255

combined versus separate, 258259

deployment strategies, 256258

installation and configuration, 256

risks associated with, 256

DevOps, 285290

infrastructure

overview, 260261

PaaS (platform as a service), 266

virtualization with Docker, 261265

logging

correlation IDs, 245

ELK (Elasticsearch, Logstash, Kibana) stack, 242244

Graylog, 244

for microservices, 241242

Splunk, 244

stakeholders, 245

Zipkin, 245246

macro/micro architecture, 281

microservice implementation and, 296297

monitoring

additional metrics, 248

basic information, 247

correlation with events, 249

dynamic environments, 250

enabling, 252

overview, 246247

stakeholders, 248249

technologies for, 250253

versus testing, 249

summary, 266267

operations and maintenance support (OAM), 362

Operations Manager, 251

Opscenter, 251

orchestration (SOA), 83, 8687

order systems, 83

OrderTestApp class, 336

organizational effects of microservices

benefits of microservices, 6365, 270273

collective code ownership, 273276

customer interface, 290292

DevOps, 285290

implementation without organizational changes, 295297

macro/micro architecture

creating, 278279

definition of, 277

domain architecture, 282

extent of, 279

operations and, 281

responsibility for, 277278

technologies, 280281

testing, 282284

overview, 18, 269

reusable code, 292295

summary, 297299

technical leadership, 284

organizational-level interfaces, 173

OSGi, 350353

OTP (Open Telecom Platform) framework, 360

Otto GmbH, 101

outdated documentation, 160

ownership, collective code ownership, 273276

P

PaaS (platform as a service), 266

package managers, 255

Packetbeat, 251

Pact, 233

pact-jvm, 233

Pacto, 233

parallel work, 12, 6567

personification of servers, avoiding, 287288

perspectives, DevOps and, 288289

“pets vs. cattle” slogan (DevOps), 287288

pipeline, continuous delivery, 5960, 67

planning for growth

big systems, 119120

deployment monoliths, 121

erosion of microservices, avoiding, 122123

global architecture, 122

new functionality, incorporating, 123125

overview, 118119

replaceability, 121

small systems, 120121

platform as a service (PaaS), 266

Play, 210

pluralism, 7374

pom.xml files, 311312

portals (SOA), 83

Postel’s Law, 189190

Prana, 336

preferIpAddress property (Eureka), 325

process engines, 208209

programs. See tools

projects

open source projects, 293295

project size, 65

Protocol Buffer, 178

provider contracts, 230

proxy-based load balancing, 144145

published language, 45

pull requests for coordination, 276

Puppet, 255

Q-R

Qpid (Apache), 182

RabbitMQ, 182

Reactive Manifesto, 207, 209210

reactive systems, 209210

reasons for microservices. See benefits of microservices

redundancy, 114115, 185186

refactoring, 8, 2930, 75

reference environments, 228

registry (Docker), 264

Release It!, 62, 203

Remedy, 251

remote procedure call (RPC), 179

replaceability

advantages of, 5657

influence on microservice size, 31

overview, 56, 67

system planning, 121

replicating data

batch, 186

consistency, 185186

event, 186187

implementation, 186

overview, 129130, 184185, 191192

redundancy, 185186

repositories, 42

representational state transfer. See REST (representational state transfer)

@RequestMapping, 307308

requests, pull, 276

resilience

bulkhead, 204205

circuit breaker design, 203204

fail fast, 205

handshaking, 205

Hystrix, 207208

overview, 203, 209

Reactive Manifesto, 207

sample microservices-based application

annotations, 330

circuit breaker, 329

configuration, 333

dashboard, 331

overview, 329

Turbine, 331332

steady state, 205

test harnesses, 206

timeouts, 203

uncoupling via middleware, 206

resource-oriented client architecture (ROCA), 168169

response times, 151

responsibility layers, 4647

responsiveness, 209

REST (representational state transfer)

definition of, 175179

load balancing, 144145

RESTful-HTTP interfaces, 50

Spring Data REST, 307

@RestController, 307308

reuse of code, 114115, 292295

rewriting services, 117

Ribbon, 310, 333334

@RibbonClient, 334

rich clients, 172173

Riemann, 250

risk mitigation, 220222, 256

robustness, 6162

Robustness Principle, 189190

ROCA (resource-oriented client architecture), 168169

roll forward, 257

rollbacks, 256

routers, 127129

routing

Enterprise Integration Patterns, 127129

HTML-based user interfaces, 169170

Zuul, 327328

RPC (remote procedure call), 179

rpm, 255

RSpec, 232233

RxJava, 210

RxJS, 210

S

Salt, 255

SAML, 155

sample microservices-based application

build, 311313

communication, 327329

deployment with Docker, 313314

Docker Compose, 321324

Docker Machine, 320321

domain architecture, 304306

integration of other technologies, 335336

JVM-based microservices in Amazon Cloud, 338340

load balancing, 333334

overview, 303304

resilience with Hystrix

annotations, 330

circuit breaker, 329

configuration, 333

dashboard, 331

overview, 329

Turbine, 331332

service discovery, 324326

Spring Framework

HSQL database, 307

Spring Boot, 307308

Spring Cloud, 308310

Spring Cloud Netflix, 310311

Spring Data REST, 307, 319320

summary, 341342

testing

consumer-driven contract tests, 337

overview, 336

stubs, 336337

Vagrant

configuration, 315317

how it works, 314

installation, 318

networking, 317

Scala, 64, 210

scalability

advantages of microservices, 150

AutoScaling, 339

dynamic scaling, 148150

ELK (Elasticsearch, Logstash, Kibana) stack, 243244

independent scaling, 7, 61, 67

sharding, 150151

throughput and response times, 151

scenarios

legacy application modernization

approach, 14

challenges, 1415

feature development, 1718

general description, 1112

influence on organization, 18

microservice advantages, 1213, 17

migration status, 1516

team creation, 16, 1819

signaling systems

challenges, 2122

general description, 1920

microservice advantages, 2021, 22

suitability of microservices for, 2223

scripts, installation, 254

SCS (self-contained system), 51

security

API keys, 157

availability, 159

certificates, 157

confidentiality, 158

data security, 158159

Datensparsamkeit, 157

firewalls, 155

Hashicorp Vault, 157158

integrity, 158

intrusion detection, 157

JWT (JSON Web Token), 154155

Kerberos, 155

OAuth2, 152156

overview, 151152

SAML, 155

Spring Cloud Security, 309

SSL/TLS, 155

self-contained system (SCS), 51

Semantic Versioning, 189

Seneca, 363365

seneca.act() function, 364

seneca.add() function, 364

seneca.listen() function, 364

separate deployment, 258259

separate ways, 45

separating interfaces, 188

Server Side Includes (SSI), 171172

servers

asset servers, 166167

Docker and, 264265

Eureka, 326

front-end servers, 171172

immutable servers, 140, 255

“pets vs. cattle” slogan (DevOps), 287288

Zuul, 327329

Serverspec, 235

service discovery

BIND (Berkeley Internet Name Domain Server), 142143

Consul, 143

DNS (Domain Name System), 142

Eureka

client, 324325

configuration, 325

overview, 143, 324

server, 326

load balancing, 146147

overview, 141142

service-oriented architecture. See SOA (service-oriented architecture)

Seyren, 250

sharding, 150151

shared integration tests, 223224

shared kernels, 44, 108

shared libraries, 112113, 292293

shared services, 115116

signaling system development

challenges, 2122

general description, 1920

microservice advantages, 2021, 22

suitability of microservices for, 2223

Simple Notification Service (SNS), 348

Simple Object Access Protocol (SOAP), 179180

Simple Queue Service (SQS), 348

single-page apps. See SPAs (single-page apps)

size of microservices

factors influencing

consistency, 3132

distributed communication, 2829

infrastructure, 3031

LOC (lines of code), 28

modularization, 28

overview, 2728, 3335

refactoring, 2930

replaceability, 31

sustainable architecture, 29

team size, 30

transactions, 3133

overview, 344345

project size, 65

summary, 52

small systems, starting with, 120121

SNS (Simple Notification Service), 348

SOA (service-oriented architecture)

characteristics of, 8182

communication, 8384

compared to microservices

architecture, 8890

communication, 87

flexibility, 8788

orchestration, 87

synergies, 91

table of differences, 91

coordination, 86

interfaces, 8586

introducing, 84

landscape, 8283

orchestration, 86

services in, 8485

technologies, 8687

versioning, 85

SOAP (Simple Object Access Protocol), 179180

software development

sustainable software development, 57, 67

test-driven development, 214215

SPAs (single-page apps)

asset servers, 166167

SPA modules, 167168

SPA per microservice, 165166

technologies, 164165

spigo, 110

Splunk, 244

Spring Boot, 307308

Spring Cloud, 308310

Spring Cloud Bus, 310

Spring Cloud Cluster, 310

Spring Cloud Config, 139, 309310

Spring Cloud Connectors, 310

Spring Cloud Consul, 310

Spring Cloud Data Flow, 310

Spring Cloud Data Tasks, 310

Spring Cloud for Cloud Foundry, 310

Spring Cloud Netflix, 310311

Spring Cloud Security, 309

Spring Cloud Sleuth, 310

Spring Cloud Stream, 310

Spring Cloud Zookeeper, 310

Spring Data REST, 307

Spring Framework

HSQL database, 307, 319320

Spring Boot, 307308

Spring Cloud, 308310

Spring Cloud Netflix, 310311

Spring Data REST, 307

Spring Guides, 311

@SpringBootApplication, 307308

SpringRestDataConfig class, 304305

SQS (Simple Queue Service), 348

Squid, 171

SSI (Server Side Includes), 171172

SSL/TLS, 155

stability

bulkhead, 204205

circuit breaker design, 203204

fail fast, 205

handshaking, 205

Hystrix, 207208

microservices and, 206207

overview, 203

Reactive Manifesto, 207

steady state, 205

test harnesses, 206

timeouts, 203

uncoupling via middleware, 206

stakeholders

for logs, 245

for monitoring, 248249

statelessness, 209

StatsD, 252

status of migration, 1516

steady state, 205

strategic design, 100101

strategies (deployment), 256258

strong modularization, 67

Structure 101, 107

stubby4j, 229

stubs, 216, 228229, 336337

sustainable architecture, 29

sustainable development, 6, 57, 67

synchronous RESTful HTTP, 179

synergies between SOA and microservices, 91

system architecture

architecture management

Context Maps, 108109

cycle-free software, 104105

importance of, 107108

tools for, 104107

configuration, 139141

documentation, 159161

domain architecture

dependency management, 101104

Otto GmbH example, 101

overview, 100

strategic design, 100101

EDA (event-driven architecture), 134135

legacy application integration

breaking up code, 126127

CMS (content management systems), 130

databases, 133134

Enterprise Integration Patterns, 127129

hidden dependencies, 132133

infrastructure and, 131

limited integration, 129

overview, 126127

UIs (user interfaces), 129130

load balancing

architecture and, 148

central load balancers, 145

client-based load balancing, 147148

number of load balancers, 145

REST/HTTP, 144145

service discovery, 146147

technologies, 145146

overview, 99

planning for growth

big systems, 119120

deployment monoliths, 121

erosion of microservices, avoiding, 122123

global architecture, 122

new functionality, incorporating, 123125

overview, 118119

replaceability, 121

small systems, 120121

scalability

advantages of microservices, 150

dynamic scaling, 148150

sharding, 150151

throughput and response times, 151

security

API keys, 157

availability, 159

certificates, 157

confidentiality, 158

data security, 158159

Datensparsamkeit, 157

firewalls, 157

Hashicorp Vault, 157158

integrity, 158

intrusion detection, 157

JWT (JSON Web Token), 154155

Kerberos, 155

OAuth2, 152156

overview, 151152

SAML, 155

SSL/TLS, 156

service discovery, 141143

summary, 161162

technical architecture, 136138

techniques to adjust architecture

causes of bad architecture, 110111

challenges with, 117118

changes in microservices, 111

changes to overall architecture, 111112

code reuse versus redundancy, 114115

code transfer, 113114

overview, 110

rewriting, 117

shared libraries, 112113

shared services, 115116

spawning new services, 116117

system metaphor, 46

system testing, 222224

T

teams

creating, 16

delegating to, 238239

DevOps, 285290

size of, 30

us versus them attitude, 288

technical architecture, 136138

technical benefits

choice of technologies, 6263

continuous delivery, 5960

independence, 63, 270273

legacy integration, 5758

microservice replacement, 5657

overview, 5556

robustness, 6162

scaling, 61

sustainable software development, 57

technical challenges

code dependencies, 7172

overview, 6971

technology pluralism, 7374

unreliable communication, 73

technical evaluation of nanoservices, 366367

technical leadership, 284

technical standards, testing, 233235

technologies

choice of, 7, 6263

high technological complexity, 2122

load balancing, 145146

messaging, 182184

monitoring tools, 250253

sample microservices-based application

HSQL database, 307

Spring Boot, 307308

Spring Cloud, 308310

Spring Cloud Netflix, 310311

Spring Data REST, 307, 319320

for service discovery, 142143

SOA (service-oriented architecture), 8687

technology stack per team, 21

technology pluralism, 7374

templates, 240

test harnesses, 206

test pyramid

for individual services, 217219

for systems, 222

test-driven development, 214215

testing

arbitrary test frameworks, 232

benefits of, 213215

bottlenecks during, 13

continuous delivery pipeline, 220

individual services, 227229

legacy applications, 225227

macro/micro architecture, 282284

versus monitoring, 249

risk mitigation, 220222

sample microservices-based application

consumer-driven contract tests, 337

overview, 336

stubs, 336337

summary, 235236

system testing, 222224

technical standards, 233235

test pyramid

for individual services, 217219

for systems, 222

test types

acceptance tests, 59

capacity tests, 59

consumer-driven contract tests, 230233, 337

exploratorive tests, 59

integration tests, 216, 226227

JUnit tests, 232

load tests, 217

manual tests, 217

shared integration tests, 223224

UI tests, 216217

unit tests, 215216

three-tier architecture, 71

Thrift, 180

throughput, 151

Tilkov, Stefan, 4750

time to market, 67

timeouts, 203

Tivoli, 251

Tolerant Reader concept, 190

tools

0MQ, 183

ActiveMQ, 183

Ansible, 255

Apache Kafka, 183

Apache Mesos, 265

Apache Qpid, 182

Apache Thrift, 180

Apache Zookeeper, 139

architecture management, 104107

ATOM Feeds, 183

Azure Service Bus, 183

BIND (Berkeley Internet Name Domain Server), 142143

Chef, 255

collectd, 252253

Consul, 143

CoreOS, 265, 324

DNS (Domain Name System), 142

Docker

cluster environments, 324

containers, 262263, 318319

file system, 261263

overview, 255

registry, 264

sample microservices-based application deployment, 313314

servers, 264265

Docker Compose, 265, 321324

Docker Machine, 265, 320321

Docker Swarm, 265

etcd, 139

Eureka

client, 324325

configuration, 325

overview, 143, 311, 324

server, 326

Feign, 311

Gephi, 107

Grafana, 250

Graphite, 250

HAProxy, 146

Hashicorp Vault, 157158

HornetQ, 183

httpd, 145

Hystrix

annotations, 330

circuit breaker, 329

configuration, 333

dashboard, 331

overview, 311, 329

resilience and stability, 207208

Turbine, 331332

Icinga, 250

jQAssistant, 107

Kerberos, 155

Kubernetes, 265, 324

Maven, 311313

Mesos, 324

Mesosphere, 324

Metrics framework, 252

Moco, 229

mountebank, 229

Nagios, 250

nginx, 145

OAuth2, 152156

Operations Manager, 251

Opscenter, 251

package managers, 255

Packetbeat, 251

Pact, 233

Pacto, 233

Puppet, 255

RabbitMQ, 182

Remedy, 251

Ribbon, 310, 333334

Riemann, 250

RSpec, 232233

Salt, 255

SAML, 155

Serverspec, 235

Seyren, 250

Spring Framework

HSQL database, 307, 319320

Spring Boot, 307308

Spring Cloud, 308310

Spring Cloud Config, 139

Spring Cloud Netflix, 310311

Spring Data REST, 307

Squid, 171

SSL/TLS, 155

StatsD, 252

Structure 101, 107

stubby4j, 229

Tivoli, 251

Turbine, 311

uniform tools, 239

Vagrant

configuration, 315317

how it works, 314

installation, 318

networking, 317

Varnish, 171

VirtualBox, 318

WireMock, 229

Zuul, 310, 327329

tracing, 245246, 310

transactions

influence on microservice size, 3133

messages and, 181182

transferring code, 113114

TSL, 155

Turbine, 331332

U

ubiquitious language, 41

UIs (user interfaces)

integration

HTML-based user interfaces, 168175

overview, 129130

SPAs (single-page apps), 164168

overview, 4750, 129130

SCS (self-contained system), 51

technical alternatives, 50

UI tests, 216217

uncoupling via middleware, 206

uniformity

uniform tools, 239

via asset servers, 166167, 311

unintended domain-based dependencies, 102103

unit tests, 215216

UNIX, 3

unreliable communication, 73

updating Docker containers, 319

“us versus them” attitude, 288

user interfaces. See UIs (user interfaces)

V

Vagrant

configuration, 315317

how it works, 314

installation, 318

networking, 317

vagrant destroy command, 319

vagrant halt command, 319

vagrant provision command, 319

vagrant ssh command, 318

vagrant up command, 319

Vagrantfile, 315317

value objects, 41

Varnish, 171

v.cpus setting (Vagrantfile), 318

versioning

interfaces, 192

Semantic Versioning, 189

SOA (service-oriented architecture), 85

version control, 77

Verticles (Vert.x), 358359

Vert.x, 210, 357359

viewing Docker containers, 318319

virtual machines, 260

VirtualBox, 318

virtualization (Docker), 261265

v.memory setting (Vagrantfile), 318

W

WAR (web application archive), 258, 307, 354

web integration. See UIs (user interfaces)

Wehrens, Oliver, 133134

WireMock, 229

X-Y-Z

XML (Extensible Markup Language), 177178

zanox AG, 338

ZeroMQ, 183

Zipkin, 245246

ZMQ, 183

Zookeeper (Apache), 139, 310

Zuul, 310, 327329

zypper, 255

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset