microservice architecture with grails 3

15
Microservice Architecture With Grails 3 Jeff Scott Brown @jeffscottbrown [email protected]

Upload: spring-by-pivotal

Post on 16-Apr-2017

1.956 views

Category:

Technology


0 download

TRANSCRIPT

Page 1: Microservice Architecture with Grails 3

Microservice Architecture With Grails 3

Jeff Scott Brown @jeffscottbrown

[email protected]

Page 2: Microservice Architecture with Grails 3
Page 3: Microservice Architecture with Grails 3
Page 4: Microservice Architecture with Grails 3

More at ociweb.com/grails

Page 5: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

WE ARE HIRING!

Groovy And Grails Project Work Grails 2 -> 3 Plugin Migrations Grails Plugin Development Expanding GORM’s Reach New Application Profiles Grails Core Development

[email protected]

Page 6: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

“The term "Microservice Architecture" has sprung up over the last few years to describe a particular way of designing software applications as suites of independently deployable services. While there is no precise definition of this architectural style, there are certain common characteristics around organization around business capability, automated deployment, intelligence in the endpoints, and decentralized control of languages and data.”

6

Microservices

— Martin Fowler, http://martinfowler.com/articles/microservices.html

Page 7: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

URL Mapping Resources

7

Page 8: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

URL Mapping

8

Method URI ActionGET /people indexGET /people/create createPOST /people saveGET /people/{id} showGET /people/{id}/edit editPUT /people/{id} updateDELETE /people/{id} delete

Page 9: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

Versioning Resources

9

curl -i -H "Accept-Version: 1.0" http://localhost:8080/people

Uses Request Header

Page 10: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

Domain Class Resource Annotation

10

• Same URL Mappings • Same Controller Behavior • Same Data Binding • Same Rendering • Etc…

Page 11: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

Extending RestfulController

11

Page 12: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

REST Client Builder

12

Page 13: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

REST Client Builder

13

Page 14: Microservice Architecture with Grails 3

Copyright (c) 2015 Object Computing, Inc. All rights reserved.

Time To Build Some Apps…

14

Page 15: Microservice Architecture with Grails 3

Q&A

Jeff Scott Brown @jeffscottbrown

[email protected]