P rogramming i n t he M any Software Engineering Paradigm for the 21 st Century

12
P P rogramming rogramming i i n n t t he he M M any any Software Engineering Paradigm for the 21 Software Engineering Paradigm for the 21 st st Century Century Nenad Medvidovic Center for Software Engineering Computer Science Department University of Southern California Los Angeles, CA 90089-0781 [email protected] http://sunset.usc.edu/

description

P rogramming i n t he M any Software Engineering Paradigm for the 21 st Century. Nenad Medvidovic Center for Software Engineering Computer Science Department University of Southern California Los Angeles, CA 90089-0781 [email protected] http://sunset.usc.edu/~neno/. PITL in a Nutshell. - PowerPoint PPT Presentation

Transcript of P rogramming i n t he M any Software Engineering Paradigm for the 21 st Century

Page 1: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

PProgramming rogramming iin n tthe he MManyanySoftware Engineering Paradigm for the 21Software Engineering Paradigm for the 21stst Century Century

Nenad Medvidovic

Center for Software EngineeringComputer Science Department

University of Southern CaliforniaLos Angeles, CA 90089-0781

[email protected]://sunset.usc.edu/~neno/

Page 2: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

PITL in a NutshellPITL in a Nutshell

The past: programming in the small (PITS)– small, simple systems– single developer (or small teams)– programs are hacked– developer = customer = user

The present: programming in the large (PITL)– large, complex systems– powerful hardware– teams of developers– systems are engineered– many people, many roles

Page 3: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

aTruck aShip aAirplane theWarehouseCo llecti on

theVehicleCollection

UML-A Generated Dependency Class:theRouter Dependency (1.0)

theStorage

aVehicle

UML-A Generated Dependency Class:theRouter Dependency (0.5)

availableVehicleCollection

UML-A Generated Association Class:theVehicleCollection Generalization (1.0)UML-A Generated Association Class:theVehicleCollection Generalization (1.0)UML-A Generated Association Class:theVehicleCollection Generalization (1.0)UML-A Genera ted As socia tion C lass: theVehicleC ollec tion Genera lization (1.0)UML-A Generated Association Class:theVehicleCollection Generalization (1.0)UML-A Generated Association Class:theVehicleCollection Generalization (1.0)UML-A Generated Association Class:theVehicleCollection Generalization (1.0)UML-A Generated Association Class:theVehicleCollection Generalization (1.0)UML- A Generated Ass ociati on Cl ass:theVehi cleCo llection Generali zation (1.0 )UML-A Generated Association Class:theVehicleCollection Generalization (1.0)

UML-A Generated Dependency Class:theRouter Dependency (1.0)

availableGoods

aPort

aPortC ollec tion

aSurp lus aDifficiency

theTimeNeeded

theGoods

UML-A Generated Association Class:aWarehouse Association (0.5)

UML-A Generated Association Class:aWarehouse Association (0.5)

UML-A Generated Association Class:availableGoods Association (0.5)

aRouteCollection

UML-A Generated Association Class:aRoute Association (0.25)UML-A Generated Association Class:aRoute Association (0.25)UML-A Generated Association Class:aRoute Association (0.25)UML-A Generated Association Class:aRoute Association (0.25)

UML-A Generated Dependency Class:theRouter Dependency (0.5)UML-A Generated Dependency Class:theRouter Dependency (1.0)

UML-A Generated Dependency Class:theRouter Dependency (1.0)

theAWT

aVehiceDialog aWarehouseDialog aPortDialog aRouterDialog

aWarehouse

UML-A Generated Association Class:aDifficiency Association (1.0)UML-A Generated Association Class:aDifficiency Association (1.0)UML-A Generated Association Class:aDifficiency Association (1.0)UML-A Generated Association Class:aDifficiency Association (1.0)

UML-A Generated Association Class:aDifficiency Association (1.0)U ML-A Generated Association Class:aD ifficiency Associ ation (1.0)UML-A Generated Association Class:aDifficiency Association (1.0)UML-A Generated Association Class:aDifficiency Association (1.0)U ML-A Generated Association Class:aD ifficiency Associ ation (1.0)UML-A Generated Association Class:aDifficiency Association (1.0)UML-A Genera ted Associ ation C lass:aSurp lus Associ ation (1.0)UML-A Generated Association Class:aSurplus Association (0.5)

UML-A Generated Associ ation Class:aRoute Association (0.5)

aLocation

UML-A Generated Association Class:aNavPoint Association (1.0)

UML-A Generated Association Class:aWarehouse Association (0.5)

UML-A Generated Association Class:aNavPoint Association (0.5)

UML-A Generated Association Class:aNavPoint Association (0.5)UML-A Generated Association Class:aNavPoint Association (0.5)

UML-A Generated Association Class:aWarehouse Association (0.5)aNavPoint

UML-A Generated Association Class:aWarehouse Association (1.0)

UML-A Generated Association Class:aWarehouse Association (0.5)UML-A Generated Association Class:aWarehouse Association (0.5)

UML-A Generated Association Class:aWarehouse Association (0.5)

UML-A Generated Association Class:aWarehouse Association (0.5)

UML-A Generated Association Class:aRoute Association (0.5)

aRoute

UML-A Genera ted Dependency C lass :aRou teCol lection Ass ociation (0.25)

UML-A Generated Association Class:aNavPoint Association (1.0)UML-A Generated Association Class:aNavPoint Association (0.5)

UML-A Generated Association Class:aWarehouse Association (1.0)

UML-A Generated Dependency Class:aRouteCollection Association (0.5)

UML-A Generated Association Class:aNavPoint Association (1.0)UML-A Generated Association Class:aNavPoint Association (1.0)UML-A Generated Association Class:aNavPoint Association (1.0)UML-A Generated Association Class:aNavPoint Association (1.0)UML-A Generated Association Class:aNavPoint Association (1.0)

UML-A Generated Association Class:aNavPoint Association (0.25)UML-A Generated Association Class:aNavPoint Association (0.25)

UML-A Generated Association Class:aNavPoint Association (0.25)

UML-A Generated Dependency Class:theRouter Association (0.25)

UML-A Generated Association Class:aNavPoint Association (0.25)

theCargoRouter

UML-A Generated Association Class:theRouter Association (0.25)

UML-A Genera ted As socia tion C lass: theWarehouseCo llection Dependency ( 0.25)

UML-A Generated Association Class:theRouter Association (0.25)

UML-A Generated Association Class:theRouter Association (0.25)

t heRou ter

UML-A Generated Association Class:theWarehouseCollection Dependency (0.5)

UML-A Generated Association Class:theWarehouseCollection Dependency (0.5)

UML-A Genera ted Dependency Class :aRouteCollection Ass ociation (0.5)UML-A Generated Association Clas s:theWarehouseCollec tion Dependency (0.5)

UML-A Generated Association Class:theVehicleCollection Dependency (0.5)UML-A Generated Association Class:availableVehicleCollection Dependency (0.5)UML- A Generated Generaliz ation Class :avail ableVehicleCollection Dependenc y (1.0 )

UML-A Generated Dependency Class:theRouter Association (0.25)

UML-A Generated Dependency Class:theRouter Association (0.5)UML-A Generated Dependency Class:theRouter Association (1.0)

UML-A Generated Dependency Class:theRouter Association (0.5)

UML-A Generated Dependency Class:theWarehouseCollection Dependency (1.0)

UML-A Generated Dependency Class:theRouter Association (1.0)UML-A Generated Dependency Class:theRouter Association (1.0)

Why PITL?Why PITL?

This is a simplesoftware system!

Page 4: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

aTruck aShipaAirplane

availableVehicleCollection

theAWT

aVehiceDialogaWarehouseDialog

aPortDialog

aRouterDialog

aRouteCollection

aVehicle

theVehicleCollection

theCargoRouter

theRouter

theTim eNeeded

aRoute

aDeficiency

theWarehouseCollection

aNavPoint

theStorage

RefrigeratedStorage

RegularStorage

availableGoods

aPortCollection

aLocation

theGoods

aWarehouse

aSurplus

aPort

Yesterday’s Tool: Design Yesterday’s Tool: Design AbstractionAbstraction

We have to do better!

Page 5: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

Architecture to the RescueArchitecture to the Rescue

VehicleDel iveryPort

CargoRouter

RouterConn

GraphicsBinding : GraphicsBinding

GraphicsConn

Warehouse

ClockConn

Clock : Clock

10: notification9: notification

5: request

3: request4: request

2: notification

1: request

7: request

6: notification

8: request

Page 6: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

A Peek into the FutureA Peek into the Future

Large, complex, highly distributed systems Teams of developers Many people, many roles Heterogeneous hardware

– desktop, laptop, palmtop– “smart dust” and “smart paint”

Mobility One application runs on many devices

– each device has limited resources

Guess what: the future is now!

Page 7: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

Resource ConstraintsResource Constraints

This has beenyour computer

This is / will become your computer

Page 8: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

PITM in a NutshellPITM in a Nutshell

Page 9: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

What Is an Engineer to Do?What Is an Engineer to Do? Engineer

– Do not “hack” by reusing the best practices of PITL

– Component-based system composition– Explicit architectures with powerful connectors– Modeling and analysis before construction– Mechanisms to support distribution and heterogeneity

and adapting them to the needs and constraints imposed by PITM– Shrink– Optimize– Distribute– Automate

Page 10: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

n

Component

RequestNotification

Notification()Notification()

ListIterator

Thread(f rom lang)

ConnectorThread

Object(f rom lang)

Object(f rom lang)

Hashtable(from uti l)

Message

source

parametersFIFOPort

SimpleArchitecture

SimpleArchitecture()SimpleArchitecture()

ComponentThread

Object(f rom lang)

C2Object

myself

BinarySemaphoravailable : boolean

Connector

bottom top

WorkerThreadSemaphor

localSem

waitingSem

LinkedList

top

bottom

Architecture

0..*

1

+workerThreads

0..*

+arch 1

sem

SynchronizedFIFO

FIFO

messageFIFO

componentFIFO

Brick

messageFIFO

r

n

Component

RequestNotification

Notification()Notification()

ListIterator

Thread(f rom lang)

ConnectorThread

Object(f rom lang)

Object(f rom lang)

Hashtable(from uti l)

Message

source

parametersFIFOPort

SimpleArchitecture

SimpleArchitecture()SimpleArchitecture()

ComponentThread

Object(f rom lang)

C2Object

myself

BinarySemaphoravailable : boolean

Connector

bottom top

WorkerThreadSemaphor

localSem

waitingSem

LinkedList

top

bottom

Architecture

0..*

1

+workerThreads

0..*

+arch 1

sem

SynchronizedFIFO

FIFO

messageFIFO

componentFIFO

Brick

messageFIFO

r

An Example of PITM in ActionAn Example of PITM in Action

n

Component

RequestNotification

Notification()Notification()

ListIterator

Thread(f rom lang)

ConnectorThread

Object(f rom lang)

Object(f rom lang)

Hashtable(from uti l)

Message

source

parametersFIFOPort

SimpleArchitecture

SimpleArchitecture()SimpleArchitecture()

ComponentThread

Object(f rom lang)

C2Object

myself

BinarySemaphor

available : boolean

Connector

bottom top

WorkerThreadSemaphor

localSem

waitingSem

LinkedList

top

bottom

Architecture

0..*

1

+workerThreads

0..*

+arch 1

sem

SynchronizedFIFO

FIFO

messageFIFO

componentFIFO

Brick

messageFIFO

r

PatientProcessing

Clock :Clock

Employee FacilitiesMedicationTreatment

ClockConn

GraphicsConn

GraphicsBinding

Patient Conn

Display

Calibrate

Display

M

MMM

MMMMMM

M

GUI DisplayGUI Display

MMMMM

Page 11: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

PITM ChallengesPITM Challenges Processor speed, memory size, network bandwidth

– PITL taught us not to worry about them True heterogeneity

– Hardware platforms– Operating systems– Programming languages– Interaction paradigms

Modeling, analysis, simulation, and generation – Partial information– Decentralized ownership and control

Inter-device interaction and code mobility– Limited resources– Frequently missing infrastructure

Effectively developing ITM using software architecture concepts– What is the price of insisting on “proper” abstractions?– How can those abstractions be properly realized?

Page 12: P rogramming  i n  t he  M any Software Engineering Paradigm for the 21 st  Century

Questions?Questions?