Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise...
Transcript of Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise...
![Page 1: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/1.jpg)
Of Microservices And Monoliths
Stefan Priebsch, The PHP Consulting Company
![Page 2: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/2.jpg)
![Page 3: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/3.jpg)
Consultant
![Page 4: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/4.jpg)
Consultant
Coach
![Page 5: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/5.jpg)
Consultant
Coach
Author
![Page 6: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/6.jpg)
Consultant
Coach
Author
University Lecturer
![Page 7: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/7.jpg)
Consultant
Coach
Author
University Lecturer
Scalability Expert
![Page 8: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/8.jpg)
![Page 9: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/9.jpg)
![Page 10: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/10.jpg)
Working on "Event Sourcing Explained"
Visit https://event-sourcing-explained.com/
![Page 11: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/11.jpg)
Monolith = Antipattern?
![Page 12: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/12.jpg)
In most cases, monoliths are the status quo.
![Page 13: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/13.jpg)
The Distributed Monolith
![Page 14: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/14.jpg)
The Distributed Monolith
Does a change to one microservice require changes to or deployments of other microservices?
Are your microservices overly chatty?
Do several microservices share a datastore?
Do my services scale dynamically?
https://blog.newrelic.com/engineering/distributed-monolith-vs-microservices/
![Page 15: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/15.jpg)
The Distributed Monolith
Implementing one business feature requires touching multiple microservices
![Page 16: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/16.jpg)
![Page 17: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/17.jpg)
~ 30 Mio lines of PHP code
![Page 18: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/18.jpg)
Interesting performance problems
![Page 19: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/19.jpg)
HipHop: Cross-compile PHP to C++
![Page 20: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/20.jpg)
50% less CPU
![Page 21: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/21.jpg)
1.5 GB binaries
![Page 22: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/22.jpg)
Deployment?
![Page 23: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/23.jpg)
Local testing?
![Page 24: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/24.jpg)
Compiler in production, interpreter in development
![Page 25: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/25.jpg)
HHVM: JIT compiler for PHP
![Page 26: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/26.jpg)
— Adam Bien, "Enterprise Architekturen"
⟫ ⟪Every architecture's number one enemy is the compiler.
![Page 27: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/27.jpg)
Compile into monolith?
![Page 28: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/28.jpg)
Single process vs. network latency
![Page 29: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/29.jpg)
Deployment?
![Page 30: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/30.jpg)
Scripting languages
![Page 31: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/31.jpg)
Deploy source code into production
![Page 32: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/32.jpg)
Load code dynamically
![Page 33: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/33.jpg)
Request/Response
![Page 34: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/34.jpg)
Static object graph
![Page 35: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/35.jpg)
Short lifetime
![Page 36: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/36.jpg)
External state
![Page 37: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/37.jpg)
Serverless?
![Page 38: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/38.jpg)
Boundaries
![Page 39: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/39.jpg)
Boundaries
Decomposition
![Page 40: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/40.jpg)
Boundaries
Decomposition
Coupling
![Page 41: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/41.jpg)
Tight coupling starts in the business
![Page 42: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/42.jpg)
Quote
Order
Invoice
![Page 43: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/43.jpg)
Order::fromQuote(...)
Invoice::fromOrder(...)
![Page 44: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/44.jpg)
Decouple
![Page 45: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/45.jpg)
Abstract
![Page 46: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/46.jpg)
![Page 47: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/47.jpg)
![Page 48: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/48.jpg)
...
$twitter= new TwitterAPIExchange($settings);
...
$twitter->buildOauth($url, $requestMethod) ->setPostfields($postfields) ->performRequest();
![Page 49: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/49.jpg)
Still very technical!
![Page 50: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/50.jpg)
Domain view?
![Page 51: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/51.jpg)
$twitter->tweet(...);
![Page 52: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/52.jpg)
$microblog->publishMessage(...);
![Page 53: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/53.jpg)
"Abstractions should not depend upon details"
![Page 54: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/54.jpg)
$remoteService->authenticate($credentials);$remoteService->sendRequest(...);
![Page 55: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/55.jpg)
...
public function publish($message){ $this->microblog->authenticate(...); $this->microblog->sendRequest(...);}
...
![Page 56: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/56.jpg)
— John V. Guttag
⟫
⟪
The essence of abstractions is preserving information that isrelevant in a given context, and forgetting information that is
irrelevant in that context.
![Page 57: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/57.jpg)
Details:
API requires authentication
Resources have URLs
...
![Page 58: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/58.jpg)
REST is an implementation detail
of the client-server communication
![Page 59: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/59.jpg)
Why REST?
![Page 60: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/60.jpg)
public function publishMessage($message){ ... $this->authenticate(...); $this->sendPostRequest(...); ...}
![Page 61: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/61.jpg)
public function publishMessage($message){ ... $this->sendJsonRpc(...); ...}
![Page 62: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/62.jpg)
public function publishMessage($message){ ... $this->sendXmlRpc(...); ...}
![Page 63: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/63.jpg)
public function publishMessage($message){ ... $this->sendSoapRequest(...); ...}
![Page 64: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/64.jpg)
Integrate client and server in one process?
![Page 65: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/65.jpg)
Develop distributed, deploy monolithic
![Page 66: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/66.jpg)
Facade API
![Page 67: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/67.jpg)
The API is an interface (as in class implements interface)
![Page 68: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/68.jpg)
Facade API
Tell to do something
Ask a question
![Page 69: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/69.jpg)
Facade API
Send a command (e.g. "publish message")
Run a query (e.g. "show list of friends")
![Page 70: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/70.jpg)
CQRS
![Page 71: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/71.jpg)
CQRS
Use a REST API for queries
Use an RPC-style API for commands
![Page 72: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/72.jpg)
Separate side e�ects
![Page 73: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/73.jpg)
Separate side e�ects
Record the decision to publish a message. Deal with the side e�ects later.
![Page 74: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/74.jpg)
Need-to-know principle
![Page 75: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/75.jpg)
Push Model
![Page 76: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/76.jpg)
More async, less sync
No temporal coupling
![Page 77: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/77.jpg)
Vertical vs. horizontal separation
![Page 78: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/78.jpg)
Self-contained systems
![Page 79: Microservices Monoliths - The PHP · HHVM: JIT compiler for PHP — Adam Bien, "Enterprise Architekturen" Every architecture's number one enemy is the compiler. Compile into monolith?](https://reader033.fdocuments.in/reader033/viewer/2022052314/605c6023da4d7f12671c40c2/html5/thumbnails/79.jpg)
Self-contained systems
Each SCS is an autonomous web application.
Each SCS is owned by one team.
Communication with other SCSs or 3rd party systems is asynchronous wherever possible.
An SCS can have an optional service API.
Each SCS must include data and logic.
An SCS should make its features usable to end-users by its own UI.
To avoid tight coupling an SCS should share no business code with other SCSs.
Shared infrastructure should be reduced to increase availability and decrease coupling.