Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing:...
Transcript of Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing:...
![Page 1: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/1.jpg)
![Page 2: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/2.jpg)
MicroservicesCloud Computing
![Page 3: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/3.jpg)
Monolith vs Microservices
![Page 4: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/4.jpg)
Scalability: Monolith vs Microservices
![Page 5: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/5.jpg)
How big is a Microservice?
a) It Dependsb) ~438 square metersc) No bigger than my head
Rule 1: “Small enough to fit in your head”Rule 2: Two-pizza team
![Page 6: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/6.jpg)
Web Services and Cloud Computing
![Page 7: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/7.jpg)
Microservices and SOA
![Page 8: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/8.jpg)
Microservices and Cloud Computing
![Page 9: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/9.jpg)
Conway’s Law
Any organization that designs a system (defined broadly)
will produce a design whose structure is a copy of
the organization's communication structure.
![Page 10: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/10.jpg)
Conway’s Law
![Page 11: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/11.jpg)
Conway’s Law
![Page 12: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/12.jpg)
Which technology?
![Page 13: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/13.jpg)
Spring Boot
![Page 14: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/14.jpg)
Spring Cloud
![Page 15: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/15.jpg)
Cargo Cult
![Page 16: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/16.jpg)
Cargo Cult
![Page 17: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/17.jpg)
Gain
▶ Scalability: Next level of scalability. Selectively deploy more instances of services which need more throughput.
▶ Separation of Concerns: Microservices matching context boundaries reinforce Separation of Concerns principle.
▶ Encapsulation: Related data and logic encapsulated with well defined API.
▶ Lower complexity at Application Level: Smaller modules are easier to develop, refactor and maintain.
▶ Testing: Shorter tests execution time encourages developer to run them more often, especially before committing. Faster feedback from CI environment.
▶ Technology: Microservices are not restricted to be implemented in the same technology.
▶ Increased isolation of data: One database assigned to one microservice.
▶ Deployment flexibility: Fine grained independent deployments.
▶ Ownership: One two-pizza team takes responsibility for microservice as a whole.
![Page 18: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/18.jpg)
Pain
▶ Context boundaries: context boundaries might be vague by the time domain is well understood. Unclear boundaries may lead to future refactoring between components which is more costly in distributed system than monolith.
▶ Distributed computing: higher complexity at integration layer and fallacies of distributed computing.
▶ Eventual consistency of data: risk of data inconsistency because of decentralized database management.
▶ Decreased productivity in the beginning: There is a lot of overhead in distributed systems. Microservices Architecture is investment in future productivity.
▶ Operational complexity: challenges for operational team. Management and monitoring of vast network of microservices.
![Page 19: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/19.jpg)
You must be this tall…
![Page 20: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/20.jpg)
AWS: VPN Connection
![Page 21: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/21.jpg)
AWS: On-premises vs Cloud
![Page 22: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/22.jpg)
Transfer datacenter to AWS
Snowball =80 Terabyte = 80 *1000 GB
10 snowmobiles =Exabyte = 1000 * Petabyte = 1 billion GB
1 snowmobile = 100 Petabyte = 100 * 1000 Terabyte
Snowmobile = 1250 * Snowball
![Page 23: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/23.jpg)
Snowball Selfies
![Page 24: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially](https://reader033.fdocuments.in/reader033/viewer/2022042322/5f0c5b417e708231d434ff33/html5/thumbnails/24.jpg)
References
▶ https://www.linkedin.com/pulse/microservices-pain-gain-krzysztof-ziomek
▶ https://martinfowler.com/articles/microservices.html
▶ http://www.service-architecture.com/articles/cloud-computing/web_services_and_cloud_computing.html
▶ http://www.imotif.net/index.php/2016/10/06/microservice/
▶ https://blog.hackerrank.com/which-country-would-win-in-the-programming-olympics/