Architecting Lecture
Transcript of Architecting Lecture
-
?
www.architecting.kr
-
.?
-
.?
-
.
-
????
-
.() ()
()
()
.
-
.
-
.
.
-
?
-
,
70%
, 30%
?
-
is NEITHER
NOR
?
-
!
-
.
-
, .
-
.
-
.
!
-
.
-
UP
-
rchitecturerchitecture-- entricentric
-
.
-
Form follows unction.
-
.
-
.
-
1.
-
XXX
XXX
XXX
XXX
2.
-
3.
-
3.
-
3.
-
4.
-
ChaosChaos
ComplicatedComplicated Complex!!!
Cosmos!!!
ComplicatedComplicated Complex!!!
-
BA AA
BA AA
DATA
-
+
Integration Allocation
+
RealizationVisualization
-
PM
QA
-
The life of a software architect is a long(and sometimes painful) succession ofsuboptimal decisions made partly in thedark. - Grady Booch
The life of a software architect is a long(and sometimes painful) succession ofsuboptimal decisions made partly in thedark. - Grady Boochdark. - Grady Booch
.
dark. - Grady Booch
.
-
..
-
.
-
www.architecting.kr
-
Trade-Off
-
(Availability)
.
.
(fault)
(failure) .
-
Availability
-
ROI
Availability
100%98% 99%
-
Heartbeat
Availability
-
Active Redundancy
Availability
-
Passive Redundancy
Availability
-
Spare
Availability
-
(Performance)
, , ,
, , ,
.
-
Performance
-
Performance
-
Performance
.
.
. .
-
?
-
System=
-
??
Middleware
ServerClient
-
JavaEE??
-
JavaEE
-
? ?
Thread SafetyThread Safety
CMT
Component Life Cycle
-
, ? !
!
.
-
1. .2. .3. .
4. .
-
: .
1.2. ACID3. vs
4. DTP/2PC4. DTP/2PC5. Flat/Nested
6.
7.
8.
9.
10.
?
-
Java EE
-
.
-
?
-
OS
Trouble Shooting HTTP
-
[email protected]/architecting.kr
-
[email protected]/architecting.kr 2
-
[email protected]/architecting.kr 3
-
[email protected]/architecting.kr 4
-
[email protected]/architecting.kr 5
-
[email protected]/architecting.kr 6
-
ADD(Attribute-Driven Design)
[email protected]/architecting.kr 7
-
[email protected]/architecting.kr 8
-
[email protected]/architecting.kr 9
-
?
[email protected]/architecting.kr 10
. .
.
-
[email protected]/architecting.kr 11
-
?
013 x
)1)(1(1 23 xxxx
[email protected]/architecting.kr 12
)1)(1(1 23 xxxx
2
31,1
ixx
-
?
[email protected]/architecting.kr 13
!
-
[email protected]/architecting.kr 14
-
[email protected]/architecting.kr 15
-
[email protected]/architecting.kr 16
-
[email protected]/architecting.kr 17
-
[email protected]/architecting.kr 18
OASIS
DB
Report
-
[email protected]/architecting.kr 19
-
[email protected]/architecting.kr 20
-
[email protected]/architecting.kr 21
-
[email protected]/architecting.kr 22
-
[email protected]/architecting.kr 23
-
[email protected]/architecting.kr 24
-
( )
[email protected]/architecting.kr 25
( )
-
(AFW)
(BFW)
[email protected]/architecting.kr 26
-
[email protected]/architecting.kr 27
-
HTTP
EAI
IIOP
XML/HTTP HTTP
ActiveX
[email protected]/architecting.kr 28
DB
DBMS
File
RMI-IIOP
JDBC
-
HTML/RIA/
ChannelAdapter
[email protected]/architecting.kr 29
ChannelManager
Connector
DBMS/File/LDAP
-
[email protected]/architecting.kr 30
-
[email protected]/architecting.kr 31
-
[email protected]/architecting.kr 32
(BFW
)
-
:
[email protected]/architecting.kr 33
-
:
[email protected]/architecting.kr 34
-
:
35
-
:
36
-
[]
[]- [] [] []
[]
[]-1
[]-2 []-3 []1 []2
[]
[email protected]/architecting.kr 37
-
1.
2.
4.
3.
[email protected]/architecting.kr 38
5.
6.
9.
7.
8.
10.
11. (, ...)
12.
13.
-
/
[email protected]/architecting.kr 39
-
(Business WorkflowComponent, BWC)
[email protected]/architecting.kr 40
(Business DomainComponent, BDC)
-
ABWC
A
aBDC
A
bBDC
BBWC
B
cBDC
B
dBDC
BFW
[email protected]/architecting.kr 41
-
Channel
[email protected]/architecting.kr 42
Connector
BusinessBusiness
-
[email protected]/architecting.kr 43
-
[email protected]/architecting.kr 44
-
/
[email protected]/architecting.kr 45
/
-
[email protected]/architecting.kr 46
-
[email protected]/architecting.kr 47
-
[email protected]/architecting.kr 48
-
Exception
RuntimeExceptionSQLException ParseException IOException
NullPointerException
NumberFormatException
BizExceptionSysException
-
X-Internet
[email protected]/architecting.kr 52
-
[email protected]/architecting.kr 53
-
[email protected]/architecting.kr 54
-
Xinternet
Xinternet Xinternet
1. 4.
( URL )
5.
7.
6.
[email protected]/architecting.kr 55
HTTP
2.
( URL )
3. URL
-
>
1. .
5. .
2. .
4
6. .
[email protected]/architecting.kr 56
3. SQL.
4. .
-
[email protected]/architecting.kr 57
-
[email protected]/architecting.kr 58
-
[email protected]/architecting.kr 59
-
(EJB)
[email protected]/architecting.kr 60
-
(Spring)
[email protected]/architecting.kr 61
-
[email protected]/architecting.kr 63
-
64
-
65
-
66
-
67
-
68
-
[email protected]/architecting.kr 69
-
.
.
, .
.
, , .
[email protected]/architecting.kr 70
-
.
.
.
. .
.
.
[email protected]/architecting.kr 71
-
.
.
.
.
.
.
[email protected]/architecting.kr 72
-
[email protected]/architecting.kr
-
Spring FrameworkSpring Framework
-
Spring Patten Aspect
-
Java EE
-
Java EE - EJB
-
JavaEE - Spring
-
? ?
CMT Thread Safety Component Life Cycle
-
Thread1 HeapStack
Object A
Thread2
Stack
attribute
-
?
JMM
-
-
object
a := 2
lock
Thread 1
a := 2
1. .
Thread
object
Thread 2
lock2. a1.
if (a > 0){a--;
}
Object
a := 1
object
a := 1
lock
Thread1
a := 1
a := 2
.
.
Thread 2
a := 1
a := 2
2. a.
3.
object
a := 1
lock
Thread 2
a := 1
3.
-
. .
.
.
-
-
public void put(Object values){
int count = 1;while (true){if ( ){
try{
Thread.sleep(10);}catch (InterruptedException e){
e.printStackTrace();MsgParameter msp = new MsgParameter();msp.add(poolType);throw new FWRuntimeException(FWExceptionCode.EX00075, msp, e);
}count++;// // .if (count == retryCount){
if(this.objPool.size()>0){
this.objPool.remove(0);}
}continue;
}this.objPool.add(values);
break;}
}
-
.
JVM : volatile
: synchronized VS
:
: singleton
-
synchronized
synchronized
.
. Oracle select for update .
-
synchronized
-
Synchronized
. .
-
Synchronized
. .
-
JavaEE -
Web Server
WASClient Thread
Client
Client
ServletThread
Thread
-
JavaEE -
-
JavaEE - EJB
Application Server
WAS
Client
Client
Client
Thread
Thread
Thread
EJB
EJB
EJB
-
JavaEE
Client
Client
Thread
Thread Servlet object
WAS
Client Thread
object
-
JavaEE
-
JavaEE - Spring
-
Spring ?
EJB Home/Business Interface, Bean Class, DD Core J2EE Pattern, EJB Pattern
Spring Interface, Bean, Context File Pattern???
-
Spring Pattern
HTTP Spring MVC
- / /
- Bean
-
Spring Pattern
Spring Beanssingleton
Spring Beanssingleton
new
new
-
Spring Pattern
-
Spring Pattern
DTO . singleton scope . .
-
Spring Aspect
-
Spring Aspect
-
ubiqo
-
4+1
RM-ODP
[email protected]/architecting.kr
-
[email protected]/architecting.kr 2
-
? (framework)
,
, ,
.
[email protected]/architecting.kr
-
, .
[email protected]/architecting.kr
-
. ,
, ,
.
.
[email protected]/architecting.kr
-
.
.
. .
[email protected]/architecting.kr
-
(Application Framework)
.
GUI : Qt, gtk+, OpenOffice, Motif, MFC, AWT, Swing : (Struts)
[email protected]/architecting.kr
-
(Application Framework) . ,
.
[email protected]/architecting.kr
-
(Application Framework)
.
.
[email protected]/architecting.kr
-
(Application Framework)
C++ STL .
.
.
[email protected]/architecting.kr
-
(Architectural Framework) .
.
, , .
[email protected]/architecting.kr
-
?
.
.
[email protected]/architecting.kr
-
.
. .
. . .
[email protected]/architecting.kr
-
: . : , ,
. :
.
[email protected]/architecting.kr
-
. . ,
IEEE 1471 .
. .
[email protected]/architecting.kr
-
: 4+1 The 4+1 View Model of
Architecture IEEE,
November 1995, P.
Kruchten(Rational)
16/[email protected]/architecting.kr
-
: 4+1 4+1
[email protected]/architecting.kr
-
: 4+1 4+1
: +1 View Scenario ( Use Case View)
: 4 View Logical View ( Design View) Process View Development View ( Implementation View) Physical View (Deployment View) Physical View (Deployment View)
[email protected]/architecting.kr
-
: 4+1 4+1
5 4+1?
. 4
. 4 4
. . +1 4
.
Scenario
[email protected]/architecting.kr
-
: 4+1 4+1 : (Scenario)
4 . . .
? ? ? ?
[email protected]/architecting.kr
-
: 4+1 4+1 :
(Use Case diagram) :
. (Use Case description) :
. (Interaction diagram) :
. . (Activity diagram) :
.
[email protected]/architecting.kr
-
: 4+1 4+1 : (Logical View)
.
. .
:
? , ,
? ? ?
[email protected]/architecting.kr
-
: 4+1 4+1 :
(Package diagrams) :
. (Class diagrams) :
. (Interaction diagrams) :
. . (Statechart diagrams) :
.
,
.
[email protected]/architecting.kr
-
: 4+1 4+1 :
(process) (thread) , ,
. , .
. ()
? ?
[email protected]/architecting.kr
-
: 4+1 4+1 :
(Class diagram) : , ,
. (Object diagram) :
.
.
[email protected]/architecting.kr
-
: 4+1 4+1 - (development view)
. . .
.
// ? ? ? ?
[email protected]/architecting.kr
-
: 4+1 4+1 -
(Component diagram) :
.
,
. ,
, ,
, .
[email protected]/architecting.kr
-
: 4+1 4+1 - (physical view)
. .
? ? ? , , ? ,
?
[email protected]/architecting.kr
-
: 4+1 4+1 - (physical view)
(Deployment diagram)
.
[email protected]/architecting.kr
-
: 4+1 4+1
. , ,
. .
[email protected]/architecting.kr
-
: RM-ODP RM-ODP(Reference Model for Open Distributed
Processing) ? RM-ODP
(ISO/IEC 10746).
[email protected]/architecting.kr
-
: RM-ODP RM-ODP
, , ,
. RM-ODP (heterogeneous)
(interoperability) (distributed)
(distribution transparency) (distribution transparency)
.
[email protected]/architecting.kr
-
: RM-ODP RM-ODP
(Enterprise)
(Computational)
(Information)
(Engineering)
(Technology)
[email protected]/architecting.kr
-
: RM-ODP RM-ODP -
.
.
: :
? : ?
[email protected]/architecting.kr
-
: RM-ODP RM-ODP -
(Enterprise Objects) (Communities) (Roles) (Contracts)
UML UML
.
[email protected]/architecting.kr
-
: RM-ODP RM-ODP -
. 4+1
(information object)
. (the universe
of discourse) .of discourse) . , , , .
: ? : ?
[email protected]/architecting.kr
-
: RM-ODP RM-ODP -
.
(schema) . . (, invariant) :
. (, static) :
.(, dynamic) : (, dynamic) :
.
[email protected]/architecting.kr
-
: RM-ODP RM-ODP -
.
.
. . , , , ,
.
[email protected]/architecting.kr
-
: RM-ODP RM-ODP -
.
: :
?
, , ,
.
[email protected]/architecting.kr
-
: RM-ODP RM-ODP
, , ,
. , , ,
.
, , , ,
. , ,
, , .
[email protected]/architecting.kr
-
: RM-ODP RM-ODP
RM- ODP
[email protected]/architecting.kr
-
: RM-ODP RM-ODP
[email protected]/architecting.kr
-
.
. .
.
[email protected]/architecting.kr
-
. 4+1 , RM-
ODP . 4+1 , , , ,
. . RM-ODP , , , ,
.
[email protected]/architecting.kr
-
[email protected]/architecting.kr 45