architecting lecture

Download Architecting Lecture

Post on 22-Jan-2017

474 views

Category:

Software

4 download

Embed Size (px)

TRANSCRIPT

  • ?

    www.architecting.kr

    architect@evalleyvs.com/jongidal@gmail.com

  • .?

  • .?

  • .

  • ????

  • .() ()

    ()

    ()

    .

  • .

  • .

    .

  • ?

  • ,

    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

    architect@evalleyvs.com/jongidal@gmail.com

  • 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

  • 1jongidal@gmail.com/architecting.kr

  • jongidal@gmail.com/architecting.kr 2

  • jongidal@gmail.com/architecting.kr 3

  • jongidal@gmail.com/architecting.kr 4

  • jongidal@gmail.com/architecting.kr 5

  • jongidal@gmail.com/architecting.kr 6

  • ADD(Attribute-Driven Design)

    jongidal@gmail.com/architecting.kr 7

  • jongidal@gmail.com/architecting.kr 8

  • jongidal@gmail.com/architecting.kr 9

  • ?

    jongidal@gmail.com/architecting.kr 10

    . .

    .

  • jongidal@gmail.com/architecting.kr 11

  • ?

    013 x

    )1)(1(1 23 xxxx

    jongidal@gmail.com/architecting.kr 12

    )1)(1(1 23 xxxx

    2

    31,1

    ixx

  • ?

    jongidal@gmail.com/architecting.kr 13

    !

  • jongidal@gmail.com/architecting.kr 14

  • jongidal@gmail.com/architecting.kr 15

  • jongidal@gmail.com/architecting.kr 16

  • jongidal@gmail.com/architecting.kr 17

  • jongidal@gmail.com/architecting.kr 18

    OASIS

    DB

    Report

  • jongidal@gmail.com/architecting.kr 19

  • jongidal@gmail.com/architecting.kr 20

  • jongidal@gmail.com/architecting.kr 21

  • jongidal@gmail.com/architecting.kr 22

  • jongidal@gmail.com/architecting.kr 23

  • jongidal@gmail.com/architecting.kr 24

  • ( )

    jongidal@gmail.com/architecting.kr 25

    ( )

  • (AFW)

    (BFW)

    jongidal@gmail.com/architecting.kr 26

  • jongidal@gmail.com/architecting.kr 27

  • HTTP

    EAI

    IIOP

    XML/HTTP HTTP

    ActiveX

    jongidal@gmail.com/architecting.kr 28

    DB

    DBMS

    File

    RMI-IIOP

    JDBC

  • HTML/RIA/

    ChannelAdapter

    jongidal@gmail.com/architecting.kr 29

    ChannelManager

    Connector

    DBMS/File/LDAP

  • jongidal@gmail.com/architecting.kr 30

  • jongidal@gmail.com/architecting.kr 31

  • jongidal@gmail.com/architecting.kr 32

    (BFW

    )

  • :

    jongidal@gmail.com/architecting.kr 33

  • :

    jongidal@gmail.com/architecting.kr 34

  • :

    35

  • :

    36

  • []

    []- [] [] []

    []

    []-1

    []-2 []-3 []1 []2

    []

    jongidal@gmail.com/architecting.kr 37

  • 1.

    2.

    4.

    3.

    jongidal@gmail.com/architecting.kr 38

    5.

    6.

    9.

    7.

    8.

    10.

    11. (, ...)

    12.

    13.

  • /

    jongidal@gmail.com/architecting.kr 39

  • (Business WorkflowComponent, BWC)

    jongidal@gmail.com/architecting.kr 40

    (Business DomainComponent, BDC)

  • ABWC

    A

    aBDC

    A

    bBDC

    BBWC

    B

    cBDC

    B

    dBDC

    BFW

    jongidal@gmail.com/architecting.kr 41

  • Channel

    jongidal@gmail.com/architecting.kr 42

    Connector

    BusinessBusiness

  • jongidal@gmail.com/architecting.kr 43

  • jongidal@gmail.com/architecting.kr 44

  • /

    jongidal@gmail.com/architecting.kr 45

    /

  • jongidal@gmail.com/architecting.kr 46

  • jongidal@gmail.com/architecting.kr 47

  • jongidal@gmail.com/architecting.kr 48

  • Exception

    RuntimeExceptionSQLException ParseException IOException

    NullPointerException

    NumberFormatException

    BizExceptionSysException

  • X-Internet

    jongidal@gmail.com/architecting.kr 52

  • jongidal@gmail.com/architecting.kr 53

  • jongidal@gmail.com/architecting.kr 54

  • Xinternet

    Xinternet Xinternet

    1. 4.

    ( URL )

    5.

    7.

    6.

    jongidal@gmail.com/architecting.kr 55

    HTTP

    2.

    ( URL )

    3. URL

  • >

    1. .

    5. .

    2. .

    4

    6. .

    jongidal@gmail.com/architecting.kr 56

    3. SQL.

    4. .

  • jongidal@gmail.com/architecting.kr 57

  • jongidal@gmail.com/architecting.kr 58

  • jongidal@gmail.com/architecting.kr 59

  • (EJB)

    jongidal@gmail.com/architecting.kr 60

  • (Spring)

    jongidal@gmail.com/architecting.kr 61

  • jongidal@gmail.com/architecting.kr 63

  • 64

  • 65

  • 66

  • 67

  • 68

  • jongidal@gmail.com/architecting.kr 69

  • .

    .

    , .

    .

    , , .

    jongidal@gmail.com/architecting.kr 70

  • .

    .

    .

    . .

    .

    .

    jongidal@gmail.com/architecting.kr 71

  • .

    .

    .

    .

    .

    .

    jongidal@gmail.com/architecting.kr 72

  • 73jongidal@gmail.com/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 -