1 / 40

Visualizing Architectures

Visualizing Architectures. INF 123 – Software architecture tdebeauv@uci.edu. Outline. Some theory The tools Examples Socket networking in the Linux kernel Vivox : VOIP for Second Life. Some theory. Software Architecture. The set of most important design decisions “Most important”

keiran
Download Presentation

Visualizing Architectures

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visualizing Architectures INF 123 – Software architecture tdebeauv@uci.edu

  2. Outline • Some theory • The tools • Examples • Socket networking in the Linux kernel • Vivox: VOIP for Second Life

  3. Some theory

  4. Software Architecture • The set of most important design decisions • “Most important” • According to the stakeholders • “Design decisions” • Aware of the options • Also called constraints • More than just the code structure

  5. Architectural Model • Aka architectural view • A subset of the design decisions • Focused on a particular concern • Separation of concerns! MASC! • Examples • Server-side of an online game • How the Linux kernel handles networking • Authentication process

  6. Architectural Model A visualization of the model “protect an entrance” Architecture

  7. How do we choose what to model? • Stakeholders decide • What should be modeled/modelled • Components, connectors, configurations, rationales, constraints, behaviors, non-functional requirements, … • At what level of detail • At what level of fidelity • More faithful = more expensive to maintain

  8. Example: level of detail (few details)

  9. More details

  10. Inconsistent models • Models contradicting each other

  11. Reasons for inconsistencies • Architects with different opinions • Level of detail • High-level view has components absent in a lower-level view • Static vs dynamic concerns • Component structure != protocol • Functional vs non-functional concerns • Broadcast the message to everyone vs scalability • Physical vs logical concerns • 2 self-contained subsystems for 3 machines

  12. Visualizing models • A model is abstract • Abstraction! MASC! • A visualization must allow… • Architects to present their models • Stakeholders to discuss the models • A visualization is concrete

  13. Tools

  14. Describing a Software Architecture • “Just look at the source code!” • Natural language • Easy to discuss and contract-like, but long to read • XML, JSON • Good for hierarchical structures, but hard to read • Images/screenshots • Good for usability arch, not for system or deploy • Box-and-arrow diagrams • Back and forth with XML/JSON

  15. Natural language The system has 3 components: C1, C2, and C3. C1 receives inputs from the user and forwards them to C2. C1 also receives information from C2 and displays it to the user. C2 …

  16. XML <instance:xArchxsi:type=”instance:XArch”> <types:archStructurexsi:type=”types:ArchStructure” types:id=”ClientArch”> <types:descriptionxsi:type=”instance:Description”> Client Architecture </types:description> <types:componentxsi:type=”types:Component” types:id=”WebBrowser”> <types:descriptionxsi:type=”instance:Description”> Web Browser </types:description> <types:interfacexsi:type=”types:Interface” types:id=”WebBrowserInterface”> <types:descriptionxsi:type=”instance:Description”> Web Browser Interface </types:description> <types:directionxsi:type=”instance:Direction”> inout </types:direction> </types:interface> </types:component> </types:archStructure> </instance:xArch>

  17. JSON xArch{ archStructure{ id = “ClientArch” description = “Client Architecture” component{ id = “WebBrowser” description = “Web Browser” interface{ id = “WebBrowserInterface” description = “Web Browser Interface” direction = “inout” } } } }

  18. Screenshots Fast, 12pts Static, 1pt Slow, 70pts

  19. Box and Arrow • The most appropriate most of the time • UML • Other standard diagrams Display Logic State

  20. UML • Structure • Class diagram • Component diagram • Interaction • Communication diagram • Sequence diagram • Behavior • State machine • Flowchart/Activity diagram

  21. Other standard diagrams • Control flow graph • Data flow diagram • Swimming lane diagram

  22. Your own diagrams • Use the same symbol for the same things • Use standard symbols and representations • Don’t use the same symbol for different things • Add a legend if needed Client 1 Client 2 Send position Has a 2-way connection server

  23. Tools for diagrams • Dia https://wiki.gnome.org/Apps/Dia • Not just UML • ArgoUMLhttp://argouml.tigris.org/ • Eclipse UML plugins • Visio, PowerPoint • Gliffy, Lucidchart, online tools • Paint (please don’t …)

  24. Example: Socket networking in the Linux kernel

  25. Swimming lane diagram http://www.cs.unh.edu/cnrg/people/gherrin/linux-net.html

  26. http://www.cs.unh.edu/cnrg/people/gherrin/linux-net.html

  27. Flowchart http://www.cs.unh.edu/cnrg/people/gherrin/linux-net.html

  28. Data flow diagram http://wiki.openwrt.org/doc/networking/praxis

  29. Vivox: VOIP for second life

  30. High-level diagram Why is Vivox a separate server process?

  31. Separation of concerns! Still working. But chat is down. Still working  Down! Chat is down 

  32. Sequence diagram without Vivox http://bowling-bash.blogspot.com/2010/03/vivox-integration.html

  33. Sequence diagram with Vivox Server-side Client-side http://bowling-bash.blogspot.com/2010/03/vivox-integration.html

  34. Client-side protocol http://bowling-bash.blogspot.com/2010/03/vivox-in-sl-client-server-and-protocols.html

  35. Class diagram (sort of) http://bowling-bash.blogspot.com/2010/03/vivox-in-sl-client-side-components.html

  36. Component diagram http://bowling-bash.blogspot.com/2010/03/vivox-in-sl-client-side-components.html

  37. Communication diagram http://bowling-bash.blogspot.com/2010/03/vivox-in-sl-client-side-components.html

More Related