1 of 15

Ratpack and You

Dan Hyun

@Lspacewalker

2 of 15

Me

@Lspacewalker

github.com/danhyun

3 of 15

What is Ratpack?

Web application framework

100% Java (jdk8 only as of 0.9.9)

Netty + Guava + Reactive Streams

First-class Groovy & Guice support

4 of 15

What is Ratpack?

“Ratpack tries to bridge the performance/convenience gap via its execution model.”

-Luke Daley

http://ldaley.com/post/97376696242/ratpack-execution-model-part-1

5 of 15

Hello, World!

@GrabResolver('http://oss.jfrog.org/artifactory/repos') �@Grab('io.ratpack:ratpack-groovy:0.9.11') � �import static ratpack.groovy.Groovy.ratpack ��ratpack { � handlers { � get { � response.send("${new Date()}") � } � } �}

6 of 15

Another framework?

Pure runtime (no dev binaries!)

Build it how you like (first class Gradle support)

Amazing testability

Easy deployments

Module based “plugin” architecture

Performance - low resource, great throughput

7 of 15

Extras

IntelliJ + Spring Loaded

Groovy script auto reload

Leverage all gradle plugins (compass plugin, asset-pipeline)

8 of 15

Ratpack Essentials

Launching

Handlers

Context - context registry

ExecControl - async power

Testing

9 of 15

Ratpack Live Code

git clone \

git@github.com:danhyun/ratpack-and-you-2014

10 of 15

Ratpack Modules

Codahale metrics, Groovy, Guice, H2, HikariCP, RxJava, Hystrix, Spring Boot, Session, Handlebars, Thymeleaf, Groovy Markup Template Engine

11 of 15

Caveats

Still pre 1.0 (1.0 targeted for July 2015)

JDK8 only - Deal breaker?

12 of 15

Ratpack in the Wild

Gradle Plugin Portal

http://plugins.gradle.org/

CellarHQ

https://www.cellarhq.com/

Ticketmaster???

13 of 15

Ratpack Future?

Grails 3?

Gradle + Spring Boot + Ratpack

App profile http://www.slideshare.net/lhotari/ratpack-andgrails3

14 of 15

Ratpack Resources

15 of 15

Ratpack & You

Questions?