programming in the many software engineering paradigm for the 21 st century nenad medvidovic center...
Post on 20-Dec-2015
214 views
TRANSCRIPT
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/
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
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!
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!
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
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!
Resource ConstraintsResource Constraints
This has beenyour computer
This is / will become your computer
PITM in a NutshellPITM in a Nutshell
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
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
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?
Questions?Questions?