microservices - gigacon › wp-content › uploads › 2017 › 03 › ziomek_krzys… · testing:...

24

Upload: others

Post on 24-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially
Page 2: Microservices - Gigacon › wp-content › uploads › 2017 › 03 › Ziomek_Krzys… · Testing: Shorter tests execution time encourages developer to run them more often, especially

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Snowball Selfies