SlideShare une entreprise Scribd logo
1  sur  222
Télécharger pour lire hors ligne
Micro-services
Architecture
Domain-Driven-Design
Multi-tenancy
DevOps
Building Multi-tenancy Enterprise Applications
with DDD Approach
Jinyoung Jang
OpenCloudEngine.org
(jyjang@uengine.org)
Day-1: Problem Statement
2
Enterprise SaaS Application
최근 Economist Intelligence 에 의한 국제
적 조사 (293개 기업 CIO, 조사국가: 미
국 39%, 영국 31%, 호주 30%)에 의하면
5개 기업중 4개는 자신의 고객들이 제화
와 서비스를 제공받는 방식에 어떤 변화
를 원하고 있다고 답했다. 그리고 실제로
반이 넘는 기업들은 가격모델과 제공방
식을 변경하였거나 계획 중이라고 답했
다. 그러한 변화 중 가장 많은 40% 로 대
답한 것은 바로 ‘ 구독형 서비 스
(Subscription Service)’의 도입으로 조사
됐다.
성공적인 서비스들
성공적 서비스로의 여정
운영자동화
• Business Continuity
• Zero-downtime
수익화
• Subscription Business
구현
• Mashups
• Multi-tenancy
• Self-Serviced
마이크로 서비스
• Separation of Concerns
Successful Ser
vice
성공적 서비스로의 여정
운영자동화
• Business Continuity
• Zero-downtime
수익화
• Subscription Business
구현
• Mashups
• Multi-tenancy
• Self-Serviced
마이크로 서비스
• Separation of Concerns
Share more, More cheap offering, More C
ompetitive in the market !
Share less, More easy & Secure !
Creating Innovative Application
Multi-tenancy Support
SaaS Maturity Model
가입자A의 앱설정 가입자B의 앱설정
* 멀티태넌시 지원 기능은 금번 사업 범위에 비포함
* 향후 현재 R&D문서관리 등은 멀티태넌트 전환이 필요함
2. 도입기관별 입력 항목 변경
3. 도입기관별 판정로직 설정
1. 도입기관 브랜드 설정
Multi-tenancy Support
Metadata-based
Multi-tenancy Support
Self Service
Multi-tenancy Support
Self Service
Tenant-­aware! Inject  tenant-­specific  logics,  workflows,  brand
Tenant-­specific  
Store
Multi-tenancy Support
SPOSAD Architecture
Tenant-specific Customization > Custom Database Schema > S
hared Database vs. Shared schema
© 2013 uEngineCloud, I
nc.
Rigid,   shared  table Extension  tabl
es
Datatype-­specifi
c  pivot  tables
Private  tables
Universal  tabl
e  with  XML  d
ocument
Universal  table
Supporting Multi-tenancy
어떤 DB 구조로 설계해야 하나요?
Supporting Multi-tenancy
Force.com: Multi-tenant Kernel
Supporting Multi-tenancy
NoSQL databases
1. Inherent multi-tenancy - Schema Free
2. High Performance - Horizontally scalable and Memory cache
3. Web optimized – Query results are JSON - data can be
parsed by web browser directly and performantly.
Additionally -
4. Easy to implement Analytic services (MR) and Full Text Search
5. Event-driven Transaction - don't have to care about CQRS
something
6. Some NoSQL products (Couchbase, Cassandra) provides
pessimistic locking and ANSI SQL (Join Query) - easily
migrate to them.
Libraries and tools for Multi-tenancy
support
• Multi-tenancy Database Frameworks
– JPA @Discriminator annotation (Hibernate,
EclipseLink)
– Athena Framework
– Spring Cloud
– Corent-technology’s JDBC/ODBC proxy
• Metadata framework (SPOSAD)
– IBM J9 JVM - @TenantScope annotation
– Athena Framework
– Adaptive Object Model
– OCE multi-tenancy metadata framework
성공적 서비스로의 여정
운영자동화
• Business Continuity
• Zero-downtime
수익화
• Subscription Business
구현
• Mashups
• Multi-tenancy
• Self-Serviced
마이크로 서비스
• Separation of Concerns
DevOps: Issues
Continuous Delivery
18
Company Deploy Frequency Deploy Lead Time Reliability Customer
Responsiveness
Amazon 23,000 / day Minutes High High
Google 5,500 / day Minutes High High
Netflix 500 / day Minutes High High
Facebook 1 / day Hours High High
Twitter 3 / week Hours High High
Typical enterprise Once every 9 months Months or quarters Low / Medium Low / Medium
출처: 도서 The Phoenix Project
Amazon,
 Google,
 Netflix,
 Facebook,
 Twitter는얼마나자주 배포할까요?
19
2. 배포 주기
• 매일 마이너 업데이트
• 메이저 업데이트 (매주 화요일 오후)
3. Deployment
 Pipeline
출처: http://ieeexplore.ieee.org /xpl/artic leDet ails.jsp?arnumber=6449236
Supporting Continuous Delivery
Facebook
20
4. Canary를통해서확신 갖기
• Canary란? 실제production
 환경에서 small
 subset에서새로운코드를 돌려보고 옛날
코드와 비교해서 새로운 코드가어떻게 돌아가는 지 보는 것
• Canary
 분석작업(HTTP
 status
 code,
 response
 time,
 실행수, load
 avg등이옛날 코
드랑 새로운 코드랑 비교해서 어떻게다른 지 확인하는것)은 1000개 이상의metric을
비교해서 100점 만점에 점수를 주고 일정 점수일 경우만배포할 수 있음.
출처: http://techblog.netf lix.com/2013/08/dep loying -netf lix -ap i.ht ml
Supporting Continuous Delivery
Netflix
CPU
MEM Disk
WAS
Storage
Service
(e.g. S3)
Memory
Service
(e.g. Redis)
Micro
Service
Architecture
Existing Enterprise
ApplicationHAarchitecture
wire network
Managing“SPOF (SinglePoint Of Failure)”
DevOps
Managing Single Point of
Failure
Managing SPOF
Micro Services Architecture
출처 :  2010 architecting for the cloud (http://www.slideshare.net/simone.brunozzi/2010-architecting-for-the-cloud-4719195)
DevOps: Issues
Managing Scalability
Managing Scalability
Workload Distribution Engine
• IBM Bluemix
• Heroku
• GE’s Predix
• Pivotal Web
Services
• Cloud Foundry
Container
Workload
Distribution Engine
(OSS)
PaaS
• Warden(Garden)
• Docker • Kubernetes
• Docker SWARM
• Mesos Marathon
• Google Compute
Engine
• Redhat Open Shift
• Hypervisor • CF version 1
• Engineyard….
• Amazon Beanstalk
DevOps
DevOps Platforms
DevOps Platform
IBM Bluemix
DevOps Platform
IBM Bluemix – Auto Scaling
DevOps Platform
IBM Bluemix – Zero Downtime
Deploy
성공적 서비스로의 여정
운영자동화
• Business Continuity
• Zero-downtime
수익화
• Subscription Business
구현
• Mashups
• Multi-tenancy
• Self-Serviced
마이크로 서비스
• Separation of Concerns
Monolithic Architecture
à 모든 서비스가 한번에 재배포
à 한팀의 반영을 위하여 모든 팀이 대기
à 지속적 딜리버리가 어려워
Micro Service Architecture
Contract based, Polyglot Programming
à Separation of Concerns, Parallel Development, Easy Outsourcing
Written in Java
Written in Node
Written in PHP
Micro Service Architecture
• 변경된 서비스만 재배포
à Side effect 최소화
• 자율성
à 각 서비스에 대한 자유로운 언어, 아키텍처, 아웃소싱 용이
• 병렬 개발, 타임 투 마켓, 린 개발
API Gateway
(Human)
Front-end
Servi
ce
Service
API G/W
Service
Service
We need API Gateway for aggregating, forwarding
services and exposing composite APIs
Tenant-Specific Routing
(Machine)
Third-party Apps
Billing
(Human)
Front-end
Service
Service
API G/W
Service
Service
We need API Gateway for aggregating, forwarding
services and exposing composite APIs
Tenant-Specific Billing
(Machine)
Third-party Apps
Billing
Metering / Loggregator
(Human)
Front-end
Service
Service
API G/W
Service
Service
로그를 수집하여, 테넌트별 사용량을 집계한 후 빌링에게 전달
(Machine)
Third-party Apps
Billing
Metering
(Loggregator)
IAM
(Human)
Front-end
Service
Service
API G/W
Service
Service
Stateless 인증, 통합빌링을 위한 IAM
Tenant Billing
(Machine)
Third-party Apps
Billing
IAM token
provider
Design factors on developing cloud
applications
1. Don't code your application directly to a specific topology
2. Do not assume the local file system is permanent
3. Don't keep session state in your application
4. Don't log to the file system
5. Don't assume any specific infrastructure dependency
6. Don't use infrastructure APIs from within your application
7. Don't use obscure protocols
8. Don't rely on OS-specific features
9. Don't manually install your application
38
Micro Service Architecture
Design Factor for Front-end
One Page
N-Screen
Responsive
Dynamic
Real-time
Front-end
Image
Server
(Python)
Business
Logic
Server
(Java)
Extended Role of Front-end in Cloud Applications
Aggregator for multiple (polyglot programmed) micro-services
Component
Service
(C)
AJAX, RESTful
Concurrent Cloud Applications are composed of multiple
Micro Services and front-end serves as an aggregator of the
services
Writing One Page Web App
Problems: One Page Web App à Low Cohesion and High Coupling
style
style for A
style for B
style for C
/style
html
element for A
element for B
element for C
/html
script
script for A
script for B
script for C
/script
Polymer: Web Component Framework
Polymer: W3C standard for Web Components
• Provides Cohesive Component Model
• Component Composition by HTML
markup
• Dynamic Data Binding
• Responsive Web by Material Design
• Standard
• Google maintains it
Polymer: Web Component Framework
Polymer: W3C standard for Web Components
style
style for A
style for B
style for C
/style
html
element for A
element for B
element for C
/html
script
script for A
script for B
script for C
/script
#A.html
style
style for A
/style
html
element for A
/html
script
script for A
/script
#B.html
style
style for B
/style
html
element for B
/html
script
script for B
/script
#C.html
style
style for C
/style
html
element for C
/html
script
script for C
/script
#index.html
A A
B B B
C
• UI Framework for MSA
– AngalarJS
– React
– Polymer
– VueJS
• API Gateway
– APIGee (Commercial)
– Kong
– OCE Gateway
– Amazon Cognito (Public)
– Spring Cloud
• IAM
– Amazon IAM (Public)
– Spring Cloud
– OCE IAM
• Metering / Billing
– Exem’s Metering Framework – BigData based
– OCE Billing
Micro Service Architecture
Platforms for MSA
Platform for MSA
OCE API Gateway
Example: Proposed SaaS Ar
chitecture
프론트엔드 (Responsive,	
  Client-­‐
side	
  Service	
  Aggregate)
확장가능한 글로벌
싱글 인스턴스 데이
터베이스
(NoSQL	
  -­‐	
  Couchbase)
서비스
API	
  G/W
서비스
서비스
Scalable,	
  Client-­‐driven,	
  Microservices	
  architecture
Tenant	
  Billin
g
(Machine)
써드파티 앱
들
Billing
IAM	
  token	
  provi
der
local	
  DB
(pouchDB)
CRUD
1.data
sync
2.REST
성공적 서비스로의 여정
운영자동화
• Business Continuity
• Zero-downtime
수익화
• Subscription Business
구현
• Mashups
• Multi-tenancy
• Self-Serviced
마이크로 서비스
• Separation of Concerns
Monetization Platform
Leaders Mainstream Laggards
Pricing strategy • Pricing metrics are defined as p
erceived by the customers
• Pricing strategy is easy to under
stand, measure.
• Boundaries for usage,
features, time, conversion
from trial are clearly define
d
• Pricing is ad hoc
• Pricing is based on internal
ly-oriented metrics
• Difficult to convert trial an
d freemium to paid
• Leader 들은 고객 관점에서 가격을 책정, 시장상황에 빠르게 가격 및 정책
개선
• 후발기업들은 내부 비용에 초점, 변경하지 않음
Zuora Aria
Hiveage Chargify
And more..
Monetization
Platforms For Monetization
Monetization Platform
Zuora - Billing Metering As A
Service
Monetization Platform
Zuora - Billing Metering As A
Service
Monetization Platform
Zuora - Billing Metering As A
Service
Monetization Platform
Zuora - Billing Metering As A
Service
Monetization Platform
OCE Billing – Open Source Billing Metering
• 구독형 (공유자원  확장성)
• 다종단말
• 마이크로 서비스
• 스마트 프론트-엔드
Mission: 향후 10년 사용할 아
키텍처
• 설치형
• 단일단말
• 모놀리씩
• 무거운 백엔드
Reference SaaS App
https://github.com/TheOpenCloudEngine/micro-service-architecture
특징
• 멀티테넌시
• 셀프서비스 (객체관리)
• 클라이언트 기반 서비스
통합
• 로컬 캐시 DB (오프라인
에서도 동작, 서버 접속
시 동기화)
• 토큰 인증 (IAM)
• API GW 통한 CRUD DB
접근
Reference SaaS App
github.com/TheOpenCloudEngine/micro-service-architecture
Front-­‐end	
  (VueJS)
CouchDB
OCE	
  API	
  G/W
Tenant	
  Billing
OCE	
  BillingOCE	
  IAM
local	
  DB
(pouchDB)
CRUD
1.data
sync
2.REST
OCE
Metadata	
  Service
Self-­‐service	
  Portal
Generate UIs
References
• www.opence.org
• https://www.ibm.com/developerworks/websphere/techjournal/14
04_brown/1404_brown.html
• http://microservices.io
• [Google Search] The SPOSAD Architectural Style for Multi-tenant
Software Applications
• https://github.com/TheOpenCloudEngine/polymer-java-mapping
• https://github.com/TheOpenCloudEngine/OCEIAM-
SERVICEWARRPER
• https://github.com/TheOpenCloudEngine/oceIAM
DDD / MSA based SaaS Application
Development Framework – metaworks4
60
Metaworks4
Open Source SaaS Platform mimicking Salesforce’s Multitenant Kernel
www.metaworks4.io
Concepts  Backgrounds
도메인 주도 설계 마이크로 서비스 아키텍처 머터리얼 디자인
DDD(Domain-Driven Design) - 도메인 주도 설계
• 마이크로서비스를 구현하기에 앞서 설계하기 위해 필요한 유용한 개념 DDD.
• 추천 도서 :  “Eric  Evans의 Domain  Driven  Design”,  도메인 주도 설계
• DDD에서 얻을 수 있는 해법(책에서 다루는 내용)
• 어떤 단위로 서비스를 구성할 것인가
• 서비스의 결합
• 변화에 강한 설계
• 레거시 시스템을 단계적 폐기
• 리팩터링 전략
• Domain  Model  정제과정의 예
• http://agiledata.org/essays/agileDataModeling.html
63
Micro Services Architecture
• https://martinfowler.com/articles/microservices.html
64
MW4 개발 프로세스
생
성
생
성
• Full-fledged Responsive Web
Single Page Application
• With google-material design• POJO based Domain Model
• Add annotations (JAX-RS, JPA,
Jackson, metaworks)
• Domain Class Analysis
도메인
클래스
모델링
애노테이
션
UI 컴포넌
트 배치
Model
metadata
Front
(Vue.js /
polymer)
REST backend
(Spring hateoas)
ORM
(Spring
JPA)
Domain Class
Developer
generates generates
generates
How it works
Multi-tenant / Self service Support
Self service
Self service
portal
• Add new attribute
• Attributes can be String,
number, Data from referenced
class (table)
• Change the title, order of
attributes
• Hide/Show attribute
Model
metadata
Front
(Vue.js /
polymer)
REST backend
(Spring
hateoas)
ORM
(Spring
JPA)
Domain ClassSelf-Service Portal
couchbase
Tenant
Admin
Developer
overrides
Overriding
metadata
generates generates
generates
How it works
활용 오픈소스 – for building app
Vue.js Vue MaterialFront
REST Service
Persistence
활용 오픈소스 – 2 – for MSA
BackEnd 1
IAM
API GW
BackEnd 2
Billing/
Metering
Front
OCE-IAM
OCE-API-GW
OCE-Bill
www.opence.org
개발환경 구축
• Apache Maven 3.x
– Will import following dependencies automatically:
• Spring Framework
• Tomcat Runtime
• Mysql Java Library
• ORM-related Libraries including JPA
• Integrated Development Environment:
Intelli-J CE 12 or higher
• Database-related tools:
Mysql Server, Mysql workbench
(Mysql Java Library will be automatically imported by maven)
71
URL for sample project
72
https://github.com/TheOpenCloudEngine/micro-service-
architecture-vuejs
Building Sample Application
73
Backend server (Runs on 8080)
mvn spring-boot:run
Front-end server (Runs on 8081 or any other port)
cd src/main/resources/static
npm install npm run dev
Go to http://localhost:8081/login.html
Dependencies
74
- MySQL DB and Couchbase Installation
- Setting the connection info to the WebConfig.java:
https://github.com/TheOpenCloudEngine/micro-service-architecture-
vuejs/wiki
Running Sample App - login
75
Default login id / pw is
jyjang@uengine.org / test
Login will be processed through the IAM server:
http://iam.uengine.io:8080
Running Sample App – Product - Master
76
• Main Screen is in a material-
design fashion
• You may reduce the screen
size to see it is responsive to
the device
Running Sample App – Product – Insert
77
Running Sample App – Product – Delete
78
Running Sample App – Progress
79
Running Sample App – Progress –
Referencing Master Values
80
Running Sample App – Self Service
81
필드추가
Getting access_token
82
Getting token from IAM directly
• curl -X POST http://iam.uengine.io:8080/oauth/access_token
-H 'cache-control: no-cache'
-H 'content-type: application/x-www-form-urlencoded'
-H 'postman-token: 8ecd37ed-0bc7-3e93-bae6-b5514fd010cd'
-d 'client_id=e74a9505-a811-407f-b4f6-
129b7af1c703grant_type=passwordclient_secret=109cf590-
ac67-4b8c-912a-
913373ada046username=sppark2password=gosu23546scope
=uEngineSubscriptions%2Fsubscriptionsapitoken_type=JWTclai
m=%7B%22aaa%22%3A%22bbb%22%7D'
83
Curl for main service
• curl localhost:8080 -H access_token:
eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0OTgwNTQ4NzUsImNvbnRleHQi
Onsic2NvcGVzIjoidUVuZ2luZVN1YnNjcmlwdGlvbnNcL3N1YnNjcmlw
dGlvbnNhcGkiLCJ1c2VySWQiOiJhYzUyYzczYTVlZTI0NjM2OThiMDc0
MDgwMGZkZTQ2MCIsImNsaWVudEtleSI6ImU3NGE5NTA1LWE4MT
EtNDA3Zi1iNGY2LTEyOWI3YWYxYzcwMyIsInVzZXJOYW1lIjoianlqY
W5nQHVlbmdpbmUub3JnIiwibWFuYWdlbWVudElkIjoiZGRmZWZlYz
A3ODliNGRiZmIwMGM3MjU2MTFiYjY5NWUiLCJyZWZyZXNoVG9rZ
W4iOiI0ODhlMmM2MC1mNWQyLTQ5M2EtYTk5YS0xN2QxMzZiZmI
zYzEiLCJ0eXBlIjoidXNlciIsImNsaWVudElkIjoiMmNlZTkwMjMxNjMyN
GNkNGJiMmQ5NjQ4NzM5MDFlZWIifSwiaXNzIjoib2NlLmlhbSIsImN
sYWltIjp7fSwiaWF0IjoxNDk4MDE4ODc1fQ.lPfzsnqv1bBdl9EcVRwY
RDtIVbVMDMdDUzeOpgfwfQs
84
Curl for main service
• curl localhost:8080 -H access_token:
eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0OTgwNTQ4NzUsImNvbnRleHQiOnsic2NvcGVzIjoidUVuZ2luZVN1YnNjcmlwdGlvbnNcL3N1YnNjcmlw
dGlvbnNhcGkiLCJ1c2VySWQiOiJhYzUyYzczYTVlZTI0NjM2OThiMDc0MDgwMGZkZTQ2MCIsImNsaWVudEtleSI6ImU3NGE5NTA1LWE4MT
EtNDA3Zi1iNGY2LTEyOWI3YWYxYzcwMyIsInVzZXJOYW1lIjoianlqYW5nQHVlbmdpbmUub3JnIiwibWFuYWdlbWVudElkIjoiZGRmZWZlYz
A3ODliNGRiZmIwMGM3MjU2MTFiYjY5NWUiLCJyZWZyZXNoVG9rZW4iOiI0ODhlMmM2MC1mNWQyLTQ5M2EtYTk5YS0xN2QxMzZiZmIz
YzEiLCJ0eXBlIjoidXNlciIsImNsaWVudElkIjoiMmNlZTkwMjMxNjMyNGNkNGJiMmQ5NjQ4NzM5MDFlZWIifSwiaXNzIjoib2NlLmlhbSIsImNs
YWltIjp7fSwiaWF0IjoxNDk4MDE4ODc1fQ.lPfzsnqv1bBdl9EcVRwYRDtIVbVMDMdDUzeOpgfwfQs”
• {
• _links : {
• person : {
• href : http://localhost:8080/person{?page,size,sort},
• templated : true
• },
• progress : {
• href : http://localhost:8080/progress{?page,size,sort},
• templated : true
• },
• product : {
• href : http://localhost:8080/product{?page,size,sort},
• templated : true
• },
• profile : {
• href : http://localhost:8080/profile
• }
• }
• }
85
Curl for main service
• curl localhost:8080 -H access_token: access token”
• {
• _links : {
• person : {
• href : http://localhost:8080/person{?page,size,sort},
• templated : true
• },
• progress : {
• href : http://localhost:8080/progress{?page,size,sort},
• templated : true
• },
• product : {
• href : http://localhost:8080/product{?page,size,sort},
• templated : true
• },
• profile : {
• href : http://localhost:8080/profile
• }
• }
• }
86
CORS Settings
87
@Configuration
@ComponentScan(basePackageClasses = {TenantAwareFilter.class, MetaworksRestService.class, ProductRepository.class,
ClassManager.class, MetadataService.class})
@EnableJpaRepositories(repositoryBaseClass = CustomGenericRepositoryImpl.class)
public class WebConfig extends WebMvcConfigurerAdapter {
@Override
public void addCorsMappings(CorsRegistry registry) {
registry.addMapping(/**)
.allowedOrigins(*)
.allowedMethods(POST, GET, PUT, DELETE, OPTIONS)
.allowedHeaders(access_token, Content-Type);
}
Using Post Man
88
The Size of Code
89
323Lines
For Developing Full-CRUD, RESTful, MSA-based,
Material-Designed, Responsive, Grid+Form, Multi-
tenant and Self-Served Application:
• Number of fields of the entity: 10
• Total lines of code per an entity:
92 for front-end,
215 for domain class,
16 lines for repository.
Anatomy of SaaS Platform:
Doman Driven Design and Metadata Oriented
Framework
90
Implementing Multi-tenant Polymorphism
91
Adaptive Object Model
92
http://adaptiveobjectmodel.com
• Class Definition model in
instance level
• Definition can be stored in a
XML file or database.
• Very Flexible to Extend
• Polymorphism for multi-
tenant
Drawbacks:
• Hard to read code
• Error-prone
Reflection + AOM
93
• Since Java 1.2
• Java Class definition can be
accessible with Reflection
APIs
• For the concrete part, Get
the Metadata from Class
Definition
• For the flexible part, use the
AOM
Annotation + Reflection + AOM
94
• Since Java 1.5
• Rather use separated XML
files, use @ for specifying
additional (user-defined)
metadata for class definition
Metaworks
1. Metadata Oriented Application Framework
2. Developed by Jinyoung Jang in 1998
3. Inspired from the Adaptive Object Models, OMG Reflection, and MDA
4. Application Component Generation on the fly from metadata
5. Metaworks1: Generates database query and action, Simple Web Forms
generation. written in ASP - 1998
6. Metaworks2: Generates Swing User interfaces written in Java, is adopted in
uEngine Process Designer – 2003
7. Metaworks3: Generates Dynamic Web Uis. Metadata definition by annotation,
is adopted in Process Codi SNS, Web based BPMN Modeler and the Cloud
IDE of OCE garuda – 2011
8. Metaworks4: Inherits concept of Metaworks 1 ~ 3. Get off from the inherent
MVV VueJS for front-end, Spring Hateoas and JPA for back-end.
Metaworks
So Metaworks3…
1. Is A POJO framework
2. Encourages the Domain-Driven Design
3. Especially for developing model-driven applications
Metaworks for early prototyping
• Metaworks generates Dynamic Web Applications on the fly from
your domain class model with minimal technical details.
• By reading the metadata declared by class model itself and the
additional annotations.
• Metaworks doesn’t generate any source codes so doesn’t requires
any round-trip job for source codes while MDA need such a job.
Metadata
Domain Model
Classes
User Interaction
Validation
Database Manipulation
Dynamic Web UIs
Swing Native UIs
Mobile Native UIs*
Metaworks for Multi-tenancy
Common Metadata
Domain Model
Classes
Class model for tenant1
ORM for tenant1
Common class model
Metadata of
Tenant1
Metadata of
Tenant2
Metadata of
Tenant3
Class model for tenant2
ORM for tenant2
Class model for tenant3
ORM for tenant3
Override by tenantID
Development Process
1. (Optional) UML을 이용한 설계
2. 도메인 자바 코드의 생성
3. 타 POJO Framework의 적용 - JPA를 통한 ORM 생성, JAX-RS를 통한 서비
스 공개
4. Metaworks3 Framework의 적용을 통한 Default Application 의 생성
5. UI 구체화 / 커스터마이징
6. 1~5 반복
Why JPA?
• The (almost-final) Java Standard
• Why not iBatis or hibernate ?
– JPA is a POJO Framework while the others not.
– Also Hibernate engine supports JPA as a interface.
• Why POJO framework is goooooood?
– To focus on the domain-driven design
– To yield the sophisticated Java class system to solve your Doman-
Specific problem.
– A POJO frameworks would not limits your domain models, they only
gives an ‘advice’ through @Annotation or Aspect-oriented manner.
– So, you can introduce one or more frameworks without changing the
domain classes.
100
Basic JPA annotations
• @Entity identifies this class is a ORM Class.
• @Id means this field is a primary key.
• @JoinColumn means a foreign value referenced by a foreign key.
• @OneToMany means this field is an accessor of related entity in
‘One-to-many’ relationship.
101
Key Generation Strategy
102
• Native/AUTO:
• SEQUENCE:
Data Insertion Test
103
public static void main(String[] args) throws PersistentException {
PersistentTransaction t = autoinsurance.AutoinsurancePersistentManager.instance().getSession().beginTransaction();
try{
Customer customer = new Customer();
customer.setCustomer_ID(“1”);
customer.setCustomer_first_name(“Jane Doe”);
customer.setVehicle(new ArrayList());
customer.getVehicle().add(new Vehicle());
autoinsurance.AutoinsurancePersistentManager.instance().getSession().save(customer);
t.commit();
}
catch (Exception e) {
t.rollback();
throw e;
}
Creating UIs
• Developing UI Applications is very complex and costly:
– Native UI: Swing
– Web UI: JSP, Struts
– N-Screen UI: AJAX / html5 / CSS
• Development Lifecycle is getting shorter and shorter:
– Lean Startup
– Early Prototyping
• So, we need something agile development approach such as:
– Model-Driven Development
– Application Frameworks
– SOA and Process Orchestration Architecture
104
History of OO Frameworks and
Methodologies
1. Smalltalk
2. STL (Standard Template Language) of C++
3. Adaptive Object Models – Ralf Johnson
4. Design Patterns – Gang of four
5. Object-Oriented Frameworks
6. OMG Reflection
7. Java – 1995
8. IBM’s San francisco Framework
9. Java 2 Enterprise Edition – EJB 2.1
10.EJB Patterns
• Bigger and Complex Super Classes
• Java doesn’t Support Multiple Inheritance
Domain Specific Application Frameworks
Example of Business Domain Specific Application Frameworks :
1. Car Simulation
2. Product Simulation
3. Or your Problem itself!!
à abstracts business problems
Example of System Domain Specific Application Frameworks :
1. EJB
2. Struts
3. Swing
4. Apache Mesos
à abstracts technical problems
But We Can’t Inherit Two Super Classes at the same
time!!!
Merging two
or more
frameworks??
Return to the “Pure Java”
- Aspect Oriented
Programming
- Java Annotation
- JPA
- JAX-RS
- EJB 3.1
EJB 2.1 vs EJB 3.1
출처: http://www-
01.ibm.com/support/knowledgecenter/SS8PJ7_9.1.0/com.ibm.javaee.doc/topics/
Domain-Driven Design
1. Using ‘Ubiquitous Language’ so that the domain expert and developer
can communicate
Anatomy of SaaS Platform:
Spring Data + Hateoas Framework
110
Microservices with Spring Boot + Spring Data
Using Spring Boot and Spring Data
to quick develop HATEOAS microse
rvices
Bernardo Silva
Terminology
• What is CRUD?
• What is REST?
• What is Spring?
• What is HATEOAS?
• What is Microservice?
• So… hands on!
What is CRUD?
• “In computer programming, create, read, update and delete (as a
n acronym CRUD or possibly a Backronym) (Sometimes called SC
RUD with an S for Search) are the four basic functions of persist
ent storage.”
Ø http://en.wikipedia.org/wiki/Create,_read,_update_and_delete
What is REST?
• “Representational state transfer (REST) is an abstraction of the ar
chitecture of the World Wide Web; more precisely, REST is an arch
itectural style consisting of a coordinated set of architectural const
raints applied to components, connectors, and data elements, wit
hin a distributed hypermedia system.”
• http://en.wikipedia.org/wiki/REST
Basic CRUD with REST
Operation HTTP / REST
Create PUT / POST
Read (Retrieve) GET
Update (Modify) PUT / PATCH
Delete (Destroy) DELETE
What is Spring?
• “The Spring Framework is an open source application framework a
nd inversion of control container for the Java platform.”
Ø http://en.wikipedia.org/wiki/Spring_Framework
§ Inversion of control container / dependency injection
§ Enrichment and proxying
Inversion of control container / dependenc
y injection:
class A {
B b = new Bimpl();
}
interface B {
(…)
}
class Bimpl implements B {
(…)
}
@Component
class A {
@Autowired
B b;
}
interface B {
(…)
}
@Component
class Bimpl implements B {
(…)
}
Spring
Enrichment and proxying:
@Component
class A {
@Autowired
B b;
}
interface B {
(…)
}
@Component
class Bimpl implements B {
(…)
}
Spring
ProxyImplements
Delegates
Using AOP for Metering / Billing – 1
@Metered(project.start)
public void executeProcess(String instanceId) throws Exception{
ProcessInstance instance = getInstance(instanceId);
instance.execute();
}
Using AOP for Metering / Billing – 2
@Aspect
public class MeteringAdvice {
@Before(@annotation(metered))
public void checkAvailable(Metered metered) throws
NoServiceAvailableException {
…..
//Check if the service is available for the requested
tenant
}
@AfterReturning(@annotation(metered))
public void meter(Metered metered) throws Exception {
….
//Add usage log
}
}
Essencia – Build  Deploy Automation
Essencia  On-­Premise
Essencia  On  Amazon
Essencia  On  Bluemix
Overrides:
1. applicationContex.xml   (to  use  AmazonS3Storage)
2. Uengine.properties (to  change  DB  connection  info)
Overrides:
1. applicationContex.xml   (to  use  services)
2.  pom.xml  (Cf push  command)
What is HATEOAS?
• “HATEOAS, an abbreviation for Hypermedia as the Engine of Appli
cation State, is a constraint of the REST application architecture th
at distinguishes it from most other network application architectur
es.”
Ø http://en.wikipedia.org/wiki/HATEOAS
HATEOAS samples
person xmlns:atom=http://www.w3.org/2005/Atom
firstnameDave/firstname
lastnameMatthews/lastname
links
atom:link rel=self href=http://myhost/people/1 /
/links
/person
XML
{ firstname : Dave,
lastname : Matthews,
links : [ { rel : self, href : http://myhost/people/1 } ] }
JSON
What is Microservice?
• “The term Microservice Architecture has sprung up over the last
few years to describe a particular way of designing software applic
ations as suites of independently deployable services.”
Ø http://martinfowler.com/articles/microservices.html
Microservices Reference
• The “ID” on a HATEOAS system is mainly an URI
– Example: If you create a “teacher”, his “id” will be “http://localhost:80
80/teacher/1” instead of just “1”.
• Then, each Microservice can reference other services entities.
So… hands on!
1) Using Gradle, you create a simple Spring Boot
project:
Ø http://projects.spring.io/spring-boot/
2) You create a basic Spring Boot main class (it c
an be converted to a WAR later).
3) Then you boot doing:
Ø gradle bootRun
build.gradle
• Buildscript dependencies:
Ø classpath(org.springframework.boot:spring-boot-gradle-plugin:1.1.5
.RELEASE”)
• Body:
Ø apply plugin: 'spring-boot’
• Dependencies:
Ø compile(org.springframework.boot:spring-boot-
starter-web”)
Application.java
• Annotations:
Ø @Configuration
Ø @ComponentScan
Ø @EnableAutoConfiguration
§ Main method (unnecessary for WAR):
Ø SpringApplication.run(Application.class, args);
Magic!
Adding Hibernate (ORM)
• build.gradle (dependencies):
Ø compile(org.springframework.boot:spring-boot-st
arter-data-jpa”)
Ø compile(com.h2database:h2:1.3.176)
Ø compile(org.projectlombok:lombok:1.14.4)
Just to make
Entities more
dumb
Adding Spring Data REST
• build.gradle (dependencies):
Ø compile(org.springframework.data:spring-data-r
est-webmvc)
• Application.java:
Ø @Import(RepositoryRestMvcConfiguration.class)
SUPER
Magic!
Teacher and Student DDL
TEACHER
ID
NAME
SUBJECT
STUDENT
ID
NAME
AGE
STUDENT_TEACHERS
STUDENT_ID
TEACHER_ID
Adding “Teacher” entity
@Data
@Entity
@EqualsAndHashCode(exclude={students})
public class Teacher {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private String subject;
@ManyToMany
@JoinTable(name = STUDENT_TEACHERS,
joinColumns = { @JoinColumn(name = TEACHER_ID)},
inverseJoinColumns = { @JoinColumn(name = STUDENT_ID)})
private SetStudent students;
}
Adding “Student” entity
@Data
@Entity
@EqualsAndHashCode(exclude={teachers})
public class Student {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String name;
private Integer age;
@ManyToMany
@JoinTable(name = STUDENT_TEACHERS,
joinColumns = { @JoinColumn(name = STUDENT_ID)},
inverseJoinColumns = { @JoinColumn(name = TEACHER_ID)})
private SetTeacher teachers;
}
Adding REST repositories
@RepositoryRestResource(
collectionResourceRel = student, path = student)
public interface StudentRepository extends
PagingAndSortingRepositoryStudent, Long {
}
@RepositoryRestResource(
collectionResourceRel = teacher, path = teacher)
public interface TeacherRepository extends
PagingAndSortingRepositoryTeacher, Long {
}
TeacherRepository.java
StudentRepository.java
Run and be amazed!
• Try to get the root service description:
Ø GET: http://localhost:8080/
• Try to create two students, two teachers and associate them!
Ø POST: http://localhost:8080/student
• Use “PATCH” with “text/uri-list” to link entities
• Get JSON Schema of the entity:
Ø GET: http://localhost:8080/student/schema
Ø Accept: application/schema+json
Examples:
• POST: http://localhost:8080/student
Ø { name: John, age: 18 }
Ø { name: Jorge, age: 19 }
• POST: http://localhost:8080/teacher
Ø { name: James, subject: Math }
Ø { name: Bob, subject: Biology }
• PUT/PATCH: http://localhost:8080/student/1/teachers
Ø Content-Type: text/uri-list
http://localhost:8080/teacher/1
http://localhost:8080/teacher/2
• GET: http://localhost:8080/teacher/1/students
Anatomy of SaaS Platform:
Vue JS + VueMaterial
137
W3C Web Components
Custom elements
HTML imports
Template
Shadow DOM
So
Why AngularJS、React、Vue.js、Ember、Pol
ymer、Riot...etc
Polyfill
Why vue.js
Angular and React is not STANDARD
Polymer is heavy and needs Polyfill
Vue.js is
1. Fastest (compared with React and Angular)
2. Light (low dependencies)
3. Usable with jQuery or existing .js libraries,
Features of Vue.js
• Reactive data binding (Spreadsheet-like)
• Composable view components (Tag-based)
MVVM
Tag based Components
Hello World!
http://vuejs.org.cn/#example
Data binding
div id=demo
p{{message}}/p
input v-model=message
/div
a v-bind:href=url/a
v-model
spanMessage is: {{ message }}/span
br
input type=text v-model=message placeholder=edit me
v-if:conditional element
v-else
h1 v-if=okYes/h1
h1 v-elseNo/h1
v-for
ul id=example-1
li v-for=item in items
{{ item.message }}
/li
/ul
var example1 = new Vue({
el: '#example-1',
data: {
items: [
{ message: 'Foo' },
{ message: 'Bar' }
]
}
})
v-on
div id=example
button v-on:click=greetGreet/button
/div
var vm = new Vue({
el: '#example',
data: {
name: 'Vue.js'
},
// 在 `methods` 对象中定义方法
methods: {
greet: function (event) {
// 方法内 `this` 指向 vm
alert('Hello ' + this.name + '!')
// `event` 是原生 DOM 事件
alert(event.target.tagName)
}
}
})
// 也可以在 JavaScript 代码中调用方法
vm.greet() // - 'Hello Vue.js!'
• init
• created
• beforeCompile
• compiled
• ready
• attached
• detached
• beforeDestroy
• destroyed
Life cycle
User defined Component
(Your own HTML Tag)
Vue.component('child', {
// public attributes, properties
props: ['msg'],
template: 'span{{ msg }}/span’
data: function(){// private attributes, properties
return {a:’aaa’, b:’bbb’}
},
// behaviors
methods:{
}
})
child msg=hello!/child
One File Component - .vue
template
div class=hello
h1{{ msg }}/h1
/div
/template
script
module.exports = {
data: function () {
return {
msg: 'Hello World!'
}
}
}
/script
style scoped
h1 {
color: #42b983;
}
/style
Metaworks4 components
object-form
Metaworks4 components
reference-picker
Metaworks4 components
object-grid
Metaworks4 components
iam-login
Metaworks4 components
iam-menu
Metaworks4 components
self-service-portal
Metaworks4 components
self-service-mashup
Development Process:
Analysis  Modeling Domain Classes with
UML Tool (DDD Approach)
160
IntelliJ and VP integration
161
1. In Visual Paradigm, select Windows 
Integration  IDE Integration... from
the toolbar. (for some version, Tools 
IDE Integration)
2. Select IntelliJ IDEA. You can run Visual
Paradigm in multiple IDEs. In other
words, if you need you can select
multiple IDEs here. Click Next.
3. Specify the folder path of IntelliJ IDEA.
Click Next to start copying files to
your IDE.
(Currently VP supports only IntelliJ 12 or
under)
IntelliJ and VP integration
162
Using Visual Paradigm In IntellJ
2. Opening a VP in
IntellJ
163
3. Import existing
model
1. Open the created
maven project
Importing Existing Model
164
• File  Visual Paradigm EE Import  UML Model
• Choose the existing .vpp file
Entity-Relationship Diagram
165
Generate ERD and Entity Classes (ORM)
• Open the Class Diagram in the
Project Explorer  Diagram Navigator
 ClassDiagram
• Set the type of attributes
– String for most types
– boolean for gender
– int for options
– double for money
– java.util.Date for Dates, timestamp
• Modeling  ORM  Generate Code
• Database Code Generation Options:
– Framework: JPA
– Persistence API: POJO
• Be careful:
– All attributes must have its type
– All classes should be belong to any
package
166
Generated Files
167
Create a Class Diagram and Generate Java
Code in IntelliJ-VP integration
168
Navigating between Model and Code
Jumping from diagram to Code:
Right-click on the class  Select in
Code
169
Jumping from Code to Diagram:
Right-click on the source file 
Visual Paradigm EE  Select in
Diagram
Automatic Code Synchronization
• Modeling  Enable Auto Synchronization
170
EXERCISE : CREATING ORM AND
DATABASE CONNECTION
171
Create a new class diagram
172
1:0..* Multiplicity
173
All classes must be ORMPersistable
174
All relations must be Persistable
175
Then, they can be converted to ERD
176
177
If there is no ID field (primary key), VP will
generate them automatically
178
Generated ERD
179
Generating ORM Code
180
Settings: JPA and POJO
181
Generated JPA model code
182
Generated Sample CRUD Code
183
Generated SQL (DDL) Code
184
Generated Entity Classes (JPA)
• All Entity Codes are POJO Classes that are described with Java Annotations meaning
entity field descriptions and relationships.
185
@Entity
@Table(name=Customer)
@Inheritance(strategy=InheritanceType.SINGLE_TABLE)
@DiscriminatorColumn(name=Discriminator, discriminatorType=DiscriminatorType.STRING)
@DiscriminatorValue(Customer)
public class Customer implements Serializable {
public Customer() {}
@Column(name=ID, nullable=false)
@Id
@GeneratedValue(generator=AUTOINSURANCE_CUSTOMER_CUSTOMER_ID_GENERATOR)
@org.hibernate.annotations.GenericGenerator(name=AUTOINSURANCE_CUSTOMER_CUSTOMER_ID_GENERATOR, strategy=native)
private String customer_ID;
@Column(name=Customer_social_security_number, nullable=true, length=255)
private String customer_social_security_number;
@Column(name=Customer_first_name, nullable=true, length=255)
private String customer_first_name;
@Column(name=Customer_middle_initial, nullable=true, length=255)
private String customer_middle_initial;
@Column(name=Customer_last_name, nullable=true, length=255)
private String customer_last_name;
@OneToMany(mappedBy=owns, targetEntity=autoinsurance.Vehicle.class)
@org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK})
@org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE)
private java.util.Set vehicles = new java.util.HashSet();
}
Day-2: Make the Application As A Service
186
Introduction to REST
REST stands for Representational State Transfer
• It is an architectural pattern for developing w
eb services as opposed to a specification.
• REST web services communicate over the HT
TP specification, using HTTP vocabulary:
– Methods (GET, POST, etc.)
– HTTP URI syntax (paths, parameters, etc.)
– Media types (xml, json, html, plain text, etc)
– HTTP Response codes.
HTTP-REST Vocabulary
HTTP Methods supported by REST:
• GET – Requests a resource at the request URL
– Should not contain a request body, as it will be discarded.
– May be cached locally or on the server.
– May produce a resource, but should not modify on it.
• POST – Submits information to the service for processing
– Should typically return the new or modified resource.
• PUT – Add a new resource at the request URL
• DELETE – Removes the resource at the request URL
• OPTIONS – Indicates which methods are supported
• HEAD – Returns meta information about the request URL
HTTP-REST Vocabulary
A typical HTTP REST URL:
• The protocol identifies the transport scheme that will be used t
o process and respond to the request.
• The host name identifies the server address of the resource.
• The path and query string can be used to identify and customi
ze the accessed resource.
http://my.store.com/fruits/list?category=fruitlimit=20
protocol host name path to a resource query string
JAX-RS Basics
An example REST service class:
• At least one method must be annotated with an HTTP verb (e.g. @GET)
• The @Controller annotation makes the class discoverable by Spring
package org.lds.tech.training.lab.ws;
import javax.ws.rs.GET;
import org.springframework.stereotype.Controller;
@Controller
public class HelloWebServiceRest {
@GET
public String sayHello() {
return Hello, World!;
}
}
JAX-RS Basics
Example Spring configuration:
• Example location: WEB-INF/example-servlet.xml
• A reference to the JAX-RS annotated service bean is pass
ed to the Stack RS “produce” namespace handler.
• Multiple service beans may be supplied under the Stack R
S “interfaces” element.
• Each bean will be scanned by CXF for annotated resource
s that can be served up RESTfully.
stack-rs:produce
stack-rs:interfaces
ref bean=helloWebServiceRest/
/stack-rs:interfaces
/stack-rs:produce
JAX-RS Basics
An example WADL descriptor:
application xmlns=http://wadl.dev.java.net/2009/02
xmlns:xs=http://www.w3.org/2001/XMLSchema
resources
base=http://localhost:8080/example/Services/rest
resource path=/
method name=GET
response
representation mediaType=application/octet-stream
param name=result style=plain type=xs:string/
/representation
/response
/method
/resource
/resources
/application
JAX-RS Method Annotations
JAX-RS HTTP Method Annotations:
@GET @POST
@PUT @DELETE
@OPTIONS @HEAD
• Applied to a Java method to bind it to an HTTP meth
od.
• Only one HTTP annotation may be applied to a singl
e Java method.
• Multiple Java methods may be given the same HTTP
method annotation, assuming they are bound to diff
erent paths.
JAX-RS @Path Annotation
• @Path annotations may be supplied to customize the reques
t URI of resource.
• @Path on a class defines the base relative path for all resou
rces supplied by that class.
• @Path on a Java class method defines the relative path for t
he resource bound to that method.
• @Path on a method is relative to any @Path on the class.
• In the absence of @Path on the class or method, the resour
ce is defined to reside at the root of the service.
• A leading forward slash (/) is unecessary as the path is alwa
ys relative.
JAX-RS Annotations: Examples
@Path(example)
public class ExampleWebServiceRest {
@GET
public Item getItem(@QueryParam(itemId) Long id) {
// @QueryParam example
}
@POST
public Response editItem(@FormParam(itemId) Long id,
@FormParam(value) String value) {
// @FormParam example
}
@GET
@Path({category}/{subcategory:[^/]*})
public ListItem getItems(
@PathParam(category) String category) {
@PathParam(subcategory) String subcategory) {
// @Path and @PathParam example
}
}
JAX-RS Annotations
Examples of @Produces and @Consumes:
• The client submits JSON or XML content with the “C
ontent-Type” header.
• The client requests either JSON or XML content thro
ugh use of the HTTP “Accept” request header.
@Path(example)
public class ExampleRestService {
@POST
@Path(items)
@Produces({application/json, application/xml})
@Consumes({application/json, application/xml})
public ListItem editItems(ListItem items) {
// Does something and returns the modified list
}
}
Operations behind the scene
• JSON(XML) serialization / deserialization
• Networking between Requester and Provider
• Dynamic method invocation
197
Service Orchestration with BPM
• uEngine BPMS is an open source software supporting BPMN 2.0
• Pools for service definition
• Using data mapper, detailed message inter-change between pools
can be done
198
Export BPMN xml file from VP
• Exporting BPMN 2.0 xml
• File  Visual Paradigm Export  BPMN 2.0
199
Importing BPMN xml to Activiti BPM
• Activiti BPM is an another open source BPMS supporting BPMN 2.0
• Processes  Model workspace  Import
• Select the BPMN xml file
200
Service Oriented Architecture Applied
201
SOA Maturity Levels
202
Day-3: Cloud Deployment
203
Overview
204
Requirement of Cloud
Service Deployment
Cloud Deployment
using IaaS
Cloud Deployment
using PaaS
Design factors on developing cloud
applications
1. Don't code your application directly to a specific topology
2. Do not assume the local file system is permanent
3. Don't keep session state in your application
4. Don't log to the file system
5. Don't assume any specific infrastructure dependency
6. Don't use infrastructure APIs from within your application
7. Don't use obscure protocols
8. Don't rely on OS-specific features
9. Don't manually install your application
205
Your
Future
Apps
PaaS
“Instance-on” Middleware and Platform Services
A PaaS provides development services on cloud.
CLOUD IDE
PaaS가 해주길 기대하는 것들
* 출처: IBM
PaaS의 유형들
• Application PaaS: OSS서비스에 집중
e.g. 클라우드 파운드리, 오픈시프트
• Business PaaS: BSS on OSS (OSS+BSS)
e.g. 포스닷컴, IBM SmartCloud, GAE, OCE
• Monetization PaaS: BSS + 소비자분석
e.g. Zuora, Aria Systems

Contenu connexe

Tendances

microservice architecture public education v2
microservice architecture public education v2microservice architecture public education v2
microservice architecture public education v2uEngine Solutions
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises Kasun Indrasiri
 
Soa Driven Project Management
Soa Driven Project ManagementSoa Driven Project Management
Soa Driven Project ManagementTerry Cho
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Chris Richardson
 
Microservices with .Net - NDC Sydney, 2016
Microservices with .Net - NDC Sydney, 2016Microservices with .Net - NDC Sydney, 2016
Microservices with .Net - NDC Sydney, 2016Richard Banks
 
Enterprise Soa Concept
Enterprise Soa ConceptEnterprise Soa Concept
Enterprise Soa ConceptTerry Cho
 
Soa Overview
Soa OverviewSoa Overview
Soa OverviewTerry Cho
 
Microservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration finalMicroservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration finalBizTalk360
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Binary Studio
 
Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices WSO2
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...Javier García Magna
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveBizTalk360
 
Node and Micro-Services at IBM
Node and Micro-Services at IBMNode and Micro-Services at IBM
Node and Micro-Services at IBMDejan Glozic
 
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices Apigee | Google Cloud
 
Microservices architecture examples
Microservices architecture examplesMicroservices architecture examples
Microservices architecture examplesChanny Yun
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .NetRichard Banks
 
Agile Development From A Developers Perspective
Agile Development From A Developers PerspectiveAgile Development From A Developers Perspective
Agile Development From A Developers PerspectiveRichard Banks
 
Integration Microservices
Integration MicroservicesIntegration Microservices
Integration MicroservicesKasun Indrasiri
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practiceaegloff
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architectureChris Richardson
 

Tendances (20)

microservice architecture public education v2
microservice architecture public education v2microservice architecture public education v2
microservice architecture public education v2
 
Microservices for Enterprises
Microservices for Enterprises Microservices for Enterprises
Microservices for Enterprises
 
Soa Driven Project Management
Soa Driven Project ManagementSoa Driven Project Management
Soa Driven Project Management
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
Microservices with .Net - NDC Sydney, 2016
Microservices with .Net - NDC Sydney, 2016Microservices with .Net - NDC Sydney, 2016
Microservices with .Net - NDC Sydney, 2016
 
Enterprise Soa Concept
Enterprise Soa ConceptEnterprise Soa Concept
Enterprise Soa Concept
 
Soa Overview
Soa OverviewSoa Overview
Soa Overview
 
Microservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration finalMicroservices and the Cloud based future of integration final
Microservices and the Cloud based future of integration final
 
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
Building Microservices with .NET (speaker Anton Vasilenko, Binary Studio)
 
Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices Merging micrservices architecture with SOA Practices
Merging micrservices architecture with SOA Practices
 
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20....Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
.Net Microservices with Event Sourcing, CQRS, Docker and... Windows Server 20...
 
Integration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep DiveIntegration Monday - BizTalk Migrator Deep Dive
Integration Monday - BizTalk Migrator Deep Dive
 
Node and Micro-Services at IBM
Node and Micro-Services at IBMNode and Micro-Services at IBM
Node and Micro-Services at IBM
 
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices
I Love APIs 2015: Building Predictive Apps with Lamda and MicroServices
 
Microservices architecture examples
Microservices architecture examplesMicroservices architecture examples
Microservices architecture examples
 
Architecting Microservices in .Net
Architecting Microservices in .NetArchitecting Microservices in .Net
Architecting Microservices in .Net
 
Agile Development From A Developers Perspective
Agile Development From A Developers PerspectiveAgile Development From A Developers Perspective
Agile Development From A Developers Perspective
 
Integration Microservices
Integration MicroservicesIntegration Microservices
Integration Microservices
 
TS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in PracticeTS 4839 - Enterprise Integration Patterns in Practice
TS 4839 - Enterprise Integration Patterns in Practice
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 

Similaire à Building multi tenancy enterprise applications

Razorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin Jacobs
Razorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin JacobsRazorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin Jacobs
Razorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin JacobsRazorfish
 
Devops transformation in the Rational Collaborative Lifecycle Organization
Devops transformation in the Rational Collaborative Lifecycle OrganizationDevops transformation in the Rational Collaborative Lifecycle Organization
Devops transformation in the Rational Collaborative Lifecycle OrganizationRobbie Minshall
 
It summit 2014_migrating_applications_to_the_cloud-5
It summit 2014_migrating_applications_to_the_cloud-5It summit 2014_migrating_applications_to_the_cloud-5
It summit 2014_migrating_applications_to_the_cloud-5margaret_ronald
 
Webinar: How and Why to Containerize Your Legacy Applications
Webinar: How and Why to Containerize Your Legacy ApplicationsWebinar: How and Why to Containerize Your Legacy Applications
Webinar: How and Why to Containerize Your Legacy ApplicationsStorage Switzerland
 
IBM Collaborative Lifecycle Management Solution for DevOps v6
IBM Collaborative Lifecycle Management Solution for DevOps v6IBM Collaborative Lifecycle Management Solution for DevOps v6
IBM Collaborative Lifecycle Management Solution for DevOps v6Strongback Consulting
 
Leveraging Hybid IT for More Robust Business Services
Leveraging Hybid IT for More Robust Business ServicesLeveraging Hybid IT for More Robust Business Services
Leveraging Hybid IT for More Robust Business ServicesAmazon Web Services
 
Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...Qian Li Jin
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Apigee | Google Cloud
 
How to Balance System Speed and Risk for Multi-Platform Innovation
How to Balance System Speed and Risk for Multi-Platform InnovationHow to Balance System Speed and Risk for Multi-Platform Innovation
How to Balance System Speed and Risk for Multi-Platform InnovationClaudia Ring
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa introSonic leigh
 
Microservices: Architecting for Innovation - Level 300
Microservices: Architecting for Innovation - Level 300Microservices: Architecting for Innovation - Level 300
Microservices: Architecting for Innovation - Level 300Amazon Web Services
 
5 Years Of Building SaaS On AWS
5 Years Of Building SaaS On AWS5 Years Of Building SaaS On AWS
5 Years Of Building SaaS On AWSChristian Beedgen
 
Practical soa for business and researchers
Practical soa for business and researchersPractical soa for business and researchers
Practical soa for business and researchersMustafa Gamal
 
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015Christophe Lucas
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesJim (张建军) Zhang
 
Cloud-native Application Lifecycle Management
Cloud-native Application Lifecycle ManagementCloud-native Application Lifecycle Management
Cloud-native Application Lifecycle ManagementNeil Gehani
 
Implementing dev ops to face a two speed it architecture
Implementing dev ops to face a two speed it architectureImplementing dev ops to face a two speed it architecture
Implementing dev ops to face a two speed it architectureDavide Veronese
 
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)Amazon Web Services
 
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...Amazon Web Services
 

Similaire à Building multi tenancy enterprise applications (20)

Razorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin Jacobs
Razorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin JacobsRazorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin Jacobs
Razorfish 2014 Tech Summit - Group VP Technology at Razorfish Martin Jacobs
 
Rushcode overview
Rushcode overviewRushcode overview
Rushcode overview
 
Devops transformation in the Rational Collaborative Lifecycle Organization
Devops transformation in the Rational Collaborative Lifecycle OrganizationDevops transformation in the Rational Collaborative Lifecycle Organization
Devops transformation in the Rational Collaborative Lifecycle Organization
 
It summit 2014_migrating_applications_to_the_cloud-5
It summit 2014_migrating_applications_to_the_cloud-5It summit 2014_migrating_applications_to_the_cloud-5
It summit 2014_migrating_applications_to_the_cloud-5
 
Webinar: How and Why to Containerize Your Legacy Applications
Webinar: How and Why to Containerize Your Legacy ApplicationsWebinar: How and Why to Containerize Your Legacy Applications
Webinar: How and Why to Containerize Your Legacy Applications
 
IBM Collaborative Lifecycle Management Solution for DevOps v6
IBM Collaborative Lifecycle Management Solution for DevOps v6IBM Collaborative Lifecycle Management Solution for DevOps v6
IBM Collaborative Lifecycle Management Solution for DevOps v6
 
Leveraging Hybid IT for More Robust Business Services
Leveraging Hybid IT for More Robust Business ServicesLeveraging Hybid IT for More Robust Business Services
Leveraging Hybid IT for More Robust Business Services
 
Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...Enable business continuity and high availability through active active techno...
Enable business continuity and high availability through active active techno...
 
Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?Which Application Modernization Pattern Is Right For You?
Which Application Modernization Pattern Is Right For You?
 
How to Balance System Speed and Risk for Multi-Platform Innovation
How to Balance System Speed and Risk for Multi-Platform InnovationHow to Balance System Speed and Risk for Multi-Platform Innovation
How to Balance System Speed and Risk for Multi-Platform Innovation
 
170215 msa intro
170215 msa intro170215 msa intro
170215 msa intro
 
Microservices: Architecting for Innovation - Level 300
Microservices: Architecting for Innovation - Level 300Microservices: Architecting for Innovation - Level 300
Microservices: Architecting for Innovation - Level 300
 
5 Years Of Building SaaS On AWS
5 Years Of Building SaaS On AWS5 Years Of Building SaaS On AWS
5 Years Of Building SaaS On AWS
 
Practical soa for business and researchers
Practical soa for business and researchersPractical soa for business and researchers
Practical soa for business and researchers
 
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
Perth DevOps Meetup - Introducing the IBM Innovation Lab - 12112015
 
Best Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with MicroservicesBest Practices Building Cloud Scale Apps with Microservices
Best Practices Building Cloud Scale Apps with Microservices
 
Cloud-native Application Lifecycle Management
Cloud-native Application Lifecycle ManagementCloud-native Application Lifecycle Management
Cloud-native Application Lifecycle Management
 
Implementing dev ops to face a two speed it architecture
Implementing dev ops to face a two speed it architectureImplementing dev ops to face a two speed it architecture
Implementing dev ops to face a two speed it architecture
 
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
AWS re:Invent 2016: Getting Started with Serverless Architectures (CMP211)
 
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
AWS Public Sector Symposium 2014 Canberra | Putting the "Crowd" to work in th...
 

Plus de uEngine Solutions

이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기
이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기
이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기uEngine Solutions
 
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture LearninguEngine Solutions
 
Event storming based msa training commerce example add_handson_v3
Event storming based msa training commerce example add_handson_v3Event storming based msa training commerce example add_handson_v3
Event storming based msa training commerce example add_handson_v3uEngine Solutions
 
Event storming based msa training commerce example v2
Event storming based msa training commerce example v2Event storming based msa training commerce example v2
Event storming based msa training commerce example v2uEngine Solutions
 
Event storming based msa training commerce example
Event storming based msa training commerce exampleEvent storming based msa training commerce example
Event storming based msa training commerce exampleuEngine Solutions
 
Event Storming and Implementation Workshop
Event Storming and Implementation WorkshopEvent Storming and Implementation Workshop
Event Storming and Implementation WorkshopuEngine Solutions
 
designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...uEngine Solutions
 
Safe cloud native transformation approaches
Safe cloud native transformation approachesSafe cloud native transformation approaches
Safe cloud native transformation approachesuEngine Solutions
 
From event storming to spring cloud implementation
From event storming to spring cloud implementationFrom event storming to spring cloud implementation
From event storming to spring cloud implementationuEngine Solutions
 
유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)
유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)
유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)uEngine Solutions
 
Distributed transanction in microservices
Distributed transanction in microservicesDistributed transanction in microservices
Distributed transanction in microservicesuEngine Solutions
 
From event storming to spring cloud implementation
From event storming to spring cloud implementationFrom event storming to spring cloud implementation
From event storming to spring cloud implementationuEngine Solutions
 
Open Cloud Engine PaaS Snapshots
Open Cloud Engine PaaS SnapshotsOpen Cloud Engine PaaS Snapshots
Open Cloud Engine PaaS SnapshotsuEngine Solutions
 
Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos uEngine Solutions
 
Process Oriented Architecture
Process Oriented ArchitectureProcess Oriented Architecture
Process Oriented ArchitectureuEngine Solutions
 
아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 alm
아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 alm아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 alm
아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 almuEngine Solutions
 
객체지향프로그래밍 특강
객체지향프로그래밍 특강객체지향프로그래밍 특강
객체지향프로그래밍 특강uEngine Solutions
 
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석uEngine Solutions
 

Plus de uEngine Solutions (20)

이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기
이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기
이벤트스토밍과 BDD 를 혼합하여 소프트웨어 디자인과 테스트 자동화하기
 
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
비대면 MSA / CNA 강의 - Contactless Microservices Architecture Learning
 
Event storming based msa training commerce example add_handson_v3
Event storming based msa training commerce example add_handson_v3Event storming based msa training commerce example add_handson_v3
Event storming based msa training commerce example add_handson_v3
 
Event storming based msa training commerce example v2
Event storming based msa training commerce example v2Event storming based msa training commerce example v2
Event storming based msa training commerce example v2
 
Event storming based msa training commerce example
Event storming based msa training commerce exampleEvent storming based msa training commerce example
Event storming based msa training commerce example
 
Event Storming and Implementation Workshop
Event Storming and Implementation WorkshopEvent Storming and Implementation Workshop
Event Storming and Implementation Workshop
 
designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...designing, implementing and delivering microservices with event storming, spr...
designing, implementing and delivering microservices with event storming, spr...
 
Microservice coding guide
Microservice coding guideMicroservice coding guide
Microservice coding guide
 
Safe cloud native transformation approaches
Safe cloud native transformation approachesSafe cloud native transformation approaches
Safe cloud native transformation approaches
 
From event storming to spring cloud implementation
From event storming to spring cloud implementationFrom event storming to spring cloud implementation
From event storming to spring cloud implementation
 
유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)
유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)
유엔진 오픈소스 클라우드 플랫폼 (uEngine Microservice architecture Platform)
 
Distributed transanction in microservices
Distributed transanction in microservicesDistributed transanction in microservices
Distributed transanction in microservices
 
From event storming to spring cloud implementation
From event storming to spring cloud implementationFrom event storming to spring cloud implementation
From event storming to spring cloud implementation
 
Open Cloud Engine PaaS Snapshots
Open Cloud Engine PaaS SnapshotsOpen Cloud Engine PaaS Snapshots
Open Cloud Engine PaaS Snapshots
 
Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos Private PaaS with Docker, spring cloud and mesos
Private PaaS with Docker, spring cloud and mesos
 
Process Oriented Architecture
Process Oriented ArchitectureProcess Oriented Architecture
Process Oriented Architecture
 
아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 alm
아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 alm아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 alm
아키텍트대회 유엔진-장진영-Sw공학표준을 기반한 alm
 
Essencia 2017
Essencia 2017Essencia 2017
Essencia 2017
 
객체지향프로그래밍 특강
객체지향프로그래밍 특강객체지향프로그래밍 특강
객체지향프로그래밍 특강
 
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석Open source apm scouter를 통한 관제  관리 jadecross 정환열 수석
Open source apm scouter를 통한 관제 관리 jadecross 정환열 수석
 

Dernier

SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfAlina Yurenko
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...Technogeeks
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtimeandrehoraa
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationBradBedford3
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWave PLM
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineeringssuserb3a23b
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commercemanigoyal112
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Angel Borroy López
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxTier1 app
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024StefanoLambiase
 

Dernier (20)

Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdfGOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
GOING AOT WITH GRAALVM – DEVOXX GREECE.pdf
 
What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...What is Advanced Excel and what are some best practices for designing and cre...
What is Advanced Excel and what are some best practices for designing and cre...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
SpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at RuntimeSpotFlow: Tracking Method Calls and States at Runtime
SpotFlow: Tracking Method Calls and States at Runtime
 
How to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion ApplicationHow to submit a standout Adobe Champion Application
How to submit a standout Adobe Champion Application
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
What is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need ItWhat is Fashion PLM and Why Do You Need It
What is Fashion PLM and Why Do You Need It
 
Software Coding for software engineering
Software Coding for software engineeringSoftware Coding for software engineering
Software Coding for software engineering
 
Cyber security and its impact on E commerce
Cyber security and its impact on E commerceCyber security and its impact on E commerce
Cyber security and its impact on E commerce
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Odoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting ServiceOdoo Development Company in India | Devintelle Consulting Service
Odoo Development Company in India | Devintelle Consulting Service
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
Alfresco TTL#157 - Troubleshooting Made Easy: Deciphering Alfresco mTLS Confi...
 
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptxKnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
KnowAPIs-UnknownPerf-jaxMainz-2024 (1).pptx
 
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
Dealing with Cultural Dispersion — Stefano Lambiase — ICSE-SEIS 2024
 

Building multi tenancy enterprise applications

  • 1. Micro-services Architecture Domain-Driven-Design Multi-tenancy DevOps Building Multi-tenancy Enterprise Applications with DDD Approach Jinyoung Jang OpenCloudEngine.org (jyjang@uengine.org)
  • 3. Enterprise SaaS Application 최근 Economist Intelligence 에 의한 국제 적 조사 (293개 기업 CIO, 조사국가: 미 국 39%, 영국 31%, 호주 30%)에 의하면 5개 기업중 4개는 자신의 고객들이 제화 와 서비스를 제공받는 방식에 어떤 변화 를 원하고 있다고 답했다. 그리고 실제로 반이 넘는 기업들은 가격모델과 제공방 식을 변경하였거나 계획 중이라고 답했 다. 그러한 변화 중 가장 많은 40% 로 대 답한 것은 바로 ‘ 구독형 서비 스 (Subscription Service)’의 도입으로 조사 됐다.
  • 5. 성공적 서비스로의 여정 운영자동화 • Business Continuity • Zero-downtime 수익화 • Subscription Business 구현 • Mashups • Multi-tenancy • Self-Serviced 마이크로 서비스 • Separation of Concerns Successful Ser vice
  • 6. 성공적 서비스로의 여정 운영자동화 • Business Continuity • Zero-downtime 수익화 • Subscription Business 구현 • Mashups • Multi-tenancy • Self-Serviced 마이크로 서비스 • Separation of Concerns
  • 7. Share more, More cheap offering, More C ompetitive in the market ! Share less, More easy & Secure ! Creating Innovative Application Multi-tenancy Support
  • 9. 가입자A의 앱설정 가입자B의 앱설정 * 멀티태넌시 지원 기능은 금번 사업 범위에 비포함 * 향후 현재 R&D문서관리 등은 멀티태넌트 전환이 필요함 2. 도입기관별 입력 항목 변경 3. 도입기관별 판정로직 설정 1. 도입기관 브랜드 설정 Multi-tenancy Support Metadata-based
  • 12. Tenant-­aware! Inject  tenant-­specific  logics,  workflows,  brand Tenant-­specific   Store Multi-tenancy Support SPOSAD Architecture
  • 13. Tenant-specific Customization > Custom Database Schema > S hared Database vs. Shared schema © 2013 uEngineCloud, I nc. Rigid,   shared  table Extension  tabl es Datatype-­specifi c  pivot  tables Private  tables Universal  tabl e  with  XML  d ocument Universal  table Supporting Multi-tenancy 어떤 DB 구조로 설계해야 하나요?
  • 15. Supporting Multi-tenancy NoSQL databases 1. Inherent multi-tenancy - Schema Free 2. High Performance - Horizontally scalable and Memory cache 3. Web optimized – Query results are JSON - data can be parsed by web browser directly and performantly. Additionally - 4. Easy to implement Analytic services (MR) and Full Text Search 5. Event-driven Transaction - don't have to care about CQRS something 6. Some NoSQL products (Couchbase, Cassandra) provides pessimistic locking and ANSI SQL (Join Query) - easily migrate to them.
  • 16. Libraries and tools for Multi-tenancy support • Multi-tenancy Database Frameworks – JPA @Discriminator annotation (Hibernate, EclipseLink) – Athena Framework – Spring Cloud – Corent-technology’s JDBC/ODBC proxy • Metadata framework (SPOSAD) – IBM J9 JVM - @TenantScope annotation – Athena Framework – Adaptive Object Model – OCE multi-tenancy metadata framework
  • 17. 성공적 서비스로의 여정 운영자동화 • Business Continuity • Zero-downtime 수익화 • Subscription Business 구현 • Mashups • Multi-tenancy • Self-Serviced 마이크로 서비스 • Separation of Concerns
  • 18. DevOps: Issues Continuous Delivery 18 Company Deploy Frequency Deploy Lead Time Reliability Customer Responsiveness Amazon 23,000 / day Minutes High High Google 5,500 / day Minutes High High Netflix 500 / day Minutes High High Facebook 1 / day Hours High High Twitter 3 / week Hours High High Typical enterprise Once every 9 months Months or quarters Low / Medium Low / Medium 출처: 도서 The Phoenix Project Amazon,
  • 23. 19 2. 배포 주기 • 매일 마이너 업데이트 • 메이저 업데이트 (매주 화요일 오후) 3. Deployment
  • 24.  Pipeline 출처: http://ieeexplore.ieee.org /xpl/artic leDet ails.jsp?arnumber=6449236 Supporting Continuous Delivery Facebook
  • 25. 20 4. Canary를통해서확신 갖기 • Canary란? 실제production
  • 27.  subset에서새로운코드를 돌려보고 옛날 코드와 비교해서 새로운 코드가어떻게 돌아가는 지 보는 것 • Canary
  • 34.  avg등이옛날 코 드랑 새로운 코드랑 비교해서 어떻게다른 지 확인하는것)은 1000개 이상의metric을 비교해서 100점 만점에 점수를 주고 일정 점수일 경우만배포할 수 있음. 출처: http://techblog.netf lix.com/2013/08/dep loying -netf lix -ap i.ht ml Supporting Continuous Delivery Netflix
  • 35. CPU MEM Disk WAS Storage Service (e.g. S3) Memory Service (e.g. Redis) Micro Service Architecture Existing Enterprise ApplicationHAarchitecture wire network Managing“SPOF (SinglePoint Of Failure)” DevOps Managing Single Point of Failure
  • 37. 출처 :  2010 architecting for the cloud (http://www.slideshare.net/simone.brunozzi/2010-architecting-for-the-cloud-4719195) DevOps: Issues Managing Scalability
  • 39. • IBM Bluemix • Heroku • GE’s Predix • Pivotal Web Services • Cloud Foundry Container Workload Distribution Engine (OSS) PaaS • Warden(Garden) • Docker • Kubernetes • Docker SWARM • Mesos Marathon • Google Compute Engine • Redhat Open Shift • Hypervisor • CF version 1 • Engineyard…. • Amazon Beanstalk DevOps DevOps Platforms
  • 41. DevOps Platform IBM Bluemix – Auto Scaling
  • 42. DevOps Platform IBM Bluemix – Zero Downtime Deploy
  • 43. 성공적 서비스로의 여정 운영자동화 • Business Continuity • Zero-downtime 수익화 • Subscription Business 구현 • Mashups • Multi-tenancy • Self-Serviced 마이크로 서비스 • Separation of Concerns
  • 44. Monolithic Architecture à 모든 서비스가 한번에 재배포 à 한팀의 반영을 위하여 모든 팀이 대기 à 지속적 딜리버리가 어려워
  • 45. Micro Service Architecture Contract based, Polyglot Programming à Separation of Concerns, Parallel Development, Easy Outsourcing Written in Java Written in Node Written in PHP
  • 46. Micro Service Architecture • 변경된 서비스만 재배포 à Side effect 최소화 • 자율성 à 각 서비스에 대한 자유로운 언어, 아키텍처, 아웃소싱 용이 • 병렬 개발, 타임 투 마켓, 린 개발
  • 47.
  • 48. API Gateway (Human) Front-end Servi ce Service API G/W Service Service We need API Gateway for aggregating, forwarding services and exposing composite APIs Tenant-Specific Routing (Machine) Third-party Apps
  • 49. Billing (Human) Front-end Service Service API G/W Service Service We need API Gateway for aggregating, forwarding services and exposing composite APIs Tenant-Specific Billing (Machine) Third-party Apps Billing
  • 50. Metering / Loggregator (Human) Front-end Service Service API G/W Service Service 로그를 수집하여, 테넌트별 사용량을 집계한 후 빌링에게 전달 (Machine) Third-party Apps Billing Metering (Loggregator)
  • 51. IAM (Human) Front-end Service Service API G/W Service Service Stateless 인증, 통합빌링을 위한 IAM Tenant Billing (Machine) Third-party Apps Billing IAM token provider
  • 52. Design factors on developing cloud applications 1. Don't code your application directly to a specific topology 2. Do not assume the local file system is permanent 3. Don't keep session state in your application 4. Don't log to the file system 5. Don't assume any specific infrastructure dependency 6. Don't use infrastructure APIs from within your application 7. Don't use obscure protocols 8. Don't rely on OS-specific features 9. Don't manually install your application 38
  • 53. Micro Service Architecture Design Factor for Front-end One Page N-Screen Responsive Dynamic Real-time
  • 54. Front-end Image Server (Python) Business Logic Server (Java) Extended Role of Front-end in Cloud Applications Aggregator for multiple (polyglot programmed) micro-services Component Service (C) AJAX, RESTful Concurrent Cloud Applications are composed of multiple Micro Services and front-end serves as an aggregator of the services
  • 55. Writing One Page Web App Problems: One Page Web App à Low Cohesion and High Coupling style style for A style for B style for C /style html element for A element for B element for C /html script script for A script for B script for C /script
  • 56. Polymer: Web Component Framework Polymer: W3C standard for Web Components • Provides Cohesive Component Model • Component Composition by HTML markup • Dynamic Data Binding • Responsive Web by Material Design • Standard • Google maintains it
  • 57. Polymer: Web Component Framework Polymer: W3C standard for Web Components style style for A style for B style for C /style html element for A element for B element for C /html script script for A script for B script for C /script #A.html style style for A /style html element for A /html script script for A /script #B.html style style for B /style html element for B /html script script for B /script #C.html style style for C /style html element for C /html script script for C /script #index.html A A B B B C
  • 58. • UI Framework for MSA – AngalarJS – React – Polymer – VueJS • API Gateway – APIGee (Commercial) – Kong – OCE Gateway – Amazon Cognito (Public) – Spring Cloud • IAM – Amazon IAM (Public) – Spring Cloud – OCE IAM • Metering / Billing – Exem’s Metering Framework – BigData based – OCE Billing Micro Service Architecture Platforms for MSA
  • 59. Platform for MSA OCE API Gateway
  • 60. Example: Proposed SaaS Ar chitecture 프론트엔드 (Responsive,  Client-­‐ side  Service  Aggregate) 확장가능한 글로벌 싱글 인스턴스 데이 터베이스 (NoSQL  -­‐  Couchbase) 서비스 API  G/W 서비스 서비스 Scalable,  Client-­‐driven,  Microservices  architecture Tenant  Billin g (Machine) 써드파티 앱 들 Billing IAM  token  provi der local  DB (pouchDB) CRUD 1.data sync 2.REST
  • 61. 성공적 서비스로의 여정 운영자동화 • Business Continuity • Zero-downtime 수익화 • Subscription Business 구현 • Mashups • Multi-tenancy • Self-Serviced 마이크로 서비스 • Separation of Concerns
  • 63. Leaders Mainstream Laggards Pricing strategy • Pricing metrics are defined as p erceived by the customers • Pricing strategy is easy to under stand, measure. • Boundaries for usage, features, time, conversion from trial are clearly define d • Pricing is ad hoc • Pricing is based on internal ly-oriented metrics • Difficult to convert trial an d freemium to paid • Leader 들은 고객 관점에서 가격을 책정, 시장상황에 빠르게 가격 및 정책 개선 • 후발기업들은 내부 비용에 초점, 변경하지 않음
  • 64. Zuora Aria Hiveage Chargify And more.. Monetization Platforms For Monetization
  • 65. Monetization Platform Zuora - Billing Metering As A Service
  • 66. Monetization Platform Zuora - Billing Metering As A Service
  • 67. Monetization Platform Zuora - Billing Metering As A Service
  • 68. Monetization Platform Zuora - Billing Metering As A Service
  • 69. Monetization Platform OCE Billing – Open Source Billing Metering
  • 70. • 구독형 (공유자원 확장성) • 다종단말 • 마이크로 서비스 • 스마트 프론트-엔드 Mission: 향후 10년 사용할 아 키텍처 • 설치형 • 단일단말 • 모놀리씩 • 무거운 백엔드
  • 71. Reference SaaS App https://github.com/TheOpenCloudEngine/micro-service-architecture 특징 • 멀티테넌시 • 셀프서비스 (객체관리) • 클라이언트 기반 서비스 통합 • 로컬 캐시 DB (오프라인 에서도 동작, 서버 접속 시 동기화) • 토큰 인증 (IAM) • API GW 통한 CRUD DB 접근
  • 72. Reference SaaS App github.com/TheOpenCloudEngine/micro-service-architecture Front-­‐end  (VueJS) CouchDB OCE  API  G/W Tenant  Billing OCE  BillingOCE  IAM local  DB (pouchDB) CRUD 1.data sync 2.REST OCE Metadata  Service Self-­‐service  Portal Generate UIs
  • 73. References • www.opence.org • https://www.ibm.com/developerworks/websphere/techjournal/14 04_brown/1404_brown.html • http://microservices.io • [Google Search] The SPOSAD Architectural Style for Multi-tenant Software Applications • https://github.com/TheOpenCloudEngine/polymer-java-mapping • https://github.com/TheOpenCloudEngine/OCEIAM- SERVICEWARRPER • https://github.com/TheOpenCloudEngine/oceIAM
  • 74. DDD / MSA based SaaS Application Development Framework – metaworks4 60
  • 75. Metaworks4 Open Source SaaS Platform mimicking Salesforce’s Multitenant Kernel www.metaworks4.io
  • 76. Concepts Backgrounds 도메인 주도 설계 마이크로 서비스 아키텍처 머터리얼 디자인
  • 77. DDD(Domain-Driven Design) - 도메인 주도 설계 • 마이크로서비스를 구현하기에 앞서 설계하기 위해 필요한 유용한 개념 DDD. • 추천 도서 :  “Eric  Evans의 Domain  Driven  Design”,  도메인 주도 설계 • DDD에서 얻을 수 있는 해법(책에서 다루는 내용) • 어떤 단위로 서비스를 구성할 것인가 • 서비스의 결합 • 변화에 강한 설계 • 레거시 시스템을 단계적 폐기 • 리팩터링 전략 • Domain  Model  정제과정의 예 • http://agiledata.org/essays/agileDataModeling.html 63
  • 78. Micro Services Architecture • https://martinfowler.com/articles/microservices.html 64
  • 79. MW4 개발 프로세스 생 성 생 성 • Full-fledged Responsive Web Single Page Application • With google-material design• POJO based Domain Model • Add annotations (JAX-RS, JPA, Jackson, metaworks) • Domain Class Analysis 도메인 클래스 모델링 애노테이 션 UI 컴포넌 트 배치
  • 80. Model metadata Front (Vue.js / polymer) REST backend (Spring hateoas) ORM (Spring JPA) Domain Class Developer generates generates generates How it works
  • 81. Multi-tenant / Self service Support Self service Self service portal • Add new attribute • Attributes can be String, number, Data from referenced class (table) • Change the title, order of attributes • Hide/Show attribute
  • 82. Model metadata Front (Vue.js / polymer) REST backend (Spring hateoas) ORM (Spring JPA) Domain ClassSelf-Service Portal couchbase Tenant Admin Developer overrides Overriding metadata generates generates generates How it works
  • 83. 활용 오픈소스 – for building app Vue.js Vue MaterialFront REST Service Persistence
  • 84. 활용 오픈소스 – 2 – for MSA BackEnd 1 IAM API GW BackEnd 2 Billing/ Metering Front OCE-IAM OCE-API-GW OCE-Bill www.opence.org
  • 85. 개발환경 구축 • Apache Maven 3.x – Will import following dependencies automatically: • Spring Framework • Tomcat Runtime • Mysql Java Library • ORM-related Libraries including JPA • Integrated Development Environment: Intelli-J CE 12 or higher • Database-related tools: Mysql Server, Mysql workbench (Mysql Java Library will be automatically imported by maven) 71
  • 86. URL for sample project 72 https://github.com/TheOpenCloudEngine/micro-service- architecture-vuejs
  • 87. Building Sample Application 73 Backend server (Runs on 8080) mvn spring-boot:run Front-end server (Runs on 8081 or any other port) cd src/main/resources/static npm install npm run dev Go to http://localhost:8081/login.html
  • 88. Dependencies 74 - MySQL DB and Couchbase Installation - Setting the connection info to the WebConfig.java: https://github.com/TheOpenCloudEngine/micro-service-architecture- vuejs/wiki
  • 89. Running Sample App - login 75 Default login id / pw is jyjang@uengine.org / test Login will be processed through the IAM server: http://iam.uengine.io:8080
  • 90. Running Sample App – Product - Master 76 • Main Screen is in a material- design fashion • You may reduce the screen size to see it is responsive to the device
  • 91. Running Sample App – Product – Insert 77
  • 92. Running Sample App – Product – Delete 78
  • 93. Running Sample App – Progress 79
  • 94. Running Sample App – Progress – Referencing Master Values 80
  • 95. Running Sample App – Self Service 81 필드추가
  • 97. Getting token from IAM directly • curl -X POST http://iam.uengine.io:8080/oauth/access_token -H 'cache-control: no-cache' -H 'content-type: application/x-www-form-urlencoded' -H 'postman-token: 8ecd37ed-0bc7-3e93-bae6-b5514fd010cd' -d 'client_id=e74a9505-a811-407f-b4f6- 129b7af1c703grant_type=passwordclient_secret=109cf590- ac67-4b8c-912a- 913373ada046username=sppark2password=gosu23546scope =uEngineSubscriptions%2Fsubscriptionsapitoken_type=JWTclai m=%7B%22aaa%22%3A%22bbb%22%7D' 83
  • 98. Curl for main service • curl localhost:8080 -H access_token: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0OTgwNTQ4NzUsImNvbnRleHQi Onsic2NvcGVzIjoidUVuZ2luZVN1YnNjcmlwdGlvbnNcL3N1YnNjcmlw dGlvbnNhcGkiLCJ1c2VySWQiOiJhYzUyYzczYTVlZTI0NjM2OThiMDc0 MDgwMGZkZTQ2MCIsImNsaWVudEtleSI6ImU3NGE5NTA1LWE4MT EtNDA3Zi1iNGY2LTEyOWI3YWYxYzcwMyIsInVzZXJOYW1lIjoianlqY W5nQHVlbmdpbmUub3JnIiwibWFuYWdlbWVudElkIjoiZGRmZWZlYz A3ODliNGRiZmIwMGM3MjU2MTFiYjY5NWUiLCJyZWZyZXNoVG9rZ W4iOiI0ODhlMmM2MC1mNWQyLTQ5M2EtYTk5YS0xN2QxMzZiZmI zYzEiLCJ0eXBlIjoidXNlciIsImNsaWVudElkIjoiMmNlZTkwMjMxNjMyN GNkNGJiMmQ5NjQ4NzM5MDFlZWIifSwiaXNzIjoib2NlLmlhbSIsImN sYWltIjp7fSwiaWF0IjoxNDk4MDE4ODc1fQ.lPfzsnqv1bBdl9EcVRwY RDtIVbVMDMdDUzeOpgfwfQs 84
  • 99. Curl for main service • curl localhost:8080 -H access_token: eyJhbGciOiJIUzI1NiJ9.eyJleHAiOjE0OTgwNTQ4NzUsImNvbnRleHQiOnsic2NvcGVzIjoidUVuZ2luZVN1YnNjcmlwdGlvbnNcL3N1YnNjcmlw dGlvbnNhcGkiLCJ1c2VySWQiOiJhYzUyYzczYTVlZTI0NjM2OThiMDc0MDgwMGZkZTQ2MCIsImNsaWVudEtleSI6ImU3NGE5NTA1LWE4MT EtNDA3Zi1iNGY2LTEyOWI3YWYxYzcwMyIsInVzZXJOYW1lIjoianlqYW5nQHVlbmdpbmUub3JnIiwibWFuYWdlbWVudElkIjoiZGRmZWZlYz A3ODliNGRiZmIwMGM3MjU2MTFiYjY5NWUiLCJyZWZyZXNoVG9rZW4iOiI0ODhlMmM2MC1mNWQyLTQ5M2EtYTk5YS0xN2QxMzZiZmIz YzEiLCJ0eXBlIjoidXNlciIsImNsaWVudElkIjoiMmNlZTkwMjMxNjMyNGNkNGJiMmQ5NjQ4NzM5MDFlZWIifSwiaXNzIjoib2NlLmlhbSIsImNs YWltIjp7fSwiaWF0IjoxNDk4MDE4ODc1fQ.lPfzsnqv1bBdl9EcVRwYRDtIVbVMDMdDUzeOpgfwfQs” • { • _links : { • person : { • href : http://localhost:8080/person{?page,size,sort}, • templated : true • }, • progress : { • href : http://localhost:8080/progress{?page,size,sort}, • templated : true • }, • product : { • href : http://localhost:8080/product{?page,size,sort}, • templated : true • }, • profile : { • href : http://localhost:8080/profile • } • } • } 85
  • 100. Curl for main service • curl localhost:8080 -H access_token: access token” • { • _links : { • person : { • href : http://localhost:8080/person{?page,size,sort}, • templated : true • }, • progress : { • href : http://localhost:8080/progress{?page,size,sort}, • templated : true • }, • product : { • href : http://localhost:8080/product{?page,size,sort}, • templated : true • }, • profile : { • href : http://localhost:8080/profile • } • } • } 86
  • 101. CORS Settings 87 @Configuration @ComponentScan(basePackageClasses = {TenantAwareFilter.class, MetaworksRestService.class, ProductRepository.class, ClassManager.class, MetadataService.class}) @EnableJpaRepositories(repositoryBaseClass = CustomGenericRepositoryImpl.class) public class WebConfig extends WebMvcConfigurerAdapter { @Override public void addCorsMappings(CorsRegistry registry) { registry.addMapping(/**) .allowedOrigins(*) .allowedMethods(POST, GET, PUT, DELETE, OPTIONS) .allowedHeaders(access_token, Content-Type); }
  • 103. The Size of Code 89 323Lines For Developing Full-CRUD, RESTful, MSA-based, Material-Designed, Responsive, Grid+Form, Multi- tenant and Self-Served Application: • Number of fields of the entity: 10 • Total lines of code per an entity: 92 for front-end, 215 for domain class, 16 lines for repository.
  • 104. Anatomy of SaaS Platform: Doman Driven Design and Metadata Oriented Framework 90
  • 106. Adaptive Object Model 92 http://adaptiveobjectmodel.com • Class Definition model in instance level • Definition can be stored in a XML file or database. • Very Flexible to Extend • Polymorphism for multi- tenant Drawbacks: • Hard to read code • Error-prone
  • 107. Reflection + AOM 93 • Since Java 1.2 • Java Class definition can be accessible with Reflection APIs • For the concrete part, Get the Metadata from Class Definition • For the flexible part, use the AOM
  • 108. Annotation + Reflection + AOM 94 • Since Java 1.5 • Rather use separated XML files, use @ for specifying additional (user-defined) metadata for class definition
  • 109. Metaworks 1. Metadata Oriented Application Framework 2. Developed by Jinyoung Jang in 1998 3. Inspired from the Adaptive Object Models, OMG Reflection, and MDA 4. Application Component Generation on the fly from metadata 5. Metaworks1: Generates database query and action, Simple Web Forms generation. written in ASP - 1998 6. Metaworks2: Generates Swing User interfaces written in Java, is adopted in uEngine Process Designer – 2003 7. Metaworks3: Generates Dynamic Web Uis. Metadata definition by annotation, is adopted in Process Codi SNS, Web based BPMN Modeler and the Cloud IDE of OCE garuda – 2011 8. Metaworks4: Inherits concept of Metaworks 1 ~ 3. Get off from the inherent MVV VueJS for front-end, Spring Hateoas and JPA for back-end.
  • 110. Metaworks So Metaworks3… 1. Is A POJO framework 2. Encourages the Domain-Driven Design 3. Especially for developing model-driven applications
  • 111. Metaworks for early prototyping • Metaworks generates Dynamic Web Applications on the fly from your domain class model with minimal technical details. • By reading the metadata declared by class model itself and the additional annotations. • Metaworks doesn’t generate any source codes so doesn’t requires any round-trip job for source codes while MDA need such a job. Metadata Domain Model Classes User Interaction Validation Database Manipulation Dynamic Web UIs Swing Native UIs Mobile Native UIs*
  • 112. Metaworks for Multi-tenancy Common Metadata Domain Model Classes Class model for tenant1 ORM for tenant1 Common class model Metadata of Tenant1 Metadata of Tenant2 Metadata of Tenant3 Class model for tenant2 ORM for tenant2 Class model for tenant3 ORM for tenant3 Override by tenantID
  • 113. Development Process 1. (Optional) UML을 이용한 설계 2. 도메인 자바 코드의 생성 3. 타 POJO Framework의 적용 - JPA를 통한 ORM 생성, JAX-RS를 통한 서비 스 공개 4. Metaworks3 Framework의 적용을 통한 Default Application 의 생성 5. UI 구체화 / 커스터마이징 6. 1~5 반복
  • 114. Why JPA? • The (almost-final) Java Standard • Why not iBatis or hibernate ? – JPA is a POJO Framework while the others not. – Also Hibernate engine supports JPA as a interface. • Why POJO framework is goooooood? – To focus on the domain-driven design – To yield the sophisticated Java class system to solve your Doman- Specific problem. – A POJO frameworks would not limits your domain models, they only gives an ‘advice’ through @Annotation or Aspect-oriented manner. – So, you can introduce one or more frameworks without changing the domain classes. 100
  • 115. Basic JPA annotations • @Entity identifies this class is a ORM Class. • @Id means this field is a primary key. • @JoinColumn means a foreign value referenced by a foreign key. • @OneToMany means this field is an accessor of related entity in ‘One-to-many’ relationship. 101
  • 116. Key Generation Strategy 102 • Native/AUTO: • SEQUENCE:
  • 117. Data Insertion Test 103 public static void main(String[] args) throws PersistentException { PersistentTransaction t = autoinsurance.AutoinsurancePersistentManager.instance().getSession().beginTransaction(); try{ Customer customer = new Customer(); customer.setCustomer_ID(“1”); customer.setCustomer_first_name(“Jane Doe”); customer.setVehicle(new ArrayList()); customer.getVehicle().add(new Vehicle()); autoinsurance.AutoinsurancePersistentManager.instance().getSession().save(customer); t.commit(); } catch (Exception e) { t.rollback(); throw e; }
  • 118. Creating UIs • Developing UI Applications is very complex and costly: – Native UI: Swing – Web UI: JSP, Struts – N-Screen UI: AJAX / html5 / CSS • Development Lifecycle is getting shorter and shorter: – Lean Startup – Early Prototyping • So, we need something agile development approach such as: – Model-Driven Development – Application Frameworks – SOA and Process Orchestration Architecture 104
  • 119. History of OO Frameworks and Methodologies 1. Smalltalk 2. STL (Standard Template Language) of C++ 3. Adaptive Object Models – Ralf Johnson 4. Design Patterns – Gang of four 5. Object-Oriented Frameworks 6. OMG Reflection 7. Java – 1995 8. IBM’s San francisco Framework 9. Java 2 Enterprise Edition – EJB 2.1 10.EJB Patterns • Bigger and Complex Super Classes • Java doesn’t Support Multiple Inheritance
  • 120. Domain Specific Application Frameworks Example of Business Domain Specific Application Frameworks : 1. Car Simulation 2. Product Simulation 3. Or your Problem itself!! à abstracts business problems Example of System Domain Specific Application Frameworks : 1. EJB 2. Struts 3. Swing 4. Apache Mesos à abstracts technical problems But We Can’t Inherit Two Super Classes at the same time!!! Merging two or more frameworks??
  • 121. Return to the “Pure Java” - Aspect Oriented Programming - Java Annotation - JPA - JAX-RS - EJB 3.1
  • 122. EJB 2.1 vs EJB 3.1 출처: http://www- 01.ibm.com/support/knowledgecenter/SS8PJ7_9.1.0/com.ibm.javaee.doc/topics/
  • 123. Domain-Driven Design 1. Using ‘Ubiquitous Language’ so that the domain expert and developer can communicate
  • 124. Anatomy of SaaS Platform: Spring Data + Hateoas Framework 110
  • 125. Microservices with Spring Boot + Spring Data Using Spring Boot and Spring Data to quick develop HATEOAS microse rvices Bernardo Silva
  • 126. Terminology • What is CRUD? • What is REST? • What is Spring? • What is HATEOAS? • What is Microservice? • So… hands on!
  • 127. What is CRUD? • “In computer programming, create, read, update and delete (as a n acronym CRUD or possibly a Backronym) (Sometimes called SC RUD with an S for Search) are the four basic functions of persist ent storage.” Ø http://en.wikipedia.org/wiki/Create,_read,_update_and_delete
  • 128. What is REST? • “Representational state transfer (REST) is an abstraction of the ar chitecture of the World Wide Web; more precisely, REST is an arch itectural style consisting of a coordinated set of architectural const raints applied to components, connectors, and data elements, wit hin a distributed hypermedia system.” • http://en.wikipedia.org/wiki/REST
  • 129. Basic CRUD with REST Operation HTTP / REST Create PUT / POST Read (Retrieve) GET Update (Modify) PUT / PATCH Delete (Destroy) DELETE
  • 130. What is Spring? • “The Spring Framework is an open source application framework a nd inversion of control container for the Java platform.” Ø http://en.wikipedia.org/wiki/Spring_Framework § Inversion of control container / dependency injection § Enrichment and proxying
  • 131. Inversion of control container / dependenc y injection: class A { B b = new Bimpl(); } interface B { (…) } class Bimpl implements B { (…) } @Component class A { @Autowired B b; } interface B { (…) } @Component class Bimpl implements B { (…) } Spring
  • 132. Enrichment and proxying: @Component class A { @Autowired B b; } interface B { (…) } @Component class Bimpl implements B { (…) } Spring ProxyImplements Delegates
  • 133. Using AOP for Metering / Billing – 1 @Metered(project.start) public void executeProcess(String instanceId) throws Exception{ ProcessInstance instance = getInstance(instanceId); instance.execute(); }
  • 134. Using AOP for Metering / Billing – 2 @Aspect public class MeteringAdvice { @Before(@annotation(metered)) public void checkAvailable(Metered metered) throws NoServiceAvailableException { ….. //Check if the service is available for the requested tenant } @AfterReturning(@annotation(metered)) public void meter(Metered metered) throws Exception { …. //Add usage log } }
  • 135. Essencia – Build Deploy Automation Essencia  On-­Premise Essencia  On  Amazon Essencia  On  Bluemix Overrides: 1. applicationContex.xml   (to  use  AmazonS3Storage) 2. Uengine.properties (to  change  DB  connection  info) Overrides: 1. applicationContex.xml   (to  use  services) 2.  pom.xml  (Cf push  command)
  • 136. What is HATEOAS? • “HATEOAS, an abbreviation for Hypermedia as the Engine of Appli cation State, is a constraint of the REST application architecture th at distinguishes it from most other network application architectur es.” Ø http://en.wikipedia.org/wiki/HATEOAS
  • 137. HATEOAS samples person xmlns:atom=http://www.w3.org/2005/Atom firstnameDave/firstname lastnameMatthews/lastname links atom:link rel=self href=http://myhost/people/1 / /links /person XML { firstname : Dave, lastname : Matthews, links : [ { rel : self, href : http://myhost/people/1 } ] } JSON
  • 138. What is Microservice? • “The term Microservice Architecture has sprung up over the last few years to describe a particular way of designing software applic ations as suites of independently deployable services.” Ø http://martinfowler.com/articles/microservices.html
  • 139. Microservices Reference • The “ID” on a HATEOAS system is mainly an URI – Example: If you create a “teacher”, his “id” will be “http://localhost:80 80/teacher/1” instead of just “1”. • Then, each Microservice can reference other services entities.
  • 140. So… hands on! 1) Using Gradle, you create a simple Spring Boot project: Ø http://projects.spring.io/spring-boot/ 2) You create a basic Spring Boot main class (it c an be converted to a WAR later). 3) Then you boot doing: Ø gradle bootRun
  • 141. build.gradle • Buildscript dependencies: Ø classpath(org.springframework.boot:spring-boot-gradle-plugin:1.1.5 .RELEASE”) • Body: Ø apply plugin: 'spring-boot’ • Dependencies: Ø compile(org.springframework.boot:spring-boot- starter-web”)
  • 142. Application.java • Annotations: Ø @Configuration Ø @ComponentScan Ø @EnableAutoConfiguration § Main method (unnecessary for WAR): Ø SpringApplication.run(Application.class, args); Magic!
  • 143. Adding Hibernate (ORM) • build.gradle (dependencies): Ø compile(org.springframework.boot:spring-boot-st arter-data-jpa”) Ø compile(com.h2database:h2:1.3.176) Ø compile(org.projectlombok:lombok:1.14.4) Just to make Entities more dumb
  • 144. Adding Spring Data REST • build.gradle (dependencies): Ø compile(org.springframework.data:spring-data-r est-webmvc) • Application.java: Ø @Import(RepositoryRestMvcConfiguration.class) SUPER Magic!
  • 145. Teacher and Student DDL TEACHER ID NAME SUBJECT STUDENT ID NAME AGE STUDENT_TEACHERS STUDENT_ID TEACHER_ID
  • 146. Adding “Teacher” entity @Data @Entity @EqualsAndHashCode(exclude={students}) public class Teacher { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private String subject; @ManyToMany @JoinTable(name = STUDENT_TEACHERS, joinColumns = { @JoinColumn(name = TEACHER_ID)}, inverseJoinColumns = { @JoinColumn(name = STUDENT_ID)}) private SetStudent students; }
  • 147. Adding “Student” entity @Data @Entity @EqualsAndHashCode(exclude={teachers}) public class Student { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) private Long id; private String name; private Integer age; @ManyToMany @JoinTable(name = STUDENT_TEACHERS, joinColumns = { @JoinColumn(name = STUDENT_ID)}, inverseJoinColumns = { @JoinColumn(name = TEACHER_ID)}) private SetTeacher teachers; }
  • 148. Adding REST repositories @RepositoryRestResource( collectionResourceRel = student, path = student) public interface StudentRepository extends PagingAndSortingRepositoryStudent, Long { } @RepositoryRestResource( collectionResourceRel = teacher, path = teacher) public interface TeacherRepository extends PagingAndSortingRepositoryTeacher, Long { } TeacherRepository.java StudentRepository.java
  • 149. Run and be amazed! • Try to get the root service description: Ø GET: http://localhost:8080/ • Try to create two students, two teachers and associate them! Ø POST: http://localhost:8080/student • Use “PATCH” with “text/uri-list” to link entities • Get JSON Schema of the entity: Ø GET: http://localhost:8080/student/schema Ø Accept: application/schema+json
  • 150. Examples: • POST: http://localhost:8080/student Ø { name: John, age: 18 } Ø { name: Jorge, age: 19 } • POST: http://localhost:8080/teacher Ø { name: James, subject: Math } Ø { name: Bob, subject: Biology } • PUT/PATCH: http://localhost:8080/student/1/teachers Ø Content-Type: text/uri-list http://localhost:8080/teacher/1 http://localhost:8080/teacher/2 • GET: http://localhost:8080/teacher/1/students
  • 151. Anatomy of SaaS Platform: Vue JS + VueMaterial 137
  • 152. W3C Web Components Custom elements HTML imports Template Shadow DOM
  • 154. Why vue.js Angular and React is not STANDARD Polymer is heavy and needs Polyfill Vue.js is 1. Fastest (compared with React and Angular) 2. Light (low dependencies) 3. Usable with jQuery or existing .js libraries,
  • 155. Features of Vue.js • Reactive data binding (Spreadsheet-like) • Composable view components (Tag-based)
  • 156. MVVM
  • 159. Data binding div id=demo p{{message}}/p input v-model=message /div a v-bind:href=url/a
  • 160. v-model spanMessage is: {{ message }}/span br input type=text v-model=message placeholder=edit me
  • 162. v-for ul id=example-1 li v-for=item in items {{ item.message }} /li /ul var example1 = new Vue({ el: '#example-1', data: { items: [ { message: 'Foo' }, { message: 'Bar' } ] } })
  • 163. v-on div id=example button v-on:click=greetGreet/button /div var vm = new Vue({ el: '#example', data: { name: 'Vue.js' }, // 在 `methods` 对象中定义方法 methods: { greet: function (event) { // 方法内 `this` 指向 vm alert('Hello ' + this.name + '!') // `event` 是原生 DOM 事件 alert(event.target.tagName) } } }) // 也可以在 JavaScript 代码中调用方法 vm.greet() // - 'Hello Vue.js!'
  • 164. • init • created • beforeCompile • compiled • ready • attached • detached • beforeDestroy • destroyed Life cycle
  • 165. User defined Component (Your own HTML Tag) Vue.component('child', { // public attributes, properties props: ['msg'], template: 'span{{ msg }}/span’ data: function(){// private attributes, properties return {a:’aaa’, b:’bbb’} }, // behaviors methods:{ } }) child msg=hello!/child
  • 166. One File Component - .vue template div class=hello h1{{ msg }}/h1 /div /template script module.exports = { data: function () { return { msg: 'Hello World!' } } } /script style scoped h1 { color: #42b983; } /style
  • 174. Development Process: Analysis Modeling Domain Classes with UML Tool (DDD Approach) 160
  • 175. IntelliJ and VP integration 161 1. In Visual Paradigm, select Windows Integration IDE Integration... from the toolbar. (for some version, Tools IDE Integration) 2. Select IntelliJ IDEA. You can run Visual Paradigm in multiple IDEs. In other words, if you need you can select multiple IDEs here. Click Next. 3. Specify the folder path of IntelliJ IDEA. Click Next to start copying files to your IDE. (Currently VP supports only IntelliJ 12 or under)
  • 176. IntelliJ and VP integration 162
  • 177. Using Visual Paradigm In IntellJ 2. Opening a VP in IntellJ 163 3. Import existing model 1. Open the created maven project
  • 178. Importing Existing Model 164 • File Visual Paradigm EE Import UML Model • Choose the existing .vpp file
  • 180. Generate ERD and Entity Classes (ORM) • Open the Class Diagram in the Project Explorer Diagram Navigator ClassDiagram • Set the type of attributes – String for most types – boolean for gender – int for options – double for money – java.util.Date for Dates, timestamp • Modeling ORM Generate Code • Database Code Generation Options: – Framework: JPA – Persistence API: POJO • Be careful: – All attributes must have its type – All classes should be belong to any package 166
  • 182. Create a Class Diagram and Generate Java Code in IntelliJ-VP integration 168
  • 183. Navigating between Model and Code Jumping from diagram to Code: Right-click on the class Select in Code 169 Jumping from Code to Diagram: Right-click on the source file Visual Paradigm EE Select in Diagram
  • 184. Automatic Code Synchronization • Modeling Enable Auto Synchronization 170
  • 185. EXERCISE : CREATING ORM AND DATABASE CONNECTION 171
  • 186. Create a new class diagram 172
  • 188. All classes must be ORMPersistable 174
  • 189. All relations must be Persistable 175
  • 190. Then, they can be converted to ERD 176
  • 191. 177
  • 192. If there is no ID field (primary key), VP will generate them automatically 178
  • 195. Settings: JPA and POJO 181
  • 196. Generated JPA model code 182
  • 198. Generated SQL (DDL) Code 184
  • 199. Generated Entity Classes (JPA) • All Entity Codes are POJO Classes that are described with Java Annotations meaning entity field descriptions and relationships. 185 @Entity @Table(name=Customer) @Inheritance(strategy=InheritanceType.SINGLE_TABLE) @DiscriminatorColumn(name=Discriminator, discriminatorType=DiscriminatorType.STRING) @DiscriminatorValue(Customer) public class Customer implements Serializable { public Customer() {} @Column(name=ID, nullable=false) @Id @GeneratedValue(generator=AUTOINSURANCE_CUSTOMER_CUSTOMER_ID_GENERATOR) @org.hibernate.annotations.GenericGenerator(name=AUTOINSURANCE_CUSTOMER_CUSTOMER_ID_GENERATOR, strategy=native) private String customer_ID; @Column(name=Customer_social_security_number, nullable=true, length=255) private String customer_social_security_number; @Column(name=Customer_first_name, nullable=true, length=255) private String customer_first_name; @Column(name=Customer_middle_initial, nullable=true, length=255) private String customer_middle_initial; @Column(name=Customer_last_name, nullable=true, length=255) private String customer_last_name; @OneToMany(mappedBy=owns, targetEntity=autoinsurance.Vehicle.class) @org.hibernate.annotations.Cascade({org.hibernate.annotations.CascadeType.SAVE_UPDATE, org.hibernate.annotations.CascadeType.LOCK}) @org.hibernate.annotations.LazyCollection(org.hibernate.annotations.LazyCollectionOption.TRUE) private java.util.Set vehicles = new java.util.HashSet(); }
  • 200. Day-2: Make the Application As A Service 186
  • 201. Introduction to REST REST stands for Representational State Transfer • It is an architectural pattern for developing w eb services as opposed to a specification. • REST web services communicate over the HT TP specification, using HTTP vocabulary: – Methods (GET, POST, etc.) – HTTP URI syntax (paths, parameters, etc.) – Media types (xml, json, html, plain text, etc) – HTTP Response codes.
  • 202. HTTP-REST Vocabulary HTTP Methods supported by REST: • GET – Requests a resource at the request URL – Should not contain a request body, as it will be discarded. – May be cached locally or on the server. – May produce a resource, but should not modify on it. • POST – Submits information to the service for processing – Should typically return the new or modified resource. • PUT – Add a new resource at the request URL • DELETE – Removes the resource at the request URL • OPTIONS – Indicates which methods are supported • HEAD – Returns meta information about the request URL
  • 203. HTTP-REST Vocabulary A typical HTTP REST URL: • The protocol identifies the transport scheme that will be used t o process and respond to the request. • The host name identifies the server address of the resource. • The path and query string can be used to identify and customi ze the accessed resource. http://my.store.com/fruits/list?category=fruitlimit=20 protocol host name path to a resource query string
  • 204. JAX-RS Basics An example REST service class: • At least one method must be annotated with an HTTP verb (e.g. @GET) • The @Controller annotation makes the class discoverable by Spring package org.lds.tech.training.lab.ws; import javax.ws.rs.GET; import org.springframework.stereotype.Controller; @Controller public class HelloWebServiceRest { @GET public String sayHello() { return Hello, World!; } }
  • 205. JAX-RS Basics Example Spring configuration: • Example location: WEB-INF/example-servlet.xml • A reference to the JAX-RS annotated service bean is pass ed to the Stack RS “produce” namespace handler. • Multiple service beans may be supplied under the Stack R S “interfaces” element. • Each bean will be scanned by CXF for annotated resource s that can be served up RESTfully. stack-rs:produce stack-rs:interfaces ref bean=helloWebServiceRest/ /stack-rs:interfaces /stack-rs:produce
  • 206. JAX-RS Basics An example WADL descriptor: application xmlns=http://wadl.dev.java.net/2009/02 xmlns:xs=http://www.w3.org/2001/XMLSchema resources base=http://localhost:8080/example/Services/rest resource path=/ method name=GET response representation mediaType=application/octet-stream param name=result style=plain type=xs:string/ /representation /response /method /resource /resources /application
  • 207. JAX-RS Method Annotations JAX-RS HTTP Method Annotations: @GET @POST @PUT @DELETE @OPTIONS @HEAD • Applied to a Java method to bind it to an HTTP meth od. • Only one HTTP annotation may be applied to a singl e Java method. • Multiple Java methods may be given the same HTTP method annotation, assuming they are bound to diff erent paths.
  • 208. JAX-RS @Path Annotation • @Path annotations may be supplied to customize the reques t URI of resource. • @Path on a class defines the base relative path for all resou rces supplied by that class. • @Path on a Java class method defines the relative path for t he resource bound to that method. • @Path on a method is relative to any @Path on the class. • In the absence of @Path on the class or method, the resour ce is defined to reside at the root of the service. • A leading forward slash (/) is unecessary as the path is alwa ys relative.
  • 209. JAX-RS Annotations: Examples @Path(example) public class ExampleWebServiceRest { @GET public Item getItem(@QueryParam(itemId) Long id) { // @QueryParam example } @POST public Response editItem(@FormParam(itemId) Long id, @FormParam(value) String value) { // @FormParam example } @GET @Path({category}/{subcategory:[^/]*}) public ListItem getItems( @PathParam(category) String category) { @PathParam(subcategory) String subcategory) { // @Path and @PathParam example } }
  • 210. JAX-RS Annotations Examples of @Produces and @Consumes: • The client submits JSON or XML content with the “C ontent-Type” header. • The client requests either JSON or XML content thro ugh use of the HTTP “Accept” request header. @Path(example) public class ExampleRestService { @POST @Path(items) @Produces({application/json, application/xml}) @Consumes({application/json, application/xml}) public ListItem editItems(ListItem items) { // Does something and returns the modified list } }
  • 211. Operations behind the scene • JSON(XML) serialization / deserialization • Networking between Requester and Provider • Dynamic method invocation 197
  • 212. Service Orchestration with BPM • uEngine BPMS is an open source software supporting BPMN 2.0 • Pools for service definition • Using data mapper, detailed message inter-change between pools can be done 198
  • 213. Export BPMN xml file from VP • Exporting BPMN 2.0 xml • File Visual Paradigm Export BPMN 2.0 199
  • 214. Importing BPMN xml to Activiti BPM • Activiti BPM is an another open source BPMS supporting BPMN 2.0 • Processes Model workspace Import • Select the BPMN xml file 200
  • 218. Overview 204 Requirement of Cloud Service Deployment Cloud Deployment using IaaS Cloud Deployment using PaaS
  • 219. Design factors on developing cloud applications 1. Don't code your application directly to a specific topology 2. Do not assume the local file system is permanent 3. Don't keep session state in your application 4. Don't log to the file system 5. Don't assume any specific infrastructure dependency 6. Don't use infrastructure APIs from within your application 7. Don't use obscure protocols 8. Don't rely on OS-specific features 9. Don't manually install your application 205
  • 220. Your Future Apps PaaS “Instance-on” Middleware and Platform Services A PaaS provides development services on cloud. CLOUD IDE
  • 221. PaaS가 해주길 기대하는 것들 * 출처: IBM
  • 222. PaaS의 유형들 • Application PaaS: OSS서비스에 집중 e.g. 클라우드 파운드리, 오픈시프트 • Business PaaS: BSS on OSS (OSS+BSS) e.g. 포스닷컴, IBM SmartCloud, GAE, OCE • Monetization PaaS: BSS + 소비자분석 e.g. Zuora, Aria Systems
  • 223. 클라우드 파운드리 • 바이두 • Heroku • IBM Bluemix • Intalio • 실습: run.pivotal.io
  • 224. CF Features Architecture FEATURES • Application Development • Development Spaces • Log aggregation • Application Hosting • Infra hiding • Business Continuity • Scale in/out
  • 228. OSGi for PaaS • More modular, so share more (at library level) • More dynamic, so easily automated • Provides standard J2EE framework including JAX-RS, JPA and Spring with whiteboard pattern.
  • 229. Sharing Level • Hypervisor-based vs. Container-based vs. OSGi-based PaaS • In OSGi-based PaaS, multi-tenants can share at library level Share more, More cheap offering, More Co mpetitive in the market ! Share less, More easy Secure !
  • 230. Lab Time: Prerequisites • CF Command Line Interface 216
  • 231. Login and Select Space 217
  • 233.
  • 234. Getting Mysql service from CF marketplace 220
  • 236. Lessons Learned • POJO based frameworks are key-enablers to make domain-driven software development. – JPA – Metaworks – JAX-RS – Spring • SOA based Application Design – Modularity is enhanced – Dynamically reconfigurable • Model-based applications are also easy to be deployed to IaaS and PaaS. – Since application is more modular, applications are easy to migrated, ported and provisioned to diverse cloud environment. – Also easy to be scaled out and in. 222