Скачать презентацию Institute for Software Research 1 Software Architecture Скачать презентацию Institute for Software Research 1 Software Architecture

f060eb9db98dfd9e8fd61aa180868c5b.ppt

  • Количество слайдов: 51

Institute for Software Research 1 Institute for Software Research 1

Software Architecture in Cyberspace Mary Shaw Carnegie Mellon University http: //www. cs. cmu. edu/~shaw/ Software Architecture in Cyberspace Mary Shaw Carnegie Mellon University http: //www. cs. cmu. edu/~shaw/ Institute for Software Research

p The Internet infrastructure supports a creative and thriving social and economic system. p p The Internet infrastructure supports a creative and thriving social and economic system. p The Internet is much richer than its communication infrastructure. p Architectural styles help explain software systems. p What is an appropriate theory of architectural style for Internet applications? Institute for Software Research 3

p The Internet infrastructure supports a creative and thriving social and economic system. p p The Internet infrastructure supports a creative and thriving social and economic system. p The Internet is much richer than its communication infrastructure. p Architectural styles help explain software systems. p What is an appropriate theory of architectural style for Internet applications? Institute for Software Research 4

p The Internet infrastructure supports a creative and thriving social and economic system. v p The Internet infrastructure supports a creative and thriving social and economic system. v End users are integral to the Internet, not simply its audience F end users are active participants, not passive consumers F end user producers outnumber technical professionals p Architectural styles help explain software systems. p What is an appropriate theory of architectural style for Internet applications? Institute for Software Research 5

Demographics of US Internet users Overall Total adults 73% Women 73 Men 73 Age Demographics of US Internet users Overall Total adults 73% Women 73 Men 73 Age 18 -29 90% 30 -49 85 50 -64 70 65+ 35 Geography urban 74% suburban 77 rural 63 Education < high school 63 some college 84 college + 91 44% Institute for Software Research 6

Activities of online users (“have you ever? ”) Activity % of ‘net users Date Activities of online users (“have you ever? ”) Activity % of ‘net users Date Send or read email 92 Dec 07 Use search engine 89 May 08 Search for map/directions 86 Dec 06 Look for info on hobby/interest 83 F-M 07 Check on product before buying 81 Sep 07 Check weather 80 May 08 Look for health/medical info 75 Dec 07 Get travel info 73 M-J 04 Get news 73 May 08 Buy product 71 Dec 07 Visit government website 66 May 08 Buy travel reservation 64 Sep 07 Surf for fun 62 F-A 06 + 65 more Institute for Software Research 7

Content from online users (“have you ever? ”) Activity % of ‘net users Date Content from online users (“have you ever? ”) Activity % of ‘net users Date Upload photos to share 37 Aug 06 Rate product with online rating system 32 Sep 07 Post comment or review of product 30 Sep 07 Use online social networking site 29 Dec 06 Categorize or tag online content 28 Dec 06 Share files from your computer 27 M-J 05 Post comments to online group or blog 22 Dec 07 Share something online you created 21 Dec 07 Create content for the internet 19 Nov 04 !! Share files with peer-to-peer sharing 15 May 08 Create or work on your own webpage 14 Dec 07 Create web pages/blogs for others 13 Dec 07 Create or work on your own blog 12 May 08 Participate in online health discussion 12 Aug 06 Institute for Software Research 8

Generation differences Activity Online After Teens Work 12 -17 70+ Go online 87 Gen Generation differences Activity Online After Teens Work 12 -17 70+ Go online 87 Gen Y Gen X Trailing Leading Boomer Matures Boomer 18 -28 29 -40 41 -50 51 -59 60 -69 84 87 79 75 64 21 Teens and Gen Y more likely than older users: Online games 32 Inst message 25 Download music 5 Download video 1 81 54 37 29 25 25 75 66 52 38 42 33 51 45 28 16 14 8 31 27 22 14 8 8 Gen X or older generations dominate 9 Get health info 73 Institute for Software Research 84 80 84 68

There are lots of end users Using data from the Bureau of Labor Statistics, There are lots of end users Using data from the Bureau of Labor Statistics, we estimate that over 90 M Americans will use computers at work in 2012. Of these, only about 2. 5 M will be professional programmers; 40. 5 M will be managers and (non-software) professionals. This does not include home users or non-US users, so there will be many more than 90 M total end users. Most of them will “program” in some way. Institute for Software Research 10 C. Scaffidi, M. Shaw, and B. Myers. Estimating the Numbers of End Users and End User Programmers. VL/HCC'05: Proc 2005 IEEE Symposium on Visual Languages and Human-Centric Computing , pp. 207 -214, 2005.

End users are not software engineers p End users do not have rich and End users are not software engineers p End users do not have rich and robust mental models of their computing systems v they fail to do backups v They misunderstand storage models (especially local vs network storage) v they execute malware v they innocently engage in other risky behavior. The responses of SE to this mismatch between real computing systems and end users’ models has been to seek ways to help the users act “rationally”. p But there is lots of evidence that people do not reason that way. p Institute for Software Research 11

Human network is part of the Internet Intrinsic property (say, dependability) of a unit Human network is part of the Internet Intrinsic property (say, dependability) of a unit in a specific (or assumed) environment based on a specific set of attributes + context, value proposition Situational dependency, reflecting the environment and a specific user’s needs, tolerances, priorities, expectations + perception, understanding humans Pragmatic dependability – as realized in practice – which results from decisions made by people and social groups and by the ways users behave Institute for Software Research 12

p The Internet infrastructure supports a creative and thriving social and economic system. p p The Internet infrastructure supports a creative and thriving social and economic system. p The Internet is much richer than its communication infrastructure. v This is an Ultra-Large Scale System F Usual software system assumptions don’t hold p Architectural styles help explain software systems. p What is an appropriate theory of architectural style for Internet applications? Institute for Software Research 13

Ultra-Large-Scale Systems More than “systems of systems” or “networks of networks” p Large size Ultra-Large-Scale Systems More than “systems of systems” or “networks of networks” p Large size on many dimensions … p v Lines of code, amount of data, users, dependencies among and complexity of components, etc p … but more than that v Decentralized operation and control v Conflicting, unknowable, diverse requirements v Continuous evolution and deployment v Heterogeneous, inconsistent, changing elements v Indistinct people/system boundary v Normal failures v New forms of acquisition and policy Institute for Software Research 14 SEI. Ultra-Large-Scale Systems. 2006

Decentralized operation and control p ULS system scale offers only limited possibilities for central Decentralized operation and control p ULS system scale offers only limited possibilities for central or hierarchical control v Long life, multiple users and objectives, span of physical jurisdictions are the norm at ULS scale v Many versions of subsystems must work together v Modifications are developed and installed by independent groups v Spontaneous, unanticipated new uses arise Undermines common assumption: p All conflicts must be resolved and must be resolved uniformly Institute for Software Research 15

Conflicting, unknowable, diverse requirements p ULS systems serve wide range of competing needs v Conflicting, unknowable, diverse requirements p ULS systems serve wide range of competing needs v Competing users contend for requirements v Understanding of problem evolves v Dependability is “better/worse”, not “right/wrong” v Wicked problems Undermines common assumptions: p Requirements are known in advance, evolve slowly p Tradeoff decisions will be stable Institute for Software Research 16

Continuous evolution and deployment p ULS systems have long lives and multiple independent developers Continuous evolution and deployment p ULS systems have long lives and multiple independent developers v Different groups may install capability for their own needs; this may conflict with other groups v Evolution can’t be controlled centrally, must be shaped by rules and policies that protect critical services and allow diversity at the edges Undermines common assumption: p System improvements introduced in “releases” p Users/developers know about releases and can choose to accept them or not Institute for Software Research 17

Heterogeneous, inconsistent, changing elements p ULS systems will be composed from independentlycreated components many Heterogeneous, inconsistent, changing elements p ULS systems will be composed from independentlycreated components many sources, no single interface standard, often incorporating legacy systems v Inconsistent: evolution spontaneous, not planned; different objectives may cause inconsistent versions v Changing: hardware, software, operating environment change based on local decisions v Heterogeneous: Undermines common assumptions: p Effect of change can be predicted adequately p Configuration information is accurate and controlled p Components and users are fairly homogeneous Institute for Software Research 18

Indistinct people/system boundary p ULS systems’ service to a user depends on actions of Indistinct people/system boundary p ULS systems’ service to a user depends on actions of other users; user/developer distinction soft v User actions may affect overall system health v System must adapt to changing usage patterns v Aggregate analysis may be better than exact analysis Undermines common assumption: p Users’ behavior doesn’t affect overall system p Collective behavior of people is not relevant p Social interactions are not relevant Institute for Software Research 19

Normal failures p ULS system scale implies inevitable failures, so systems must do protection/recovery/enforcement Normal failures p ULS system scale implies inevitable failures, so systems must do protection/recovery/enforcement v Hardware failures inevitable because of scale v Legitimate use of software and services outside planned capability will cause degradation/failure v Malicious use will cause problems Undermines common assumptions: p Failures will be infrequent and exceptional p Defects can be removed Institute for Software Research 20

New forms of acquisition and policy p ULS systems will evolve, but there must New forms of acquisition and policy p ULS systems will evolve, but there must be governance to prevent anarchy v Success of system depends on organic evolution v Individual developers won’t fully understand core infrastructure v Need effective guidance on allowed/unallowed change Undermines common assumption: p There is a single agent responsible for system development, operation, and evolution Institute for Software Research 21

Analogy: Cities and city planning p Cities are complex systems v Built of individual Analogy: Cities and city planning p Cities are complex systems v Built of individual components chosen by individuals v Constantly evolve v Withstand failures and attacks p Cities are not centrally controlled v Standards F Building v Policies for infrastructures codes, highway standards that allow individual action within constraints F Zoning laws v Regulations that govern individual action F Enforcement after the fact, rather than prior constraint Institute for Software Research 22

p The Internet infrastructure supports a creative and thriving social and economic system. p p The Internet infrastructure supports a creative and thriving social and economic system. p The Internet is much richer than its communication infrastructure. p Architectural styles help explain software systems. v Style establishes the abstract structure of a system v Character of problem should lead to style for solution p What is an appropriate theory of architectural style for Internet applications? Institute for Software Research 23

Architectural style in software Styles are rooted in common knowledge, intuition, informal prose, box-and-line Architectural style in software Styles are rooted in common knowledge, intuition, informal prose, box-and-line diagrams p A style is a set of design rules that identify p v which kinds of components make up a system v which kinds of connectors compose the components v how control is shared among components v how data is transmitted through the system v what type of reasoning is compatible with the style p Focus on abstractions used by designers v In practice, implemented as processes and calls … v … but that loses the designer’s intent Institute for Software Research 24 M Shaw and P. Clements, A Field Guide to Boxology… COMPSAC 1997

Examples of styles p Data flow styles v Batch p Call-and-return styles v Main Examples of styles p Data flow styles v Batch p Call-and-return styles v Main p sequential, dataflow network, closed-loop control program/subroutines; object-oriented systems Interacting process styles v Communicating p Data-centered repository styles v Transactional p document, hypertext, Fortran common Hierarchical styles v Layers 25 database, blackboard Data-sharing styles v Compound p processes, event subsystems Institute for Software Research

Members of Interacting Process Family All members of the family are dominated by messagepassing Members of Interacting Process Family All members of the family are dominated by messagepassing protocols among independent , usually concurrent processes with sporadic low-volume traffic. ===Control=== ====Data==== Topo- Synch- Topo. Substyle logy roniciy logy Mode Comm proc arb 1 way data flowlinear Client-server star Heartbeat hier pass, share Broadcast arb Token passing arb 26 not seq arb any asynch linear passed synch star passed ls/par hier/star asynch arb bdcast Institute for Software Research passed G. Andrews, Paradigms for Process Interaction in Distributed Programs. ACM Comp Surv 1991

Language of Styles: Constituent Parts p Component: unit of software that performs some function Language of Styles: Constituent Parts p Component: unit of software that performs some function at runtime process stand-alone program procedure transducer manager memory p Connector: mechanism that mediates communication, coordination, cooperation among components procedure call data stream shared representation direct access message protocol implicit invocation Institute for Software Research 27

Language of Styles: Control Issues p Topology: Geometric form of control flow linear acyclic Language of Styles: Control Issues p Topology: Geometric form of control flow linear acyclic hierarchical arbitrary p Synchronicity: dependency among components synchronous opportunistic p asynchronous direct access Binding time: when are control relations set up message protocol initialization time compile time while running Institute for Software Research 28

Language of Styles: Data Issues p Topology: Geometric form of data flow linear acyclic Language of Styles: Data Issues p Topology: Geometric form of data flow linear acyclic hierarchical arbitrary p Continuity: how continuous is flow continuous sporadic (discrete times) p Mode: how data is made available explicit passing sharing broadcast multicast p Binding time: when are control relations set up message protocol initialization time compile time while running Institute for Software Research 29

Language of Styles: Reasoning p Data flow styles v Functional p Call-and-return styles v Language of Styles: Reasoning p Data flow styles v Functional p Call-and-return styles v Hierarchy p composition (local reasoning) Interacting process styles v Nondeterminism p Data-centered repository styles v Data p integrity (ACID, convergence, invariants) Data-sharing styles v Representation p Hierarchical styles v Levels 30 of service Institute for Software Research

Utility of Arch Description Languages p Establish uniform descriptive notation v Clarify informal concepts Utility of Arch Description Languages p Establish uniform descriptive notation v Clarify informal concepts v Document design intent p Discriminate among different styles v Bring out significant differences that affect suitability for various tasks p Provide advice on selecting style for a problem v Following Jackson, characterize problem domain and use this to select appropriate abstract architecture v Separate concerns about fit of architecture to problem from implementation and performance issues v Allow comparison of alternatives, potentially simulation and analysis Institute for Software Research 31

p The Internet infrastructure supports a creative and thriving social and economic system. p p The Internet infrastructure supports a creative and thriving social and economic system. p The Internet is much richer than its communication infrastructure. p Architectural styles help explain software systems. p What is an appropriate theory of architectural style for Internet applications? v Style establishes the abstract structure of a system v Character of problem should lead to style for solution Institute for Software Research 32

Picking a target in cyberspace Cyberspace supports many sophisticated applications, interactions, and communities, including Picking a target in cyberspace Cyberspace supports many sophisticated applications, interactions, and communities, including everything from IM/email to enterprise integration. p Focus here on the web as used by everyday people p This is the most different from conventional software systems v We need to start with a specific focus v End users are in dire need of support v Institute for Software Research 33

Example: Twitter Vote Report On US Election Day 2008, this application, set up by Example: Twitter Vote Report On US Election Day 2008, this application, set up by an interested user community, collected reports on status of polling places and displayed it on a map in near real time so that interested people, especially the public, could spot problem areas 34 Institute for Software Research

Vote. Report input stream Data was collected by twitter, SMS, and telephone call. A Vote. Report input stream Data was collected by twitter, SMS, and telephone call. A stylized format was provided (and often ignored) The message feed was available Institute for Software Research 35

Vote. Report composition The Vote. Report application interpreted the Twitter/SMS feed, geo-referenced the data, Vote. Report composition The Vote. Report application interpreted the Twitter/SMS feed, geo-referenced the data, and mapped them, presumably through the efforts of professional programmers. The report could be embedded in a web site by anyone The input stream was also available 36 Institute for Software Research

Mashups “Mashup”s combine functionality of multiple websites or augment existing websites; they show users Mashups “Mashup”s combine functionality of multiple websites or augment existing websites; they show users build on existing systems in new and innovative ways. p Wong did a qualitative survey of high-quality mashups to see how they used/improved existing web sites, how they combined data from multiple sites, and what kinds of user tasks they support p Overall impression: mashups are ad hoc and idiosyncratic p Institute for Software Research 37 J. Won and J Hong. What do we “mashup” when we make mashus? WEu. SE IV 08

Capabilities of Mashups provided a variety of capabilities, often more than one per mashup Capabilities of Mashups provided a variety of capabilities, often more than one per mashup : Does it have a search interface? v Visualization : Does it add visualization to the date? v Real-time : Is the purpose to allow user to monitor original websie as realtime data set? v Widget : Is it actually a widget or plugin? v Personalized : Does it use personal information or enable personalization? v Folksonomy : Does it use or add tagging? v In-situ use: Does it simply tailor a website for a specific situation or use? v Search Institute for Software Research 38

Categories of mashups Aggregation: aggregate multiple websites or summarize sets of data p Alternate Categories of mashups Aggregation: aggregate multiple websites or summarize sets of data p Alternate UI & In-situ use: provide new ways t interact with a website or support specific use cases p Personalization: specialize a website based on personal data from that site or another source p Focused View of Data: index or categorize contents of another website p Real-time Monitoring: react to changes in a website and make user aware of them p Institute for Software Research 39

Implementations of mashups p Inputs v RSS feeds, search engine feeds, personal names, user Implementations of mashups p Inputs v RSS feeds, search engine feeds, personal names, user ids, settings, ranges, geographical points and directions, search terms, tracking numbers, ISBNs, headlines, tags, “clippings” (screen scraping? ) p Outputs v RSS feeds, list of links, visualizations, text, maps, pictures, numeric tables, lists, reports p APIs v Delicious, yelp, craiglist, flickr, city information feeds, e. Bay, Google Maps, Google Earth, USGS DRM, amazon, UPS, USPS, Fed. Ex, i. Tunes, Napster, news sites, wikipedia daylife, Rhapsody, search engines, Twitter, You. Tube, My. Space Institute for Software Research 40

Architectural Task for Web Applications p How do web applications differ from classical software Architectural Task for Web Applications p How do web applications differ from classical software systems? v Richer set of component types v Much stronger role for data and its presentation v More integration by inclusion or embedding v More significance for initiative (push/pull) v Minimal reliance on compiler for integration p How much of classic architectural style carries over? How much extension is required? v Structure (component/connector/composition) remains valid v Details partially hold, but require extension Institute for Software Research 41

Online Activities Between user and … Interactive Synchronous Asynchronous … few known people IM, Online Activities Between user and … Interactive Synchronous Asynchronous … few known people IM, chat, email online meetings private blog, photo sharing … many unknown people multiplayer games, broadcast public blog, wiki, social networks, ratings … a server e-commerce, search, news, banking, games, job hunt remote desktop newsgroups, mailing lists, RSS feeds web browsing, music download, storage/backup Institute for Software Research 42

Distinguishing the Classes of Solutions One role of an architecture for cyberspace is to Distinguishing the Classes of Solutions One role of an architecture for cyberspace is to explain the structural distinctions among the applications that support user activities p Sometime differences matter p v You wouldn’t use IM for offline backup of photo files v What attributes of IM, photo files, and the backup task show the mismatch? p Sometimes the same application can be realized in different ways v Both FTP and P 2 P support file sharing, but with different resource implications v What attributes show the abstract similarity, and what attributes show the resource implications? Institute for Software Research 43

Elementary Component Types (provisional) Text (human-readable, file or message) p Encoded file (typed set Elementary Component Types (provisional) Text (human-readable, file or message) p Encoded file (typed set of bits) p Database (structured, with query capability) p Web page (human-readable, possibly generated) p Computation or service p Stream (continuous, nonpersistent) p Human (yes, people are part of the system) p p Attributes of interest v state persistence, qualitative size, type/internal structure, rate of change (static/dynamic) Institute for Software Research 44

Connector Primitives (provisional) Institute for Software Research 45 Connector Primitives (provisional) Institute for Software Research 45

Composition of primitives p Abstractly, we can recognize v Simple connections F Scripting, v Composition of primitives p Abstractly, we can recognize v Simple connections F Scripting, v Remote F RPC, linking call in various forms service invocation v Extended sessions F Browser session with session ID v User-facing compositions F Installation v Enterprise F SOA, of plug-in, mashups compositions Saa. S Institute for Software Research 46

Example: Internet Messaging p A human creates short unstructured text units and pushes them Example: Internet Messaging p A human creates short unstructured text units and pushes them via IRC to another known person. They are delivered with low latency, but they are not persistent. Institute for Software Research 47

Example: Grapevine model of email p An email system has five components: a composer, Example: Grapevine model of email p An email system has five components: a composer, a reader, a database for archiving messages, a directory system, and a transport mechanism. v. A message is a structured text entity. It has formatted headers, including an address text string, and may have internal formatting and/or attachments. v The composer is an interactive editor (computation) that produces a mail message v The reader can display the message, and it is integrated with the database for archiving messages, which it can also classify and retrieve. v The directory system translates a symbolic address to a destination. v The transport mechanism moves mail to is destination. Institute for Software Research 48 Grapevine paper, CACM, sometime in the 70 s

Example: Vote. Report p Here is a plausible architectural description of the Vote. Report Example: Vote. Report p Here is a plausible architectural description of the Vote. Report application v The input is a stream of messages, merged from twitter, SMS, and transcriptions of phone calls. F The input is supposed to be structured but often is not v. A parser receives the input stream and transduces the messages (to the extent possible) to georeferenced reports v A report has a text, a timestamp, and an icon v Recent reports are displayed on a zoomable map embedded in a web page v Filters are provided, and summaries are displayed v The map and input stream are elements that can be incorporated in other web pages. Institute for Software Research 49

p The Internet infrastructure supports a creative and thriving social and economic system. v p The Internet infrastructure supports a creative and thriving social and economic system. v Some p The Internet is much richer than its communication infrastructure. v The p of the wires in the network have myelin sheaths problems are wicked , not just technical Architectural styles help explain software systems. v Software architecture provides a model for a descriptive theory of software in cyberspace p What is an appropriate theory of architectural style for Internet applications? v Can we help end users at the ends of the network? Institute for Software Research 50

Institute for Software Research 51 Institute for Software Research 51