introduction of categolj2 #jjug_ccc

27
Intoroduction of CategoLJ2 @making (Toshiaki Maki) http://blog.ik.am JJUG CCC 2014 Spring LT 2014/05/18

Upload: makingx

Post on 27-Aug-2014

1.047 views

Category:

Software


0 download

DESCRIPTION

JJUG CCC 2014 SpringのLT資料です。 https://github.com/making/categolj2-backend の説明

TRANSCRIPT

Page 1: Introduction of CategoLJ2 #jjug_ccc

Intoroduction of CategoLJ2

@making (Toshiaki Maki) http://blog.ik.am

JJUG CCC 2014 Spring LT 2014/05/18

Page 2: Introduction of CategoLJ2 #jjug_ccc

What is CategoLJ2

Originally, Categorizer written in Lisp (since 2009)

Rewrite with Java (2011)

2nd version (2013)

Used as a simple blogware History: http://blog.ik.am/#/entries/193

https://github.com/making/categolj2-backend

Page 3: Introduction of CategoLJ2 #jjug_ccc

Featuare

Simple! Portable! RESTful!

Page 4: Introduction of CategoLJ2 #jjug_ccc

Used TechnologiesJava8 & Spring 4

Spring MVC

Spring Security OAuth

Spring Data JPA & JPA 2.1 (Hibernate)

Hibernate Search

Flyway

Backbone.js

Page 5: Introduction of CategoLJ2 #jjug_ccc

Normal RESTful Architecture

Resource Server

Authorization Server

Client

OAuth API

Resource API

access token

Page 6: Introduction of CategoLJ2 #jjug_ccc

CategoLJ2 Architecture

All in One jar file

Resource

Authorization Client (Admin)

Embedded Tomcat

Client (Frontend)

Flyway

Hazelcast RDB (H2 or MySQL)

Page 7: Introduction of CategoLJ2 #jjug_ccc

CategoLJ2 Architecture

All in One jar file

Resource

Authorization Client (Admin)

Embedded Tomcat

Client (Frontend)

Flyway

Hazelcast RDB (H2 or MySQL)

Page 8: Introduction of CategoLJ2 #jjug_ccc

CategoLJ2 Architecture

All in One jar file

Resource

Authorization Client (Admin)

Embedded Tomcat

Client (Frontend)

Flyway

Hazelcast RDB (H2 or MySQL)

Resource Owner Password Credentials Grant

Page 9: Introduction of CategoLJ2 #jjug_ccc

Technology StackClient(Admin) Resource Server

Backbone.js

Handlebars

Spring

Spring MVC

Jackson2

Spring Data JPA

Hibernate

Embedded Tomcat

Java 8

Page 10: Introduction of CategoLJ2 #jjug_ccc

Admin Console

Page 11: Introduction of CategoLJ2 #jjug_ccc

Admin Console

Page 12: Introduction of CategoLJ2 #jjug_ccc

Admin Console

Page 13: Introduction of CategoLJ2 #jjug_ccc

Admin Console

Page 14: Introduction of CategoLJ2 #jjug_ccc

Admin Console

Page 15: Introduction of CategoLJ2 #jjug_ccc

(Default) Frontend

Page 16: Introduction of CategoLJ2 #jjug_ccc

Quick Launch

wget https://github.com/making/categolj2-backend/releases/download/0.12.0/categolj2-backend.jar

java -jar categolj2-backend.jar

Download & Run!

Page 17: Introduction of CategoLJ2 #jjug_ccc

Default Behavior

Use file based H2 database

DB migration using Flyway

No need to set up any middleware

Page 18: Introduction of CategoLJ2 #jjug_ccc

See Document

https://github.com/making/categolj2-backend#quick-launch

Page 19: Introduction of CategoLJ2 #jjug_ccc

Scalable

java -jar xxx.jar -httpPort 8081

port: 8080

port: 8081

java -jar xxx.jar -httpPort 8080

LB

Hazelcast

Hazelcast

RDB

Distributed Cache

multicast

Page 20: Introduction of CategoLJ2 #jjug_ccc

Scalable

java -jar xxx.jar -

java -jar xxx.jar -

LB

Hazelcast

Hazelcast

RDB

Hazelcast

Hazelcast

Hazelcast

Hazelcast

Hazelcast

Hazelcast

Page 21: Introduction of CategoLJ2 #jjug_ccc

Write your own client!

All in One jar file

Resource

Authorization Client (Admin)

Embedded Tomcat

Client (Frontend)

Flyway

Hazelcast

Your Client (Frontend)

REST API

Page 22: Introduction of CategoLJ2 #jjug_ccc

Write your own client!

All in One jar file

Resource

Authorization Client (Admin)

Embedded Tomcat

Client (Frontend)

Flyway

Hazelcast

Your Client (Frontend)

REST API

JavaScript, JavaFX, JSF, Other langs …

Page 23: Introduction of CategoLJ2 #jjug_ccc

client written in Go lang

https://github.com/making/categolj2-cli

Command Line Interface for CategoLJ2

$ catego gets $ catego get {entryId} $ catego post hogehoge.md $ catego put {entryId}.md

Page 24: Introduction of CategoLJ2 #jjug_ccc

REST API Document

https://github.com/making/categolj2-backend#backend-apis

Comming soon…

using Swagger

Page 25: Introduction of CategoLJ2 #jjug_ccc

Replace your blog!

Page 26: Introduction of CategoLJ2 #jjug_ccc

with “はじめてのBootstrap”

http://amzn.to/hajiboo

Page 27: Introduction of CategoLJ2 #jjug_ccc

Thank you