distributed platform development with groovy

25
© 2014 SpringOne 2GX. All rights reserved. Do not distribute without permission. Distributed Platform Development with Groovy By Dan Woods

Upload: spring-io

Post on 14-Jun-2015

592 views

Category:

Software


2 download

DESCRIPTION

Speaker: Dan Woods, Netflix Building an Enterprise Application Stack means the necessity to have a service tier that can scale to the demands of business. This talk will discuss the approach to developing a scalable enterprise architecture, and will demonstrate implementations based on the variety of technologies available from the Groovy ecosystem, including Grails, Spring, Spring Boot, and Spring Integration.

TRANSCRIPT

Page 1: Distributed Platform Development with Groovy

© 2014 SpringOne 2GX. All rights reserved. Do not distribute without permission.

Distributed Platform Development with Groovy

By Dan Woods

Page 2: Distributed Platform Development with Groovy

Who Am I?

2

f

@danveloper /danveloper #author

[email protected]

Page 3: Distributed Platform Development with Groovy

Intro

3

What is a Platform?

Page 4: Distributed Platform Development with Groovy

Intro

4

What is a Platform?

“A broad set of functionality structured in a

common way that exposes one or many

business functions”

Page 5: Distributed Platform Development with Groovy

Intro

5

What is a Platform?

• A pattern of architecting a “system”

• System is designed to expand and contract as business

needs evolve

Page 6: Distributed Platform Development with Groovy

Intro

6

Distributed Computing & Data

Encapsulation

• Platform service components run in their own process

and memory space

• Services are responsible for their own business logic and

data processing rules

Page 7: Distributed Platform Development with Groovy

Intro

7

Platform as a Service

• Vertically sliced by business function

• Platform-oriented architecture means services are

composable

• Pick-and-choose services as they relate to some

business functionality

Page 8: Distributed Platform Development with Groovy

Intro

8

Why is Platform Architecture

Important?

Page 9: Distributed Platform Development with Groovy

Intro

9

Why is Platform Architecture

Important?

• Enforces modularity of concepts, not just code

• Easy to get a grasp on the “system” and its capabilities

• Allows functionality to scale as complexity grows

• “True” vertical slices

Page 10: Distributed Platform Development with Groovy

Intro

10

Microservice Architecture

• Microservices are great, but don’t speak directly to

Platform Architecture

• Platform Microservices are designed as atomic subsets

of capabilities in the platform

• A collection of microservices comprise a vertical slice of

a system’s business function (encapsulating their own

data domains)

Page 11: Distributed Platform Development with Groovy

11

Why Choose Groovy for

Platform Development?

Page 12: Distributed Platform Development with Groovy

Why Choose Groovy?

12

Groovy Has Come A Long Way…

• Since Groovy 2.0.0 – Static Compilation!

• Since Groovy 2.0.0 – Type Checking!

• Groovy’s Indy support in Java 7 gives near-static-

compilation performance, while still maintaining the

dynamic nature

• Pick-and-choose your compilation strategy

Page 14: Distributed Platform Development with Groovy

Why Choose Groovy?

14

Groovy Beans are Superior!

• In microservice architecture, components encapsulate

their data, and inherently the model

• Groovy beans cut the verbosity, and get right at the

model of the data

• Rich models are easily built into Groovy beans,

especially when considering the MetaClass

Page 15: Distributed Platform Development with Groovy

Why Choose Groovy?

15

Great Out-of-the-Box Support for

Microservices

• Groovy SQL is a great foundation for data encapsulation

• Groovy String/URL extensions make REST calls a

breeze

• The world’s fastest JSON parser!

Page 16: Distributed Platform Development with Groovy

Why Choose Groovy?

16

Groovy Extensions

• Groovy’s extension framework allows compile-time

analysis driven by business/technical rules

• Annotation collectors can roll-up static compilation, as

well as common service-layer annotations (JAX-RS, for

example)

Page 17: Distributed Platform Development with Groovy

17

Debunking Groovy Performance

Myths

Page 18: Distributed Platform Development with Groovy

#debunk

18

Ratpack Benchmarks

• Ratpack utilizes full Java APIs in the core – no cost to its

Groovy integration

49,000 49,500 50,000 50,500 51,000 51,500 52,000 52,500

Dynamic Groovy

Indy Groovy

Statically Compiled Groovy

Java 8

Requests/sec

https://github.com/Netflix-Skunkworks/WSPerfLab

Page 19: Distributed Platform Development with Groovy

19

Platform Tools in the Groovy

Ecosystem

Page 20: Distributed Platform Development with Groovy

20

Grails

• Groovy-first web framework; full-stack defined

• Run in either container or in a stand-alone fashion

• Abstractions on data encapsulation (GORM)

• Extremely advanced REST support

#platformtools

Page 21: Distributed Platform Development with Groovy

21

#platformtools

Spring Boot

• Opinionated framework for Spring

• Builds on all of the new Spring hotness, including

conditional wirings, and advanced data bindings

• Advanced REST support, enables edge slicing

• Cloud-native, preferable to run in an embedded container

Page 22: Distributed Platform Development with Groovy

22

#platformtools

Ratpack

• JVM web framework, designed for high-throughput, non-

blocking request system

• First class support for Groovy, seamless static

compilation

• Seamless Groovy Sql integration (through the

SqlModule)

• Excellent choice for developing a microservice

Page 23: Distributed Platform Development with Groovy

23

#platformtools

Vert.x

• Vertical slicing of applications, fits very well in the

Platform Architecture concept

• Extremely high throughput

• Asynchronous, event-driven architecture model

• Packaged and run as a fat jar

Page 24: Distributed Platform Development with Groovy

24

To Summarize…

Page 25: Distributed Platform Development with Groovy

25

#summary

Summary

• Platform architecture is important for scaling systems as

business complexity grows

• Platform verticals are defined by business functions

• Microservices can be built to compose the business

functions

• Groovy provides a rich ecosystem for developing a

distributed platform architecture