• # SEM1020 - Current Issues in Software Engineering

This module focuses on current issues in the field of Software Engineering. The module will involve students in an examination of current research literature of interest to software engineers.

• # SEM2220 - Mobile Solutions

Mobile devices (phones, tablets and other handheld devices) are the fastest growing area of computing. Typical applications involve a wide range of software and system issues. This module will investigate those issues, giving students experience and understanding of the best ways of building different types of mobile applications.

• # SEM5640 - Developing Advanced Internet-Based Applications

This module builds on SE31520 examining further the development processes, techniques and technologies for constructing Internet-based, distributed software systems. Particular emphasis is placed on studying and applying enterprise design patterns. Students, working in small groups, will build, using a modern software engineering methodology, a distributed application that employs the technologies and concepts taught in this and previous modules.

Nigel Hardy awesome tally: 2

• # SEM5720 - The Internet And How It Really Works

The Internet is a complex, multi-organisation network reaching nearly all parts of the world. The functioning of this network and the applications running upon it depend on a complex set of protocols. This module addresses the fundamental aspects of the most important issues that permit the network and its applications to operate successfully. The module also addresses the current threats to the Internet and topics still emerging from R&D studies around the world.

Postal service analogies: 4

• # SEM6120 - Introduction to Intelligent Systems

This module introduces the key ideas in Artificial Intelligence and ensures all students are at roughly the same level before moving on to the specialist modules.

• # Seminars

Seminars from Aberystwyth University

• ## Introduction

It is okay to produce a paper based on my own paper :-)

• ## How to Read a Scientific Paper

Papers provides a good view of what is happening now. Journal papers give a more out of date view than conference papers. Blogs typically give the most up-to-date view but are least verifiable.

Papers should give enough information that there is enough information to replicate the experiment.

It will show some actual data.

• ## Paper Presentations

Set down for presenting Abstract State Machines (Feb 28) and Swarm Robotics (Mar 28) and asking questions on Biological Data Sharing (Mar 14) and Swarm Robotics (Apr 4).

• ## Literature Review/Survey Paper

9000 words of pure gold.

May address any aspect of software engineering.

MSc should probably review the literature of their project.

• ## Introduction

Scope of mobile systems, , mobile web, native apps, design choices, main platforms, overview of implications (2 lectures)

• ## Mobile Web

Basic tools, responsive web, matching platform expectations, testing, delivery. (5 lectures plus practicals)

• ## IOS Native Apps

Objective-C, relevant design patterns, platform design considerations, handling data, using sensors and location (5 lectures plus practicals)

• ## Android Native Apps

Relevant design patterns, platform design considerations, handling data, using sensors and location, handling device variation (5 lectures plus practicals)

• ## Bringing it all together

Legal, social, ethical and professional issues. Selecting platforms and delivery methods, getting the interface right. (3 lectures)

• ## Introduction

Provides a road-map to the module, with a brief overview of main concepts and how they interrelate.

• ## Construction Technologies

Examination of technical solutions for building enterprise applications as provided by enterprise Java and .NET for building distributed applications.

These include:

• support for server-side MVC, e.g. JavaServer Faces and ASP.NET MVC;
• business objects, e.g. Enterprise JavaBeans;
• object to relational mapping, e.g. MS LINQ, Java Persistence API;
• messaging systems, e.g. Java Messaging Service;
• interoperability, e.g. SOAP-based web services.
• ## Software Development Process

There is no such thing as a silver bullet for software development processes.

• ## Design Issues

A number of enterprise application design patterns will be reviewed within the context of technologies discussed in 2. Building multi-tier applications requires developers to know more than just technologies, they must also know and use design techniques suited to their development. Students will learn about reusable enterprise design patterns, and in particular those used for the development of distributed, multi-tier applications.

• ## Wider Issues

Examination of current issues that are related to 2 and 3, e.g. scalability; approaches to testing and deployment; the use of cloud computing.

• ## Revision

Preparing for the examination in June

• ## Introduction

This module discusses the detailed underlying operation of the Internet and its constituent components and is an essential topic in its own right as well as providing a solid foundation for much of the other material covered in the MEng.

• ## Practicals

Practical work sessions focusing mainly on the electronics and hardware of network issues.

• ## Basic Issues in Data Communication

A revision of the basic issues in data communication.

• ## Local Area Networks

A detailed study of variants of the technologies collectively known as Ethernet.

• ## Other Network Technologies

A brief look at fast and wireless network technologies.

• ## Standards

The ISO OSI model.

• ## Unicast Network Level Protocols

Unicast Network Level Protocols in use in today’s Internet. Including further study of protocols such as IPv4, ICMP, ARP, RARP used in unicast applications and IPv4 and IGMP used in multicast applications.

• ## Unicast Routing in the Internet

Example routing problems. Interior and exterior routing protocols. Protocols covered will include RIP, OSPF and BGP.

• ## Multicast Routing in the Internet

Example routing problems. Protocols covered will include PIM-DM, PIM-SM and MSDP. We will also cover the role of the Rendezvous Point, Anycast IP, and issues still under debate in the technical community.

• ## Transport Level Protocols

An in-depth study addressing the behaviour of TCP and UDP. Connection establishment and termination, flow control under various load conditions, timeouts and retransmission, newer features and performance.

• ## Naming and Directory Services

Including the DNS and LDAP and their use.

• ## Quality of Service

The need for and the provision of Quality of Service (QoS) within packet based networks such as the Internet which are inherently best efforts at heart.

• ## Security Issues

The inherent risks within networks such as the Internet, cracking, viruses, trojans, worms and denial of service attacks. The role of the Firewall and the problems it can bring.

• ## Current and Future Issues

The (still) emerging IPv6 protocol and other active issues.

• ## Exam Preparation

Some chances to get a feel for what is expected in the exam.

• ## Introduction

General introduction to Artificial Intelligence (AI), including discussion of what AI is, its history, definitions, and philosophical debates on the issue (the Turing test and the Chinese room). Ethical issues (3 hours).

• Why search is important in AI and how to go about it. This includes both informed and uninformed strategies. Evolutionary search (6 hours).

• ## Knowledge Representation

Ways of representing knowledge in a computer-understandable way. Semantic networks, rules. Examples of the importance of KR (4 hours).

• ## Neural Networks and subsymbolic learning

We can find solutions using search, but how can we remember solutions, learn from them and adapt them to new situations? This will cover perceptrons, single-layer and multi-layer networks (5 hours).

• ## Propositional and First-Order Logic

The backbone of knowledge representation (4 hours).

• ## Programming for Intelligent Systems

Practical introduction to programming for Intelligent Systems, used to illustrate search, KR and first-order logic (3 hours).

• ## Rule-based Systems

How can human expertise be automated? How to build an expert system - system concepts and architectures. Rule-based systems: design, operation, reasoning, backward and forward chaining (3 hours).

• ## Knowledge Acquisition

Knowledge Acquisition and its importance in KR and RBS (2 hours).

• ## Statistical Methods

Multivariate analysis and statistical methods for solving problems.

• ## Fuzzy Logic

Not clear cut for a definite value. (i.e. not boolean logic).

• ## Learning from Big Random Weight Networks and Their Training Algorithms

by Xizhao Wang Fellow; IEEE Editor-in-Chief, IJMLC

• ## Some cybersecurity issues of Smart Buildings, Smart Metering, not-so-Smart Cars and the Smart Grid

Martyn Thomas CBE FREng

• ### Learning Outcomes

1. Identify and use the main research resources that are available to software engineers
2. Constructively participate in advanced technical debate in the field.
3. Have a general overview of the field of Software Engineering and be aware of focused areas of research interest within it.
4. Present current research at an appropriate level of detail to a technical audience.
5. Produce a survey paper on some current area of Software Engineering research.
• ### Assessment

• Participation and Contribution 15%
• Survey Paper (9000 words) 60%
• Poster 25%
• ### Steps

1. Read the abstract, check the information will be relevant
2. Read the conclusion and discussion, check the results agree with the abstract and if they are still relevant.
3. Read the introduction, check you understand the background information and see if you need to look up more items to understand this paper.
4. Read the results. Usually tables and figures are provided to show the data.

Now the methods become important, it gives details on how the experiment was set up and carried out. Try to pick out the basic methods and work upwards.

References provide a way of tracking back through the sources.

• ### Learning Outcomes

1. Demonstrate an advanced understanding of the domain of mobile systems.
• Quite a broad overview of these systems.
• High level view.
• Give a flavour of specific systems (iOS, Android).
2. Analyse and evaluate mobile solutions in a range of application areas and be able to critically evaluate their effectiveness.
• Have to be critical at M level.
• Research. Pros and cons.
3. Evaluate the social, legal, ethical and professional issues involved in implementing mobile applications.
4. Implement representative mobile systems.
• Playing with the technologies.
• Building an android, iOS and mobile web app.
• ### Assessment

• Mobile Web-based Programming project 20% 22/10/2013 to 04/11/2013
• iOS-based Programming project 20% 12/11/2013 to 25/11/2013
• Android-based Programming project 20% 02/12/2013 to 16/12/2013
• Case study analysis 40% 10/12/2013 to 22/01/2014
• ### Motivation

In 2012 the whole mobiles ecosystem’s revenue was $1,551 billion; equivalent to 2.2% of global GDP. 5% CAGR (Compound Annual Growth Rate). These are only projected figures, the picture is much bigger than this as this only includes money which takes into account the money which stays within the ecosystem (doesn’t include ecommerce, etc.). The affect is much higher. • ### Mobile Landscape Constantly changing given that its a new market. The iPhone was the real kickstarter for this in 2007. Timeline of the history mobile telephones. Difference between “smart” and “feature” phones. Mobile subscribers are growing 4 times faster than the global population. Reducing now (especially in the West) due to market saturation. More scope for growth in developing countries. Asia Pacific accounts for approximately half of global subscribers. Total sim-enabled connections (including machine to machine (M2M) connections). Estimated 7.6% CAGR 2012-2017. Percentage of M2M connections is increasing rapidly. Multiple devices (tables/phones/etc.) allow growth in sim-enabled connections. Mobile data traffic is increasing rapidly. Video speculated to be one of the most rapidly increasing traffic. • ### Mobile versus Desktop Over time the sales of desktops (PCs & Laptops) is decreasing while the sale of mobile devices is increasing. • ### Some predictions by GSMA • Asia predicted to add approx. 50% of all connections/subscribers between 2013-17 • Same period Latin America and Africa next 20% • Subscriber growth in developed nations slowing (e.g. 1% in UK) • Total data traffic load in 2012 was 0.9 Exabyte/month). • Predicted to be 11.2 EB/mth. • ### Chief Stakeholders • Network operators • Content providers • OS vendors • Device vendors • ### Fragmentation and Differentiation Issue of fragmentation and differentiation, related to: • the number of OS variants, • the number of device vendors wishing to customise the OS, • different browsers, • Network operators and device vendors do not like commoditisation. • Don’t want to be treated like commodities which are values on price. Top 25 ranked apps in 2012 take 15% of all revenue. Only 2% of App Store newcomers get into the top 250 apps. Free apps are becoming more of a norm, especially with the saturation of android. • ### Mobile Network Operators Revenues are decreasing due to over-the-top services (i.e. using online services over SMS or phone calls). Operators will push, via their shop sales-assistant commission, those devices they gain the biggest discounts on. High profile phones promoted, often Android. Apple disrupts this model due to a locked mindshare. Psychological hook of “cheap” contract phones. Free now, pay later ideology. Billing relationship with the customer. Paying for things using your mobile account rather than via a bank account (directly). Small transaction fee for this service to generate revenue. • 48% of the world’s population do not have a bank account. Something for the future, not quite so prevalent at the moment. • ### Rich Communication Service Threat of over the top (OTT) services such as Skype. Quality of service is currently an issue here, but voice call is growing very slowly (13% in 2008 to 4% 2012). GSMA responded by developing a Rich Communication Service specification. Only aimed at long term evolution (LTE) networks (4G). Aims to provide this as a universal service. 17 different implementations by MNOs including AT&T, Telefonica, Verizon and Verdafon. • ### Device Vendors (OEMs) Nokia sales falling. Haven’t kept up with the trends. Samsung now the major player. Mainly due to their adoption of Android. Apple improving with mobiles. RIM/Blackberry are focusing on development. Building an Android smartphone involves: • Choosing an OS. • OEMs design phone (HW, UX, required changes to the Android OS UX) plus apps to include. • Marketing. • Negotiations with MNOs to arrange bulk discounts. • Production test units sent to MNOs, app developers and Google. • Phone is shipped to MNOs and independent stores • MNOs customise with their own apps. • Sales to public plus marketing. Can also go down the stock phone route. Inception to market is approximately around 6 months when based on an existing OS. Apple is a little easier to to the locked-in syndrome. • ### Types of Phone • Basic Phones • Call and SMS support only. • Feature Phones • No touch screen • Browser becoming standardised. • Smart Phones • Definition changes year-on-year. • Expectations change a lot. • More sensors and technology. • Phablets • Large smartphones. • Tablets • Same functionality as smartphones, often without SIM. • Slates • Large tablets. • Non-phone devices • iPod touch • eBook readers • Google Glass • Watches like the Apple Pebble. • Rely on bluetooth or similar. • ### Operating System Vendors Android leading market player. iOS popular. Symbian (dead now) and Blackberry not doing well. Windows Phone a late starter. • ### Android Fragmentation There are 24 listed Android device manufacturers but at least 259 different device models currently on sale. Lots of different screen sizes, resolutions, hardware capability, etc. There is only one manufacturer for Apple products. Version 4.1+ Jelly Bean most prevalent, but versions 4.0, 3.0 and 2.3 are still a large market share. Security problems, most malware attacks on Android. iOS is mostly all the same version. However, companies often prescribe a 2-3 purchase cycle. Corporate world might need to take into account older versions. Google allow fragmentation to make Android more interesting to OEMs, However this can get in the way of updates. Webkit configuration varies; browser fragmentation. Tried to stop fragmentation in version 3, but this lead to new forks. So this has been re-introduced in version 4. • ### Fragmentation and Differentiation Differentiation gives a unique selling point (USP) for vendors. Sticking with the same model. Fragmentation leads to security issues and makes the OS more complex to handle screen sizes, etc. More testing needed. Therefore increased cost. • ### Windows Phone 8 Microsoft and Nokia. A closed environment (or “walled garden”). No fragmentation/differentiation. Very few OEMs interested. • ### How to join the OS game? Buy into it. Web as OS platform. Firefox OS is trying hard with cheap alternatives. HTML5, JS, CSS3 and APIs to access hardware. Very fragmented, depending on rendering engine. • ### Mobile Webkits are not always the same Can be configured differently. Must be careful with mobile websites. Depends on location too (UC Browser more popular than Android in Asia). • ### Proxy versus full browsers. Opera mini, for example. • HTTP request (encrypted) • Proxy Server • Target HTTP Server resources • Renders page • Compresses into an image map • Image map returned to Opera mini (encrypted). Cheaper and faster over a slow network. Very popular in certain developing countries with low bandwidth. Cheap in terms in processing too. JS is handled by the proxy server. Not always perfect and may not be enabled. • ### Content Providers App Stores • Apple App Store is a walled garden. 70% developer revenue. • Google Play. 70% developer revenue. • Amazon Android Appstore. • Others (apk) security issues with this. • ### Objectives • To be able to build some simple mobile web sites/applications and view them via desktop browsers, mobile browsers and as mobile applications (hybrid apps). • To gain an insight into design issues especially multiple screen sizes and browser support. • To use a common mobile web framework to help build a mobile web application. • To user PhoneGap™ to turn a webb application into a “native” application which can be deployed. • To use some common testing technologies for mobile web. • ### Overview • Is mobile web being exploited? • Three main approaches: 1. Web site 2. Hybrid App 3. Native App • Challenges for mobile web developers • Standards are a moving target. • How can we be informed what support there is? • Given a complex situation, how can we make testing tractable? #### Core philosophy Progressive enhancement and not graceful degradation. • ### Web site/app Approach #### Pros • One codebase • Cross platform • Familiar technology • Easy to distribute to both mobile and non-mobile #### Cons • Lack app store distributions • Weak access to device services • Performance (JS interpretation). • Not as slick as a native app • ### Hybrid Applications Native wrapper around HTML and CSS and JS. #### Pros • One codebase • Cross platform • Better accesses to device services • Can distribute via app stores • Familiar technologies #### Cons • No full access to device services • Performance • Not as slick as native apps • ### Native Applications #### Pros • Highly polished • Good performance (potentially) • Good developer support platform • App store distribution. #### Cons • Platform specific • Multiple codebases • ### Progressive Enhancement not Graceful Degradation Graceful degradation (of a website): • Focus is on building a great experience for the latest browsers, testing one browser version back. • Old browsers provide poor, but passable, experience, only show-stopped bugs fixed. Progressive enhancement (of website): • Focus on content, not browsers. • ### Responsive Web Design (RWD) • Fluid grids • Media queries - use em over px. • ### Mobile virtual viewports Mobiles have a virtual viewport which bypass the media queries. Use the viewport meta-tag to ask the viewport width to be the same as the actual width. • ### Breakpoints Research suggest lines of text should be between 45-75 characters for comfortable reading. Columns help with this. • ### Mobile-first progressive enhancement. Design site for the mobile device. If media queries are supported and on a bigger screen, add to the existing CSS for mobile to add for the styling rules and changing font sizes. Simplification of complex designs is harder than making a simple design more complex. • ### Server-side Detection of Device Capabilities Client side RWD alone may not be sufficient. There are some server-side approaches: • User-agent sniffing. • Client-side reconnaissance missions. Classes of “device”. RESS (Responsibe Web Design and Server-side Components). • ### The problem Some services will only run on a mobile device (Phone calls, accelerometer). Some services are more significant on a mobile device (location awareness, etc.), be careful not to run into the Hide and Cry anti-pattern. Some classes of device are very different (feature versus smart phone). What we spit out is so different that RWD alone won’y help. Need variants of the website. Image sizing issues that RWD won’t solve. • ### User-agent sniffing Can use HTTP User-Agent request header with a device description repository to work out: • Device hardware characteristics • Operating System • Browser characteristics • ### Example: Detecting viewport width var width = (winder.innerWidth > 0) ? Window.innderWidth : screen.width; document.cookie = "sitewidth="width; document.location.reload(); if(isset($_COOKIE["sitewidth"]) {
$_SESSION["screenwidth"] =$_COOKIE["sitewidth"];
}
// ...
if(_SESSION["screenwidth"] <= "380") { include("includes/mobile-nav.inc.php"); } else { include("includes/desktop-nav.inc.php"); } • ### Herding Devices into Device Classes Device Class: An abstract collection of common characteristics of similar devices and their browsers. Why? Because we don’t want our server-side code to have to deal with every device (this isn’t scalable). • ### Typical Classes • Higher Mobile (WebKit-based, >= 320px width) • Simpler Mobile (minimal JS support, >176px width) • Tablets • Desktop • Unsupported (if no SLL, Cookies, JS, or < 176px width) Does unsupported break progressive enhancement? • ### What to send? • Stylesheets and Code based on class • Sometimes single codebase is too small (watch out for duplication of common code). • RESS can help with codebase maintenance. • ### Responsive Web Design and Server Side Components Combine client-side RWD with templating in the codebase for different classes of device. • ### Sometimes HTML5, CSS3 and JS isn’t enough Many HTML5 features aren’t widely supported. Can’t publish to application stores. Perhaps go for a hybridge: part native, part HTML. PhoneGap/Cordova is the best known hybrid technology. • ### Objective-C Based on C and Object-Orientation (based on Smalltalk), has basic rules of C but most of the syntax is smalltalk-based. Some repeated information is involved, but this is improving. Uses late binding (names are looked up at runtime, not compile time). Good, but unusual, object syntax with some useful extensions and libraries. Verbose (A: yay boilerplate), designed to be descriptive (A: yay dot-enter programming). Likely to change with each release (good and bad). • ### Application Structure Typical project implementations have a simple structure which corresponds to MVC AppDelegate accesses the model (if there is one). The storyboard is the view, describe many screens in a single file. ControllerView is the controller. • ### Developing an Application 1. Make a new view-based progect, 2. Add extra views in the Storyboard, 3. Design the application by placing buttons, etc. allows easy prototyping 4. Make new ViewController files and link them to the views 5. Via drag and drop, define Actions and Outlets in the ViewController and link outlets and actions to interface (associate views to controllers) 6. Implement model separately (if complex enough). • ### Rule of Thumb If your newly created app crashes when trying to load a new screen, then you usually have: 1. Messed up linking the view to the view controller. 2. Done something wrong when linking an outlet or action to a screen. The error message should give you a clue as to what is wrong. • ### Types of Interfaces • Tabbed screens • Tables • Linked Views • More examples from iOSDevUK You can put each of the views into the storyboard and define how you segue from screen to screen then write code to pass data between them. • ### Data Storage on iOS Techniques for storing and retrieving data on the iPhone. XML and SQLite provide the best portability. • ### Application Sandbox iOS applications are run in a protected area on the device. Within this area there is a defined structure of Directories that you can access. The developer is responsible for managing files that are created within the application area. • ### SQLite 3 Database and library available in iOS. C library, which needs to be included in the project. Create a SQLite database on the command line and include in the project. Need to marshal data into and out of the database, with some conversions (e.g. Strings). • ### Introducing Android Android Inc. started developing an open source mobile OS, acquired by Google in 2005. Uses the Dalvik Virtual Machine: • Google • Virtual Machine and Dex Language • Linux kernel • Apache Harmony class libraries. • ### Why Android? • Popularity and market saturation. • ### Android IDEs • Eclipse and ADT. • Android Studio. • ### Application Space There are other apps which are isolated from the application, but are able to communicate with intents. • ### Application Lifecycle Memory of mobile devices is much more limited than on PCs or servers. Short battery life is an issue. Lots of apps vying for limited resources. • ### List Views Used to display scrollable lists of data. • ### Filesystem Given a private filestore under: /data/data/package-path • ### Motivations The BCS, under its Royal Chater, is required to establish and maintain standards of competence, conduct and ethical practice for information systems professionals. The ability to recognised the legal, social, ethical and professional issues involved in the exploitation of computer technology and be guided by the adoption of appropriate professional, ethical and legal practises. • Which laws relate to the use of computers? • ### Social Issues What is the impact of computers on society? • ### Ethical Issues How should we act? • ### Professional Issues What are our professional responsibilities? • ### Staff • ### Learning Outcomes 1. Analyse a complex software engineering problem. 2. Within a group design and implement an original solution to the problem. 3. Test and critically evaluate their solution. 4. Critically assess the relative merits of various software development methodologies within the context of the given problem and nature of the project team. 5. Working in a group, apply the chosen software development methodology to solve the given problem. 6. Critically explain the relative merits of alternative server-side technologies. 7. Demonstrate a critical appreciation of design issues encountered when developing multi-tier, distributed applications. • ### Assessment • Group Programming project and report 75% • Exam 25% • ### Internet Applications • Uses network connection • Browser-based • Client-server model • Reliance of collection of internet standards (e.g. HTTP) • ### Advanced Internet Applications • AJAX/Plugins support to provide a client rich experience • Multiple Application/Servers • Distributed or more complex processing • Transaction (DB) support • REST/SOAP or other remote procedure calls No precise definition. • ### Overview There are several themes this module will look at: • Multi-Tier Internet Applications • Developing using .NET and Java EE • Design Patterns • MVC • ORM • Web Services • REST • SOAP • RMI/RPC • Building Applications • Cloud Computing • Structure and deployment • ### Java Enterprise Edition (Java EE) Java is a language (JDK) and a platform (JRE). The platform is the Java Virtual Machine and a set of APIs. Four platforms: 1. Java Standard Edition (SE) 2. Java Enterprise Edition (EE) 3. Java Mobile Edition (ME) 4. Java FX • ### .NET Microsoft framework for developing and deploying applications with: • Cloud (Azure) • Web Server • Desktop • Restricted Resource Devices and Mobile Phones Similarities with Java (JRE). Focused on Windows, but can run on other platforms through mono. • ### Server-Side MVC Methods for implementing the MVC pattern in an Web Application. • ### Business Objects Objects which relate to the business layer of a multi-tier application. • ### Object Relational Mapping (ORM) Libraries which provide a mapping from a relational database to objects in an object-orientated paradigm. • ### Messaging Systems Acts as a middleware which decouples: • time • platform • language Which is usually machine-to-machine. There are a lot of standards. • ### Interoperability Methods of performing B2B operation. • ### Testing Methods for testing a system. • ### Formal Methods Write a formal specification and then program to that specification so that something can be proved to have worked. • ### Traditional Methods Focus on up front design before development • ### Agile Methods Focus on providing features without large amounts of up-front development and client involvement. • ### Open Source Methods for developing software in a more unmanaged and dynamic way. • ### Domain Logic Patterns • ### Data Source Architectural Patterns • ### Object-Relational Structural Patterns • ### Object-Relational Metadata Mapping Patterns • ### Web Presentation Patterns • ### Distribution Patterns • ### Offline Concurrency Patterns • ### Session State Patterns • ### Base Patterns • ### eBay Example • ### Load Balancing Balance the load of the request across a number of different machines. There are hardware and software solutions for performing this. Benefits: • Scalability • Manageability • Server and Content balancing Has a single point of failure. • ### Scalability • Partition by function • Split horizontally • Avoid distributed transactions • Decouple functions asynchronously • Move processing to asynchronous flow • Virtualise at all levels • Cache appropriately • ### Deployment • ### Integration • Integration and the enterprise • Distribution vs Integration • Coupling 8 Types of integration • Main pattern topics in the EAI book • ### Cloud How can we use the cloud for advanced internet applications? • ### 2012-13 Paper • ### Example extract from 2011-2012 paper This question is about development technologies and enterprise application patterns applied to the HoBo Room Brokering application, developed during the module. • ### Staff • ### Learning Outcomes 1. Participate in planning networks that are cost effective and realistic in terms of products and services currently available. 2. Critically assess proposed networking solutions. 3. Assess the effect of likely technological developments on existing network applications. 4. Make decisions and provide guidance to others in the choice of appropriate communications technologies to deploy, to solve real world requirements. 5. Demonstrate extensive knowledge of the internal operation of the Internet and its protocols. 6. Demonstrate an appreciation of the problems that appear in the management of routing and naming in large networks. 7. Exercise judgment in the choice of appropriate protocols and services to address the real needs of Internet operators and users. 8. investigate, and propose solutions to problems of quality of service. 9. Demonstrate an appreciation of the security issues that surround the Internet and its applications and how these can be mitigated. 10. Explain the need for a new generation of the Internet and describe current progress towards it. • ### Assessment • Assignment 40% ??/??/2013 to ??/??/???? • Exam 60% • ### Commitment 20 credits = 200 hours of work. 44 hours of lectures, around 20 hours of practicals. This leaves about 140 hours of personal study, including extra practical work. There is an assignment worth 40% of the marks (2000 word report). Text book study and revision. 2 hour exam. • TCP/IP Protocol Suite - Foruzan B., Fegan S. • RFC or internet drafts available online from IEFT • Other textbooks and journals • The Internet Protocol Journal by Cisco Systems • ### Practical 1 Using the computer connected digital oscilloscopes or picoscopes. • ### More DNS nslookup minted.dcs.aber.ac.uk whilst capturing packets on port 53 captured 8 packets. The type of the message was of type A and of class IN and was a recursive lookup. There was no response because the message was a query. The server this was sent to was 193.60.11.253. In /etc/resolv.conf/ the nameserver: 127.0.1.1 c57net.aber.ac.uk. 1 question and 3 answers were held in the first answering packet. 4 authoritative records were received specifying the 2 authoritative nameservers from dcs.aber.ac.uk and 2 from yale.ac.uk. The additional records provided all possible IP addresses of all nameservers contacted during the lookup to cache the information. nslookup set type=MX aber.ac.uk was then captured. The answer record contained: Mail exchange: aber-ac-uk.mail.protection.outlook.com. The authorative record contained nameservers for: aber.ac.uk (3) and yale.ac.uk (1). nslookup set type=SOA dcs.aber.ac.uk was then captured. The email of the person responsible for this domain is: cs-root.aber.ac.uk. There are 4 authoritative nameservers for this domain: dcs.aber.ac.uk (2), aber.ac.uk (1) and yale.ac.uk (1). nslookup aber-ac-uk.mail.protection.outlook.com. The response from this was from microsoft. 2 IP addresses which can switch (load balanced?). nslookup 193.60.11.36 had a type of PTR for the name 36.11.60.193.in-addr.arpa. Still used the standard nameservers. nslookup sillyname gave an authoritative and non-authoritative response (one authoritative for sillyname.c57net.dcs.aber.ac.uk and non-authoritative for sillyname). Uses two different sets of nameservers, the Aberystwyth local ones and the root nameserver. dig @dns0.aber.ac.uk 98.34.124.144.in-addr.arpa PTR shows lots of packets, initially gathering DNS information, then on 144.124.34.98. dig www.yahoo.com A shows that yahoo uses CNAME instead, with an IP address of 87.248.122.122. • ### Protocol Models and Frameworks In the 1970s there was no master plan, overall structure nor agreements on application protocols. Proprietary protocols and architectures lead to a large amount of anarchy. • ### ISO Committees In 1977 ISO establishes committees and subcommittees and so on and so forth. Not just ISO doing this, telecommunications (CCITT) also got involved. • ### OSI Reference Model - IS 7498 Provides a basic framework using a “divide and conquer” principle. Uses layering to reduce complexity, where each layer handles one (group of) problem(s). 1. Keep things simple. 2. Choose boundaries at places that minimise interaction between adjacent layers. 3. Functions of a different nature or purpose in different layers 4. Similar function in same layer. 5. Use all part knowledge and experience. 6. Hide implementation within layers 7. Special hardware/processors 8. Data abstraction levels. 9. Internal changes do not affect other layers 10. Only create interfaces to directly surrounding layers (controversial). • ### OSI Reference Model Layers 1. Physical - wires, radio frequency 2. Data Link - direct link from one to another 3. Network - global issues like addressing 4. Transport - methods for ensuring quality of service. 5. Session - availability of resources, “checkpoints”, etc. 6. Presentation - Language/character set encoding 7. Application - Not supposed to contain or control whole applications, just the useful parts to applications, e.g. directory service • ### Exercise Discuss the statement: The existence of a communications framework like the OSI model promotes competition between companies. #### For • Companies spend more time actually building products than on firmware to deal with communications. • Standardised method of communication allow products to be linked: more scope for different products. #### Against • No competition to improve the network process. • No differentiation. • ### Ethernet A passive, contention-based broadcast technology that uses baseband signalling. • ### 802.3 CSMA/CD Bus (Ethernet) Derived from work by: • Xerox • Intel • Digital (DEC) Publised in Ethernet (DIS Blue Book) V1.0 September 30th 1980. 802.3 Revision D dated December 1982 publish by IEEE. Revision F published July 1984 and also issued as draft proposal 8802/3 by ISO. • ### Operation: Carrier Sense Multiple Access with Collision Detection (CSMA/CD) Distributed Control • Contend for use • Acquire access and send a data packet • No priority Simple Algorithm: 1. if(network active) goto 1 transmit(data) check for collision if(collision) transmit(JAM) delay(a random time) goto 1 transmission complete Checking for collision is the difficult part. Can check: 1. I’m transmitting a 1, is there a 1 on the wire. 2. Do the signals on the wire look like the output of one station and one station only. Delay must be random to avoid future collisions and not have priority. • ### Coaxial cable Very rigorous specifications. Maximum length of 500m and limits on bend. These are to stop the electric current being interfered with. Hard limit on propagation: c (speed of light). Transceiver (MAU) to link devices to co-ax conveniently. Terminators absorb the signal at the ends of the cable. Repeaters repeat the signal onto other cables, repeat a perfect version of the signal (if possible). • ### Broadcast Networks If data is inserted into the network, it should reach every member on the network. Need to know how long it will take for data to get across the network. Rules tend to be the distance between two extremes in the network is 5 of the co-ax cables and 4 repeaters. 2 of the co-ax cables must be point to point without any devices attached. Bridges, switches, hubs and routers help build larger networks. • ### Co-ac Medium Options 802.3 • Original (10BASE5) • 10Mbps • Baseband coaxial cable • segment length 500m • Max 10 taps per segment • Max 4 repeaters • 10BASE2 • 10Mbps • Thinner coaxial cable • 185m segments • Max 30 taps per segment. • ### Slot Time Worst case: B stars transmitting when As packet has nearly reached B. B must corrupt, at least, the last bit of As packet. Therefore, packet length must be such that time to transmit is greater than twice the transmission delay for longest route in the network. For a 2.5km network, 10MBit/sec, the slot time is 51.2 micro seconds. Smallest allowed packet needs to be the number of bits it takes to reach from one end of the network to the other, times 2, plus a little extra for luck. 512 bit packets capture the network for 10BASE5. “Your bits are now all over the network” - Dave Price, 10/10/2013 • ### Calculatng Slot Time Slot time s. Path time p. s > 2p • 3 coax (with stations) = 21.65 bits • 2 links (no stations) = 25.65 bits • 4 repeater delays = 7.5 bits • Transceiver delays = 6.0 bits • Transceiver cable delays = 2.57 bits • etc. Total about 499 bits worst case. Specified as 512 bits to give a safety margin. • ### Network JAMs • Repeaters required to propagate JAMs. • Must make sure all repeaters see JAMs. • Time delay of 500m coax about 2.165 micoseconds • 32 bits JAM • ### MAC Frame Format for 802.3 Number of OctetsField Usage 7Preamble 1Start of frame delimiter 6Destination Address 6Source Address 2Length in 802.3 1500LLC data and padding 4Frame Check Sequence • Preamble synchronises. • ### Ethernet Addresses 48 bits long. Designed to be globally unique. Globally unique should be completely unique, not always though. Not expected to be able to be changed, can now be programmed (simply, apparently; nmap --spoof-mac 0) • ### Frame details Minimum frame size is 512 bits, not including the preamble. Maximum frame size is 1518 octets (1500 octets of data). Above assumes 48 bit addresses which IEEE 302.3 says “shall be used” for 10 Mbps networks. 9.6µs inter-frame gap to allow desynchronisation. Time for frame is 51.2µs plus 6.4µs for preamble. • ### Collision Backoff and Retransmission Transmitter tries to send for a maximum of 16 attempts to send a frame. The transmitter waits for an integer multiple slot times determined by the following algorithm prior to each retry. Rescheduling of each transmission uses “truncated binary exponential backoff” This ensures a random but increasing delay if many collisions occur: DelaySlots = rand[0 <= r < 2^k] Where k = min(n, 10) for the nth retansmission • ### Probabilistic Characteristics of CSMA/CD All access to the 802.3 LAN only completes with some probability. It is thus impossible to guarantee transfer rates. When the net is very busy collisions might go on forever. Debates often take place on the usability of CSMA/CD LANs for real time use. The answer depends on the true use intended rather than the LAN. • ### Bridges Partition LAN to segregate load, add reliability, add security. Combine remote LAN segments into a single logical network. Combine separately developed and controlled LANs. IEEE 802 LANs often include bridges. Repeaters clean and forward all data. Bridges selectively forward data. It will store and forward complete packets. Forwarding based on header information, Sometimes known as MAC level relay. • ### Alternative LAN Technologies • 802.4 - Token Bus • 802.5 - Token Ring Standards differ at the physical layer Differ at MAC sublayer of Data Link Layer. Compatible at the LLC sublayer of the Data Link Layer. • ### Quick notes on Ethernet A quick summary of 802.3 • ### Signalling Baseband is a single transmission involved (digital signal) Broadband can handle multiple transmissions with a modulated analogue signal. • ### Multiplexing and Demultiplexing Putting more than one signal on a wire at once and getting it back again at the other end. • ### Fibre Optic Supports all Ethernet versions above 10BASE5. Carries high-bandwidth data through beams of light carrying electromagnetic signals. Not so affected by noise. Can carry signals up to approximately 70 miles without amplification. Light can be pulsed in a single wavelength to represent 45 Gigabits of information. • ### Network Adapters Adapters for connecting to ethernets. Ethernet cards, etc. • ### Ethernet Devices Note that most devices are completely tied to a specific function, some repeaters might have some Data Link Layer functions depending on the manufacturer. • ### Ethernet Encoding Methods for encoding bits in different Ethernet technologies. • ### Fast Ethernet 802.3u CSMA/CD and Full Duplex Backwards compatible. Physical layer structure (PHY) has been redesigned. Complex signal encoding mechanisms than the simple Manchester code. Uses three sublayers. • ### Gigabit Ethernet 802.3z Two distinctive approaches for medium access: 1. Half Duplex 2. Full Duplex Most follow the full-duplex approach. Star topology. Support standard Ethernet frame format. Uses 802.3x flow control. Backwards compatible. Physical layer is more complex • ### Encoding Digital to digital encoding schemes. • ### Broadband • ### Wireless LAN (802.11) • ### Wireless Mobile Communication/Cellular Telephony. Utilises lower frequency radio spectrum. • ### IEEE 802 Standards Encapsulation at each level. • More hardware-based layers. Data Link layer could be divided into two sub-layers: 1. Logical Link Control (LLC) 2. Media Access Control (MAC) LLC is more software orientated and interacts with higher layers. MAC is more hardware orientated and interacts with lower layer. (R)ARP protocol links hardware addresses to logical addresses at the Network layer. • ### OSI Layers Protocol Data Unit (PDU) is a term to define any one of the following: • Data (at Application, Presentation and Session layers) • Segment (at Transport layer) • Packet (at Network layer) • Frame (at Data Link Layer) • Bits (at Physical Layer) Each layer, with the exception of the physical layer, adds its own header. This is done because each layer has its own specific function. • ### Internet Protocol version 4 (IPv4) • ### Address Resolution Protocol (ARP) IPv4 has the problem that we know our IP address and the ones which we want to talk to, either router or machines on the link. Very first header is the Ethernet header, need this because every machine would need to look at the IP header, which is a process which needs to be done in software. Other network protocols exist too. Ethernet headers can be processed in hardware. Ethernet headers don’t contain much, but the machines can automate the process of deciding to ignore the packet in firmware not by the CPU. There is a problem of mapping IPv4 address to Ethernet address. There’s no direct link between IP addresses and Ethernet addresses so we need more at the data link layer. • ### MAC Addresses (IEEE 802) • Gotcha: each Octet of MAC frame transmitted low order first (back-to-front). • I/G - Individual (0), Group (1) - Unicast or Multicast • U/L - Universal (0), Local (1) • ### Internet Control Message Protocol (ICMP) The Internet Control Message Protocol (ICMP) is the protocol used for error and control messages in the Internet ICMP provides an error reporting mechanism of routers to the sources. All ICMP packets are encapsulated as IP datagrams. • ### Traceroute Sends out ICMP ping messages with increasing TTL starting at 1. For each host that isn’t the target, an ICMP time exceeded message is sent back. On UNIX uses the port unreachable message instead (using a UDP packet) by default. • ### Fragmentation If a packet needs to be split then a flag is set to say “more fragments”. Identification is the same through the fragments. More fragments flag is not set for the last fragment, but is known to be a fragment due to the fragmentation offset. If a part of a fragment is missing, after an amount of time packet loss is assumed. Occurs if MTU < datagram size to be sent out on an interface, “Don’t fragment” flag allowed: causes ICMP “Destination unreachable: fragmentation needed but don’t fragment bit set”. Reassembly takes place at destination. Fragments may be fragmented. Experience shows that fragmentation is best avoided. • ### Path MTU Discovery Intermediate routers may have lower MTUs. Uses ICMP uncreachable Error: Fragmentation Required ping -s n -M do: • Set packet size and “do not fragment” bi • Returns “message too long” is s > MTU. • RFC 1191 has likely values traceroute.pmtu • Version of tracerout that automates discovery. Firewalls can break PMTU discovery. • ### Sock Traffic Generator Sock is a test program which can be run as a client or as a server. • ### Ping TTL doesn’t always start at 255, might be around 64 but not standardised. • ### IP Routing Split into two parts: 1. Packet Forwarding or Packet Switching 2. Routing • ### Classifying Routes Routes can be classified into three different categories: 1. Default Routes 2. Static Routes 3. Dynamic Routes Could also classify by interior and exterior routing. • ### Routing Algorithms/Protocols Different methods for finding out routes. • ### Multicast Refers to the sending of data from one to many or many to many registered recipients. Contrast to broadcast, which floods the network with data, which all hosts will receive whether they want it or not. Unicast is the sending of data to a single recipient. Unlike unicast, multicast is scalable,if ten clients request a connection then unicast must provide those ten connections with their own copy of the data. Multicast, whether there are 1, 10 or 100 members of a ground, only one copy of the data is transmitted and is only replicated where there are group members on different paths to and from the router. • ### Media Access Control (MAC) All devices have a unique 48-bit MAC address. Devices on the LAN keep a table that maps unicast IP to MAC. A special range of MAC addresses is used for multicast as a multicast address does not correspond to a single end host. • ### 1:32 IP Multicast to MAC Multicast Mapping Class D address range: 224.0.0.0 - 239.255.255.255 High order 4 bits of the first octet of a class D address are always 1110 (0xE) To provide a 1:1 mapping between MAC and multicast IP addresses the remaining 28 bits of the IP address would need a unique representation in MAC addresses. MAC address range assigned for multicast is only 24 bits. The high order bit is reserved, leaving 23 bits. Thus, 28 bits of IP addresses need to be mapped to just 23 bits of the MAC address. This corresponds to a 1:32 mapping MAC multicast addresses to IP multicast addresses. • ### Special Multicast Addresses • ### IP Group Management Protocol used is Internet Group Management Protocol (IGMP) • IGMPv1 - RFC1112 • IGMPv2 - RFC2236 • IGMPv3 - RFC3376 • ### Multicast Distribution Trees The set of links and connections that traffic will follow to get to a destination. • ### Multicast Forwarding Routers must no just forward all multicast traffic. Potentially there could be customers anywhere, unlike with unicast. However, forwarding all multicast would be broadcast instead and would lead to chaos. Techniques include: • Reverse Path Forwarding • Multicast Forwarding Caches • TTL Thresholds • Administratively Scoped Boundaries • ### Multicast Routing Protocols • ### User Datagram Protocol (UDP) RFC 768 • Datagram orientated • Unreliable, connectionless • Simple • Unicast and multicast • Useful for only a few application • Used a lot for services No handshake required which allows it to be fast, especially for many short connections. Applications must handle failures. • ### Transmission Control Protocol (TCP) • Stream orientated • Reliable, connection-orientated • Complex • Only unicast • Used for most internet applications Done by creating connections between two points and aim to provide data integrity. Also provides flow control. • ### Transactional Transmission Control Protocol (T/TCP) RFC 1644 TCP for transactions. Nearly as fast as UDP. • ### Port Numbers • ### Demultiplexing Layered like the OSI model (but pre-dates the OSI model). Ethernet driver captures the incoming frame, strips the Ethernet header and passes to IP IP layer strips out the IP header and passes it to the transport layer, etc. Levels: • Application • Transport • Network • Link • Physical The process of moving things up and down layers is demultiplexing and multiplexing. • ### Data Encapsulation Don’t sent arbitrary length methods, to allow the multiplexing of networking. (In TCP) Data is encapsulated into frames, frames have a frame header, trailer and a datagram. This datagram contains an IP Header and a segment or protocol data unit (PDU) The PDU has the (TCP) protocol header and the actual data. The frame header is used to drop the packet onto the local link. The address used in the frame header is embedded in the hardware in the network card (MAC address), this is why the IP address is not used. This is for efficiency. Frame headers are: source address, destination address, protocol and checksum. • ### Domain Name Service (DNS) A distributed database mapping hostnames to IP addresses and vice versa. • ### Dynamic Host Configuration Protocol (DHCP) • ### Lightweight Directory Access Protocol (LDAP) • ### Challenges • QoS needs to be end-to-end, involving numerous management domains. • QoS service should address all requirements - not just ‘top quality’ • QoS policy distribution, maintenance and monitoring will increase in importance. • Better to implement QoS earlier - provides scalability, experience. Pro-active not reactive. • ### Queueing Disciplines Ways in which resources can be allocated to priority traffic best. • ### Data Encryption Four aspects of security to consider: 1. Privacy 2. Authentication 3. Integrity 4. Nonrepudiation • ### Transport Layer Security (TLS) Client sends a “hello” message with TLS version number and prefernces. Server sends a certificate including a public key. • Public key encrypted by some CAs. • Client has a list of CAs and their keys and uses a corresponding key to decrypt the server key. • This authenticates the server, unless it is self-signed. Client sends a secret key encrypted with the server’s public key. Server decrypts message and then encrypts a response with secret key which the client decrypts. • ### Hashing and Message Authentication Hashing is the operation that maps the message of variable length into a hash value with fixed length. Hashing is not reversible. Hashing can be used to generate a digest of the message, called the Message Authentication Code. The receiver can use the digest to verify if the message is authentic. • ### Internet Protocol Version 6 (IPv6) Problems with IPv4 is that 32 bit addresses is too small. • 128 bit address space solves the problem for the long term. • Large space allows addresses to be more structured. • ### Steve Kingston s/(Use a diagram) is necessary/\1/g • ### 1. This is a question about the Transport Layer Protocols • ### Staff • ### Learning Outcomes 1. Describe and use the basic principles of Artificial Intelligence and Machine Learning. 2. Be able to reflect on project needs. 3. Practically apply AI and ML principles to meet those needs. 4. Present the material they have learned in an informed, clear manner. 5. Demonstrate understanding and insight into the material that they are presenting. • ### Assessment • Presentation 20% 01/10/2013-18/10/2013 • Report 20% 01/10/2013-25/10/2013 • Essay 60% (coding + report) 10/10/2013-01/11/2013 Tips: if you disagree with a paper, you should comment on why, this will be a good thing :) • ### Commitment • 26h seminars • 6h practicals • The rest of the time is spent on background reading and assignments. • ### Booklist • Artificial Intelligence: A Modern Approach Russell, S. and Norvig, P. • Artificial Intelligence: Structures and Strategies for Complex Problem Solving. - Luger G. • Artificial Intelligence Illuminated - Coppin B. • ### What is Artificial Intelligence? • Understand intelligent entities; learning more about ourselves? • Building intelligent entites; creating things which exhibit “intelligence”. Two ways of looking at this: • Scientific goal • Engineering goal Many definitions, all potentially valid. Problem: what is intelligence and how do we prove a system is intelligent. • ### Strong versus Weak AI • Strong AI can actually think intelligently. • Weak AI can possibly act intelligently. • ### Turing Test Human interrogator talks to another system (human or AI), if the interrogator cannot tell the difference then the argument is we must acknowledge it is able to think like a human. Has not yet been passed. • ### The Chinese Room Behaving intelligently may not be enough. Computers are just a symbol manipulation device and therefore cannot have mental states. • ### Ethics and AI We have investigated whether we can develop AI, but not whether we should. Problems of AI: • Job losses • Too much/little leisure • Privacy rights • Accountability • End of the human race? • Harm in the wrong hands • ### Branches of AI • Logical AI • Search • Pattern recognition • Representation • Inference • Common-sense knowledge and reasoning • Learning from experience • Planning • Epistemology • Ontology • Heuristics • Genetic Programming • ### Defining the Problem Many AI problems can be framed in terms of a search problem. Representation is very important. The search strategy is the way in which searching is performed: • Uninformed • Informed (Heuristic) Can’t always evaluate all the search space. Massive search space (e.g. Chess) or even infinite. • ### Terminology • ### Search Trees Visualise the progression of a particular algorithm. Shouldn’t evaluate every possibility of the state space. Initial state is the root, goal is a leaf. Don’t store the whole search tree. Requires a lot of space. Can discard explored nodes. Store the frontier of search (i.e. nodes in search tree with some unexplored children). • ### Evaluation • Branching factor b and depth of solution d. • Time complexity: O(b^d) • Space complexity: O(b^d) • Optimal (given step costs are identical) • Complete (provided b is finite) • Branching factor b, depth of solution d and maximum depth m. • Time complexity: O(b^m) • Space complexity: O(bm) • Not optimal • Not complete (complete if no loops) • A Depth First Search with a limited maximum depth. Depth limit l. • Time Complexity: O(b^l) • Space Complexity: O(bl) • Complete if l >= d • Not optimal • A form of Breadth First Search, using a Priority Queue. Node with the lowest total path cost is expanded. If all the cost steps are equal, it is exactly the same as BFS. Complete and Optimal if no negative path costs. • ### Iterative Deepening A depth-limited search where the limit is increased iteratively. Avoids the space complexity of BFS. • Time Complexity: O(b^d) • Space Complexity: O(bd) • Optimal • Complete • ### Iterative Improvement Paths not retained - low memory • Heuristic is a sort of rule of thumb. • ### Genetic Algorithms Encode solutions in Chromosomes. Mutate and crossover chromosomes. Evaluate the new population and select the best. • ### Genetic Programming A branch of genetic algorithms which uses programming statements as genes. Easy to do in LISP. Usually represented as trees. • ### Ant Colony Optimisation In nature, ants could solve complex problems unsupervised. Capable of finding the shortest route between a food source and the nest. Can react to changes in the environment, • Each ant moves “randomly” • Pheromone is deposited on path • Ants detect lead ant’s path, inclined to follow. • More pheromone on a path increases the probability of that path being followed. • Pheromone decays over time. • ### Particle Swarm Optimisation Each particle is searching for the optimum and encodes a solution (like a GA). Each particle is moving (can’t search otherwise), and hence has a velocity. It also maintains the position it was in where it had its best result so far (its personal best). The particles co-operate, exchanging information about what they’ve discovered in the places they’ve visited. This co-operation only needs to be very simple; • A particle has a neighbourhood associated with it • A particle knows the fitness of those in its neighbourhood, and uses the position of the one with the best fitness. • Adjusts using this. • ### Multi-objective Optimisation Sometimes an answer has to be optimal in several aspects. Examples: • Quickest and cheapest flights • Lightest and strongest construction material. • ### What is Knowledge? AI Agents deal with knowledge (data). • Facts • Procedures • Meaning • ### Logic Representation • ### Non-logical Representation Logical representations have restrictions which can be hard to work with. • ### Non-monotonic Logic Once true doesn’t mean always true. As information arrives, truth values can change. A number of implementations for this, • Circumscription: • Brid(x) and not abnormal(x) -> flies(x) • We can assume not abnormal(x) unless we know abnormal(x). • Default logic: • x is true given x does not conflict with anything we already know.” • ### Symbolic Learning When we use some sort of rule-based system, we generally have to understand the rules. This means we understand the conclusions it draws, because it can tell us. When a system learns from such rules, it processes in a way which can be understood. • ### Subsymbolic Learning Don’t really understand, or have control over, the way in which solutions are found. ANNs, GAs, GP and sometimes statistical methods. Might be related to the randomness factor. • ### Artificial Neural Networks (A: time to not understand backprop again) Inputs (variables) -> network -> Outputs (results). X and Y matrices of the statistical models are analogous to the training inputs and outputs of ANNs. • ### Types of Knowledge • Declarative - Facts • Procedural • Meta - knowledge about knowledge • Heuristic - rules of thumb • ### Representing Knowledge: Object-attribute-value Encoding a fact in three pieces of information; the object, it’s attributes and the values of these attributes. The facts a human knows are not obvious to a computer; needs to be encoded. e.g.: Tree(species, oak) The encoding doesn’t matter, so long as its uniform to the system. Can include an uncertainty factors is a number which can be taken into account by the system when making decisions. The final conclusion of any program where uncertainty was used in the input is likely to also have an uncertainty factor (if you’re not sure of the facts, can can the result be certain?) Encoding uncertainty might be encoded something like this: Tree(species, oak, 0.8) (the certainty that the tree is an oak tree is 80%). Again encoding doesn’t matter, so long as its uniform to the system. • ### Rules A knowledge base may have rules associated. IF premises THEN conclusion. There may be more than one premises and may contain logical function • AND, OR and NOT for example If a premise evaluates to TRUE the rule fires. e.g. IF tree(species, oak) THEN tree(type, deciduous) Rules may contradict another rule. Different strategies can be applied to choose the most specific or most relevant rules. • ### Meta Rules IF tree is conifer THEN load conifer data ELSE load deciduous data  • ### Logic We can represent knowledge using logic. There are two types: propositional and predicate (or first-order logic or predicate calculus) • ### Propositional Logic In propositional logic formulas are constructed using variables, TRUE and FALSE constants and connectors: • AND (∧) • OR (∨) • NOT (¬) • IMPLIES (→) • ### Predicate Logic Prolog is based on this. A predicate is like a function that returns TRUE or FALSE Tree(a) is true if a is oak, false if a is daffodil. • ### Implication Oak(a) → Tree(a) If the first clause is satisfied, the second clause is also satisfied. • ### Assertions The symbol ∀ can be read as “for all”. ∀a(Oak(a) → Tree(a) • ### Existence The symbol ∃ can be read as “exists” ∃a(Beech(a) ∧ ¬Green(a)) • ### The Atomic Formula beech(a) is known as an atomic formula. Can have multiple parameters. • ### Human Reasoning We use two standard rules: • Deductive 1. Modus Ponens - if we know P→Q then if P is true, Q must also be true 2. Modus Tollens - if we know P→Q then if Q is false, P must also be false • Inductive • Difficult for machines • Observations: • Oak trees have green leaves • Pine trees have green leaves • Induce • All trees have green leaves • Unfortunately, that’s not true, but it is useful. • ### Non-monotonic Classic monotonic reasoning cannot contain contradictions Put formally: X ⊆ Y → Deriv(X) ⊆ Deriv(Y) where Deriv(X) is a set of facts derived from X • ### Temporal Reasoning Reasoning changes over time. Can introduce this into machines by introducing a concept of time. • ### Machine Inference Machine inference is used to deduce new facts from a knowledge base which is held in working memory. Knowledge Base -> Inference Engine -> Working memory Can be very complex • ### Deducing New Facts Two principal methods 1. Forwards chaining - based on modus ponens. 2. Backwards chaining - based on modus tollens. • ### Forward Chaining Modens Ponens: student(S) ∧ studies(S, ai) → studies(S, prolog) student(T) ∧ studies(S, expsys) → studies(T, ai) student(joe) studies(joe, expsys) Therefore we can deduce: studies(joe, prolog) Proof: student(joe) ∧ studies(joe, expsys) → studies(joe, ai) student(joe) ∧ studies(joe, ai) → studies(joe, prolog) Q.E.D. Forwards chaining can fire any rules which match the knowledge held in its working memory. This can potentially come up with a huge amount of new knowledge, most of which is probably completely irrelevant. • ### Backwards chaining Backwards chaining sets out to prove a piece of information. The information will either be true or false, but doesn’t generate unwanted results. Use the resolution proof method for now. Say we have: A1 ∨ A2 ∨ ... ∨ An ∨ B and ¬B ∨ C1 ∨ C2 ∨ ... ∨ Cm Resolvent of clauses is: A1 ∨ .. ∨ An ∨ C1 ∨ ... ∨ Cm • ### Resolution Now take the two clauses: A1 ∨ A2 ∨ ... ∨ An ∨ B and D ∨ C1 ∨ C2 ∨ ... ∨ Cm If there is some subset where B and D are negations of each other Theta If we have two clauses Clause1 and Clause2, and these both have a resolvant R, then if Clause1 and Clause2 are both satisfiable, so must R be. The idea: take a clause, containing a goal we want to prove, and negate that goal. If we then resole this with other clauses, over and over and we get to the empty clause (which is never satisfiable), we have proved our goal. • ### Clause form We can express any predicate calculus statement in clause form. This enables us to work with OR and NOT rather than any other clause. p → q ≡ ¬p ∨ q A ∧ B ≡ ¬(¬A ∨ ¬B) • ### Example of Resolution Use a previous example in clause form: 1. ¬student(S) ∨ ¬studies(S, ai) ∨ studies(S, prolog) 2. ¬student(T) ∨ ¬studies(T, expsys) ∨ studies(T, ai) 3. student(joe) 4. studies(joe, expsys) Solution to studies(S, prolog) means we must negate it: ¬studies(S, prolog) Resolve the clause 1: ¬student(S) ∨ ¬studies(S, ai) Resolve with clause (2) (S=T) ¬student(S) ∨ ¬studies(S, expsys) Resolve with clause (4) (S = joe): ¬student(joe) Resolve with clause (3): Ø Therefore studies(joe, prolog) is true. Q.E.D. • ### Horn Clauses The same thing, but expressed differently. This is how Prolog does it. A horn clause is a series of disjuncts (ORs) We can take: A ∨ ¬B ∨ ¬C and write it: A ← B ∧ C If B and C then A All the same thing: 1. studies(S, prolog) ← student(S) and studies(S, ai) 2. studies(T, ai) ← student(T and studies(T, expsys) 3. student(joe) ← 4. studies(joe, expsys) ← • ### Resolving Horn Clauses All the negatives are one side of the ← sign. ← studies(S, prolog) studies(S, prolog) ← student(S) ∧ studies(S, ai) ← student(S) ∧ studies(S, ai) studies(T, ai) ← student(T) ∧ studies(T, expsys) S = T ← student(S) ∧ studies(S, expsys) student(joe) ← S = joe ← studies(joe, expsys) studies(joe, expsys) ← ← Q.E.D. • ### Prolog Example Prolog Tutorial • ### Prolog Programming with logic. Uses backwards chaining through horn clauses. • ### RBS Knowledge base contains the rules. Database contains the facts. Inference engine uses both of these to match facts to rules to derive new facts, etc. Justifiable and transparent. • ### Multivariate Analysis Analysis of high-dimensional data. Often not possible to identify or quantify an object from one dimension. Two methods: 1. Statistical 2. AI methods • ### Statistical Models Always produces the same result from a given set of data. Will always find the best result within the constraints of their abilities. • ### X Values All the factors which might affect the outcome so that the analysis can find some form of correlation. • ### Y Values The set of objects and associated variables. • ### Realigning Axes. Usually statistics are in high-dimensional space. No way of visualising this data. In a 3D space, can fit a plane to any 3 points to make the problem a 2D one. Can approximate the plane to more than 3 points and fit the best plane using root mean square error. This is done using regression, but does mean there will be error in the model. Can do this with a 3D plane, but the idea is to keep the model as simple as possible. • ### Principal Component Analysis The line through multi-dimensional space which describes the most variation in the data (the one with the widest space) is the First Principal Component. The following Principal Components are always perpendicular and are ordered by the amount of variation from the data and have less importance. Can analyse the principal components to see which of the original X values contributed most. Principal components help understand the data better. • ### Principal Components Regression The main principal components help to explain what factors had most bearing on the results. They form a model that could be used for predicting results. Using a PCA model to predict is known as Principal Components Regression (PRC). Closely related is PCL. • ### Principal of Parsimony Fewer variables, if they produce a model just as good in testing, should be preferred. • ### Introduction to Big Data The internet, financial institutions, media, medical treatment, scientific research, etc. provide a huge amount of data. This data is only increasing in size. Big Data is the explosion of information. Storing Big Data is, as expected, very difficult. • ### Uncertainty of Big Data There is lots of uncertainty in Big Data, there can be a lot of ambiguity in symbolic data, etc. • ### Smart Buildings Offer significant benefits and new vulnerabilities. • ### Smart Cars Michael Barr’s expert report in the Bookout v Toyota lawsuit. See here. • ### Safety World Safety world works on probabilities, but in security there is a direct attacker - can’t argue independence. • ### Smart Meter Security End-to-end security: “No trusted components”. Whether this works or not is unknown. • ### Cyber Security Is a through-life discipline. • Planning • Control • Monitoring • Response • From design through to decommissioning • Lifetimes of 20+ years • Don’t run anti-virus • Monitoring is difficult (and uncommon) • How to respond to incidents? • Insider threats • Lifetime security needs discipline and excellent configuration control through years of maintenance and upgrades. • ### M2M and the IoT • ### Cyber Security Is a tier one threat. • #### Basic Syntax and Objects • #### Objects and Messages Messages are Objective-C’s version of methods, where the Java syntax would be: ObjectName.methodName() The Objective-C syntax is: [objectName messageName] Example: NSArray *temp = @[@"Test", @"2"]; NSLog(@"%@", [temp description]); // Logs information about temp • #### Conditionals and Loops if(condition) { // ... } else if(condition) { // ... } else { // ... } switch(thing) { case value: // ... break; } for(Class *item in iterable) { // ... } • #### Blocks Blocks are like basic methods. void (^block)(void) = ^{ // ... }; Inkoving a block: block(); • #### Classes In a header file (.h): @interface Name : NSObject @property Type *name; @property NSString *myName; @end Implementing the interface (.m): #import Name.h @implementation Name @end Accessing properties Name *name = [[Name alloc] init]; name.myName = @"Value"; • #### Protocols Similar to Java interfaces. There are some features where you can have required and optional methods. Optional methods act as empty methods if they are not implemented. Set in the header file (.h) • #### Primitive Types Primitive types from C can be used in Obj-C, e.g. int, long, float, double. Additional types: 1. BOOL (YES or NO) 2. NSInteger (typedef to either long or int depending on architecture) 3. CGFloat (typedef to either float or double depending on architecture) • #### Memory Management Memory management is achieved by checking the number of references to an object. In older code, you needed to write lines of code to state when you wanted to keep an object in memory. Modern applications use ARC (Automatic Reference Counting). The compile tracks when objects should be kept in memory or removed from the application. • #### Tabbed Screens • #### Tables UITableView is used to display repeating section of data. UITableViewCell is a cell in the table. Unlike classic tables on other platforms, there is only a single column. Tables contains many sections, which in turn contains many rows. The entire table can have a header and footer. Sections can also have a header and footer. Each table must have at least one section to be complete. • #### Linked Views • #### NSUserDefaults User preferences. Persistent map. • #### Property List Serialisation Mechanism to store a selected number of data types in a property list (plist). • #### NSCoder Technique to save more complex objects. • #### XML XML data files. • #### SQLite Small memory footprint SQL database. • #### Core Data More complex system, but offering a powerful way to manage data and relationships. Best integration with iCloud. • #### Where to store the database By default, your database is in the default bundle, inside your application. If read-only data is needed, it can remain there. Write access needs to be moved to the Documents directory. • #### The effect of OS segmentation The Android platform is currently changing very quickly. Each manufacturer has a coperate theme to it. • #### Linux Kernel and Android OS • #### Operating system process Owned by the application. • #### Dalvik Virtual Machine A special Java VM for running on Mobile Devices. May be moved to the ART (Android Runtime). • #### Application No single main method. The way that Android apps are developed, and the model following, doesn’t have a concept of a start point or end point, rather it has the idea of the behaviours. • #### Android Manages Memory Carefully Android has the opportunity to remove resorces from memory when screens are switched. If necessary a whole application and its process will be removed. Need to be able to reincarnate apps. • #### List Activity Extended by classes to handle clicks, etc. Acts as a controller in an MVC sense. • #### List View Used by the List Activity Acts as a view in an MVC sense. Does the hard work of sizing rows, etc. • #### List Adapter Created by the controller and acts as the data source for the list view. Acts as a model in the MVC pattern. • #### Public On SD Card • #### Private Stored under private filestore. /data/data/package-path/files • #### Media On SD Card under the standard location for media files. • #### Temporary /data/data/package-path/cache • #### Shared Preferences /data/data/package-path/shared-prefs XML only • #### Databases /data/data/package-path/databases • #### Data Protection Act • #### The Equality Act • #### Copyright, Design and Patents Act • #### Contract Law and Licenses • #### Computer Misuse Act • #### Multi-Tier Internet Applications Applications that involve multiple servers which run different parts of the application so that the business logic is separated from the presentation logic. Different parts tend to include: • Client • Web • Business Logic • Data/EIS Lots of small applications which build up a larger, more complex, application. Communication between the servers provides the linkage between the applications. Supports scalability if done correctly. Also more resistant to failure. Potentially more secure (more important servers firewalled). Should all be transparent to the user. • ### Java Enterprise Edition (J2EE) • Building web applications • JavaServer Faces • Enterprise Java Beans • Portability • #### .NET • Building web applications • Web Forms, MVC • C# • Tiers and layers • #### Design Patterns Two types of issues: • #### Building Applications Using Cloud computing and how relevant it really is. Examples from eBay of structure and deployment. • #### Web Services Application that provide services which have destination endpoints with operations. SOAP XML, WSDL and REST are the big players. Alternatives to REST? • #### Java EE A superset of Java Set, providing a development model, APIs and runtime environment (the server). “For developing and running large-scale, multi-tiered, scalable, reliable and secure network systems” - The Oracle BS • #### Java EE Web Tier Access the web tier with HTTP(S). Provides static resources and dynamic page generation. Handles client input and navigation flow with maintance of state. JavaBeans provide temporary storage on the Web Tier. Can do simple logic, could build the whole application in this tier, but would be a bad design. • #### Java EE Business Tier Provides Enterprise Java Beans (EJB) components. Access to Java Logic, etc. which provide the business logic. • #### Java EE Enterprise Information System (EIS) Tier Logically and typically on other machines, typically “foreign” technology. • #### Other Clients Can build Java Applications or Web Applications which access the EJB components directly. Uses remote procedure calls. • #### Java EE Application Server Provides: • The JVM and core APIs • The EE APIs • Component containers • component lifecycle management • creation • association • services to components • security • transaction management • directory lookup • remote connectivity • #### Servlets Servlets are the olderest EE web component. Servlets act as a dynamic page, which have a URL, and must receive a HTTP request, from this it generates a HTTP response. Is a Java object with a managed lifecycle. Extension of javax.servlet.http.HttpServlet class. • #### Useful Features • Templating • Validation & Schemas • i18n • Security • Database access • Support for good design patterns • Tight Integration • Testing Frameworks • Web Service support Generally: higher level libraries and code reuse. • #### i18n and L10n Internationalisation and localisation are both important. Don’t hardcode for the locale, instead store translations in DB or files and load them dynamically. • #### Authentication • #### Authorization • #### Testing Use JUnit where possible (with mocks, stubs, etc.) Can test Java Beans using an embedded EJB Container. Service testing is slightly more difficult • #### Overview • #### Internet Information Services (IIS) The application server which runs ASP.NET applications. • #### JavaServer Faces (JSF) Provides: • Templating • Facelets • JavaServer Pages (JSP) • Validators • MVC Pull • Navigation • Fixed • Dynamic • AJAX • i18n/L10n • Session Management • DB Access • JDBC • ORM frameworks • Testing Frameworks • Code reuse • Web Services and resources • #### ASP.NET .NET Applications for the web, which uses: • Web Forms - Event based • Web Services - Application to Application • MVC • ASP.NET AJAX • #### Enterprise Java Beans (EJB) EJBs act as an ORM framework, where the Java Objects are annotated with the DB schema details. Three types of EJB Session: 1. Stateful 2. Stateless 3. Singleton Can also have message-driven beans. Access can be done through: • No-interface view (all the public methods are available) • Through a business interface • Injection • JNDI • #### Language-Integrated Query (LINQ) A query language for .NET languages which is akin to SQL. • #### Java Persistence API Access to database at SQL level or through an ORM Framework • #### Models for Messaging Systems. • Point-to-Point (queue) • Publish/Subscribe • Fanout • Request/Response • #### Java Messaging Service A Java API which “allows applications to create, send, receive and read messages using reliable, asynchronous, loosely coupled communication.” Requires an implementation. Access Connection Factories or Queues using injection. • #### Message Brokers Most patterns require middleware (all can use it). Possible roles include: • Routing • Receiving • Storing • Persistent • Transmit • Broadcast • Translate • Monitor • #### Socket Connections Powerful, but not generally available as an API. Need a Domain Specific Language. • #### Remote Method Invocation (RMI) Marshalling and unmarshalling are handled by generated code. Some distribution services are provided. Access to CORBA IIOP. Builds on services provided by sockets. Has the problem of specificity to Java. Even with IIOP it is still better in an intranet. Focuses on synchronous transmission. • #### RESTful Web Services Use HTTP methods (GET, POST, PUT, DELETE, PATCH and HEAD) with a URI for the API. Return any form of data; usually XML, JSON or YAML. Very constrained on header information. • #### Simple Object Access Protocol (SOAP) based Web Services Expressed as XML supporting interoperability (both Business to Business (B2B) and EAI). Typically sent over HTTP but can use other network protocols. Usually generated automatically using facilities in a program, but it is possible to create messages manually. More popular than CORBA, extensible through the use of XML. HTTP avoids firewalls. Industry backing: • Miscrosoft • I’ve Been Moved (IBM) • Oracle • BEA • HP • SAP • etc. • #### White/Black Box Testing A basis for which testing is built on • #### Unit Testing Testing the smallest possible unit. • #### Functional Testing Test that a part provides an expected function. • #### Non-functional Testing Tests that a part will not fail to function under certain circumstances. • #### Integration/Subsystem Testing Testing larger units of work combine together. • #### Verification Testing Have we built the right thing? Does it conform to standards. • #### System Testing Our testing of the entire system. • #### Acceptance Testing Testing the system is acceptable for the client. • #### VDM • #### Z Notation • #### Waterfall Model 1. Requirements 2. Planning 3. Design 4. Development 5. Testing 6. Deployment 7. Maintainace • #### Spiral Model • #### Iterative Development • #### Extreme Programming Promotes no-one authorship of code with refractoring. Planning game to put features. Can use a metaphor to describe the system. • #### Test Driven Development Write tests first then produce code to pass those tests (but no more). • #### Feature Driven Development Break the system down into user stories, make these stories into features which can then be developed independently. Need some overall architecture. • #### Rapid Application Development Hack it until it works. • #### Scrum Self organising teams with a focus on co-location of all team members and communication. • #### Model-Driven Engineering 1. Build a model 2. Test the model 3. Translate the model into executables Platform Independent Model -> Platform Dependent Model. Can use tools like executable UML. • #### Cathedral A big in-house style of development where every developer understands the big picture. • #### Bazaar A very dynamic way of developing, which not every developer has the big picture, but understands their small parts, usually needs some figureheads. • #### Crowd Sourcing Getting a large amount of people to come up with potential solutions and selecting the best ones. • #### Hacking Playing with a system and getting it to do tasks it was not necessarily designed to do. • #### Transaction Script Organizes business logic by procedures where each procedure handles a single request from the presentation. • #### Domain Model An object model of the domain that incorporates both behavior and data. • #### Table Model A single instance that handles the business logic for all rows in a database table or view. • #### Service Layer Defines an application’s boundary with a layer of services that establishes a set of available operations and coordinates the application’s response in each operation. • #### Table Data Gateway An object that acts as a Gateway to a database table. One instance handles all the rows in the table. • #### Row Data Gateway An object that acts as a Gateway to a single record in a data source. There is one instance per row. • #### Active Record An object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data. • #### Data Mapper A layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself. • #### Identity Field Saves a database ID field in an object to maintain identity between an in-memory object and a database row. • #### Foreign Key Mapping Maps an association between objects to a foreign key reference between tables. • #### Association Table Mapping Saves an association as a table with foreign keys to the tables that are linked by the association. • #### Dependent Mapping Has one class perform the database mapping for a child class. • #### Embedded Value Maps an object into several fields of another object’s table. • #### Serialized LOB Saves a graph of objects by serializing them into a single large object (LOB), which it stores in a database field. • #### Single Table Inheritance Represents an inheritance hierarchy of classes as a single table that has columns for all the fields of the various classes. • #### Class Table Inheritance Represents an inheritance hierarchy of classes with one table for each class. • #### Concrete Table Inheritance Represents an inheritance hierarchy of classes with one table per concrete class in the hierarchy. • #### Inheritance Mappers A structure to organize database mappers that handle inheritance hierarchies. • #### Metadata Mapping Holds details of object-relational mapping in metadata. • #### Query Object An object that represents a database query. • #### Repository Mediates between the domain and data mapping layers using a collection-like interface for accessing domain objects. • #### Model View Controller Splits user interface interaction into three distinct roles. • #### Page Controller An object that handles a request for a specific page or action on a Web site. • #### Front Controller A controller that handles all requests for a Web site. • #### Template View Renders information into HTML by embedding markers in an HTML page. • #### Transform View A view that processes domain data element by element and transforms it into HTML. • #### Two Step View Turns domain data into HTML in two steps: first by forming some kind of logical page, then rendering the logical page into HTML. • #### Application Controller A centralized point for handling screen navigation and the flow of an application. • #### Remote Facade Provides a coarse-grained facade on fine-grained objects to improve efficiency over a network. • #### Data Transfer Object An object that carries data between processes in order to reduce the number of method calls. • #### Optimistic Offline Lock Prevents conflicts between concurrent business transactions by detecting a conflict and rolling back the transaction. • #### Pessimistic Offline Lock Prevents conflicts between concurrent business transactions by allowing only one business transaction at a time to access data. • #### Coarse-Grained Lock Locks a set of related objects with a single lock. • #### Implicit Lock Allows framework or layer supertype code to acquire offline locks. • #### Client Session State Stores session state on the client. • #### Server Session State Keeps the session state on a server system in a serialized form. • #### Database Session State Stores session data as committed data in the database. • #### Gateway An object that encapsulates access to an external system or resource. • #### Mapper An object that sets up a communication between two independent objects. • #### Layer Supertype A type that acts as the supertype for all types in its layer. • #### Separated Interface Defines an interface in a separate package from its implementation. • #### Registry A well-known object that other objects can use to find common objects and services. • #### Value Object A small simple object, like money or a date range, whose equality isn’t based on identity. • #### Money Represents a monetary value. • #### Special Case A subclass that provides special behavior for particular cases. • #### Plugin Links classes during configuration rather than compilation. • #### Service Stub Removes dependence upon problematic services during testing. • #### Record Set An in-memory representation of tabular data. • #### Partition Everything Split everything into manageable chunks: data, load and usage. If you can’t split it, you can’t scale it Motivations: • Scalability - can scale horizontally and independently • Availability - can isolate failures • Manageability - can decouple segments and functional areas • Cost - can use less expensive hardware • #### Async Everywhere • Scalability - can scale components independently • Availability - Decouples state (up/down), characteristics (always available, best effort), retry operations • Latency - Can improve user experience at cost of data/execution latency. Can allocate more time than the user would be willing to do. • Cost - can spread peak load over time. • #### Automate Everything Prefer adaptive/automated systems to manual systems. • Scalability - can scale with machines, not humans • Availability/Latency - can adapt to changing environments • Cost - machines cheaper than humans • Functionality - consider more feature space • #### Remember Everything Fails Build all systems to be tolerant of failure. • Assume every operation will fail • Assume every resource will be unavailable • Detect failure as rapidly as possible • Recover from failure as rapidly as possible • Do as much as possible during failure. Motivation: • Availability - duh • #### Round Robin Allocate in a circular pattern • #### Least Connections Allocate to the machine with the least connections • #### Response Times Allocate to the machine with the quickest response time. • #### Server Probes Gain even more information about the servers and allocate based on this. • #### Weighting Apply a weighting to each machine and allocate accordingly. • #### Scaling • Scale horizontally (scale out) is preferential. Adding more machines • Scale vertically (scale up). Upgrade machines Cost basis - try to keep on commodity hardware. • #### Partition Everywhere Functional segmentation into logical function (example is the database; split the database into the segments, continue splitting until no more splits can be made). Horizontal split using an internal ORM implementation, requires additional routing. • #### Integration and the enterprise Integrating separate applications so that they work together. Enterprises tend to have numerous systems which weren’t implicitly designed, for example: • Email • Databases • Calendars • Accounting • HR • Website • CRM • Warehouse Management • Shipping • Stock • Disaster Recovery These may • Support different areas of the enterprise • Mergers, take overs, … • Different technologies • Legacy systems • #### Coupling Thins “fused” (read dependent on another) together. Multi-tiered applications tend to be tightly coupled. Messaging systems offer the chance to be loosely coupled by decoupling the ends of the communication, even offering asynchronous communication. • #### Types of integration • File integration • Remote procedure invocation • Shared database • Messaging • #### Messaging Systems Example system using message systems: • #### Overview What is the cloud? • The cloud • Cloud computing Principles of cloud computing X as a service • #### Cloud - Computing as a Utility Largely a new business model. Just computers, networking and applications, but arranged different; pay for usage rather than buying the infrastructure, etc. • #### The benefit to business What problems is the cloud trying to solve? How can the cloud be used for: • Small to medium enterprise (SME) manufacturing business • Startup company looking to launch an eCommerce site • Company gathering data from devices • #### 5 Aspects of Cloud Computing 1. Pooled computing resources 2. Virtualised computing resources 3. Elastic scaling up or down according to need 4. Automated creation of new virtual machines or deletion of existing ones 5. Resources only billed as used The Cloud at Your Service, Resenberg and Mateos, 2011, Manning Publications • #### Data Centres Cloud providers have large data centres at locations around the world. • #### SaaS: Software as a Service The web browser is your computer. (Pay?) for resources used. Is this different from managed servers? Is this different from web applications? • #### Platform as a Service (PaaS) • #### Infrastructure as a Service (IaaS) A lower lever set of infrastructure to choose from: • Services • Data storage • Load balancing • Content delivery networks • Message queues Examples: • Amazon Web Services • Windows Azure • #### 1. This question is about integration of enterprise systems and is based on an extension of the fish marketing system developed during the course. • #### a. Describe and compare the facilities provided by .NET and by the Java Platform, Enterprise Edition 6 (Java EE 6) for supporting the implementation of each of the following features within the application. • #### Passive No one device controlling the network. • #### Contention-based Each device must compete with every other device for access to the network. • #### Broadcast Ever device on a shared network fears broadcast transmissions. • #### Baseband Signalling Entire bandwidth of a cable for a single transmission. • #### Source Routing Bridges Hosts discover the route to each other host and are very aware of the presence of multiple LANs couple by bridges. Needs identifiers for bridges and LANs. Data is transmitted with routing attached. Bridges obey the routing. • #### Transparent Bridges Bridge learns (or is told) the LAN on which each address exists. Hosts need not to know anything about the location of other hosts and indeed are not even aware of the presence of the bridges. Frames which arrive are handled in one of 3 different ways: 1. Same LAN 2. Different LAN 3. Unknown destination. 4. Broadcast address. • #### Local Bridge Connect two (or more) adjacent LANs. Throughput is likely to be high. Hosts not likely to notice much performance degradation unless waiting for each packet to be acknowledged. • #### Remote Bridge Connect two (or more) LANs which are widely separated. Bridge consists of two ‘half bridges’ connected by a WAN type link. Link typically 64Kbps to 2Mbps. • #### Managed Bridges Bridges often available in a managed form. These are managed from a station and can load the bridges with lots of things. Lots of monitoring, etc. Another protocol needed and this needs to be standardised. • #### Token Bus Uses a bus physical topology and ring logical topology. The physical order of nodes does not matter. Coaxial cable served as a common communication bus. Token was created bus the token bus protocol to manage access to the bus Any station that holds the token packet has permission to transmit data. The station releases the token when it is done communication or when a higher priority device needs to transmit. Two major problems: 1. Bus failure leads to a network failure. 2. Adding a new node is not simple. • #### Token Ring Similar to token bus, but in a ring physical ring topology. Messages are transferred in one direction along the ring at all times. Token Ring networks sequentially pass a token to each connected device. When the token arrives at a particular node, the recipient is allowed to transmit data onto the network. Since only one device may be transmitting at any given time, no data collisions occur. Access to the network is guaranteed Time-sensitive applications can be supported. Still used for some real-time applications. Based initially for the mainframe infrastructure. Problems: 1. Costly 2. Complex. • ### Why Ethernet is used • Inexpensive • Easy to install, maintain, troubleshoot and expand • Widely accepted industry standard. • Structured to allow compatibility with Network Operating Systems. • Reliable • ### Ethernet Versions 1. Ethernet 10 BASE-T/F 802.3 (10 Mbps) 2. Fast Ethernet 100 BASE-T/F 802.3u (100 Mbps) 3. Gigabit Ethernet 1000 BASE-T/F 802.3z (1000 Mbps) 4. 10 Gigabit Ethernet 10 GBASE-F 802.3ae (10 Gbps) • ### Ethernet Components • CSMA/CD (No protocol for 10 GigE) as 10 GigE is completely full duplex so it isn’t needed. • Baseband Signalling. • Ethernet cables. • Ethernet card or adapter. • Ethernet devices. • #### Ethernet Cables: Twisted Pair (CAT5/CAT5e) • CAT5: Ethernet and Fast Ethernet. • CAT5e: Gigabit Ethernet. Contains four pairs of copper wire. Cable runs are limited to a maximum run length of 100m. Operates at 100MHz. CAT5 comes in two main varieties, solid and stranded. Fast Ethernet communications only utilise 2 out of 4 pairs. CAT5 enhanced (CAT5e) uses all 4 pairs to support GigE over short distances. CAT5e is backwards compatible with CAT5. CAT6 (250MHz) and CAT7 (600MHz). • #### Baseband Signalling Network uses all available signal frequencies or the entire bandwidth. One signal can be transmitted at a time. Light or electrical pulses based transmission. Related to digital technologies, but can be used for analogue technologies. Bi-directional communication (Half duplex) is possible, but difficult. Multiplexing (using Time Division Multiplexing) allows transfer of multiple signals on a single medium. • #### Broadband Signalling Network uses only one frequency or a part of the entire bandwidth. Multiple signals can be transmitted at a time. Electromagnetic or optical waves transmission. Related to analogue technologies but can be used for digital technologies. Bi-directional communication is possible and fairly easy. Multiplexing (using Frequency Division Multiplexing) allows transfers of multiple signals on a single medium. • #### Time Division Multiplexing Gives the illusion of multiplexing. Each signal is allowed a slot of time to transmit for. • #### Frequency Division Multiplexing Actual multiplexing. Each signal uses a single frequency channel to transmit. • #### Single-Mode Fibre Optic Transmits one signal per fibre. Diameter: 8.3 to 10 microns that has one mode of transmission. Speed and distance: up to 40Gbps over up to 100km Used in telephones and cable TV applications. • #### Multi-Mode Fibre Optic Transmits many signals per fibre. Multi-modes result from the fact that light will only propergate in the fibre core at discrete angles within the cone of acceptance. Diameter: 50 to 100 microns. Speed and distance: 10Mbps to 1 Gbps over 275m to 2km. Used for Computer Networks and LAN Applications. • #### 10/100 Ethernet Connect computer using a PCI, PCIe or ISA moethboard interface slot, CAT5/6 • #### Gigabit Ethernet PCIe slots, CAT5/5e/6/7 and Fibre Optic cables. • #### Fibre Optics For tier 1 and 2 internet backbones, External device, Fibre Optic cables. Slightly different, can use not only for network but for the backbone (a sophisticated network). • #### Wireless Network Interface Cards Internal or external device • #### Wireless Dongles External device • #### Repeater Repeat an electrical signal including noise. Takes an incoming signal and then generates a new, clean copy of that exact signal. Overcomes signal attenuation problem. Allows LANs to extend beyond normal distance limitations. Physical layer device. Doesn’t read data frames, just repeat the signal unintelligently. • #### Hub Multiport repeater. Broadcasts frame to all ports and devices. Allows users to share Ethernet for transmission of data onto a single network (collision domain). Physical Layer device. Doesn’t read data frames. Repeater is usually used for the extension of the length of a network, while the hub is a simple connectivity gadget that is used to broaden a network. • #### Bridge Connect two LAN segments of similar or dissimilar types such as Ethernet and Token Ring. Split a networking into separate collision domains. Map the Ethernet addresses of the nodes residing on each network segment and allow only the necessary traffic to pass through the bridge. Do not forward bad or misaligned packets. Works on the Physical and lower Data Link (MAC) Layers • #### Switch Expansion of the Bridge. Used in heavily loaded networks to isolate data flow and improve performance (parallelism). Up to on-half of the computers connected to a switch can send data at the same time. Data Link and Network Layer device. • #### Manchester Coding Used in 10-Base* Bipolar scheme, synchronisation via a clock. • #### Convergence Sublayer Introduces the concept of auto-negotiation; negotiates between two different medium to make the properties similar to for communication • #### Media Independent Interface Interfaces the physical medium used so that it can be handled generically. • #### Media Dependent Sublayer Deals with encoding, transmission in a way specific to the medium. • #### Gigabit Media Independent Interface • #### Physical Layer • #### Media Dependent Interface • #### Medium • #### Unipolar Encoding Only use one pole (+ or -). One pole is used to represent 1 or 0, zero is used to represent the other. Two problems: 1. DC Component 2. Synchronisation DC cannot be transmitted properly through an AC line without noise. The receiver cannot synchronise its clock to the sender. • #### Polar Encoding Uses both poles to represent bits. • #### Bipolar Encoding • #### Digital Subscriber Line Uses local telephone lines. Allows simultaneous void and data transmission. • #### Cable • #### Station (STA) • #### Access Point (AP) Access points act as a central transmitter and receiver of WLAN radio signals. • #### Basic Service Set (BSS) A set of STAs that communicate with each other. When two or more stations communicate together they form a BSS. • #### Distributed System (DS) Two or more BSSs are interconnected using a distribution system. APs communicate via the DS. The DS is the backbone of the WLAN and may be constructed of either wired or wireless networks. The DS is also a thin layer in each AP. That determines if communications received from the BSS are to be relayed back to a destination in the BSS, forwarded on to the DS to another AP or sent into the wired network infrastructure to a destination not in the ESS • #### Extended Service Set (ESS) An ESS is a BSS where APs communicate amongst themselves from one BSS to another.. Entire network looks like an interdependent BSS to the Logical Link Control (LLC). This means stations can communicate or even move between BSSs transparently to the LLC. • #### Portal The logical point at which medium access control (MAC) service data units (MSDUs) from a non-IEEE 802.11 local are network (LAN) enter the distribution system (DS) of an extended service set (ESS). • #### WLAN Frame • #### MSDU and AMSDU Multiple MSDUs are aggregated at the MAC layer and are pushed into a single MPDU. They have a single frame header with multiple frames and they are destined for the same client and the same service class. • #### MPDU and AMPDU • #### DS Services While the implementation for the DS is not specified, 802.11 does specify the services which the DS must support. • #### Physical Layer • #### Mobile RF Spectrum Typically delivered over a wide range of radio frequency spectrum bands (e.g. 900MHz, 1800MHz, 2.6GHz, etc.). Most of which can also reach indoors to some degree. • #### Architecture of the GSM Network • #### Cell Cellular telephony derives its name from the partition of geographical area into small cells. A cell is roughly circular (exactly hexagonal) area with a central transmitter and receiver base station. The size and shape of each cell is determined by the features of the surrounding area, such as buildings, trees and hills, which can block signals. In a city, there are many small cells, while rural areas may have very large cells. • #### Sector Site coverage (cell) is partitioned into different directions called sectors. Each cell is usually split into tree sectors. Which overlap with other sectors of neighbouring cells so network is uninterrupted. • #### Switched Communications Networks Long distance transmission between stations (called end devices) is typically done over a network of switching nodes. Switching nodes do not concern with content of data. Their purpose is to provide a switching facility that will move the data from node to node until they reach their destination. A collection of nodes and connections forms a communications network. In a switched communications network, data entering the network from a station is routed to the destination by being switched from node to node. • #### Multiple Access (Multiplexing) Protocol Mobile development is facing the major problem to find protocols that could be used to maximise bandwidth efficiently. Multiple access enables … • #### Cellular Generations • #### Physical Layer Defines: • Physical and electrical properties of the media • Mechanical properties of the connectors • Bit representation by the signals (encoding) • Transmission rate • Physical topology • Transmission mode • Defines: • Encoding bits into packets prior to transmission • Decoding the packets back into bits at the destination • Flow control • Error control (Automatic repeat request (ARQ)) • Access control • Hardware addressing • Defining physical layer standards • #### LAN Technologies • Ethernet • Fast Ethernet • Gig Ethernet • 10 Gig Ethernet • WiFi • FDDI • Token Ring • ATM LANE • #### WAN Technologies • X.25 • Frame Relay • T-carrier • ISDN • DSL Technologies • SONET/SDH • ATM • #### IP Headers Organised in octlets as bytes didn’t used to be just 8 bits long. IPv4 designed for 32 bits. Version indicates the version of the IP protocol Time to live stops network loops. Header checksum to check the integrity of the header but not the data. Very basic checksum which is used by the router to ensure the packet has not be damaged. This does add significant load to the router, not only this, but due to TTL it has to create a new checkum without much gain. There are better checksums to be used and they do not appear in IPv6. • #### The IP Address Tied to an interface, not an actual machine. Common to have multiple interfaces (eth0, wlan0, etc.) Can have multiple addresses on a single interface. • #### Classes of Network 5 classes. • Class A - 0, 7 bits netid, 24 bits hostid many host. • Class B - 10, 14 bits netid, 16 bits hostid • Class C - 110, 21 bits netid, 8 bits hostid many network. • Class D • Class E - intended for future use Class Es will never be used because of Microsoft and lack of value. • #### Special Addresses • X.X.255.255 = Broadcast Address • X.X.0.0 = Network • 255.255.255.255 = Limited broadcast address, used in auto-configuration (e.g. DHCP) • #### Network masks IF you own the address: 10.0.0.0 But want to share the address so that: 10.1.0.0 and 10.2.0.0 are different networks. 10.0.0.0 is a class A address. therefore is is actually: 10.0.0.0/8. So if we change the networks to: 10.1.0.0/16 the network id will be expanded to the first 16 bits. • #### Loopback Interface Most TCP implementations have a loopback interface with the IP address 127.0.0.1 (127.X) and name localhost (or anything else in /etc/hosts which specifies 127.X as an address). The localhost behaves as a separate data link interface, A packet that is sent to the loopback interface moves down the protocol stack and is returned back by the driver software for the localhost “device”. Used for debugging. Loopback is done in software, never appears on the network. • #### Subnets: An example Take the university address: 144.124.76.0 Say we want a network per department, can’t use a 24 bit address as that doesn’t leave enough addresses. So they can use a 22 bit network id. 144.124.76.30/22 or 144.124.76.30/255.255.252.0 Apply the mask 255.255.252.0 to the IP address to get the host id. Invert for the host address. Network address is: 144.124.76.0 But what’s the broadcast address? 144.124.79.255 (Look at the bits for this) Here, 255.255.252.0 is the subnet mask. Used to be allowed to have subnet masks like 255.0.255.255 as it doesn’t add anything. • #### Classless Interdomain Routing (CIDR) - Supernetting Treat two contiguous class C networks as a single network. This eases routing (supernets). For example supernet on geographic locations to make routing tables easier at a router level. Usual class C is /24, we make them a /23 if we have to contiguous networks This is the answer to the 192 soup. Non-contiguous versions of this are disallowed. Must choose numbers for which the maths works. • #### Private Address Space There are some special IP addresses • e.g. loopback RFC 1918 written when started IP addresses to reserve certain IP addresses: These can be used for private addressing schemes, but not routable on the internet. • 10.0.0.0 - 10.255.255.255 (10/8) • 172.16.0.0 - 172.31.255.255 (172.16/12) • 192.168.0.0 - 192.168.255.255 (192.168/16) • #### Network Address Translation Router has a pool of public IP addresses, when a private IP address attempts to access an external resource. The router maps the private IP address to a public IP address which accesses the resource and returns. The public IP address is then translated back to the private IP address and routed. In industry the pool may be a class C network. In home networks there is only a pool of one. They also do port address translation. • #### ARP Packets ARP is cached for a limited amount of time. If no reply, retransmit after stand-off. • #### ARP Delay First packet: 1. ARP Request. 2. Processing Time 3. ARP Reply 4. ICMP Echo Request 5. ICMP Echo Reply Following packets: 1. ICMP Echo Request 2. ICMP Echo Reply • ### Fooling ARP Locate an interface in promiscuous mode, ARP request not broadcast, a dummy address is used. Some TCP/IP stacks pass the ARP request up the line. A reply indicates a machine is in promiscuous mode. neped • ### Gratuitous ARP A host sends a request for its own MAC. The sender’s IP and MAC address are broadcast, and other hosts will insert this mapping into their ARP tables. Useful to detect duplicate IP addresses (should be no reply). Causes other hosts to update their ARP cache (useful if the network adapter has been changed or if this is a hot spare). • #### Why switched networks are not safe Man-in-the-Middle attacks. ARP allows for MITMA as the IP and MAC are learned by the switch. Sending out a false ARP reply last will allow you to to spoof the IP address to your MAC address. • #### Proxy ARP Same problems with MITMA • #### ICMP Message Types ICMP messages are either query messages or error messages. • ICMP query messages: • Echo request / Echo reply • Router advertisement / Router solicitation • Timestamp request / Timestamp reply • Address mask request / Address mask reply • ICMP error messages: • Host unreachable • Source quench • Time exceeded • Parameter problem • #### Message Codes Specific to message type. E.g. for message type 3 (destination unreachable): • 0 = network unreachable • 1 = host unreachable • 3 = port unreachable • 4 = fragmentation needed but don’t fragment bit is set • Etc • #### ICMP Error Codes Each ICMP error message contains the header and at least the first 8 bytes of the IP datagram payload that triggered the error message. To avoid too many ICMP messages, ICMP error messages are not sent • for multiple fragments of the same IP datagrams • in response to an error message • in response to a broadcast packet • #### ICMP Codes • #### Echo Request/Reply Message Format Identifier is set to process the ID of querying process. Sequence numbers are created for each new echo request. • #### Port unreachable error Reply telling that a port is not available. Network scanners may make use of this, e.g. NMAP. Many hosts will not reply. • #### Avoiding Fragmentation • Never send a datagram which is greater than the minimum MTU maximum size it can be sent wholly. • Path MTU discovery to make sure you never send a datagram which is grater than the smallest MTU maximum size. • #### Ping through a router Routers have many different interfaces. This means, with traceroute, only the nearside interface can be found. There is a record route option which can find this: ping -R • #### Packet Forwarding Needs to be fast and efficient, every packet involves a forwarding option. Based on prior knowledge the packet is moved towards the destination. • #### Routing Filling routing tables. This requires knowledge of the connectivity in some sense. This needs to be stable and should converge relatively quickly. This task should not be performed frequently • #### Default Routes A default route which is used as a fallback if all other routing fails. • #### Static Routes Manually configured information. Not very scalable. • #### Dynamic Routes Automatically use information from other participating routers. • #### Distance View Routing Uses the Bellman-Ford algorithm. Regularly broadcast the entire routing table, containing known networks and the “distance” to each (usually a number of hops). Has the problem of routing loops and convergence after change. • #### Routing Internet Protocol (RIP) Uses Distance View Routing • Each router sends the state of all its links to all adjacent routers. • Link State Advertisements (LSA) Each router independently calculates its routing table based on the link state database it has constructed. Normally uses Dijkstra Shortest Path (Shortest Path First). • #### IP Address Class Based Only • #### Classless Inter-domain Routing • #### Translation Six octets in an Ethernet header. Three high order octets are constant 01-00-5E. The remaining three octets have a range of 00-00-00 to 7F-FF-FF (high order bit is always 0 for IP multicast. An IP address of 224.1.1.1 maps to 01-00-5E-01-01-01. Byt the MAC address also maps to 31 other IP addresses. • #### Host Behaviour Reception Discarding of unwanted packets has to be handled by the IP stack. Hosts interesting in 224.1.1.1 will also receive (if on LAN) the other 31 possibilities. After de-capsulation the Ethernet fram and discovering the IP address of an unwanted packet, the host discards the packet. The probability of this are quite slim at the moment • #### Local Network Control Block 224.0.0.0 - 244.0.0.255 (224.0.0.0/24) Should never leave the local network. • #### Internetwork Control Block 224.0.1.0 - 244.0.1.255 (244.0.0.1/24) • #### Session Description Protocol (SDP)/Session Announcement Protocol (SAP) Block 224.2.0.0 - 224.2.255.255 (224.2/16) • #### Source Specific Multicast 232.000.000.000 - 232.255.255.255 Specifically permit or block source addresses. • #### GLOP Block 233.000.000.000 - 233.255.255.255 Ensure that addresses are specific to an administrative domain. Low number of specific addresses (255). • #### Administratively Scoped 239.000.000.000 - 239.255.255.255 Private multicast addresses. • #### IGMPv1 No explicit leave message. IGMP Report Suppression • #### IGMPv2 Major change, introduces an explicit Leave Message • #### IGMPv1 and IGMPv2 Interoperability IGMPv2 Hosts must send IGMPv1 if they spot an IGMPv1 router is the querier. IGMPv2 Hosts may suppress Leave Messages if they spot an IGMPv1 router is the querier. IGMPv2 Hosts must suppress reports if they see others using IGMPv1 or IGMPv2 reports for a given group. IGMPv2 routers must ignore Leave messages if IGMPv1 hosts are present. If any IGMPv1 routers are present must use IGMPv1 • #### IGMPv3 Major change: supports the specification of sources in messages. Host now do not suppress Reports. Thus, supports the concept of Source Specific Multicast. Protocol messages are now more complex. • #### Source Trees Sometimes called Shortest Path Trees (SPT) A tree where the root is the source of the data. A different forwarding tree for every combination of source (S) and group (G). N groups and M sources implies trees. This makes it difficult to calculate the best tree. Routers need to maintain separate states for all trees. (S,G) notation. • #### Shared Trees Rendezvous Point Trees or Core Based Trees. Traffic follows some form of common path, unlike source trees in which two different trees can send data through different paths, at least most of the route will follow a common tree. Each group in the system uses the same tree. N trees implies N groups, no matter how many sources. Normally, each group has a nominated router as the Rendezvous Point, which is the root of the tree. All sources send towards the Rendezvous Point. Can potentially lead to a single point of failure if no backup is specified. (*, G) Notation • #### Reverse Path Forwarding Note the source address of the arriving packet and interface of arrival. The IP tables are checked for the correct interface towards the source. If the packet has arrived into the expected interface, it can be forwarded onwards. If not it can be discarded. • #### Multicast Forwarding Caches Used to help avoid some RPF calculations Sometimes called multicast routing tables. Used to help make decisions for routing tables. • #### TTL Thresholds TTL normally used by IP and decremented as each router passed. When this TTL reaches zero, the packet is dropped. Multicast routers often set TTL Thresholds on interfaces, if the TTL of the packet is less than this threshold then the packet isn’t forwarding. If traffic was only designed to reach internal locations, the TTL would be set such that it could reach all internal routers, but external routers would have high enough threshold to stop this traffic, but not those expected to reach external locations. • #### Administratively Scoped Boundaries These boundaries don’t pass certain multicast addresses. • #### Dense Mode Protocol Send all valid packets out of all interfaces, flooding the network. When a router receives unwanted packets it sends a prune message upstream. When a prune message is received, the router removes the interface it was received on from the forwarding table for the specified group. Prune times out in typically 2 to 3 minutes. • #### Sparse Mode Protocol Routers send no traffic onwards unless asked. Shared tree branch constructed from rendezvous point (root) to any interested receiver. Join messages are sent from the receiver to the root via other routes, creating a shared tree where it goes. Prune sent when the traffic is no longer wanted. • #### UDP Header Checksum is the same as the IPv4 checksum, but is over the UDP header, the data, and the UDP pseudo header • #### Example: Trivial File Transfer Protocol (TFTP) TFTP used UDP, uses a stop-and-wait flow window control algorithm: • Stop for ACK before sending the next data packet • A lost packet causes timeout and retransmission. Designed for diskless systems to download configuration files during bootstrapping. Does waste a lot of network time. • #### TCP Header • #### Connections How TCP establishes, keeps and tears down connections. • #### TCP Options TCP Header also supports options. Originally only MSS, NOOP and EOS were specified. • #### Bulk Data Transfer Bulk data transfer (e.g. FTP) has different requirements. Low overhead from headers. Receiving systems have limited buffers. Sliding windows used for flow control. Packet loss is expensive; timeouts are the simplest way, but there are better. Want to send as many packets as possible without flooding the network. • #### Flow Control In TCP for Bulk Data Transfer Sliding window flow control is carried out by the receiver. CWND flow control is carried out by the receiver. • #### Flow Control in TCP for Interactive Data Transfer Interactive data transfer can result in many small segments which, together with their ACKs, can lead to congestion. ACKs are, therefore, piggybacked onto data segments - delayed ACKs. Nagle’s algorithm result in some collection of data to produce larger segments. • #### Persist Timer Keeps window size information flowing even if the other end closes its receive window. Possible situation where an ACK is lost and both ends waiting. • Sender waiting for acknowledgement with window update so that it can send more data. • Receiver waiting to receive the data as it indicated a non-zero window in the acknowledgement that go lost. Sending TCP uses a persist timer to periodically query the receiver to see if the window size has updated. • #### Timeout and Retransmission Fundamental to the use of acknowledgements is the need for timeout and re-transmission of packets. TCP keeps four different timers for a connection and performs exponential backoff when a packet goes unacknowledged. TCP also has a congestion avoidance algorithms to complement the slow start algorithm to cope with packet loss caused by congestion. • #### TCP Accelerated Open (TAO) Reduces minimum number of packets required to three in many circumstances. Data and FIN are piggybacked on the ACK. Connection Count (CC) used to avoid duplicate SYNs. Security issues caused due to this. • #### Truncation of TIME_WAIT State 2MSL state is abandonded. 8 times RTO used instead. Allows retransmission of final ACK. A new incarnation of the same connection, using TAO, implicitly acknowledges the ACK of FIN. • #### How DNS is used • Applications access the information in the DNS by way of resolver programs • gethostbyname() returns an IP address in response on a hostname • gethostbyaddr() returns a hostname in response to an IP address. • People access information by way of client programs • nslookup • dig • Common implementation of DNS client and server is BIND (Berkeley Internet Domain Server). • Server is named • The DNS defines a protocol (see RFCs) that is used for communication between client and server. • #### The DNS namespace DNS is stored as a tree: 13 canonical name servers which server information for the root “unnamed” root. • #### DNS Lookup Is a recursive process and therefore quite slow. Results are cached to improve performance. To try and reduce the effects of this when changing hostnames the TTL of the cache is reduced prior to performing this. • #### Name Ownership No one company owns all names • #### Name Server Zones and Boundaries Can have zones within a name server. • #### Resource Record This is where DNS gets its information from. Examples: 3www4aber2ac2uk0 3www6google3com0 The 0 occurs because the top-level domain has no name. This is how the end of the string is reached. • ### DHCP Timeline Request are broadcast address 255.255.255.255. Often used during host configuration. Never forwarded by a route, by a DHCP/BOOTP relay agent can be used to forward this onto the DHCP server. Replies are routed normally. • ### The Directory Information Tree Similar to the DNS tree, but the whole world doesn’t typically use the same tree. • ### The Information Model Service model based on entries. An entry is a collection of attributes, that has a distinguished name (DN). • #### Priority Queue Other queues only get any resources at all when the priority queue is empty. Simple and effective. Traffic must be policed to stay within low limit as other traffic can get starved or the priority queue reverts to Best Effort • #### Weighted Round Robin Multiple queues, each queue gets a guaranteed minimum of resource even under congestion conditions. Can be combined with Priority Queues. • #### Aspects of Security • #### Encryption Techniques Classical encryption techniques: • Permutation: The order of the plaintext characters is changed • Substitution: a plaintext alphabet is mapped to a different one. A cipher used to perform the encryption. • Stream ciphers encrypt data bit by bit or byte by byte. • Block ciphers first pack data bits into a fixed length block, then encrypt the whole block into a ciphertext block. • ### An IPv6 Address fe80::2c0:dfff:fee4:bd87/10 Loopback address: ::1/128 :: is a string of 0s of indeterminate length. IPv4 addresses are encapsulated in IPv6 are expressed with dotted decimal for last four octlets: ::194.123.1.2 IPv6 addresses are leased (possibly infinitely). #### Current Allocation • 0000 0000 - Reserved • 0000 001 - NSAP Allocation • 001 - Aggregatable Global Unicast • 1111 1110 10 - Link-Local Unicast • 1111 1110 11 - Site-Local Unicast • 1111 1111 - Multicast • Format Prefix: 1111 1110 10 or FE80::/64 Postfix is usually the last 24 bits of MAC address. middle byte is fffe due to IEEE standards. fe80::00ff:fe00:0000 for MAC address: 00:00:00:00:00:00 • ### Site-Local Addresses Format Prefix 1111 1110 11 or FEC0 • ### Neighbour Discovery • ### Router Advertisements • ### DHCPv6 Where autoconfiguration is undesirable for operational reasons. Similar in concept to DHCP for IPv4 Compatible with autoconfiguration Nodes may request multiple addresses. Authentication of nodes. Makes use of address deprecation and reconfiguration-init message… • ### Co-existence and Tunnelling • #### a) With reference to the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP), describe features that are provided by transport layer protocols. In your answer distinguish between features provided just by TCP and those provided by both UDP and TCP. • Both use port numbers. Server listens of a specific port and client sends data to that port. • UDP Connectionless • No acknowledgement that data is recieved • Up to the application to manage successful transmission of data • TCP sets up a connection between two machines • Connection must first be established • All sent packets (except ACK’s) must be acknowledged by the other party • Support for flow control using sliding window protocol • Must also terminate the connection • Protocol ensures sucessful delivery of data (or failure). • b) Describe with the aid of diagrams the TCP/IP connection establishment processes, and explain how the initial sequence number (ISN) is exchanged between two nodes during connection establishment. Label the diagrams with the TCP connection states at each stage. • Server listens on a specified port • Client sends a SYN packet to that with a random ISN and a receiving port number (usually fairly high). • Server responds to the client with an ACK with a sequence one higher than the SYN’s ISN (the SYN is seen to have taken up one byte of data). • Server also responds with a SYN to the client, the ISN here is generated by the server and is different to the clients. • Client responds to the server’s SYN with an ACK, again here the sequence number of this packet will be the ISN of the Servers SYN packet + 1. • At this point the connection is established. The ISNs must be different as they are used to acknowledge how much data was actually received later in the connection. Sequence numbers returned in the ACK are the sequence number of the acknowledge packets plus the size of that packet (which can then be used for flow control). • #### c) What is meant by a flow control mechanism? In your answer describe the likely effect of not employing flow control on TCP connections. • Flow control used to send multiple packets of data and acknowledging them all in a single packet. • Flow control is also used to stop flooding the network with packets that would just be dropped by the receiver because it’s buffers are full. Not using flow control would either: 1. Require the sender to wait for the receiver to acknowledge a single packet before sending the next one, meaning the whole transmission would be very slow. 2. Allow the sender to flood the network with packets which would eventually be dropped by the receiver as its buffers fill up to maximum (or by intermediary devices to the same effect). The sender would receive acknowledgements for some of the packets and would have to constantly resend dropped packets after a timeout period, leading to a lot of traffic on the network, especially when the receiver does not process the information quickly. • #### d) Describe, with the aid of diagrams, the problem with transferring very large files using the slow start /congestion avoidance flow control mechanism on fast (e.g. gigabit) but high latency networks. Explain in your answer how the TCP Westwood+ algorithm modifies the mechanism to provide better throughput whilst retaining a concept of fair access. • #### Search State Summarises the state of search. May not lead to a solution. e.g. Representation of a chess board. • #### Initial State The first search state. • #### Solution A special example of a search state. It solves the problem. • #### Goal State The state trying to be reached. • #### State Space All possible search states. • #### Successor Function Ways to move around in the state space (action/operators). • #### Goal Function To check if the goal has been reached. • #### Cost Function Measures the path cost. • #### Time Complexity In big O notation. Number of nodes generated during a search (worst case). • #### Space complexity In big O notation. Maximum number of nodes stored in memory. • #### Optimality Is it guaranteed to find the optimal solution? • #### Completeness If there is a solution, will it be found? • #### Branching Factor b Maximum number of successors of any node • #### Depth of shallowest goal d • #### Maximum length of any path in the state space m • ### Hill Climbing Heuristic best child chosen at each point until goal reached or no change in current state. No backtracking. • Priority queue based on heuristic. Like BFS other than that. • f(n) = h(n) • ### A* A best first search which takes into account current path cost. f(n) = g(n) + h(n) • ### Dominance/Informedness If h2(n) >= h1(n) then h2 dominates h1. • #### Koza’s Algorithms • Tree consists of functions and terminals • Choose a set of functions and terminals • e.g.: {+,-,*,/,sqrt},{A,B} • Generate random population which are syntactically correct. • Follow GA-like procedure. • #### Mechanics of ACO • Graph Representation • Heuristic desirability of edges • Construction of feasible solutions • Pheromone update rule (attached to edges). • #### Algorithm for one ant • Select starting node at random. • While not finished: • Evaluate all edges from this node. • Select the best-looking edge via probabilistic transition rule • Deposite artificial pheromon on the chosen edge. • Finished path is a potential solution, analysed for optimality. • #### Classes Ignored in Logic Objects in the world tend to be related to each other: • Classes, super- and sub- classes. • Part or whole hierarchies • Properties which are inherited. The state of the world changing over time. • Explicit representation of time. • Frame problem. • Non-monotonic reasoning. Closed world assumption. Uncertainty or fuzzy knowledge. • #### Classes and Object-Orientated Representations Classes define Objects, Objects are instances of Classes. Object ∈ Class Class ⊂ Superclass Facts and rules can be encoded. • #### Semantic Networks Essentially a generalisation of inheritance hierarchies. Each node is an object, class, concept or event. Each link is a relationship which makes sense in context. Inheritance is as expected. Example: Note: pre-dated OOP. • #### Frames Incorporates certain valuable human thinking characteristics: • Expectations • Assumptions • Stereotypes • Exceptions • Fuzzy boundaries Represent what is typical unless an exception is known. Frames allow more convenient “packaging” of facts about an object. Frames often allow things which are typical of a class and which are definitional and can’t be overridden. Frames also support multiple inheritance. Frames are represented as semantic networks where nodes have structure. A frame has a number of slots (age, height, etc.), each of these slots stores specific information. When new information is gained slots can be filled in, this can cause the triggering of actions, which may trigger the retrieval of other frames. • #### Scripts Can fill in missing detail that is assumed. • #### Truth Maintenance Systems These systems allow truth values to be changed during reasoning (belief revision). When retracting to a fact, must also retract to any other fact derived from it. Penelope is a bird (can fly) Penelope is a penguin (cannot fly) Penelope is magical (can fly) Retract magical (cannot fly) Retract penguin (can fly)  • ### Backpropagation Most common learning rule for ANNs. Connections between nodes given random initial weights. We therefore get a value at the output node(s) which happens when these random weights are applied to the data at the input. • ### Epoch An iteration, that is, finding the error then adjusting weighting, is called an epoch. There may be many thousands of epochs in one training. • ### Overfitting Need to be able to generalise the model to unseen data. Too much training will lead to a lack of generalisation. • ### Kohonen Neural Networks Self-organising neural networks. Random initialisation of a grid, see which nodes best match the input and change nodes around it. • #### Variety Structured data is becoming unstructured. • #### Velocity Moving from batch jobs to the streaming of data. • #### Volume Now around Zettabytes of data around. • #### Value • #### Benefits • Access Passes, Attendance monitoring, follow me printing • Calendar, room booking, etc. • CCTV, WiFi, Remote and central monitoring and control • Dynamic displays, emergency messages, fire alarms • #### Vulnerabilities • Denial of access, unauthorised access, data compromise • Disruption, wasted energy, damage • Intrusion, loss of control, • Safety. • #### Vulnerabilities • Meters contain clocks and billing data, if these are changed, bills can be manipulated. • Meters contain an off switch, misuse could cause distress, harm or substantial disruption. • Meter firmware will need to be updated. • The Gas meter can only handle low-grade encryption. • ##### Logging and Strings NSLog(@"Message"); NSString *var = @"Some message"; NSLog(@"Message: %@.", var); • ##### Booleans BOOL true = YES; BOOL false = NO; • ##### Numbers NSNumber *num = @10; // Conversion to unsigned int NSUInteger uInt = [num unsignedIntegerValue]; • #### Arrays NSArray *arr = @[...]; // Accessing elements arr[index]; // Something about NSArrays being immutable objects. • #### Dictionaries NSDictionary *dict = @{@"key": @"value"}; // Accessing NSString *val = dict[@"key"]; • ##### Storing the output of Messages Just need to worry about typing NSArray *temp = @[@"Test", @"2"]; NSString *result = [temp description] NSLog(result); #### Parameters Messages can have parameters, however they may act differently than expected. [object methodName:parameter namedParameter:value] • ##### Initialisation [[Class alloc] init]; • ##### Method Signatures In many languages, you might see: void m(int x, int y, String text) A similar method in Obj-C is: - (void) mAtX: (NSInteger) x atY: (NSInteger) y withText: (NSString *) text Calling this: [obj mAtX: 2 atY: 32 withText @"a message"] The method name is: mAtX:atY:withText • ##### Properties Defined with the @property syntax. The attributes in the () control how the property manages the underlying data value. The IBOutlet is only used on properties that are linked to the user interface. atomic is used for multi-threading purposes (read locks, etc.). Under the bonnet, this is an instance variable (ivar). Good practise is to cover your ears and pretend they’re just properties. • ##### Instances Example *inst; inst = [[Example alloc] init]; // or inst = [Example new]; alloc and init is the typical Obj-C way as classes often have different initialisation techniques. alloc is a class method, init is an instance method. • ##### Table Styles Table style is set at build time only. • ##### Cells Each row contains a cell. When a row’s data is to be displayed, the UITableView will request the cell. By default, the UITableViewCell is used to degine a cell. The cell is initialised in the method: tableView:cellForRowAtndexPath: A table can contain different types of cells for different rows. The cell is reused. • #### Table View Contoller UITableViewContoller is a subclass of UIViewControler that is designed to manage UITableViews. If a new view based controller is created, the XIB will contain the table linked to this controller. In order to provide custom behaviour, the following methods needed to be implemented: • UITableViewDelegate • Manage selections, • Configure section headings and footers, • Help to delete and reorder cells, • Perform other actions • (All optional) • UITableViewDataSource • The data source provides the table-view object with the information it needs to construct and modify a table view. Two are required. • ##### Activity A single screen layout and the code behind. A functional piece of UI. • ##### Service A background process. Does not have a UI, may interact with them though. • ##### Content Provider A way of sharing a local database. Queries and cursors used to interact. • ##### Broadcast Reciever • ##### Array Adapter <T> Simple array of type T. Generally a hard-coded list of static data. • ##### Simple Adapter A list of maps, where the map keys relate to UI element IDs. • ##### Simple Cursor Adapter A dynamic adapter which is based on a cursor of an iteratable object. • ##### Access Apps access their private files folder with: Context.getFilesDir(); • ###### Read/Write Context.openFileOutput(String name, int mode); Context.openFileInput(String name) • ##### Patterns of Enterprise Architecture • Building and structuring the application • Relate to .NET and Java • ##### Patterns of Enterprise Integration • Making applications communicate • Examples: • Apache Camel • Apache ActiveMQ • ##### Containers A set of Java classes packaged into a jar file. Can be deployed using either: • XML descriptors • Java annotations Annotations are widely used, but can be overriden by descriptors. Components plus deployment descriptors make up a module, each for one container type. Four types of EE modules: • Web modules .war • EJB modules .jar • Application client modules .jar • Resource Adapter Modules .rar A set of modules makes up a Enterprise archive: .ear • ##### Lifecycle Managed by the web container. The first call is: • Load class • Create an instance • Call init() Any call: • Handle the HTTP request Perhaps calls destroy() Only one instance is needed by a running server. • ##### Handling Requests The HttpServlet class has stubs for all the HTTP methods doGet(...) etc. service() method used to handle the finding of appropriate methods for the HTTP headers. Common to use the same method to handle GET and POST (for some strange reason, this sounds bad). • ##### Forwarding Can forward requests to other servlets, passing on the request and response objects. Used for branching on context, for example. RequestDispatcher d = req.getRequestDispatcher('name'); d.forward(req, resp) • ##### Instance Variables and Servlets A servlet could have instance variables, however these variables are not specific to a connection, rather the whole servlet. There may also be multiple servlets so there is no guarantee that these will be the same. Need features for session data. Reminder that HTTP is stateless. • ##### Sessions The request must carry some identification of the session, server usually generates this information. • Parameters • Cookies Remember EU Cookie Law • ##### Error Redirects Specified in the web.xml descriptor. • ##### Service Testing Testing the resources in an automated way to avoid manual input. Provides rapid and reliable regression testing. Handles: • HTTP(S) • FTP • LDAP • JMS • Mail • SOAP Specify calls, with parameters or sequences. Selenium or JMeter are options (JMeter also does load testing). JMeter also has a NetBeans plugin. • ##### Common Language Runtime (CLR) The .NET JRE effectively. Loads and executes .NET “managed code”. CLR loads code into application domains to provide a level of isolation and the ability to stop and remove a domain. Provides Just In Time (JIT) compilation, memory management and GC. Security based one roles and defined by policies. • ##### Building and Deploying Code 1. Compile source code files. 2. Combine IL (MSIL), metadata, config files and other resources into assembly files. • DLL or EXE extensions • DLL is a library module • EXE is only type that will activate the CLR 3. Deploy Applications to CLR • ##### Basic Technology Basic Api for represention components and managing their state; handling events, server-side validation and data conversion; defining page navigation; supporting i18n and accessibility; and providing extensibility. A tag library for adding components to web pages and connecting components to server-side objects. • ##### Expression Language Like most scripting languages  and # are used.

${expr} are rvalues (read-only) and are processed immediately. #{expr} are *lvalues (read-write) and have deferred evaluation. Also used for method expressions. ${object.variable} calls object.getVariable() under the covers.

#{object.method} calls object.method().

• ##### Faces

A replacement for JavaServer Pages (which are now deprecated).

Write (X)HTML with special tags which have an XML appearance which will be rendered as HTML with functionality behind it.

<h:body> is the top level tag.

All pages will tend to act like a form, so <h:form> is very commonly used, even in cases where there would not normally be a form.

• ##### Common Attributes
• id
• style to associate CSS
• rendered is a condition to check is the element should be rendered on the page. The condition can be an expression from the Expression Language.
• value the value of the component, again this can be from the Expression Language, which links the view to the model.
• ##### Composite Components

Built from standard components.

These can be parametrised and stored in resources; they have a namespace (default: http://xmlns.jcp.org/jsf/composite/ezcomp)

• ##### Templating

Can create template pages which has values to fill in. The inheriting page has to fill in these values.

• Write navigation rules in XML, each rule is a page (view). For each page there is a set of outcomes (in string form). For each outcome a next page is specified.

Typically stored in faces-config.xml

Outcomes are generated from the action attributes from components.

There are implicit navigation rules which falls back to a matching page if it can be found.

• ##### Converters

Implement javax.faces.convert.Converter

Have associated error string displayed if conversion fails (<h:messages>).

Number of default converters for most Java Objects and primitives.

Converters are used in four ways:

1. Bind the component to a managed bean property of the right type (default).
2. Put the converter class in the component’s converter attribute.
3. For numbers and dates, nest the f:convertDateTime or f:convertNumber tag inside the component.
4. Put the f:converter tag inside the component and refer to the converter (general purpose tag).
• ##### Events & Listeners

Part of the component model, application events are generated by components (ultimately from the rendered page).

The JSF application can map HTTP requests to the specific handling code.

Two types of event:

1. Application event; when the user activates a component that implements ActionSource (buttons, links, etc.).
2. Value-change event; when the users changes the value of a component represented by UIInput.

Listeners cause the application to respond to events:

1. Implement an event listener class to handle the event and register it to a component.
2. Implement a method of a managed bean and refer to it in the EL attribute in the component tag.
• ##### Validators

Similar to converters, but only provide validation.

Implement javax.faces.validator.Validator

Again, default validators are provided.

Registered by:

1. nesting the validator’s tag inside the component
2. Nesting the f:validator tag inside the component.

BeanValidator uses validation methods in the bean instead of having to write a separate class. Also allows the validation to be model-state specific.

• ##### Lifecycle

Starts when the client request a URL and ends with the server response.

• ##### View State

Stores the entire state in a hidden item in the form. Simplistic, but does affect performance and security.

Sent in base64.

Can disable for the entire page, or for specific elements.

Also have the ability to encrypt, EnableViewStateMac or store server-side.

• ##### Session State

There are different techniques which can be used to store session state:

• REST Requests (not stateful)
• Server Side session tokens (persistence/scalability questions)

ASP.NET uses server side session tokens:

String myVallue = "A. Name";
Session["name"] = myValue;
myVale = (String) Session["name"];

Can configure where the data is held. Can also turn off the requirement for cookies.

• ##### System.Web.UI.Page

Default base class for code-bheind filels.

Implements System.Web.IHttpHandler:

• IsReusable() - true if the handler can be pooled
• ProcessRequest( - Processes the actual HTTP request.

• #### GridView and SQL DataSource

Ways of display DB data.

• ##### Transactions

A transaction is a unit of work which supports “ACID”.

• ##### EJB Transactions

In EJB Transactions have a scope. A transaction manager manages this process.

EJBs support two types of transactions:

• Container managed
• Bean Managed
• ##### EJB Transactions Attributes

Six types of transaction attributes, specified by annotations or descriptor.

The default is Required.

Can annotate the class to set the default for the class.

• ##### EJB Isolation

Problems:

Provide four (fairly standard) levels of transactions:

• TRANSACTION_READ_UNCOMMITTED
• TRANSACTION_READ_COMMITTED
• TRANSACTION_REPEATABLE_READ
• TRANSACTION_SERIALIZABLE

In bean-managed transaction, can specify isolation using the JDBC API:

connection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE) ;

Using serializable guarantees data consistency, but may affect performance.

• ##### EJB Transactions with Exceptions

Checked exceptions (including application exceptions) do not cause an automatic rollback, but can be set using @ApplicationException(rollback=true)

Unchecked exceptions and RemoteExceptions automatically cause a rollback and the EJB instance is discarded.

• ##### Injections

Getting a reference to object instances without instantiation or passing in as parameters, providing good decoupling.

There are two mechanisms for this:

1. Resource Injection
2. Dependency Injection

Annotations to fields or methods specify the injection points.

Provides a runtime binding which provides inversion of control.

Compatible abstractions are required to avoid typing errors; the code using an object is not responsible for choosing an implementation or creating the instance.

Injection is often the implementation for this, but can use:

• Factories
• Service Locators
• Contextualised lookup
• ##### Resource Injection

Inject references to objects in the JNDI namespace into any container-managed object.

Gets a reference to a resource using:

• Annotations
• Deployment Descriptor
• InitialContext lookup

Inject as an interface type, code independent of specific implementation.

Not type safe!

• ##### JDBC

Only provides relational records, not Objects.

• ##### Java Naming and Directory Interface (JNDI)

Access to naming and directory services, part of the Java SE API. Looks up objects by name, returning values or references.

API for the clients.

Service provider interface (SPI) wadds new directory and naming services.

• ##### Java Persistence API (JPA)

Provides an ORM mapping of Java Object using Java annotations. Provides:

• Create
• Retrieve
• Modify
• Write

(So CURD then? -A)

Entities are JavaBeans, annotated with @Entity. Automatically mapped, but can label instance variables with extra details; @Column can map Java types to SQL types.

@Id is required.

(JPA can be a real pain though, he glossed over this just a little bit -A).

• #### Contexts and Dependency Injection (CDI)

Any Java object can be made managed by its container. The CDI defines scpoes and a managed object has a declared (or default) scope.

This can then be injected into any other managed object.

• ##### Brokers

JavaEE applcation servers must have one. Glassfish has Open MQ.

.NET has one part of the service bus.

Apache Active MQ is a good offering.

• ##### Security

Authentication & Authorisation, encryption of messages, integrity of messages, transactional, etc.

Some protocols and some implementation already on offer.

• ##### Structure
POST /webservice/OrderProcessing HTTP/1.1
...
<?xml version="1.0" encoding="UTF8" ?>
<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”
xmlns:xsd=“http://www.w3.org/2001/XMLSchema”
xmlns:ns1=“http://orders.borthdistributors.co.uk”>
<!-- Optional. Meta-data in form of header blocks. e.g.: security credentials, id, etc. -->
<soapenv:Body>
<!-- Mandatory. Arbitrary application-specific XML data or elements that map to method/procedure calls or code that processes the XML document. Could be fault data -->
</soapenv:Body>
</soapenv:Enveloper>
• ##### Web Services Description Language (WSDL)

SOAP manages the process of communicating information but doesn’t define operations, data types or faults of the service.

WSDL is an XML description of a service, generally autogenerated by tools.

• ##### In .NET

Generates proxy code for you. A set of asynchronous methods are provided:

BeginMethodName(...)
EndMethodName(...)
• ##### Interoperability in SOAP

How do you expose types as parameters and return values in a way which in interoperable?

Value types map onto XML Schema types, classes or structs are converted into complex types in the schema.

• Classes must be public
• Public fields and properties are serialised as elements
• Methods are not exposed.

Arrays and collections are supported by this, but not all types can be mapped easily (e.g. custome types where methods are used to provide access to calculated data). (A: as you’d expect really)

• #### Windows Communication Foundation (WCF)

Splits Application domain from communication domain.

Brings together lots of different interoperability technologies.

• ##### Functional Segmentation

Group data using standard data modelling techniques.

Logical hosting: abstract the logical representation from hosts physical location.

Support combining and splitting without code change.

• ##### Horizontal Split

Split databases horizontally along primary access path.

Multiple split patterns:

• Hashing based on a key
• Lookup- or range-based

Aggregation/routing in Data Access Layer:

• Abstracts developers from split logic.
• Routes CRUD operations to appropriate split
• Supports rebalancing through configuration changes
• ##### No (cross-database) Transactions

Absolutely no client-side transactions, two-phase commits.

Auto-commit for vast majority of DB writes.

Anonymous PL/SQL blocks for transactions within single database.

Consistency without transactions using:

• Careful ordering
• Recovery through:
• Asynchronous recovery
• Reconciliation batch
• Fallover to guaranteed asnyc flow.

• Avoids coupling availability
• Maximises update correctly.
• ##### No session state

User session flow moves through multiple application pools

Absolutely no session state in application tier.

Transient state maintained/references by:

• URL rewriting
• Scratch database
• ##### Message Dispatch

Consumers subscribe to event.

• Multiple logical consumers can process each event
• Each logical consumer processes events independently
• Within each individual consumer, single consumer instance processes event
• Guaranteed at least once delivery, no guaranteed order.

Managing timing conditions

• Idempotent - processing event N times should give the same results as processing once.
• Readback - consumer typically reads back to primary database for latest data.
• ##### Search Feeder

Reliable multicast

• Publish updates to search service
• Persist messages to intermediate data store for recovery
• Resent recovery messages when messages are missed

• Listen to assigned subset of messages
• Update in-memory index
• Request recovery.
• ##### Periodic Batch

Schedule offline batch processes

Most appropriate for:

• Infrequent or scheduled processing
• Non-incremental computation

Often drives further downstream processing through message dispatching.

Define service-level agreement (SLA) for a given logical event.

Consumer dynamically adjusts to meet defined SLA with minimal resources.

• Event processing time
• Number of consumer instances
• ##### Machine Learning

• choose pages, modules and which provide best experience for that user and context
• Order results by combination of demand, supply and other factors

Feedback loop enables system to learn and improve over time:

• Collect user behaviour
• Aggregate and analyse offline
• Decide and serve appropriate experiences

Best practises:

• Perturbation (anneling) for continual improvement
• Dampening of positive feedback
• ##### Failure Detection

Application servers log all requests

• Detailed logging of all application activity

Messages broadcast on multicast message bus

Listeners automate failure detection and notification.

• ##### Rollback

Absolutely no changes to the site cannot be done.

Code deployment: Rollout/Rollback

• Entire site rolled every 2 weeks
• Many deployments have dependencies between pools
• Rollout plan contains explicit set (transitive closure) of all rollout dependencies.
• Automatic tool executes staged rollout, with built-in checkpoints and immediate rollback if necessary.

Feature deployment: Wire on/Wire off

• Every feature has an on/off state driven by central configuration
• Allows feature to be immediately turned off for operational or business reasons
• Decouples code deployment from feature deployment
• Applications can check for feature “availability” in the same way as they check for resource availability.
• ##### Markdown

Detecting that a resource is down or slow.

Application “marks down” the resource.

• Stops it from making calls to it

Non-critical functionality is removed or ignored

• “Limp mode” operation

Critical functionality is retired or deferred

• Fallover to alternative resource
• Defer process to guarantee aynch message

Explicit “markup”

• Allows resource to be restored and brought online in a controlled way.
• ##### File Integration

Export data from one system and import into another using a file system.

Works with different technologies.

Issues of file format, shared file systems, timing.

Question of how data is exported and imported?

• User managed
• Other communication

Automation problems. File locking might be required.

• ##### Shared Database

Collection of applications that need to share common data.

DBMS removes a lot of issues from file integration.

Tightly coupling the applications to a common area.

• ##### Remote Procedure Invocation

Invoking actions in addition to sharing data, using some form of RPC methodology:

• Sockets
• SOAP
• REST
• etc.

Again needs a shared understanding of the data. No shared file format.

Timing question of when do we start the transfer.

Communication might fail, does that affect the coupling of the two applications?

• ##### Messaging

Share data by sending Messages over a Message Channel. Application(s) pick up messages and process the information.

Fire and forget for the sender.

Message channel stores and forward to provide reliable message delivery which mimics the real world.

• ##### Message Channel

Logical pipe between senders and receivers, the implementation of this vary:

• Direct Connections
• Central message hub

Each channel has an identity, typically a name.

Different channels exist for different methods of solving problems.

• ##### Messages

A unit of information containing a header and a body.

Different types of message:

1. Messages to send commands
2. Messages to send documents
3. Messages to send events

There are ways to specify how long messages are relevant for

• ##### Routing

Sending messages might involve more than just forwarding.

• ##### Endpoints

The interfaces to the senders and receivers

• How do they link to the message channel
• Polling consumer
• Event driven consumer
• Messaging gateway
• Other
• ##### Transformation

Isolate different stages and then translate later.

• ##### System Management

The challenge for these systems is how do we know what’s going on, given that there may be many different queues in a system.

Object to object communication is easy(ish) to use a debugger or log.

Web systems are a little harder, but possible to debug and monitor.

But how do you monitor message based systems?

• ##### i Registration of human users and authentication and authorisation for use of the various aspects of the application by a range of user types
• Java
• Registration
• Realms (File, JDBC, LDAP, …)
• Group of users
• Facilities to manage/persist user data
• Authorisation
• Roles
• Authentication
• Configuration
• Web server
• .NET
• Wizards/template (not many marks for such a galling answer)
• ASP.NET Identity System
• Authentication
• Web.config (protected)
• SQLServer (.mdf)
• ActiveDirectory
• OAuth
• Authorisation
• Roles
• ##### ii Concurrent use of the application by many users, each with their own server-side interaction context.
• Java
• Session beans
• Distinguishing between request, session and application
• Session Management?
• .NET
• Session Management
• Session["myKey"] = ...
• InProc
• SQL Server (DB)
• Session State Server
• View State
• ##### iii Provision to client applications of a SOAP based search service that returns a set of descriptions of establishments with current availability, which meet given criteria.
• Java
• Annotations
• WSDL generation of exposed class
• Operations through @WebMethod on methods
• @WebService on class
• .NET
• Attributes
• Operations through [WebMethod...] on methods
• [WebService...] on class
• .asmx still exists, but older
• .WCF Windows Communication Foundation
• Interface
• methods
• Implementing class
• WS* specifications
• Generate proxy from WSDL (client)

Problems of mapping data types between languages.

Public properties/fields exposed for sending over a web service (attributes in .NET)

Raw data only.

Underlying standards and tool support.

• ##### Differnet LAN

If destination address on different LAN, forward packet.

• ##### Unknown Destination

If location of destination address is not known then ‘flood’.

‘flood’.

• ##### Flood

Forward the packet to every other network attached to the bridge.

Bridges listen to the traffic and can learn where machines where by looking at the source addresses in the packets.

Need to be quite large depending on the network.

Generally there is a time-out associated with the addresses known.

• ##### Bridge Cycles

Address Learning works well if there are no alternative routes in the internetwork connections (i.e. a tree structure).

However there often are alternative routes, so bridges might cause loops.

• ##### Solution to Bridge Cycles

Need a protocol to avoid cycles.

Result for graph theory states:

For any connected graph, there is a spanning tree of edges which maintains the connectivity but contains no closed loop.

Each LAN represents a graph node and each bridge corresponds to an edge.

• ###### Spanning Tree
1. Bridges have numbers
2. Broadcast number every few seconds
3. One bridge becomes the root bridge
4. Bridges discover route to root via root port.
5. Routes might have costs.
6. A designated bridge is determined for each LAN (minimum cost of path to root).
7. Only the designated bridge can forward to and from its LAN.
8. Bridges communicate with a Bridge Protocol Data Unit (BPDU) consisting of:
• The originating bridge number
• The number of the bridge thought to be the root
• The path cost to root.

Initially every bridge thinks it is the root and it broadcasts a BPDU to assert this fact.

If a bridge gets a BPDU indicated a ‘superior’ bridge exists it assigns its root port and the path cost to root.

If a bridge gets a BPDU from a bridge with a shorter root path it releases any claim to be the designated bridge for the segment.

The lowest numbered bridge becomes the root.

Bridge ports which are not root or designated ports are blocks.

• #### Coding Convention

• Network speed
• Baseband Signalling
• 2 or 5 stands for coaxial cable and length
• T stands for Twisted Pair
• F/FL/S/L Stands for Fiber-Optic
• X stands for full duplex.
• ##### Cut-through Switches

Are faster because they examined the packet destination address only before forwarding it on to its destination segment.

• ##### Store-and-forward Switches

Work like bridges in that they accept and analyse the packet before forwarding it to its destination.

Takes more time to examine the whole packet, although it does allow the switch to catch certain packet errors and keep them from propagating through the network.

• Positive to 0 is 1.
• Negative to 0 is 0

• ##### Asymmetric Digital Subscriber Line (ADSL)

Designed to deliver more bandwidth down than up.

Rates range from 1.5 to 9 Mbps down, 16 to 640kbps up.

Distances of 18,000 feet over a single copper twisted pair.

A splitter is needed.

• ##### Very high bit-rate Digital Subscriber Line (VDSL)

VDSL is designed to provide higher bandwidths.

Up to 52Mbps down, 16Mbps up.

• ##### VDSL 2

Support the wide deployment og triple play services.

100 Mbps down, 20 Mbps up

150 to 500m distance.

500 Mbps transmission rates over copper cabling by using crosstalk cancellation or “vectorized” VDSL2 based modems.

• ##### BT Infinity

Now rolling out ultrafast fibre optic broadband with speeds of up to 100Mb.

Next step up from FTCC is FTTh (Fibre to the Home).

Negative factor is the costs.

• ##### Infrastructure Mode

All wireless clients are connected to an AP.

Generally the default mode for the 802.11b cards.

All mobile STAs communicate with each other via the AP.

Network consumes double bandwidth for one communication.

AP provide buffering of traffic for a mobile broadcast.

Wireless clients are connected without an AP.

An ad-hoc network is where stations only communicate peer-to-peer (P2P).

There is no base and no one gives permission to talk.

Mostly these networks are set up spontaneously.

• ##### Mac Service Data Unit (MSDU)

It is the MAC service data unit. This is the unit o transmission used at the MAC layer which is received from the upper layer.

• ##### Aggregated Mac Service Data Unit

Aggregation of the MSDU directly performed at the MAC layer is called AMSDU.

Such AMSDUs are now passed to the lower PHY later where they are dealt with as MPDUs

• ##### Mac Protocol Data Unit (MPDU)

These are the frames passed from the MAC layers into the PHY later.

• ##### Aggregated Mac Protocol Data Unit

These are the aggregated MPDU units which are pushed into a single Physical Protocol Data Unit (PPDU).

• ##### Distribution Station Services (DSS)

The three physical layers originally defined in 802.11 included two spread-spectrum radio techniques and a diffuse infrared specification.

Spread spectrum is a communication technique that spreads a narrowband communication signal over a wide range of frequencies for transmission then de-spreads it into the original data bandwidth at the receive.

Spread spectrum increases the bandwidth of the signal compared to narrow band by spreading the signal.

• ##### Narrowband and Wideband

In communications, band is referred to as the range of frequencies (bandwidth) used in the channel.

Depending on the size of the band (in terms of kHz, MHz or GHz) and some other properties of the communication channel, they can be categorized as narrowband and wideband etc.

Narrowband uses a smaller frequency range (bandwidth)- 300–3400 Hz.

Wideband is a relative term, and the size of the band may be in kHz, MHz or GHz depending on the application.

• ##### Base Station Subsystem (BSS)

Composed of one or more BSC.

BSS is the point where all radio transmission related functions are performed.

BTS and BSC connected through the Abis interface.

BSS connected to the MSC through the A interface.

• ##### Network Switching Subsystem

Contains the network elements MSC, LR, VLR, EIR, AuC and GMSC.

• ##### Circuit Switching Network

A dedicated radio channel is allocated to a single transmission

As long as data transmissions are long and continuous (file transfers) a circuit is used efficiently.

However, most data transmissions are bursty, and dedicating an entire circuit to them is usually a waste of valuable wireless bandwidth.

During idle periods when no data is being sent, bandwidth is still dedicated to the user and not available for others to use.

• ##### Packet Switching Network

An entire network may be designed just for packet data.

Packets do not have a dedicated path, it is decided by the routers.

Most old wireless data systems offered minimal data rates, usually in the 10Kbps range. However new wireless protocols bond multiple channels to increase data rates.

• ##### Code Division Multiple Access (CDMA)

Each user is assigned a different psuedorandom binary sequence that modulates the carrier, spreading the spectrum of the waveform, giving each user a unique code pattern.

• ##### 4G
• Frames the Network layer packet
• Identifies the Network layer protocol.

Provides multiplexing and demultiplexing to and from the network layer.

Manages flow control and error control.

• ##### Media Access Control
• Marks the beginning and ending of the frame

Managed access control.

• ##### Hardware Type

Which type of hardware are we using

• ##### Protocol Type

ARP can be used with other protocols (other than IP).

• ##### Hardware Size & Protocol Size

Size of the addresses (hardware and protocol).

Doesn’t map just MAC addresses, etc.

Hardware address is repeated as the Ethernet header is harder to access in software.

• ##### Operation

1. ARP Request
3. RARP Request

RARP - Reverse ARP (looking up IP from MAC). Can be used to discover the machine’s own IP address, for example.

Used before DHCP.

If unknown to the sender, filled with 0s, otherwise the actual address

• ##### RIPv1 (RFC 1058)

Classful routing with no ability to pass netmasks.

Metrics range from 1 to 16 (infinity).

“Split Horizon” often used.

“Triggered Updates” send an update when something (close) changes to improve convergence.

Sent via UDP to the IP broadcast address (usually) to port 520.

• ##### RIPv2 (RFC 1723)

Refinement of RIPv1.

Includes netmasks and some support for authentication and multicast.

• #### Open Shortest Path First (OSPF)

Uses IP directly.

Early versions could calculate a different set of routes for each value of the IP Type-Of-Service (ToS) field, but this was abandoned in the latest RFC.

Interfaces have a dimension-less costs (these were potentially different for each value of ToS).

Supports subnet mask and thus CIDR.

Supports authentication

On a multi-access network (e.g. ethernet), two routers are elected as Designated Router and Backup Designated Router.

• ##### Membership Queries

Sent by routers to ask for existence of hosts interested in receiving multicast groups.

• ##### Membership Reports

Sent by hosts in response to Queries,

Also sent by the host if they wish to join a new group.

• ##### Membership Queries

General Query as before.

Group-Specific Query. Used to query if there are any members of a group left after a leave message.

• ##### Membership Reports

Now contain information relating to multiple groups and each group report can contain source address information.

• ##### Protocol Independant Multicast - Sparse Mode (PIM-SM)

Has a rendezvous point using a shared tree, but uses source trees to get data from sources to the rendezvous point. Also allows the final router feeding receivers to switchover to a source tree from the source if the traffic level exceeds some threshold (in Cisco routers the default value for the threshold is zero).

• ##### Sequence Number

Ensures ordering of packets (is actually a byte count of the first byte count in the packet of data).

Doesn’t start at 1.

• ##### Acknowledgement Number

Helps find missing packets, is the last byte of the packet.

Describes the length of the header.

• ##### TCP Checksum

Same as UDP Checksum

• ##### Wait States

TIME_WAIT is also called the 2MSL wait state.

• MSL - Maximum segment life.
• RFC 793 specifies MSL as 2 minutes.
• 30 seconds, 1 minute, 2 minutes are common implementations.
• ##### Connection Establishment
1. Server listens on a given port (no network traffic).
2. Client sends a TCP packet with the SYN flag set to a random number.
3. Server receives the SYN, the 0 offset is the value of the SYN flag. Server goes into SYN Received state.
4. Server sends a TCP packet with a different SYN flag and an ACK flag, returning the Client’s SYN flag plus one*.
5. Client returns an ACK flag.

* The SYN flag is assumed to have consumed 1 byte.

If no ACK is received at SYN Received state then the SYN is resent after a timeout.

Known as the three way handshake.

Note: Initial sequence numbers are important! Both client and server choose different ISNs.

• ##### Half-Open

When you have a connection between two machines, but one crashes. There’s no data sent between them so one still believes it is connected.

• ##### Simultaneous Open

Possible (but unlikely) that two applications will perform active open to one another. Not Client/Server, each opens to a known port.

Results in a single open connection.

Four-way handshake required.

• ##### Connection Termination
1. Client sends a FIN
2. Server sends an AWK and a FIN
3. Client sends an AWK.

Three way closedown.

ACK and FIN might not be sent together (server might still be transmitting data).

• ##### Half-Close

When a FIN is sent to the server but there is still more data to be sent should not close fully until a FIN AWK is sent and the AWK returned. Microsoft broke this by sending a RST instead of a proper AWK

• ##### Simultaneous Close

Both sides of a connection might perform an active close.

Four segments required, which s not unusual.

• ##### Maximum Segment Size (MSS) (2)

Length is 4

2 byte MSS. Usually based on the MTU size.

• ##### Window Scale Factor (3)

Length is 3

1 byte shift count.

• ##### Timestamp (4)

Length is 10

4 bytes timestamp value

• ##### Sliding Windows Flow Control

The idea is that in every ACK we also advertise a window. The window is a number of bytes, usually a multiple of the MSS.

The initial window size will be the size of the buffer TCP has available.

Sender can send up to the limit of the window.

When a segment is acknowledged, the window slides making another slot in the window available.

The window is said to close when the left-hand edge moves to the right.

The window is said to open when the right-hand edge moves to the right.

The window is said to shrink if the right-hand edge moves to the left.

• ##### TCP Slow Start (RFC 2001)

Intermediate routers must queue packets - congestion may occur at routers.

Congestion window (CWND).

1. Initially set to 1 segment (based on announced MSS).
2. On first ACK, increase CWND by 1 segments of bytes.
3. Now 2 segments are sent and ACK’d. CWND is increased to 4 segments.
4. Exponentiall increase until peak flow reached or router discards packets.
5. Sender can transmit up to the minimu of the sliding window size and CWND.

Has two phases:

1. Exponential increase.
2. Linear increase.

Based on a threshold (the slow start threshold).

Drops drastically when there is packet loss.

• ##### Fast Retransmit and Fast Recovery (TCP Reno)

Problem: TCP timeouts lead to idle periods.

Fast retransmit: use 3 duplicate ACKs to trigger retransmission.

Fast recovery: start CWND at SSTHRESH and do incremental increase after fast retransmit.

• #### TCP Westwood +

Improved congestion control algorithm for fast, high latency links and lossy links.

Can take many hours to reach optimal throughput with TCP Reno as packet loss has a large affect on throughput.

Westwood carries out end to end bandwidth estimate (BWE) using received ACKs and RTT monitoring.

TCP Reno overreacts to random loss by cutting cwnd in half.

A small fraction of random packet loss does not impact the BWE.

Thus the ssthresh remains unchanged, allowing Westwood to be much more efficient than Reno.

• ##### Nagle Algorithm

Many small datagrams results in very large overhead.

Can cause congestion, particularly on a WAN.

• Only one outstanding segement not ACK’d
• Cannot send any more small segments until ACK received.
• Whilst waiting for ACK, TCP will collect small segments together to send as a single segment.
• On a fast network, more segments are sent.
• On a congested network less segments are sent, but data still get through (with less overhead).

Sometimes desirable to disable Nagle algorithm, e.g., X mouse movements need to be sent without delay.

• ##### Round Trip Time Measurement

Used to calculate retransmission timeout (RTO).

Mean deviation is used to allow arithmetic to be carried out with integers and without square roots.

Where:

• D is the smoothed mean deviation
• M is the latest measured RTT value
• Gain (g) for average is set to 1/8
• Gain (h) for deviation is set to 1/4
• ##### Karn’s Algorithm

If a packet times out and there is a retransmission, when an ACK is received, whose was it.

Karn’s algorithms specifies that RTT estimate cannot be update when a timeout and retransmission occur.

Re-use the RTO after such an exponential back off until an acknowledgement is received.

• ##### .arpa

A special domain which is used for reverse lookup.

Now .ipv6

• ##### Fully qualified domain names

www.google.com. is a fully qualified domain name. Missing the trailing . allows the DNS to lookup other entries based on the domain it resides on.

• ##### SOA

Name of primary source of info for zeon

• ##### CNAME

Canonical name

• ##### PTR

Alias for an IP address for reverse lookups

• ##### MX

Mail exchange information

• ##### NS

The Name of the nameserver

• ##### HINFO

Host information (CPU and OS).

• ##### LOC

Location of host.

• #### Attributes

Type/value pairs, e.g.:

C = GB

o = University of Wales

Attributes described by a schema.

• #### Privacy

Snoopers should not be able to read confidential data

• #### Authentication

Verifies that the apparent sender really sent a message, and not an imposter.

• #### Integrity

Verifies that data has not been corrupted or altered in transmission

• #### Nonrepudiation

Ensures that the sender or receiver cannot deny sending or receiving a piece of information.

• #### Symmetric Key Encryption

Use a shared secret key to encrypt and decrypt.

For users, keys required.

Can be done in hardware.

• #### Public Key Encryption

The key is split into two: a public key and a private key.

Anything encrypted by the public key can only be decrypted by the private key.

The private key must be kept private, but the public key can be shared without worry.

Cannot be done in hardware.

• #### Combining Both

Create a shared secret based from public key encryption.

• Slow start sets the window to 1 to begin with and grows it exponentially after each ACK received. Once it reaches the slow start threshold (ssthres), this growth is linear (by 1 from each ACK) - this is congestion avoidance.
• Eventually the congestion will be encountered, and a packet will not be ACK’d before a timeout. The size of sstresh is set to one half of the current window size and then the size of the window is reset to 1. The process then repeats endlessly.
• This tends to lead to “sawtooth” graphs.
• Problem of slow start is that it has to wait for a timeout to occur before it knows congestion has occurred.
• To change this, TCP Reno was implemented; if the receiver does not receive the next expected packet (i.e. it receives one with a higher sequence number than expected) it will send a duplicate ACK of the last ACK it sent.
• If this ACK is received by the sender 3 times it triggers retransmission and will retransmit the next packet from that sequence number.
• The receiver may then acknowledge further packets in the sequence in the next ACK.
• Instead of reseting the window size to 1, it is started at sstresh instead and grown incramentally.
• TCP Reno still leads to sawtooth graphs, but is less affected by congestion.
• TCP Westwood+ implemented to further improve TCP connections.
• Westwood+ estimates the bandwidth available using received ACKs and Round Trip Time monitoring.
• In both cases of 3 duplicate ACKs or coarse timeout, the ssthresh is set to max(2, (BWE * RTTmin) / Seg_size). The congestion window is set to ssthresh in the case of 3 dup ACKs or 1 in the case of coarse timeout.
• A small fraction of randomly lost packets doesn’t affect the BWE and therefore the ssthresh, unlike with Reno.
• ##### Justification-based TMS

For each fact, track its justification

When a fact is retracted, retract all facts that have justifications leading back to that fact, unless they have independent justifications.

• ##### Assumption-based TMS

Represent all possible states simultaneously

• ##### Who controls the off switch?

Anyone who has the authority to send the relevant messaged through the DCC.

Anyone who can mount a successful cyber attack on the network.

• ##### How will security be assured?
• Human review of the spec.s
• Testing the system
• Focuesed pentesting

Testing only shows that faults do exist, not that there are no faults.

For high confidence you need formal methods.

• ###### Plain

Cells flush to each other

Not in iOS7.

• ###### Cell Structure
• Content
• Layout depends on Style
• UITableViewCellStyleDefault
• UITableViewCellStyleSubtitle
• UITableViewCellStyle1 (right detail)
• UITableViewCellStyle2 (left detail)
• Accessory
• Disclosure Indicator
• Detail Disclosure Button
• Check Mark
• ###### Custom Cells

Content of a cell can be defined in code, but is tedious.

It is more likely that IB will be used to define the layout for the cell and use a View Controller to control the behaviour.

• ###### Request

• Call details
• Parameters
• Body
• Context
• ###### Response

• Response code
• A writer (for the body)
• <!DOCTYUPE html PUBLIC ...>
<html xmlns="..."
xmlns:cc = "..."
xmlns:h = "...">

<!-- INTERFACE -->
<cc:interface>
<cc:attribute name="x" required="true" />
</cc:interface>

<!-- IMPLEMENTATION -->
<cc:implementation>
<p>
<h:outputLabel for="i" value="Repeats" />
<h:inputText id="i" value="{cc.attrs.x}" />
<h:message for="repeat" />
</p>
</cc:implementation>
• ###### Bean Validation
public void validateVar(FacesContext context, UIComponent toValidate, Object value) {
int input = (Integer) value; // cast the given value
if(!condition) {
((UIInput) toValidate).setValid(false);
FacesMessage message = newFacesMessage(
"error message");
toValidate.getClientId(context),
message);
}
}

Same as ASP.

• ###### SQL Server (SQLServer)

Store state in Microsoft’s SQL Server, which can be on another machine.

• ###### StateServer

Store in a separate process, which can be on another machine.

• ###### Atomic

Every task within a unit of work must complete successfully otherwise the transaction is aborted

• ###### Consistent

Atomicity, isolation, durability lead to consistent data. Developer must also define database consistency checks.

• ###### Isolated

Preventing interference from other transactions.

• ###### Durable

Data written to disc before a transaction can fully complete.

• ###### Container Managed Transactions

Transactional attributed specified using annotations or in the deployment descriptor.

Outside of the EJB code.

Reccommended

• ###### Bean Managed Tranasctions

Annotate EJB class with:

@TransactionManagement(TransactionManagerType.BEAN)

Offers fine grained control.

• ###### NotSupported

Transactions are not supported by the method, any current transaction will be suspended during this method call and resumed once it terminates.

• ###### Supports

Follows the caller; if it was in a transaction, it will remain so, if it was not, this will not create a new one.

• ###### Required

The method must be part of a transaction.

If the caller was not in a transaction, this will start one.

• ###### RequiresNew

This method will always crate a new transaction. An existing one will be suspended and will resume after this is complete.

The outer transaction will not roll-back if this one does.

Useful to nest transactions

• ###### Mandatory

Must already be in a transaction, otherwise a TransactionRequiredException will be thrown.

• ###### Never

Must never be in a transaction, otherwise a RemoteException will be thrown.

Uncommitted changes are visible to other transactions, other transactions can change rows that another transaction has read.

May result in inconsistencies as a rollback by T1 may mean that T2s data is out of date.

Rows updated in a transaction cannot be read by another transaction, but rows read by one transaction can be changed by another.

Rows updated by T1 cannot be read by T2.

Rows read by T1 can be updated by T1 or T2.

Rows read by one transaction cannot be updated by any transactions.

Rows read by T1 cannot be updated by T1 or T2.

• ###### Serializable

Transaction (appears) to have a lock on the data.

• ##### Variable Resource Injection
public class MyServlet extends HttpServlet
@Resource(name="java:comp/DfeaultDataSource")
private javax.sql.DataSource dsc;
}
• ##### Method Resource Injection
public class MyServlet extends HttpServlet {
private javax.sql.DataSource dsc;

@Resource(name="java:comp/DefaultDataSource")
public void setDsc(javax.sql.DataSource dsc) {
this.dsc = dsc
}
}

Method name must being with set, with a void return type and only one parameter.

• ##### Application Scoped

@ApplicationScoped

• ##### Session Scoped

@SessionScoped

• ##### Request Scoped

@RequestScoped

• ##### Conversation Scoped

@ConversationScoped

Covers the AJAX exchanged (can be extended using an ID)

• ##### Dependent

@Dependent

Inherits the scope from the object it is inserted into.

This is the default scope.

• ##### Injection
import javax.inject.Inject

public class Printer {
@Inject
Greeting greeting;
}
• ##### Qualified Injection
public class Printer {
@Inject
@Informal
Greeting greeting;
}

Can create a subtype of Greeting which is annotated using @Informal to allow variants of a type.

• ###### WSDL Elements

In the specification, there are the following eleents that define a service.

• types - the data types used that can be used in the messages
• message - the messages that can be transmitted, which also specifies the types used
• portType - the list of possible operations, linking the input and output messages
• binding - the link between a portType and the specific protocol settings
• port - the definition of a specific location that a particular binding is available.
• service - a collection of ports.
• ##### Contracts
• ###### Message Formats
• Custom data formats
• Industry standards for exchange
• XML

• ###### Message Filtering

Appling filters to messages

• ###### Content-Based Router

Routing messages to other channels and/or filters based on the content of a message

See here

• ###### Infrastructure

WGRUS has four different channels to interact with customers:

1. Web site
2. Call centre
3. Fax

• ###### Processing Orders

• Implementing this we gets something like this:

• Looking in at the inventory request:

• Because an order may have many items, split the order up:

• To know which item is for which type, we need to enrich the data at the order stage:

• The high level view of the order process now looks like this:

• ###### Checking Status

Need to know the status of the order as it can take some time to process.

Using a message store we can log the system:

• In situations where point-to-point MQs are used a wire tap is needed:

• A process manage can be added to manage the flow of messages in the queues, providing two main bits of functionality:

1. Storing data between messages
2. Keeping track of progress and deciding the next step

What happens if an address changes?

What happen if the address change is not part of an order?

• ###### NRZ-Level

1 as positive voltage, 0 as negative voltage.

• ###### NRZ-Inverse

Voltage inverts on a 1.

• ###### Infinity-1

Top speeds are up to 40Mbps down and 10Mbps up

• ###### Infinity-2

Topspeeds are up to 76Mbps down and 19Mbps up.

• ###### No Transition

If a station is not moving within its own BSS or it is not moving

• ###### BSS Transition

If a station moves between BSSs within the same ESS

• ###### ESS Transition

If the station moves between BSSs of differing ESS.

• ###### Authentication

With a wireless system, the medium is not exactly bounded as with a wired system.

In order to control access to the network, stations must first establish their identity.

The authentication relationship may be between two stations inside an IBSS or to the AP of the BSS.

Authentication outside of the BSS does not take place.

Two types of authentication:

1. Open System Authentication
2. Shared Key Authentication
• ###### Deauthentication

When either the station or AP wishes to terminate a stations authentication.

• ###### Privacy

An encryption algorithm, which is used so that other 802.11 users cannot eavesdrop on your LAN traffic.

• ###### Association

A station must affiliate itself with the BSS infrastructure if it wants to use the LAN.

This is done by Associating itself with an AP. Associations are dynamic in nature because stations can move, turn on or turn off.

A station can only be associated with one AP.

This ensures that the DS always knowns where the station is.

Association supports no-transition mobility, but is not enough to support BSS transition.

• ###### Reassociation

The service allows the station to switch its association from one AP to another.

Both association and reassociation are initiated by the station.

• ###### Disassociation

When the association between the station and the AP is terminated.

Can be initiated by either party.

A disassociated station cannot send or receive data.

ESS transition is not supported.

A station can move to a new ESS but will have to reinitiate connections

• ###### Distribution

Getting data from the sender to the receiver.

The message is sent to the local AP (input AP) then distributed via the DS to the AP (output AP) that the recipient is associated with.

If the sender and receiver are on the same BSS the input and output APs are the same.

The distribution service is not logically invoked whether the data is going through the DS or not.

• ###### Integration

Where the output AP is a portal. Thus 802.X LANs are integrated into the 802.11 DS.

• ###### Techniques

The Code of Federal Regulations (CFR) Part 15 originally only described two spread spectrum techniques to be used in the licensed free Industrial, Scientific, Medical (ISM) band, 2.4 GHz, thus 802.11 and 802.11b.

• Frequency Hopping Spread Spectrum (FHSS)
• Direct Sequence spread Spectrum (DSSS)

Orthogonal Frequency Division Multiplexing (OFDM) was not covered by the CFR and would have required licensing.

802.11a, employing OFDM, was created to work in the 5GHz.

• ###### Frequency Hopping Spread Spectrum (FHSS)

FHSS spreads the signal by hopping from one frequency to another across a bandwidth of 83 MHz.

The data is spread over 83 MHz in the 2.4 GHz ISM band.

A short burst of data is sent on one frequency (usually less than half a second).

Then the sender changes to another pseudorandom frequency and broadcasts another burst of data before changing to another frequency, and so on.

The carrier then repeats this pattern.

• ###### Direct Sequence Spread Spectrum (DSSS)

DSSS spreads the signal by adding redundant bits to the signal prior to transmission.

The signal is divided into many different parts and sent on different frequencies simultaneously.
Spectrum is divided into 13/14 channels.

However, the FCC specifies only 11 channels for non-licensed (ISM band) use in the US.

• ###### Narrow Band

Uses only enough frequency spectrum to carry the signal

• High peak power
• Easily jammed
• Easy to detect
• Easy to intercept

The bandwidth is much wider than required to send to the signal

• Low peak power
• Difficult to jam
• Hard to detect
• Hard to intercept
• ###### Base Station Controller (BSC)

The management of several BTS is done by the BSC.

It also provides all the control functions and physical links amoung the different BTS and between the mobile switching centre (MSC) and the BTSs.

Being a high-capacity switch, it provides functions such as cell configuration data, control of radio frequency power levels in BTS, frequency hopping, and handovers.

One MSC serves a number of BSCs.

• ###### Base Transceiver Station (BTS)

It is a station or site where antennas and radio transmitters and receivers are placed to create a radio coverage area in the mobile network.

Contains one or more transceivers (TRC) and antennas.

The cell site has a 360 degree omni-directional (omni-sector) antenna that is turned to create a cellular area of a specific size.

Omni-sector means the same frequencies are used in all directions.

Communication from the mobile terminal to the cell site is referred to as uplink.

Cell site to mobile terminal is downlink

• ###### Mobile Station (MS)

Mobile phone with ME and SIM.

It consists of the mobile equipment (uniquely identified by International Mobile Equipment Identity (IMEI)

The SIM card contains the International Mobile Subscriber Identity (IMSI) used to identify the subscriber to the system, a secret key for authentication and other information.

The IMEI and the IMSI are independent, thereby allowing personal mobility.

The SIM card may be protected against unauthorised by a password or PIN.

• ###### Mobile Switching Centre (MSC)

Primary service delivery node for GSM and central components of NSS.

It provides all the functionality needed to handle a mobile subscriber, such as:

• Registraion
• Authentication
• Sets up and releases the end-to-end connection
• Location Updating
• Handovers
• Cell routing and roaming subscribers

HLR and VLR, together with the MSC, provide the call-routing and roaming capabilities of GSM.

It takes care of charging and real time pre-paid account monitoring.

These services are provided in conjunction with several functional entities, which together form the Network Switching Subsystem (NSS).

The MSC provides the connection to the fixed networks (such as the PSTN or ISDN).

• ###### Home Location Register (HLR)

The database that contains a subscription record for each subscriber of the GSM network.

All the administrative information related to each subscriber registered in the respective communication network, including the current location of the subscriber, is contained in the HLR.

The HLR is responsible for the sending of subscription data to the VLR (during registration)
or GMSC (during mobile terminating call handling).

The location of the mobile is typically in the form of the signalling address of the VLR associated with the mobile station.

A GSM subscriber is normally associated with one particular HLR.

There is logically one HLR per GSM network, although it may be implemented as a distributed database.

• ###### Visitor Location Register (VLR)

The database that contains subscriber data for subscribers registered in a MSC.

It contains all the temporary information about the subscribers.

This information is needed by the MSC to service the visiting subscribers.

Every MSC contains a VLR. Although MSC and VLR are individually addressable.

They are always contained in one integrated node.

• ###### Equipment Identity Register (EIR)

A database of all valid mobile equipment on the network.

Where each mobile station is identified by its International Mobile Equipment Identity (IMEI).

An IMEI is marked as invalid if it has been reported stolen or is not type approved.

• ###### Authentication Centre (AuC)

A protected database that stores a copy of the secret key stored in each subscriber’s SIM card which is used for authentication and encryption.

• ###### Gateway MSC (GMSC)

Switching entity that controls mobile terminating calls.

When a call is estabished towards a GSM subscriber, a GMSC contacts the HLR of that subscriber, to obtain the address of the MSC where that subscriber is currently registered.

That MSC address is used to route the call to that subsciber

• ###### A Interface

The connection between MSC and BSC.

• ###### Abis Interface

The connection between BSC and BTS.

• ###### D interface

The connection between MSC and HLR.

• ###### Um interface

The radio connection between MS and BTS.

• ###### Single Splint Horizon

Don’t repeat information to the originator.

• ###### Poison Reverse Horizon

Repeat back information, but metric is set to infinity

• ###### Urgent (URG)

The value in the Urgent field is valid.

• ###### Acknowledge (ACK)

The value in the Acknowledge field is valid.

• ###### Push (PSH)

Push the data up to the application as quickly as possible.

• ###### Reset (RST)

Reset the connection

• ###### Synchronise (SYN)

Used to set up connections

• ###### Finish (FIN)

Used to tear down connections

• ###### Listening

Waiting for a connection

• ###### SYN Sent

Waiting for acknowledgement of the first send of a SYN

• ###### FIN Wait 1

Wait for an ACK of a sent FIN

• ###### FIN Wait 2

Wait for a FIN from an acknowledged FIN.

• ###### Close Wait

Acknowledged a FIN but still need the connection to send data.

• ###### Last ACK

Final FIN sent, waiting for the last ACK.

• ###### Time Wait

Final FIN received and ACK sent, wait for a number of seconds before closing.

Done in case the ACK is not received by the other party.

• ###### Closed

Not listening, connection closed.

• ###### Window Scaling

Scale factor is actually a shift.

Largest scaling factor is 14 (maximum window size of 1,073,741,823 bytes).

Remember this increases the size of the header.

Used for high capacity networks.

RFC 1323, TCP Extensions for High Performance.

• ###### Calculating Optimal Window Size

Can never reach optimal capacity but can approach it.

• ###### Bandwidth delay product

Capacity(bits) = bandwidth (bits/s) * RTT (sec)

Increase Round Trip Time (RTT) and data travels more slowly, thus higher capacity.

Likewise increased bandwidth involves higher capacity.

Max window size of 65535 bytes, but window scale option can increase this to 1024MB.

Around 10% of the capacity is a good size for the TCP buffer size.

• ###### Problems with Fast Retransmit and Fast Recovery

WiFi and very fast networks.

Can be a problem on high capacity networks.

• ###### On ACK Reception

Increase cwnd according to Reno algorithm.

Estimate available bandwidth.

• ###### When 3 Duplicate ACKs received

cwnd is then set to ssthresh.

• ###### On RTO (coarse timeout)

cwnd is then set to 1.

• ###### Retransmission Timer

Used when expecting an acknowledgement from the other end.

• ###### Persist Timer

Keeps window size information flowing even if the other end closes its receive window.

• ###### Keepalive Timer

Detects when the other end of a connection has crashed or re-booted.

• ###### 2MSL Timer
{"cards":[{"_id":"38aebeafc633cb537e0001a1","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":null,"content":"# SEM1020 - Current Issues in Software Engineering\n\nThis module focuses on current issues in the field of Software Engineering. The module will involve students in an examination of current research literature of interest to software engineers."},{"_id":"38aec04ac633cb537e0001a2","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38aebeafc633cb537e0001a1","content":"## Introduction\n\nIt is okay to produce a paper based on my own paper :-)"},{"_id":"38aec155c633cb537e0001a3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38aec04ac633cb537e0001a2","content":"### Staff\n\n* **[Edel Sherrat](mailto:eds@aber.ac.uk)**\n* [Elio Tuci](mailto:elt7@aber.ac.uk)\n* [Nigel Hardy](mailto:nwh@aber.ac.uk)"},{"_id":"38aec4c3c633cb537e0001a4","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38aec04ac633cb537e0001a2","content":"### Learning Outcomes\n\n1. Identify and use the main research resources that are available to software engineers\n2. Constructively participate in advanced technical debate in the field.\n3. Have a general overview of the field of Software Engineering and be aware of focused areas of research interest within it.\n4. Present current research at an appropriate level of detail to a technical audience.\n5. Produce a survey paper on some current area of Software Engineering research."},{"_id":"38aec64ec633cb537e0001a5","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38aec04ac633cb537e0001a2","content":"### Assessment\n\n* Participation and Contribution **15%**\n* Survey Paper (9000 words) **60%**\n* Poster **25%**"},{"_id":"3d914b323239654acc000350","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38aebeafc633cb537e0001a1","content":"## How to Read a Scientific Paper\n\nPapers provides a good view of what is happening now. Journal papers give a more out of date view than conference papers. Blogs typically give the most up-to-date view but are least verifiable.\n\nPapers should give enough information that there is enough information to replicate the experiment.\n\nIt will show some actual data."},{"_id":"3d9184ab3239654acc000351","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d914b323239654acc000350","content":"### Steps\n\n1. Read the abstract, check the information will be relevant\n2. Read the conclusion and discussion, check the results agree with the abstract and if they are still relevant.\n3. Read the introduction, check you understand the background information and see if you need to look up more items to understand this paper.\n4. Read the results. Usually tables and figures are provided to show the data.\n\nNow the methods become important, it gives details on how the experiment was set up and carried out. Try to pick out the basic methods and work upwards.\n\nReferences provide a way of tracking back through the sources."},{"_id":"3dedc674fcb59632fb00037f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38aebeafc633cb537e0001a1","content":"## Paper Presentations\n\nSet down for presenting Abstract State Machines (Feb 28) and Swarm Robotics (Mar 28) and asking questions on Biological Data Sharing (Mar 14) and Swarm Robotics (Apr 4)."},{"_id":"3dedd5aefcb59632fb000380","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38aebeafc633cb537e0001a1","content":"## Literature Review/Survey Paper\n\n9000 words of pure gold.\n\nMay address *any* aspect of software engineering.\n\nMSc should probably review the literature of their project."},{"_id":"3617bbd78d057d230c000014","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":null,"content":"# SEM2220 - Mobile Solutions\n\nMobile devices (phones, tablets and other handheld devices) are the fastest growing area of computing. Typical applications involve a wide range of software and system issues. This module will investigate those issues, giving students experience and understanding of the best ways of building different types of mobile applications.\n"},{"_id":"3617bf3f8d057d230c000017","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617bbd78d057d230c000014","content":"## Introduction\n\n*Scope of mobile systems, , mobile web, native apps, design choices, main platforms, overview of implications (2 lectures)*"},{"_id":"3617c2ee8d057d230c00001c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617bf3f8d057d230c000017","content":"### Staff\n\n- **[Chris Loftus](mailto:cwl@aber.ac.uk) (E38)**\n- [Neil Taylor](mailto:nst@aber.ac.uk) (C58)\n- [Andrew Star](mailto:aos@aber.ac.uk) (C47)"},{"_id":"3617c3648d057d230c00001d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617bf3f8d057d230c000017","content":"### Learning Outcomes\n\n1. Demonstrate an advanced understanding of the domain of mobile systems.\n * Quite a broad overview of these systems.\n * High level view.\n * Give a flavour of specific systems (iOS, Android).\n2. Analyse and evaluate mobile solutions in a range of application areas and be able to critically evaluate their effectiveness.\n * Have to be critical at M level.\n * Research. Pros and cons.\n3. Evaluate the social, legal, ethical and professional issues involved in implementing mobile applications.\n * Neil will be talking about this in the context of mobile.\n4. Implement representative mobile systems.\n * Playing with the technologies.\n * Building an android, iOS and mobile web app."},{"_id":"3617c4ac8d057d230c00001e","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617bf3f8d057d230c000017","content":"### Assessment\n\n- Mobile Web-based Programming project **20%** *22/10/2013 to 04/11/2013*\n- iOS-based Programming project **20%** *12/11/2013 to 25/11/2013*\n- Android-based Programming project **20%** *02/12/2013 to 16/12/2013*\n- Case study analysis **40%** *10/12/2013 to 22/01/2014*"},{"_id":"36bbc3458a757ab7ff000030","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617bf3f8d057d230c000017","content":"### Motivation\n\nIn 2012 the whole mobiles ecosystem's revenue was $1,551 billion; equivalent to 2.2% of global GDP. \n\n5% CAGR (Compound Annual Growth Rate).\n\nThese are only projected figures, the picture is much bigger than this as this only includes money which takes into account the money which stays within the ecosystem (doesn't include ecommerce, etc.). The affect is much higher."},{"_id":"36dfe582b0dc2d7517000064","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617bf3f8d057d230c000017","content":"### Mobile Landscape\n\nConstantly changing given that its a new market. The iPhone was the real kickstarter for this in 2007.\n\n[Timeline](https://gsmaintelligence.com/timeline/) of the history mobile telephones.\n\nDifference between \"smart\" and \"feature\" phones.\n\nMobile subscribers are growing 4 times faster than the global population. Reducing now (especially in the West) due to market saturation.\n\nMore scope for growth in developing countries.\n\nAsia Pacific accounts for approximately half of global subscribers.\n\nTotal sim-enabled connections (including machine to machine (M2M) connections). Estimated 7.6% CAGR 2012-2017. Percentage of M2M connections is increasing rapidly.\n\nMultiple devices (tables/phones/etc.) allow growth in sim-enabled connections.\n\nMobile data traffic is increasing rapidly. Video speculated to be one of the most rapidly increasing traffic."},{"_id":"36e01635b0dc2d7517000065","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617bf3f8d057d230c000017","content":"### Mobile versus Desktop\n\nOver time the sales of desktops (PCs & Laptops) is decreasing while the sale of mobile devices is increasing."},{"_id":"36e017d6b0dc2d7517000066","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617bf3f8d057d230c000017","content":"### Some predictions by GSMA\n\n* Asia predicted to add approx. 50% of all connections/subscribers between 2013-17\n* Same period Latin America and Africa next 20%\n* Subscriber growth in developed nations slowing (e.g. 1% in UK)\n* Total data traffic load in 2012 was 0.9 Exabyte/month).\n* Predicted to be 11.2 EB/mth.\n"},{"_id":"36e01cc4b0dc2d7517000067","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617bf3f8d057d230c000017","content":"### Chief Stakeholders\n\n* Network operators\n* Content providers\n* OS vendors\n* Device vendors"},{"_id":"36e02821b0dc2d7517000068","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617bf3f8d057d230c000017","content":"### Fragmentation and Differentiation\n\nIssue of fragmentation and differentiation, related to:\n* the number of OS variants, \n* the number of device vendors wishing to customise the OS, \n* different browsers,\n* Network operators and device vendors do not like commoditisation.\n * Don't want to be treated like commodities which are values on price.\n\nTop 25 ranked apps in 2012 take 15% of all revenue. Only 2% of App Store newcomers get into the top 250 apps.\n\nFree apps are becoming more of a norm, especially with the saturation of android."},{"_id":"36e04b6cb0dc2d7517000069","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617bf3f8d057d230c000017","content":"### Mobile Network Operators\n\nRevenues are decreasing due to over-the-top services (i.e. using online services over SMS or phone calls).\n\nOperators will push, via their shop sales-assistant commission, those devices they gain the biggest discounts on.\n\nHigh profile phones promoted, often Android.\n\nApple disrupts this model due to a locked mindshare.\n\nPsychological hook of \"cheap\" contract phones. Free now, pay later ideology.\n\nBilling relationship with the customer. Paying for things using your mobile account rather than via a bank account (directly). Small transaction fee for this service to generate revenue.\n\n* 48% of the world's population do not have a bank account.\n\nSomething for the future, not quite so prevalent at the moment."},{"_id":"36e082bdb0dc2d751700006b","treeId":"361777d2f26949dff8000005","seq":1,"position":10.5,"parentId":"3617bf3f8d057d230c000017","content":"### Rich Communication Service\n\nThreat of over the top (OTT) services such as Skype. Quality of service is currently an issue here, but voice call is growing very slowly (13% in 2008 to 4% 2012).\n\nGSMA responded by developing a Rich Communication Service specification. Only aimed at long term evolution (LTE) networks (4G). Aims to provide this as a universal service. 17 different implementations by MNOs including AT&T, Telefonica, Verizon and Verdafon."},{"_id":"36e06dd1b0dc2d751700006a","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617bf3f8d057d230c000017","content":"### Device Vendors (OEMs)\n\nNokia sales falling. Haven't kept up with the trends.\n\nSamsung now the major player. Mainly due to their adoption of Android.\n\nApple improving with mobiles.\n\nRIM/Blackberry are focusing on development.\n\nBuilding an Android smartphone involves:\n\n* Choosing an OS.\n* OEMs design phone (HW, UX, required changes to the Android OS UX) plus apps to include.\n* Marketing.\n* Negotiations with MNOs to arrange bulk discounts.\n* Production test units sent to MNOs, app developers and Google.\n* Phone is shipped to MNOs and independent stores\n* MNOs customise with their own apps.\n* Sales to public plus marketing.\n\nCan also go down the stock phone route.\n\nInception to market is approximately around 6 months when based on an existing OS.\n\nApple is a little easier to to the locked-in syndrome."},{"_id":"36e085cab0dc2d751700006c","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"3617bf3f8d057d230c000017","content":"### Types of Phone\n\n* Basic Phones\n * Call and SMS support only.\n* Feature Phones\n * No touch screen\n * Browser becoming standardised.\n* Smart Phones\n * Definition changes year-on-year.\n * Expectations change a lot.\n * More sensors and technology.\n* Phablets\n * Large smartphones.\n* Tablets\n * Same functionality as smartphones, often without SIM.\n* Slates\n * Large tablets.\n* Non-phone devices\n * iPod touch\n * eBook readers\n * Google Glass\n * Watches like the Apple Pebble.\n * Rely on bluetooth or similar."},{"_id":"36e0915bb0dc2d751700006d","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3617bf3f8d057d230c000017","content":"### Operating System Vendors\n\nAndroid leading market player.\n\niOS popular.\n\nSymbian (dead now) and Blackberry not doing well.\n\nWindows Phone a late starter."},{"_id":"36e093e3b0dc2d751700006e","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"3617bf3f8d057d230c000017","content":"### Android Fragmentation\n\nThere are 24 listed Android device manufacturers but at least 259 different device models currently on sale.\n\nLots of different screen sizes, resolutions, hardware capability, etc.\n\nThere is only one manufacturer for Apple products.\n\nVersion 4.1+ *Jelly Bean* most prevalent, but versions 4.0, 3.0 and 2.3 are still a large market share.\n\nSecurity problems, most malware attacks on Android.\n\niOS is mostly all the same version. However, companies often prescribe a 2-3 purchase cycle. Corporate world might need to take into account older versions.\n\nGoogle allow fragmentation to make Android more interesting to OEMs, However this can get in the way of updates.\n\nWebkit configuration varies; browser fragmentation.\n\nTried to stop fragmentation in version 3, but this lead to new forks. So this has been re-introduced in version 4."},{"_id":"36e0a4c7b0dc2d7517000070","treeId":"361777d2f26949dff8000005","seq":1,"position":14.25,"parentId":"3617bf3f8d057d230c000017","content":"### Fragmentation and Differentiation\n\nDifferentiation gives a unique selling point (USP) for vendors. Sticking with the same model.\n\nFragmentation leads to security issues and makes the OS more complex to handle screen sizes, etc. More testing needed. Therefore increased cost."},{"_id":"36e0b4b0b0dc2d7517000071","treeId":"361777d2f26949dff8000005","seq":1,"position":14.5,"parentId":"3617bf3f8d057d230c000017","content":"### Windows Phone 8\n\nMicrosoft and Nokia. A closed environment (or \"walled garden\").\n\nNo fragmentation/differentiation. Very few OEMs interested."},{"_id":"36e0b753b0dc2d7517000072","treeId":"361777d2f26949dff8000005","seq":1,"position":14.75,"parentId":"3617bf3f8d057d230c000017","content":"### How to join the OS game?\n\nBuy into it.\n\nWeb as OS platform. Firefox OS is trying hard with cheap alternatives. HTML5, JS, CSS3 and APIs to access hardware.\n\nVery fragmented, depending on rendering engine."},{"_id":"36e0be86b0dc2d7517000073","treeId":"361777d2f26949dff8000005","seq":1,"position":16,"parentId":"3617bf3f8d057d230c000017","content":"### Mobile Webkits are not always the same\n\nCan be configured differently. Must be careful with mobile websites.\n\nDepends on location too (UC Browser more popular than Android in Asia)."},{"_id":"36e0c48eb0dc2d7517000074","treeId":"361777d2f26949dff8000005","seq":1,"position":17,"parentId":"3617bf3f8d057d230c000017","content":"### Proxy versus full browsers.\n\nOpera mini, for example.\n\n* HTTP request (encrypted)\n* Proxy Server\n * Target HTTP Server resources\n * Renders page\n * Compresses into an image map\n* Image map returned to Opera mini (encrypted).\n\nCheaper and faster over a slow network. Very popular in certain developing countries with low bandwidth.\n\nCheap in terms in processing too.\n\nJS is handled by the proxy server. Not always perfect and may not be enabled."},{"_id":"36e0ccdbb0dc2d7517000075","treeId":"361777d2f26949dff8000005","seq":1,"position":18,"parentId":"3617bf3f8d057d230c000017","content":"### Content Providers\n\nApp Stores\n\n* Apple App Store is a walled garden. 70% developer revenue.\n* Google Play. 70% developer revenue.\n* Amazon Android Appstore.\n* Others (apk) security issues with this."},{"_id":"3617bfed8d057d230c000018","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617bbd78d057d230c000014","content":"## Mobile Web\n\n*Basic tools, responsive web, matching platform expectations, testing, delivery. (5 lectures plus practicals)*"},{"_id":"373c17e4ab3d3445bf00007b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617bfed8d057d230c000018","content":"### Objectives\n\n* To be able to build some simple mobile web sites/applications and view them via desktop browsers, mobile browsers and as mobile applications (hybrid apps).\n* To gain an insight into design issues especially multiple screen sizes and browser support.\n* To use a common mobile web framework to help build a mobile web application.\n* To user PhoneGap™ to turn a webb application into a \"native\" application which can be deployed.\n* To use some common testing technologies for mobile web."},{"_id":"373c25dbab3d3445bf00007c","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617bfed8d057d230c000018","content":"### Overview\n\n* Is mobile web being exploited?\n* Three main approaches:\n 1. Web site\n 2. Hybrid App\n 3. Native App\n* Challenges for mobile web developers\n* Standards are a moving target.\n* How can we be informed what support there is?\n* Given a complex situation, how can we make testing tractable?\n\n#### Core philosophy \nProgressive enhancement and not graceful degradation."},{"_id":"373c3cd4ab3d3445bf00007d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617bfed8d057d230c000018","content":"### Web site/app Approach\n\n#### Pros\n* One codebase\n* Cross platform\n* Familiar technology\n* Easy to distribute to both mobile and non-mobile\n\n#### Cons\n* Lack app store distributions\n* Weak access to device services\n* Performance (JS interpretation).\n* Not as slick as a native app"},{"_id":"373c4014ab3d3445bf00007e","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617bfed8d057d230c000018","content":"### Hybrid Applications\n\nNative wrapper around HTML and CSS and JS.\n\n#### Pros\n* One codebase\n* Cross platform\n* Better accesses to device services\n* Can distribute via app stores\n* Familiar technologies\n\n#### Cons\n* No full access to device services\n* Performance\n* Not as slick as native apps"},{"_id":"373c40acab3d3445bf00007f","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617bfed8d057d230c000018","content":"### Native Applications\n\n#### Pros\n* Highly polished\n* Good performance (potentially)\n* Good developer support platform\n* App store distribution.\n\n#### Cons\n* Platform specific\n* Multiple codebases"},{"_id":"373c8edceb91ce937c000080","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617bfed8d057d230c000018","content":"### Progressive Enhancement not Graceful Degradation\n\nGraceful degradation (of a website):\n\n* Focus is on building a great experience for the latest browsers, testing one browser version back.\n* Old browsers provide poor, but passable, experience, only show-stopped bugs fixed.\n\nProgressive enhancement (of website):\n\n* Focus on content, not browsers."},{"_id":"373cb044eb91ce937c000081","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617bfed8d057d230c000018","content":"### Responsive Web Design (RWD)\n\n* Fluid grids\n* Media queries - use em over px.\n\n"},{"_id":"3746c67b6d6d502cf700008e","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617bfed8d057d230c000018","content":"### Mobile virtual viewports\n\nMobiles have a virtual viewport which bypass the media queries.\n\nUse the viewport meta-tag to ask the viewport width to be the same as the actual width."},{"_id":"3746c9d46d6d502cf700008f","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617bfed8d057d230c000018","content":"### Breakpoints\n\nResearch suggest lines of text should be between 45-75 characters for comfortable reading. Columns help with this."},{"_id":"3746cb9c6d6d502cf7000090","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617bfed8d057d230c000018","content":"### Mobile-first progressive enhancement.\n\nDesign site for the mobile device. If media queries are supported and on a bigger screen, add to the existing CSS for mobile to add for the styling rules and changing font sizes.\n\nSimplification of complex designs is harder than making a simple design more complex."},{"_id":"37482d8c6d6d502cf7000091","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617bfed8d057d230c000018","content":"### Server-side Detection of Device Capabilities\n\nClient side RWD alone may not be sufficient.\n\nThere are some server-side approaches:\n\n* User-agent sniffing.\n* Client-side reconnaissance missions.\n\nClasses of \"device\".\n\n**RESS** (Responsibe Web Design and Server-side Components)."},{"_id":"374835d76d6d502cf7000093","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"3617bfed8d057d230c000018","content":"### The problem\n\nSome services will only run on a mobile device (Phone calls, accelerometer).\n\nSome services are more significant on a mobile device (location awareness, etc.), be careful not to run into the *Hide and Cry* anti-pattern.\n\nSome classes of device are very different (feature versus smart phone).\n\nWhat we spit out is so different that RWD alone won'y help. Need variants of the website.\n\nImage sizing issues that RWD won't solve."},{"_id":"37484a566d6d502cf7000094","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3617bfed8d057d230c000018","content":"### User-agent sniffing\n\nCan use HTTP User-Agent request header with a device description repository to work out:\n\n* Device hardware characteristics\n* Operating System\n* Browser characteristics"},{"_id":"37986266ac3e33092e0000b8","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"3617bfed8d057d230c000018","content":"### Example: Detecting viewport width\n\njavascript\nvar width = (winder.innerWidth > 0) ? Window.innderWidth : screen.width;\ndocument.cookie = \"sitewidth=\"width;\ndocument.location.reload();\n\n\nphp\nif(isset($_COOKIE[\"sitewidth\"]) {\n $_SESSION[\"screenwidth\"] =$_COOKIE[\"sitewidth\"];\n}\n// ...\nif($_SESSION[\"screenwidth\"] <= \"380\") {\n include(\"includes/mobile-nav.inc.php\");\n} else {\n include(\"includes/desktop-nav.inc.php\");\n}\n"},{"_id":"37986b08ac3e33092e0000ba","treeId":"361777d2f26949dff8000005","seq":1,"position":15,"parentId":"3617bfed8d057d230c000018","content":"### Herding Devices into Device Classes\n\n**Device Class**: An abstract collection of common characteristics of similar devices and their browsers.\n\nWhy? Because we don't want our server-side code to have to deal with every device (this isn't scalable)."},{"_id":"37986f90ac3e33092e0000bb","treeId":"361777d2f26949dff8000005","seq":1,"position":16,"parentId":"3617bfed8d057d230c000018","content":"### Typical Classes\n\n* Higher Mobile (WebKit-based, >= 320px width)\n* Simpler Mobile (minimal JS support, >176px width)\n* Tablets\n* Desktop\n* Unsupported (if no SLL, Cookies, JS, or < 176px width)\n\nDoes unsupported break progressive enhancement?"},{"_id":"37987a3aac3e33092e0000bc","treeId":"361777d2f26949dff8000005","seq":1,"position":17,"parentId":"3617bfed8d057d230c000018","content":"### What to send?\n\n* Stylesheets and Code based on class\n* Sometimes single codebase is too small (watch out for duplication of common code).\n* RESS can help with codebase maintenance."},{"_id":"37987d40ac3e33092e0000bd","treeId":"361777d2f26949dff8000005","seq":1,"position":18,"parentId":"3617bfed8d057d230c000018","content":"### Responsive Web Design and Server Side Components\n\nCombine client-side RWD with templating in the codebase for different classes of device."},{"_id":"37f4aa5e24a76e5c23000113","treeId":"361777d2f26949dff8000005","seq":1,"position":19,"parentId":"3617bfed8d057d230c000018","content":"### Sometimes HTML5, CSS3 and JS isn't enough\n\nMany HTML5 features aren't widely supported.\n\nCan't publish to application stores.\n\nPerhaps go for a hybridge: part native, part HTML.\n\nPhoneGap/Cordova is the best known hybrid technology."},{"_id":"3617c0958d057d230c000019","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617bbd78d057d230c000014","content":"## IOS Native Apps\n\n*Objective-C, relevant design patterns, platform design considerations, handling data, using sensors and location (5 lectures plus practicals)*"},{"_id":"36186e618d057d230c00003f","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617c0958d057d230c000019","content":"### Objective-C\n\nBased on C and Object-Orientation (based on Smalltalk), has basic rules of C but most of the syntax is smalltalk-based.\n\nSome repeated information is involved, but this is improving.\n\nUses late binding (names are looked up at runtime, not compile time).\n\nGood, but unusual, object syntax with some useful extensions and libraries.\n\nVerbose (*A: yay boilerplate*), designed to be descriptive (*A: **yay** dot-enter programming*).\n\nLikely to change with each release (good and bad)."},{"_id":"36186f848d057d230c000040","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"36186e618d057d230c00003f","content":"#### Basic Syntax and Objects\n\n"},{"_id":"3851956bb5b70c9ac900012b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"36186f848d057d230c000040","content":"##### Logging and Strings\n\nobjc\nNSLog(@\"Message\");\n\nNSString *var = @\"Some message\";\nNSLog(@\"Message: %@.\", var);\n\n"},{"_id":"38519613b5b70c9ac900012c","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"36186f848d057d230c000040","content":"##### Booleans\n\nobjc\nBOOL true = YES;\nBOOL false = NO;\n\n"},{"_id":"385196aab5b70c9ac900012d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"36186f848d057d230c000040","content":"##### Numbers\n\nobjc\nNSNumber *num = @10;\n\n// Conversion to unsigned int\nNSUInteger uInt = [num unsignedIntegerValue];\n"},{"_id":"38519787b5b70c9ac900012e","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"36186f848d057d230c000040","content":"#### Arrays\n\nobjc\nNSArray *arr = @[...];\n\n// Accessing elements\narr[index];\n\n// Something about NSArrays being immutable objects.\n\n"},{"_id":"385197e1b5b70c9ac900012f","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"36186f848d057d230c000040","content":"#### Dictionaries\n\nobjc\nNSDictionary *dict = @{@\"key\": @\"value\"};\n\n// Accessing\nNSString *val = dict[@\"key\"];\n"},{"_id":"361899c38d057d230c000041","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"36186e618d057d230c00003f","content":"#### Objects and Messages\n\nMessages are Objective-C's version of methods, where the Java syntax would be:\n\njava\nObjectName.methodName()\n\n\nThe Objective-C syntax is:\n\nobjc\n[objectName messageName]\n\n\nExample:\n\nobjc\nNSArray *temp = @[@\"Test\", @\"2\"];\n\nNSLog(@\"%@\", [temp description]);\n// Logs information about temp\n"},{"_id":"38519b37b5b70c9ac9000130","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"361899c38d057d230c000041","content":"##### Storing the output of Messages\n\nJust need to worry about typing\n\nobjc\nNSArray *temp = @[@\"Test\", @\"2\"];\nNSString *result = [temp description]\nNSLog(result);\n\n\n#### Parameters\n\nMessages can have parameters, however they may act differently than expected.\n\nobjc\n[object methodName:parameter namedParameter:value]\n\n"},{"_id":"38519bdbb5b70c9ac9000131","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"361899c38d057d230c000041","content":"##### Initialisation\n\nobjc\n[[Class alloc] init];\n"},{"_id":"361902332cdea70cae00002d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"36186e618d057d230c00003f","content":"#### Conditionals and Loops\n\n\nif(condition) {\n // ...\n} else if(condition) {\n // ...\n} else {\n // ...\n}\n\n\n\nswitch(thing) {\n case value:\n // ...\n break;\n}\n\n\n\nfor(Class *item in iterable) {\n // ...\n}\n"},{"_id":"361909fc2cdea70cae00002e","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"36186e618d057d230c00003f","content":"#### Blocks\n\nBlocks are like basic methods.\n\nobjc\nvoid (^block)(void) = ^{\n // ...\n};\n\n\nInkoving a block:\n\nobjc\nblock();\n"},{"_id":"3619254e2cdea70cae00002f","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"36186e618d057d230c00003f","content":"#### Classes\n\nIn a header file (.h):\n\nobjc\n@interface Name : NSObject\n@property Type *name;\n@property NSString *myName;\n@end\n\n\nImplementing the interface (.m):\n\nobjc\n#import Name.h\n\n@implementation Name\n@end\n\n\nAccessing properties\n\nobjc\nName *name = [[Name alloc] init];\nname.myName = @\"Value\";\n"},{"_id":"3851e1cdb5b70c9ac9000133","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3619254e2cdea70cae00002f","content":"##### Method Signatures\n\nIn many languages, you might see:\n\n java\nvoid m(int x, int y, String text)\n\n\nA similar method in Obj-C is:\n\n objc\n- (void) mAtX: (NSInteger) x\n atY: (NSInteger) y\n withText: (NSString *) text\n\n\nCalling this:\n\n objc\n[obj mAtX: 2 atY: 32 withText @\"a message\"]\n\n\nThe method name is: mAtX:atY:withText"},{"_id":"3851e9f5b5b70c9ac9000134","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3619254e2cdea70cae00002f","content":"##### Properties\n\nDefined with the @property syntax.\n\nThe attributes in the () control how the property manages the underlying data value.\n\nThe IBOutlet is only used on properties that are linked to the user interface.\n\natomic is used for multi-threading purposes (read locks, etc.).\n\nUnder the bonnet, this is an instance variable (ivar).\n\nGood practise is to cover your ears and pretend they're just properties."},{"_id":"3851efccb5b70c9ac9000135","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3619254e2cdea70cae00002f","content":"##### Instances\n\n objc\nExample *inst;\ninst = [[Example alloc] init];\n// or\ninst = [Example new];\n\n\nalloc and init is the typical Obj-C way as classes often have different initialisation techniques. alloc is a class method, init is an instance method."},{"_id":"3851a1b1b5b70c9ac9000132","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"36186e618d057d230c00003f","content":"#### Protocols\n\nSimilar to Java interfaces. There are some features where you can have required and optional methods.\n\nOptional methods act as empty methods if they are not implemented.\n\nSet in the header file (.h)"},{"_id":"3851fe7db5b70c9ac9000136","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"36186e618d057d230c00003f","content":"#### Primitive Types\n\nPrimitive types from C can be used in Obj-C, e.g. int, long, float, double.\n\nAdditional types:\n\n1. BOOL (YES or NO)\n2. NSInteger (typedef to either long or int depending on architecture)\n3. CGFloat (typedef to either float or double depending on architecture)"},{"_id":"38520252b5b70c9ac9000137","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"36186e618d057d230c00003f","content":"#### Memory Management\n\nMemory management is achieved by checking the number of references to an object.\n\nIn older code, you needed to write lines of code to state when you wanted to keep an object in memory.\n\nModern applications use ARC (Automatic Reference Counting).\n\nThe compile tracks when objects should be kept in memory or removed from the application."},{"_id":"385207ddb5b70c9ac9000138","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617c0958d057d230c000019","content":"### Application Structure\n\nTypical project implementations have a simple structure which corresponds to MVC\n\nAppDelegate accesses the model (if there is one).\n\nThe storyboard is the view, describe many screens in a single file.\n\nControllerView is the controller."},{"_id":"38521dddb5b70c9ac9000139","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c0958d057d230c000019","content":"### Developing an Application\n\n1. Make a new view-based progect,\n2. Add extra views in the Storyboard,\n3. Design the application by placing buttons, etc. *allows easy prototyping*\n4. Make new ViewController files and link them to the views\n5. Via drag and drop, define Actions and Outlets in the ViewController and link outlets and actions to interface (associate views to controllers)\n6. Implement model separately (if complex enough)."},{"_id":"385233a5b5b70c9ac900013a","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c0958d057d230c000019","content":"### Rule of Thumb\n\nIf your newly created app crashes when trying to load a new screen, then you usually have:\n\n1. Messed up linking the view to the view controller.\n2. Done something wrong when linking an outlet or action to a screen.\n\nThe error message should give you a clue as to what is wrong."},{"_id":"385237b7b5b70c9ac900013b","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617c0958d057d230c000019","content":"### Types of Interfaces\n\n* Tabbed screens\n* Tables\n* Linked Views\n* More examples from iOSDevUK\n\nYou can put each of the views into the storyboard and define how you segue from screen to screen then write code to pass data between them."},{"_id":"38adc873c633cb537e000185","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"385237b7b5b70c9ac900013b","content":"#### Tabbed Screens"},{"_id":"38adca02c633cb537e000186","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"385237b7b5b70c9ac900013b","content":"#### Tables\n\nUITableView is used to display repeating section of data. UITableViewCell is a cell in the table.\n\nUnlike classic tables on other platforms, there is only a single column.\n\nTables contains many sections, which in turn contains many rows.\n\nThe entire table can have a header and footer. Sections can also have a header and footer.\n\nEach table must have at least one section to be complete."},{"_id":"38addba6c633cb537e00018a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38adca02c633cb537e000186","content":"##### Table Styles\n\nTable style is set at build time only."},{"_id":"38addbe8c633cb537e00018b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38addba6c633cb537e00018a","content":"###### Plain\n\nCells flush to each other"},{"_id":"38addc5bc633cb537e00018c","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38addba6c633cb537e00018a","content":"###### Grouped\n\nNot in iOS7."},{"_id":"38ade6cac633cb537e00018d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38adca02c633cb537e000186","content":"##### Cells\n\nEach row contains a cell.\n\nWhen a row's data is to be displayed, the UITableView will request the cell.\n\nBy default, the UITableViewCell is used to degine a cell.\n\nThe cell is initialised in the method: tableView:cellForRowAtndexPath:\n\nA table can contain different types of cells for different rows.\n\nThe cell is reused."},{"_id":"38adf3a2c633cb537e00018e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38ade6cac633cb537e00018d","content":"###### Cell Structure\n\n* Content\n * Layout depends on Style\n * UITableViewCellStyleDefault\n * UITableViewCellStyleSubtitle\n * UITableViewCellStyle1 (right detail)\n * UITableViewCellStyle2 (left detail)\n* Accessory\n * Disclosure Indicator\n * Detail Disclosure Button\n * Check Mark"},{"_id":"38ae001ec633cb537e00018f","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38ade6cac633cb537e00018d","content":"###### Custom Cells\n\nContent of a cell can be defined in code, but is tedious.\n\nIt is more likely that IB will be used to define the layout for the cell and use a View Controller to control the behaviour."},{"_id":"38ae0593c633cb537e000190","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38adca02c633cb537e000186","content":"#### Table View Contoller\n\nUITableViewContoller is a subclass of UIViewControler that is designed to manage UITableViews.\n\nIf a new view based controller is created, the XIB will contain the table linked to this controller.\n\nIn order to provide custom behaviour, the following methods needed to be implemented:\n\n* UITableViewDelegate\n * Manage selections, \n * Configure section headings and footers, \n * Help to delete and reorder cells, \n * Perform other actions\n * (All optional)\n* UITableViewDataSource\n * The data source provides the table-view object with the information it needs to construct and modify a table view. Two are required."},{"_id":"38adca30c633cb537e000187","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"385237b7b5b70c9ac900013b","content":"#### Linked Views"},{"_id":"38add475c633cb537e000188","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617c0958d057d230c000019","content":"### Data Storage on iOS\n\nTechniques for storing and retrieving data on the iPhone.\n\nXML and SQLite provide the best portability."},{"_id":"38ae79f1c633cb537e000191","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"38add475c633cb537e000188","content":"#### NSUserDefaults\n\nUser preferences.\n\nPersistent map."},{"_id":"38ae7aacc633cb537e000192","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"38add475c633cb537e000188","content":"#### Property List Serialisation\n\nMechanism to store a selected number of data types in a property list (plist)."},{"_id":"38ae7b0bc633cb537e000193","treeId":"361777d2f26949dff8000005","seq":1,"position":0.875,"parentId":"38add475c633cb537e000188","content":"#### NSCoder\n\nTechnique to save more complex objects."},{"_id":"38ae7b4ac633cb537e000194","treeId":"361777d2f26949dff8000005","seq":1,"position":0.9375,"parentId":"38add475c633cb537e000188","content":"#### XML\n\nXML data files."},{"_id":"38add4c5c633cb537e000189","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38add475c633cb537e000188","content":"#### SQLite\n\nSmall memory footprint SQL database."},{"_id":"38ae7b83c633cb537e000195","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38add475c633cb537e000188","content":"#### Core Data\n\nMore complex system, but offering a powerful way to manage data and relationships. Best integration with iCloud."},{"_id":"38ae9854c633cb537e00019e","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617c0958d057d230c000019","content":"### Application Sandbox\n\niOS applications are run in a protected area on the device. Within this area there is a defined structure of Directories that you can access.\n\nThe developer is responsible for managing files that are created within the application area.\n"},{"_id":"38ae9b36c633cb537e00019f","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617c0958d057d230c000019","content":"### SQLite 3\n\nDatabase and library available in iOS.\n\nC library, which needs to be included in the project.\n\nCreate a SQLite database on the command line and include in the project.\n\nNeed to marshal data into and out of the database, with some conversions (e.g. Strings)."},{"_id":"38aeb19bc633cb537e0001a0","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38ae9b36c633cb537e00019f","content":"#### Where to store the database\n\nBy default, your database is in the default bundle, inside your application.\n\nIf read-only data is needed, it can remain there.\n\nWrite access needs to be moved to the Documents directory."},{"_id":"3617c17f8d057d230c00001a","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617bbd78d057d230c000014","content":"## Android Native Apps\n\n*Relevant design patterns, platform design considerations, handling data, using sensors and location, handling device variation (5 lectures plus practicals)*"},{"_id":"390a06c311e2300a800001d1","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617c17f8d057d230c00001a","content":"### Introducing Android\n\nAndroid Inc. started developing an open source mobile OS, acquired by Google in 2005.\n\nUses the Dalvik Virtual Machine:\n\n* Google\n* Virtual Machine and Dex Language\n* Linux kernel\n* Apache Harmony class libraries."},{"_id":"390a3a1611e2300a800001d3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"390a06c311e2300a800001d1","content":"#### The effect of OS segmentation\n\nThe Android platform is currently changing very quickly.\n\nEach manufacturer has a coperate theme to it."},{"_id":"390a52c311e2300a800001d5","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"3617c17f8d057d230c00001a","content":"### Why Android?\n\n* Popularity and market saturation."},{"_id":"390a611e11e2300a800001d6","treeId":"361777d2f26949dff8000005","seq":1,"position":1.75,"parentId":"3617c17f8d057d230c00001a","content":"### Android IDEs\n\n* Eclipse and ADT.\n* Android Studio."},{"_id":"39666426e9b2e323bd000202","treeId":"361777d2f26949dff8000005","seq":1,"position":1.875,"parentId":"3617c17f8d057d230c00001a","content":"### Application Space\n\nThere are other apps which are isolated from the application, but are able to communicate with intents."},{"_id":"396664a2e9b2e323bd000203","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39666426e9b2e323bd000202","content":"#### Linux Kernel and Android OS"},{"_id":"3966654be9b2e323bd000204","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39666426e9b2e323bd000202","content":"#### Operating system process\n\nOwned by the application."},{"_id":"39666604e9b2e323bd000205","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39666426e9b2e323bd000202","content":"#### Dalvik Virtual Machine\n\nA special Java VM for running on Mobile Devices.\n\nMay be moved to the ART (Android Runtime)."},{"_id":"39666732e9b2e323bd000206","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"39666426e9b2e323bd000202","content":"#### Application\n\nNo single main method. The way that Android apps are developed, and the model following, doesn't have a concept of a start point or end point, rather it has the idea of the behaviours."},{"_id":"39666d34e9b2e323bd000207","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39666732e9b2e323bd000206","content":"##### Activity\n\nA single screen layout and the code behind.\n\nA functional piece of UI."},{"_id":"39666db1e9b2e323bd000208","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39666732e9b2e323bd000206","content":"##### Service\n\nA background process.\n\nDoes not have a UI, may interact with them though."},{"_id":"39666df7e9b2e323bd000209","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39666732e9b2e323bd000206","content":"##### Content Provider\n\nA way of sharing a local database.\n\nQueries and cursors used to interact."},{"_id":"39666e57e9b2e323bd00020a","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"39666732e9b2e323bd000206","content":"##### Broadcast Reciever"},{"_id":"396683c3e9b2e323bd00020b","treeId":"361777d2f26949dff8000005","seq":1,"position":1.9375,"parentId":"3617c17f8d057d230c00001a","content":"### Application Lifecycle\n\nMemory of mobile devices is much more limited than on PCs or servers.\n\nShort battery life is an issue.\n\nLots of apps vying for limited resources."},{"_id":"39669121e9b2e323bd00020c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"396683c3e9b2e323bd00020b","content":"#### Android Manages Memory Carefully\n\nAndroid has the opportunity to remove resorces from memory when screens are switched.\n\nIf necessary a whole application and its process will be removed.\n\nNeed to be able to reincarnate apps."},{"_id":"39c2ac0214325872fd000270","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c17f8d057d230c00001a","content":"### List Views\n\nUsed to display scrollable lists of data."},{"_id":"39c2b1f614325872fd000271","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c2ac0214325872fd000270","content":"#### List Activity\n\nExtended by classes to handle clicks, etc.\n\nActs as a controller in an MVC sense."},{"_id":"39c2b26114325872fd000272","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c2ac0214325872fd000270","content":"#### List View\n\nUsed by the List Activity\n\nActs as a view in an MVC sense. Does the hard work of sizing rows, etc."},{"_id":"39c2b28914325872fd000273","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39c2ac0214325872fd000270","content":"#### List Adapter\n\nCreated by the controller and acts as the data source for the list view.\n\nActs as a model in the MVC pattern."},{"_id":"39c2b8d514325872fd000274","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c2b28914325872fd000273","content":"##### Array Adapter &lt;T&gt;\n\nSimple array of type T.\n\nGenerally a hard-coded list of static data."},{"_id":"39c2bb3a14325872fd000275","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c2b28914325872fd000273","content":"##### Simple Adapter\n\nA list of maps, where the map keys relate to UI element IDs."},{"_id":"39c2bd5614325872fd000276","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39c2b28914325872fd000273","content":"##### Simple Cursor Adapter\n\nA dynamic adapter which is based on a cursor of an iteratable object."},{"_id":"39c2f76414325872fd000278","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c17f8d057d230c00001a","content":"### Filesystem\n\nGiven a private filestore under: /data/data/package-path"},{"_id":"39c2fb6a14325872fd00027a","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"39c2f76414325872fd000278","content":"#### Public\n\nOn SD Card"},{"_id":"39c2fb3c14325872fd000279","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c2f76414325872fd000278","content":"#### Private\n\nStored under private filestore.\n\n/data/data/package-path/files"},{"_id":"39c30a3214325872fd00027f","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c2fb3c14325872fd000279","content":"##### Access\n\nApps access their private files folder with: Context.getFilesDir();"},{"_id":"39c30b8b14325872fd000280","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c2fb3c14325872fd000279","content":"###### Read/Write\n\nContext.openFileOutput(String name, int mode);\n\nContext.openFileInput(String name)"},{"_id":"39c2fed714325872fd00027b","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c2f76414325872fd000278","content":"#### Media\n\nOn SD Card under the standard location for media files."},{"_id":"39c3024314325872fd00027c","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39c2f76414325872fd000278","content":"#### Temporary\n\n/data/data/package-path/cache"},{"_id":"39c308af14325872fd00027d","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"39c2f76414325872fd000278","content":"#### Shared Preferences\n\n/data/data/package-path/shared-prefs\n\nXML only"},{"_id":"39c3097914325872fd00027e","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"39c2f76414325872fd000278","content":"#### Databases\n\n/data/data/package-path/databases"},{"_id":"3617c2718d057d230c00001b","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617bbd78d057d230c000014","content":"## Bringing it all together\n\n*Legal, social, ethical and professional issues. Selecting platforms and delivery methods, getting the interface right. (3 lectures)*"},{"_id":"3a1eec95fa67f1c84e0002da","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617c2718d057d230c00001b","content":"### Motivations\n\nThe BCS, under its Royal Chater, is required to establish and maintain standards of competence, conduct and ethical practice for information systems professionals.\n\nThe ability to recognised the **legal**, **social**, **ethical** and **professional** issues involved in the exploitation of computer technology and be guided by the adoption of appropriate professional, ethical and legal practises."},{"_id":"3a1f125dfa67f1c84e0002db","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617c2718d057d230c00001b","content":"### Legal Issues\n\nWhich laws relate to the use of computers?"},{"_id":"3a1f3a26fa67f1c84e0002df","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a1f125dfa67f1c84e0002db","content":"#### Data Protection Act"},{"_id":"3a1f3c13fa67f1c84e0002e0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3a1f125dfa67f1c84e0002db","content":"#### The Equality Act"},{"_id":"3a1f43ddfa67f1c84e0002e1","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3a1f125dfa67f1c84e0002db","content":"#### Copyright, Design and Patents Act"},{"_id":"3a1f44b8fa67f1c84e0002e2","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3a1f125dfa67f1c84e0002db","content":"#### Contract Law and Licenses"},{"_id":"3a1f4507fa67f1c84e0002e3","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3a1f125dfa67f1c84e0002db","content":"#### Computer Misuse Act"},{"_id":"3a1f12a1fa67f1c84e0002dc","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c2718d057d230c00001b","content":"### Social Issues\n\nWhat is the impact of computers on society?"},{"_id":"3a1f12c7fa67f1c84e0002dd","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c2718d057d230c00001b","content":"### Ethical Issues\n\nHow should we act?"},{"_id":"3a1f1314fa67f1c84e0002de","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617c2718d057d230c00001b","content":"### Professional Issues\n\nWhat are our professional responsibilities?"},{"_id":"38ae88ecc633cb537e000196","treeId":"361777d2f26949dff8000005","seq":1,"position":2.5,"parentId":null,"content":"# SEM5640 - Developing Advanced Internet-Based Applications\n\nThis module builds on SE31520 examining further the development processes, techniques and technologies for constructing Internet-based, distributed software systems. Particular emphasis is placed on studying and applying enterprise design patterns. Students, working in small groups, will build, using a modern software engineering methodology, a distributed application that employs the technologies and concepts taught in this and previous modules.\n\n*Nigel Hardy awesome tally: 2*"},{"_id":"38ae8ae2c633cb537e000197","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38ae88ecc633cb537e000196","content":"## Introduction\n\n*Provides a road-map to the module, with a brief overview of main concepts and how they interrelate.*"},{"_id":"38ae90d0c633cb537e00019b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38ae8ae2c633cb537e000197","content":"### Staff\n\n* **[Neil Taylor](mailto:nst@aber.ac.uk)**\n* [Nigel Hardy](nwh@aber.ac.uk)"},{"_id":"38ae93a8c633cb537e00019c","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38ae8ae2c633cb537e000197","content":"### Learning Outcomes\n\n1. Analyse a complex software engineering problem.\n2. Within a group design and implement an original solution to the problem.\n3. Test and critically evaluate their solution.\n4. Critically assess the relative merits of various software development methodologies within the context of the given problem and nature of the project team.\n5. Working in a group, apply the chosen software development methodology to solve the given problem.\n6. Critically explain the relative merits of alternative server-side technologies.\n7. Demonstrate a critical appreciation of design issues encountered when developing multi-tier, distributed applications."},{"_id":"38ae9572c633cb537e00019d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38ae8ae2c633cb537e000197","content":"### Assessment\n\n* Group Programming project and report **75%**\n* Exam **25%**"},{"_id":"3d0a8db527b0f9b2970002f9","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38ae8ae2c633cb537e000197","content":"### Internet Applications\n\n* Uses network connection\n* Browser-based\n* Client-server model\n* Reliance of collection of internet standards (e.g. HTTP)"},{"_id":"3d0a938527b0f9b2970002fa","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"38ae8ae2c633cb537e000197","content":"### Advanced Internet Applications\n\n* AJAX/Plugins support to provide a client rich experience\n* Multiple Application/Servers\n* Distributed or more complex processing\n* Transaction (DB) support\n* REST/SOAP or other remote procedure calls\n\nNo precise definition."},{"_id":"3d0aa78527b0f9b2970002fb","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"38ae8ae2c633cb537e000197","content":"### Overview\n\nThere are several themes this module will look at:\n\n* Multi-Tier Internet Applications\n* Developing using .NET and Java EE\n* Design Patterns\n * MVC\n * ORM\n* Web Services\n * REST\n * SOAP\n * RMI/RPC\n* Building Applications\n * Cloud Computing\n * Structure and deployment"},{"_id":"3d0ab00c27b0f9b2970002fd","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d0aa78527b0f9b2970002fb","content":"#### Multi-Tier Internet Applications\n\nApplications that involve multiple servers which run different parts of the application so that the business logic is separated from the presentation logic.\n\nDifferent parts tend to include:\n\n* Client\n* Web\n* Business Logic\n* Data/EIS\n\nLots of small applications which build up a larger, more complex, application.\n\nCommunication between the servers provides the linkage between the applications.\n\nSupports scalability if done correctly. Also more resistant to failure. Potentially more secure (more important servers firewalled).\n\nShould all be transparent to the user."},{"_id":"3d0abaf427b0f9b2970002fe","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d0aa78527b0f9b2970002fb","content":"### Java Enterprise Edition (J2EE)\n\n* Building web applications\n* JavaServer Faces\n* Enterprise Java Beans\n* Portability"},{"_id":"3d0abc9a27b0f9b2970002ff","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d0aa78527b0f9b2970002fb","content":"#### .NET\n\n* Building web applications\n* Web Forms, MVC\n* C#\n* Tiers and layers"},{"_id":"3d0ad16c27b0f9b297000300","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d0aa78527b0f9b2970002fb","content":"#### Design Patterns\n\nTwo types of issues:"},{"_id":"3d0adc4927b0f9b297000301","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d0ad16c27b0f9b297000300","content":"##### Patterns of Enterprise Architecture\n\n* Building and structuring the application\n* Relate to .NET and Java"},{"_id":"3d0adcb727b0f9b297000302","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d0ad16c27b0f9b297000300","content":"##### Patterns of Enterprise Integration\n\n* Making applications communicate\n* Examples:\n * Apache Camel\n * Apache ActiveMQ"},{"_id":"3d0ae1b727b0f9b297000303","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d0aa78527b0f9b2970002fb","content":"#### Building Applications\n\nUsing Cloud computing and how relevant it really is.\n\nExamples from eBay of structure and deployment."},{"_id":"3d0ae42a27b0f9b297000304","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3d0aa78527b0f9b2970002fb","content":"#### Web Services\n\nApplication that provide services which have destination endpoints with operations.\n\nSOAP XML, WSDL and REST are the big players.\n\nAlternatives to REST?"},{"_id":"38ae8b9dc633cb537e000198","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38ae88ecc633cb537e000196","content":"## Construction Technologies\n\n*Examination of technical solutions for building enterprise applications as provided by enterprise Java and .NET for building distributed applications.*\n\nThese include:\n* support for server-side MVC, e.g. JavaServer Faces and ASP.NET MVC; \n* business objects, e.g. Enterprise JavaBeans; \n* object to relational mapping, e.g. MS LINQ, Java Persistence API; \n* messaging systems, e.g. Java Messaging Service;\n* interoperability, e.g. SOAP-based web services."},{"_id":"3d0b3eb64c84e44cd7000304","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"38ae8b9dc633cb537e000198","content":"### Java Enterprise Edition (Java EE)\n\nJava is a language (JDK) and a platform (JRE).\n\nThe platform is the Java Virtual Machine and a set of APIs.\n\nFour platforms:\n\n1. Java Standard Edition (SE)\n2. Java Enterprise Edition (EE)\n3. Java Mobile Edition (ME)\n4. Java FX"},{"_id":"3d0b42794c84e44cd7000305","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Java EE\n\nA superset of Java Set, providing a development model, APIs and runtime environment (the server).\n\n> *\"For developing and running large-scale, multi-tiered, scalable, reliable and secure network systems\"* - The Oracle BS"},{"_id":"3d0b4b734c84e44cd7000306","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Java EE Web Tier\n\nAccess the web tier with HTTP(S).\n\nProvides static resources and dynamic page generation. Handles client input and navigation flow with maintance of state.\n\nJavaBeans provide temporary storage on the Web Tier.\n\nCan do simple logic, could build the whole application in this tier, but would be a bad design."},{"_id":"3d0b515f4c84e44cd7000307","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Java EE Business Tier\n\nProvides Enterprise Java Beans (EJB) components.\n\nAccess to Java Logic, etc. which provide the business logic."},{"_id":"3d0b53a24c84e44cd7000308","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Java EE Enterprise Information System (EIS) Tier\n\nLogically and typically on other machines, typically \"foreign\" technology."},{"_id":"3d0b57264c84e44cd7000309","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Other Clients\n\nCan build Java Applications or Web Applications which access the EJB components directly. Uses remote procedure calls."},{"_id":"3d0b672345ee75d40300030a","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Java EE Application Server\n\nProvides:\n\n* The JVM and core APIs\n* The EE APIs\n* Component containers\n * component lifecycle management\n * creation\n * association\n * services to components\n * security\n * transaction management\n * directory lookup\n * remote connectivity"},{"_id":"3d0b72454c84e44cd700030c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d0b672345ee75d40300030a","content":"##### Containers\n\nA set of Java classes packaged into a jar file.\n\nCan be deployed using either:\n\n* XML descriptors\n* Java annotations\n\nAnnotations are widely used, but can be overriden by descriptors.\n\nComponents plus deployment descriptors make up a module, each for one container type.\n\nFour types of EE modules:\n\n* Web modules .war\n* EJB modules .jar\n* Application client modules .jar\n* Resource Adapter Modules .rar\n\nA set of modules makes up a Enterprise archive: .ear"},{"_id":"3d0ce3b7d559d5f14d00030c","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Servlets\n\nServlets are the olderest EE web component.\n\nServlets act as a dynamic page, which have a URL, and must receive a HTTP request, from this it generates a HTTP response.\n\nIs a Java object with a managed lifecycle.\n\nExtension of javax.servlet.http.HttpServlet class."},{"_id":"3d0ced21d559d5f14d00030d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d0ce3b7d559d5f14d00030c","content":"##### Lifecycle\n\nManaged by the web container.\n\nThe first call is:\n\n* Load class\n* Create an instance\n* Call init()\n\nAny call:\n\n* Handle the HTTP request\n\nPerhaps calls destroy()\n\nOnly one instance is needed by a running server."},{"_id":"3d0cf8c3d559d5f14d00030e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d0ce3b7d559d5f14d00030c","content":"##### Handling Requests\n\nThe HttpServlet class has stubs for all the HTTP methods doGet(...) etc.\n\nservice() method used to handle the finding of appropriate methods for the HTTP headers.\n\nCommon to use the same method to handle GET and POST (for some strange reason, this sounds bad)."},{"_id":"3d0d04b9d559d5f14d00030f","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d0cf8c3d559d5f14d00030e","content":"###### Request\n\nProvides access to:\n\n* Call details\n* Parameters\n* Body\n* A reader\n* Context"},{"_id":"3d0d05c8d559d5f14d000310","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d0cf8c3d559d5f14d00030e","content":"###### Response\n\nProvides access to:\n\n* Response code\n* Headers\n* A writer (for the body)"},{"_id":"3d0d526bd559d5f14d000311","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d0ce3b7d559d5f14d00030c","content":"##### Forwarding\n\nCan forward requests to other servlets, passing on the request and response objects. Used for branching on context, for example.\n\n\njava\nRequestDispatcher d = req.getRequestDispatcher('name');\nd.forward(req, resp)\n"},{"_id":"3d0d57c0d559d5f14d000312","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d0ce3b7d559d5f14d00030c","content":"##### Instance Variables and Servlets\n\nA servlet could have instance variables, however these variables are not specific to a connection, rather the whole servlet.\n\nThere may also be multiple servlets so there is no guarantee that these will be the same.\n\nNeed features for session data.\n\nReminder that HTTP is stateless."},{"_id":"3d0d5fe1d559d5f14d000314","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d0ce3b7d559d5f14d00030c","content":"##### Sessions\n\nThe request must carry some identification of the session, server usually generates this information.\n\n* Parameters\n* Cookies\n\nRemember EU Cookie Law"},{"_id":"3d0d9c3ed559d5f14d000316","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3d0ce3b7d559d5f14d00030c","content":"##### Error Redirects\n\nSpecified in the web.xml descriptor."},{"_id":"3d0e70229c71951702000315","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Useful Features\n\n* Templating\n* Validation & Schemas\n* i18n\n* Security\n* Database access\n* Support for good design patterns\n* Tight Integration\n* Testing Frameworks\n* Web Service support\n\nGenerally: higher level libraries and code reuse."},{"_id":"3d0e8a899c71951702000317","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### i18n and L10n\n\nInternationalisation and localisation are both important. Don't hardcode for the locale, instead store translations in DB or files and load them dynamically."},{"_id":"3d69aee86595f6d87600034f","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Authentication"},{"_id":"3d69af316595f6d876000350","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Authorization"},{"_id":"3dc5b7caab1469c94a000352","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3d0b3eb64c84e44cd7000304","content":"#### Testing\n\nUse JUnit where possible (with mocks, stubs, etc.)\n\nCan test Java Beans using an embedded EJB Container.\n\nService testing is slightly more difficult"},{"_id":"3dc5b99aab1469c94a000353","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc5b7caab1469c94a000352","content":"##### Service Testing\n\nTesting the resources in an automated way to avoid manual input.\n\nProvides rapid and reliable regression testing.\n\nHandles:\n\n* HTTP(S)\n* FTP\n* LDAP\n* JMS\n* Mail\n* SOAP\n\nSpecify calls, with parameters or sequences.\n\nSelenium or JMeter are options (JMeter also does load testing).\n\nJMeter also has a NetBeans plugin."},{"_id":"3d8126fefa3b69fdef00034b","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"38ae8b9dc633cb537e000198","content":"### .NET\n\nMicrosoft framework for developing and deploying applications with:\n\n* Cloud (Azure)\n* Web Server\n* Desktop\n* Restricted Resource Devices and Mobile Phones\n\nSimilarities with Java (JRE).\n\nFocused on Windows, but can run on other platforms through mono."},{"_id":"3d81374efa3b69fdef00034c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d8126fefa3b69fdef00034b","content":"#### Overview\n\n![](http://misc.alexanderdbrown.com/dotNET.png)"},{"_id":"3d815491fa3b69fdef00034e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d81374efa3b69fdef00034c","content":"##### Common Language Runtime (CLR)\n\nThe .NET JRE effectively.\n\nLoads and executes .NET \"managed code\".\n\nCLR loads code into application domains to provide a level of isolation and the ability to stop and remove a domain.\n\nProvides Just In Time (JIT) compilation, memory management and GC.\n\nSecurity based one roles and defined by policies."},{"_id":"3d816543fa3b69fdef000350","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d81374efa3b69fdef00034c","content":"##### Building and Deploying Code\n\n1. Compile source code files.\n2. Combine IL (MSIL), metadata, config files and other resources into assembly files.\n * DLL or EXE extensions\n * DLL is a library module\n * EXE is only type that will activate the CLR\n3. Deploy Applications to CLR\n"},{"_id":"3ddd830c9271cbd978000375","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d8126fefa3b69fdef00034b","content":"#### Internet Information Services (IIS)\n\nThe application server which runs ASP.NET applications."},{"_id":"39c39be27dfb5960fa000280","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38ae8b9dc633cb537e000198","content":"### Server-Side MVC\n\nMethods for implementing the MVC pattern in an Web Application."},{"_id":"3d0e86929c71951702000316","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"39c39be27dfb5960fa000280","content":"#### JavaServer Faces (JSF)\n\nProvides:\n\n* Templating\n * Facelets\n * JavaServer Pages (JSP)\n* Validators\n* MVC Pull\n* Navigation\n * Fixed\n * Dynamic\n* AJAX\n* i18n/L10n\n* Session Management\n* DB Access\n * JDBC\n * ORM frameworks\n* Testing Frameworks\n* Code reuse\n* Web Services and resources"},{"_id":"3d0e97989c71951702000319","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d0e86929c71951702000316","content":"##### Basic Technology\n\nBasic Api for represention components and managing their state; handling events, server-side validation and data conversion; defining page navigation; supporting i18n and accessibility; and providing extensibility.\n\nA tag library for adding components to web pages and connecting components to server-side objects."},{"_id":"3d17b47e988e71643800031b","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"3d0e86929c71951702000316","content":"##### Expression Language\n\nLike most scripting languages $ and # are used.\n\n${expr} are *rvalues* (read-only) and are processed immediately.\n\n#{expr} are *lvalues (read-write) and have deferred evaluation. Also used for method expressions.\n\n${object.variable} calls object.getVariable() under the covers.\n\n#{object.method} calls object.method()."},{"_id":"3d17aa98988e716438000319","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d0e86929c71951702000316","content":"##### Faces\n\nA replacement for JavaServer Pages (which are now deprecated).\n\nWrite (X)HTML with special tags which have an XML appearance which will be rendered as HTML with functionality behind it.\n\n<h:body> is the top level tag.\n\nAll pages will tend to act like a form, so <h:form> is very commonly used, even in cases where there would not normally be a form."},{"_id":"3d17b119988e71643800031a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d0e86929c71951702000316","content":"##### Common Attributes\n\n* id\n* style to associate CSS\n* rendered is a condition to check is the element should be rendered on the page. The condition can be an expression from the Expression Language.\n* value the value of the component, again this can be from the Expression Language, which links the view to the model."},{"_id":"3d17cfa3988e71643800031c","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d0e86929c71951702000316","content":"##### Composite Components\n\nBuilt from standard components.\n\nThese can be parametrised and stored in resources; they have a namespace (default: http://xmlns.jcp.org/jsf/composite/ezcomp)"},{"_id":"3d17d408988e71643800031d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d17cfa3988e71643800031c","content":"xml\n<!DOCTYUPE html PUBLIC ...>\n<html xmlns=\"...\"\n xmlns:cc = \"...\"\n xmlns:h = \"...\">\n\n<!-- INTERFACE -->\n<cc:interface>\n <cc:attribute name=\"x\" required=\"true\" />\n</cc:interface>\n\n<!-- IMPLEMENTATION -->\n<cc:implementation>\n <p>\n <h:outputLabel for=\"i\" value=\"Repeats\" />\n <h:inputText id=\"i\" value=\"{cc.attrs.x}\" />\n <h:message for=\"repeat\" />\n </p>\n</cc:implementation>\n"},{"_id":"3d17dc39988e71643800031e","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d0e86929c71951702000316","content":"##### Templating\n\nCan create template pages which has values to fill in. The inheriting page has to fill in these values."},{"_id":"3d17ef07988e71643800031f","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3d0e86929c71951702000316","content":"##### Navigation\n\nWrite navigation rules in XML, each rule is a page (view). For each page there is a set of outcomes (in string form). For each outcome a next page is specified.\n\nTypically stored in faces-config.xml\n\nOutcomes are generated from the action attributes from components.\n\nThere are implicit navigation rules which falls back to a matching page if it can be found."},{"_id":"3d17f98b988e716438000320","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3d0e86929c71951702000316","content":"##### Converters\n\nImplement javax.faces.convert.Converter\n\nHave associated error string displayed if conversion fails (<h:messages>).\n\nNumber of default converters for most Java Objects and primitives.\n\nConverters are used in four ways:\n\n1. Bind the component to a managed bean property of the right type (default).\n2. Put the converter class in the component's converter attribute.\n3. For numbers and dates, nest the f:convertDateTime or f:convertNumber tag inside the component.\n4. Put the f:converter tag inside the component and refer to the converter (general purpose tag)."},{"_id":"3d17fa03988e716438000322","treeId":"361777d2f26949dff8000005","seq":1,"position":7.5,"parentId":"3d0e86929c71951702000316","content":"##### Events & Listeners\n\nPart of the component model, application events are generated by components (ultimately from the rendered page).\n\nThe JSF application can map HTTP requests to the specific handling code.\n\nTwo types of event:\n\n1. Application event; when the user activates a component that implements ActionSource (buttons, links, etc.).\n2. Value-change event; when the users changes the value of a component represented by UIInput.\n\nListeners cause the application to respond to events:\n\n1. Implement an event listener class to handle the event and register it to a component.\n2. Implement a method of a managed bean and refer to it in the EL attribute in the component tag."},{"_id":"3d17f9b7988e716438000321","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3d0e86929c71951702000316","content":"##### Validators\n\nSimilar to converters, but only provide validation.\n\nImplement javax.faces.validator.Validator\n\nAgain, default validators are provided.\n\nRegistered by:\n\n1. nesting the validator's tag inside the component\n2. Nesting the f:validator tag inside the component.\n\nBeanValidator uses validation methods in the bean instead of having to write a separate class. Also allows the validation to be model-state specific."},{"_id":"3d1812fbf5b5b7e14a000323","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d17f9b7988e716438000321","content":"###### Bean Validation\n\njava\npublic void validateVar(FacesContext context, UIComponent toValidate, Object value) {\n int input = (Integer) value; // cast the given value\n if(!condition) {\n ((UIInput) toValidate).setValid(false);\n FacesMessage message = newFacesMessage(\n \"error message\");\n context.addMessage(\n toValidate.getClientId(context), \n message);\n }\n}\n"},{"_id":"3d184b30f5b5b7e14a000324","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3d0e86929c71951702000316","content":"##### Lifecycle\n\nStarts when the client request a URL and ends with the server response."},{"_id":"3d844a8d637cafac2f00034f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39c39be27dfb5960fa000280","content":"#### ASP.NET\n\n.NET Applications for the web, which uses:\n\n* Web Forms - Event based\n* Web Services - Application to Application\n* MVC\n* ASP.NET AJAX"},{"_id":"3dde002d9271cbd978000376","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d844a8d637cafac2f00034f","content":"##### View State\n\nStores the entire state in a hidden item in the form. Simplistic, but does affect performance and security.\n\nSent in base64.\n\nCan disable for the entire page, or for specific elements.\n\nAlso have the ability to encrypt, EnableViewStateMac or store server-side."},{"_id":"3dde15619271cbd978000377","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d844a8d637cafac2f00034f","content":"##### Session State\n\nThere are different techniques which can be used to store session state:\n\n* Cookies (bad)\n* REST Requests (not stateful)\n* Server Side session tokens (persistence/scalability questions)\n\nASP.NET uses server side session tokens:\n\nC#\nString myVallue = \"A. Name\";\nSession[\"name\"] = myValue;\nmyVale = (String) Session[\"name\"];\n\n\nCan configure where the data is held. Can also turn off the requirement for cookies."},{"_id":"3dde2d349271cbd978000378","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dde15619271cbd978000377","content":"###### In Process (InProc)\n\nSame as ASP."},{"_id":"3dde2dd39271cbd978000379","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dde15619271cbd978000377","content":"###### SQL Server (SQLServer)\n\nStore state in Microsoft's SQL Server, which can be on another machine."},{"_id":"3dde2ece9271cbd97800037a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3dde15619271cbd978000377","content":"###### StateServer\n\nStore in a separate process, which can be on another machine."},{"_id":"3dde2fb69271cbd97800037b","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3dde15619271cbd978000377","content":"###### Custom\n\nWrite your own mechanism."},{"_id":"3dde302a9271cbd97800037c","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3dde15619271cbd978000377","content":"###### Off\n"},{"_id":"3de04467bc1f26884800037d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d844a8d637cafac2f00034f","content":"##### System.Web.UI.Page\n\nDefault base class for code-bheind filels.\n\nImplements System.Web.IHttpHandler:\n\n* IsReusable() - true if the handler can be pooled\n* ProcessRequest( - Processes the actual HTTP request."},{"_id":"3de0479abc1f26884800037e","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d844a8d637cafac2f00034f","content":"##### HTTP Pipeline\n\n![HTTP Pipeline](http://misc.alexanderdbrown.com/asp.net/http_pipeline.png)"},{"_id":"3deb8011e69074683200037e","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d844a8d637cafac2f00034f","content":"#### GridView and SQL DataSource\n\nWays of display DB data."},{"_id":"39c39cd07dfb5960fa000283","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38ae8b9dc633cb537e000198","content":"### Business Objects\n\nObjects which relate to the business layer of a multi-tier application."},{"_id":"3d66dded3448f21c2f000327","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c39cd07dfb5960fa000283","content":"#### Enterprise Java Beans (EJB)\n\nEJBs act as an ORM framework, where the Java Objects are annotated with the DB schema details.\n\nThree types of EJB Session:\n\n1. Stateful\n2. Stateless\n3. Singleton\n\nCan also have message-driven beans.\n\nAccess can be done through:\n\n* No-interface view (all the public methods are available)\n* Through a business interface\n* Injection\n* JNDI"},{"_id":"3d6917cd6595f6d876000328","treeId":"361777d2f26949dff8000005","seq":1,"position":0.25,"parentId":"3d66dded3448f21c2f000327","content":"##### Transactions\n\nA transaction is a unit of work which supports \"ACID\".\n"},{"_id":"3d6918f96595f6d876000329","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d6917cd6595f6d876000328","content":"###### Atomic\n\nEvery task within a unit of work must complete successfully otherwise the transaction is aborted"},{"_id":"3d6919ef6595f6d87600032a","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d6917cd6595f6d876000328","content":"###### Consistent\n\nAtomicity, isolation, durability lead to consistent data. Developer must also define database consistency checks."},{"_id":"3d691db26595f6d87600032b","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d6917cd6595f6d876000328","content":"###### Isolated\n\nPreventing interference from other transactions."},{"_id":"3d691e666595f6d87600032c","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d6917cd6595f6d876000328","content":"###### Durable\n\nData written to disc before a transaction can fully complete."},{"_id":"3d6921956595f6d87600032d","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3d66dded3448f21c2f000327","content":"##### EJB Transactions\nIn EJB Transactions have a scope. A transaction manager manages this process.\n\nEJBs support two types of transactions:\n\n* Container managed\n* Bean Managed"},{"_id":"3d6921e96595f6d87600032e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d6921956595f6d87600032d","content":"###### Container Managed Transactions\n\nTransactional attributed specified using annotations or in the deployment descriptor.\n\nOutside of the EJB code.\n\nReccommended"},{"_id":"3d69222f6595f6d87600032f","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d6921956595f6d87600032d","content":"###### Bean Managed Tranasctions\n\nAnnotate EJB class with:\n\njava\n@TransactionManagement(TransactionManagerType.BEAN)\n\n\nOffers fine grained control."},{"_id":"3d6925a26595f6d876000333","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d66dded3448f21c2f000327","content":"##### EJB Transactions Attributes\n\nSix types of transaction attributes, specified by annotations or descriptor.\n\nThe default is Required.\n\nCan annotate the class to set the default for the class."},{"_id":"3d6926756595f6d876000334","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d6925a26595f6d876000333","content":"###### NotSupported\n\nTransactions are not supported by the method, any current transaction will be suspended during this method call and resumed once it terminates."},{"_id":"3d6927da6595f6d876000335","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d6925a26595f6d876000333","content":"###### Supports\n\nFollows the caller; if it was in a transaction, it will remain so, if it was not, this will **not** create a new one."},{"_id":"3d6928096595f6d876000336","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d6925a26595f6d876000333","content":"###### Required\n\nThe method **must** be part of a transaction.\n\nIf the caller was not in a transaction, this will start one."},{"_id":"3d692ba36595f6d876000337","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d6925a26595f6d876000333","content":"###### RequiresNew\n\nThis method will always crate a new transaction. An existing one will be suspended and will resume after this is complete.\n\nThe outer transaction will not roll-back if this one does.\n\nUseful to nest transactions"},{"_id":"3d692dfb6595f6d876000338","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d6925a26595f6d876000333","content":"###### Mandatory\n\nMust already be in a transaction, otherwise a TransactionRequiredException will be thrown."},{"_id":"3d692f3f6595f6d876000339","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3d6925a26595f6d876000333","content":"###### Never\n\nMust never be in a transaction, otherwise a RemoteException will be thrown."},{"_id":"3d69344e6595f6d87600033b","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d66dded3448f21c2f000327","content":"##### EJB Isolation\n\nProblems:\n\n* Dirty Reads\n* Non-repeatable Reads\n* Phantom Reads\n\nProvide four (fairly standard) levels of transactions:\n\n* TRANSACTION_READ_UNCOMMITTED\n* TRANSACTION_READ_COMMITTED\n* TRANSACTION_REPEATABLE_READ\n* TRANSACTION_SERIALIZABLE\n\nIn bean-managed transaction, can specify isolation using the JDBC API: \n\njava\nconnection.setTransactionIsolation(Connection.TRANSACTION_SERIALIZABLE) ;\n\n\nUsing serializable guarantees data consistency, but may affect performance."},{"_id":"3d693aad6595f6d87600033c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d69344e6595f6d87600033b","content":"###### Read Uncommitted\n\nUncommitted changes are visible to other transactions, other transactions can change rows that another transaction has read.\n\nMay result in inconsistencies as a rollback by T1 may mean that T2s data is out of date."},{"_id":"3d693c796595f6d87600033d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d69344e6595f6d87600033b","content":"###### Read Committed\n\nRows updated in a transaction cannot be read by another transaction, but rows read by one transaction can be changed by another.\n\nRows updated by T1 cannot be read by T2.\n\nRows read by T1 can be updated by T1 or T2."},{"_id":"3d693cd36595f6d87600033e","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d69344e6595f6d87600033b","content":"###### Repeatable Read\n\nRows read by one transaction cannot be updated by any transactions.\n\nRows read by T1 cannot be updated by T1 or T2."},{"_id":"3d693de36595f6d87600033f","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d69344e6595f6d87600033b","content":"###### Serializable\n\nTransaction (appears) to have a lock on the data."},{"_id":"3d6942986595f6d876000340","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d66dded3448f21c2f000327","content":"##### EJB Transactions with Exceptions\n\nChecked exceptions (including application exceptions) do not cause an automatic rollback, but can be set using @ApplicationException(rollback=true)\n\nUnchecked exceptions and RemoteExceptions automatically cause a rollback and the EJB instance is discarded."},{"_id":"3d694cd46595f6d876000341","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d66dded3448f21c2f000327","content":"##### Injections\n\nGetting a reference to object instances without instantiation or passing in as parameters, providing good decoupling.\n\nThere are two mechanisms for this:\n\n1. Resource Injection\n2. Dependency Injection\n\nAnnotations to fields or methods specify the injection points.\n\nProvides a runtime binding which provides inversion of control.\n\nCompatible abstractions are required to avoid typing errors; the code using an object is not responsible for choosing an implementation or creating the instance.\n\nInjection is often the implementation for this, but can use:\n\n* Factories\n* Service Locators\n* Contextualised lookup"},{"_id":"3d6959706595f6d876000342","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3d66dded3448f21c2f000327","content":"##### Resource Injection\n\nInject references to objects in the JNDI namespace into any container-managed object.\n\nGets a reference to a resource using: \n\n* Annotations\n* Deployment Descriptor\n* InitialContext lookup\n\nInject as an interface type, code independent of specific implementation.\n\nNot type safe!"},{"_id":"3d695db36595f6d876000343","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d6959706595f6d876000342","content":"##### Variable Resource Injection\n\njava\npublic class MyServlet extends HttpServlet\n @Resource(name=\"java:comp/DfeaultDataSource\")\n private javax.sql.DataSource dsc;\n}\n"},{"_id":"3d695f8c6595f6d876000344","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d6959706595f6d876000342","content":"##### Method Resource Injection\n\njava\npublic class MyServlet extends HttpServlet {\n private javax.sql.DataSource dsc;\n\n @Resource(name=\"java:comp/DefaultDataSource\")\n public void setDsc(javax.sql.DataSource dsc) {\n this.dsc = dsc\n }\n}\n\n\nMethod name must being with set, with a void return type and only one parameter."},{"_id":"39c39e4a7dfb5960fa000285","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38ae8b9dc633cb537e000198","content":"### Object Relational Mapping (ORM)\n\nLibraries which provide a mapping from a relational database to objects in an object-orientated paradigm."},{"_id":"39c39ef67dfb5960fa000286","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c39e4a7dfb5960fa000285","content":"#### Language-Integrated Query (LINQ)\n\nA query language for .NET languages which is akin to SQL."},{"_id":"39c39f6b7dfb5960fa000287","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c39e4a7dfb5960fa000285","content":"#### Java Persistence API\n\nAccess to database at SQL level or through an ORM Framework"},{"_id":"3d18785ff5b5b7e14a000325","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c39f6b7dfb5960fa000287","content":"##### JDBC\n\nProvides direct access to a database.\n\nOnly provides relational records, not Objects."},{"_id":"3d28101e1ecce6a62a000325","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c39f6b7dfb5960fa000287","content":"##### Java Naming and Directory Interface (JNDI)\n\nAccess to naming and directory services, part of the Java SE API. Looks up objects by name, returning values or references.\n\nAPI for the clients.\n\nService provider interface (SPI) wadds new directory and naming services."},{"_id":"3d2874511ecce6a62a000327","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39c39f6b7dfb5960fa000287","content":"##### Java Persistence API (JPA)\n\nProvides an ORM mapping of Java Object using Java annotations. Provides:\n\n* Create\n* Retrieve\n* Modify\n* Write\n\n*(So CUR<s>D</s> then? -A)*\n\nEntities are JavaBeans, annotated with @Entity. Automatically mapped, but can label instance variables with extra details; @Column can map Java types to SQL types.\n\n@Id is required.\n\n*(JPA can be a real pain though, he glossed over this just a little bit -A).*"},{"_id":"3d696c196595f6d876000345","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"39c39f6b7dfb5960fa000287","content":"#### Contexts and Dependency Injection (CDI)\n\nAny Java object can be made managed by its container. The CDI defines scpoes and a managed object has a declared (or default) scope.\n\nThis can then be injected into any other managed object."},{"_id":"3d6970e36595f6d876000346","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3d696c196595f6d876000345","content":"##### Application Scoped\n\n@ApplicationScoped"},{"_id":"3d69715c6595f6d876000347","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3d696c196595f6d876000345","content":"##### Session Scoped\n\n@SessionScoped"},{"_id":"3d6971a16595f6d876000348","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3d696c196595f6d876000345","content":"##### Request Scoped\n\n@RequestScoped"},{"_id":"3d6971db6595f6d876000349","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3d696c196595f6d876000345","content":"##### Conversation Scoped\n\n@ConversationScoped\n\nCovers the AJAX exchanged (can be extended using an ID)"},{"_id":"3d69729f6595f6d87600034a","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3d696c196595f6d876000345","content":"##### Dependent\n\n@Dependent\n\nInherits the scope from the object it is inserted into.\n\nThis is the default scope."},{"_id":"3d6979946595f6d87600034d","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3d696c196595f6d876000345","content":"##### Injection\n\njava\nimport javax.inject.Inject\n\npublic class Printer {\n @Inject\n Greeting greeting;\n}\n"},{"_id":"3d697cae6595f6d87600034e","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3d696c196595f6d876000345","content":"##### Qualified Injection\n\njava\npublic class Printer {\n @Inject\n @Informal\n Greeting greeting;\n}\n\n\nCan create a subtype of Greeting which is annotated using @Informal to allow variants of a type."},{"_id":"39c39fcd7dfb5960fa000288","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38ae8b9dc633cb537e000198","content":"### Messaging Systems\n\nActs as a middleware which decouples:\n\n* time\n* platform\n* language\n\nWhich is usually machine-to-machine.\n\nThere are **a lot** of standards."},{"_id":"3dc5f59fab1469c94a000355","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"39c39fcd7dfb5960fa000288","content":"#### Models for Messaging Systems.\n\n* Point-to-Point (queue)\n* Publish/Subscribe\n* Fanout\n* Request/Response"},{"_id":"39c3a04f7dfb5960fa00028a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c39fcd7dfb5960fa000288","content":"#### Java Messaging Service\n\nA Java API which \"allows applications to create, send, receive and read messages using reliable, asynchronous, loosely coupled communication.\"\n\nRequires an implementation.\n\nAccess Connection Factories or Queues using injection."},{"_id":"3dc5ff12ab1469c94a000356","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c39fcd7dfb5960fa000288","content":"#### Message Brokers\n\nMost patterns require middleware (all can use it).\n\nPossible roles include:\n\n* Routing\n* Receiving\n* Storing\n * Persistent\n* Transmit\n* Broadcast\n* Translate\n* Monitor"},{"_id":"3dc604ebab1469c94a000357","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc5ff12ab1469c94a000356","content":"##### Brokers\n\nJavaEE applcation servers must have one. Glassfish has Open MQ.\n\n.NET has one part of the service bus.\n\nApache Active MQ is a good offering."},{"_id":"3dc6071cab1469c94a000358","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dc5ff12ab1469c94a000356","content":"##### Security\n\nAuthentication & Authorisation, encryption of messages, integrity of messages, transactional, etc.\n\nSome protocols and some implementation already on offer."},{"_id":"39c3a0027dfb5960fa000289","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"38ae8b9dc633cb537e000198","content":"### Interoperability\n\nMethods of performing B2B operation."},{"_id":"3e219c21cc9ef165f1000381","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"39c3a0027dfb5960fa000289","content":"#### Socket Connections\n\nPowerful, but not generally available as an API. Need a Domain Specific Language."},{"_id":"4259e87eba65566a400003f7","treeId":"361777d2f26949dff8000005","seq":1,"position":0.625,"parentId":"39c3a0027dfb5960fa000289","content":"#### Remote Method Invocation (RMI)\n\nMarshalling and unmarshalling are handled by generated code.\n\nSome distribution services are provided.\n\nAccess to CORBA IIOP.\n\nBuilds on services provided by sockets.\n\nHas the problem of specificity to Java. Even with IIOP it is still better in an intranet.\n\nFocuses on synchronous transmission."},{"_id":"3e219daecc9ef165f1000382","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"39c3a0027dfb5960fa000289","content":"#### RESTful Web Services\n\nUse HTTP methods (GET, POST, PUT, DELETE, PATCH and HEAD) with a URI for the API. Return any form of data; usually XML, JSON or YAML.\n\nVery constrained on header information."},{"_id":"39c3a0ed7dfb5960fa00028b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c3a0027dfb5960fa000289","content":"#### Simple Object Access Protocol (SOAP) based Web Services\n\nExpressed as XML supporting interoperability (both Business to Business (B2B) and EAI).\n\nTypically sent over HTTP but can use other network protocols.\n\nUsually generated automatically using facilities in a program, but it is possible to create messages manually.\n\nMore popular than CORBA, extensible through the use of XML.\n\nHTTP avoids firewalls.\n\nIndustry backing:\n\n* Miscrosoft\n* I've Been Moved (IBM)\n* Oracle\n* BEA\n* HP\n* SAP\n* etc."},{"_id":"3e2250ddcc9ef165f1000386","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"39c3a0ed7dfb5960fa00028b","content":"##### Structure\n\nHTTP\nPOST /webservice/OrderProcessing HTTP/1.1\n...\n\nXML\n<?xml version=\"1.0\" encoding=\"UTF8\" ?>\n<soapenv:Envelope xmlns:soapenv=“http://schemas.xmlsoap.org/soap/envelope/”\n xmlns:xsd=“http://www.w3.org/2001/XMLSchema”\n xmlns:ns1=“http://orders.borthdistributors.co.uk”>\n <soapenv:Header>\n <!-- Optional. Meta-data in form of header blocks. e.g.: security credentials, id, etc. -->\n </soapenv:Header>\n <soapenv:Body>\n <!-- Mandatory. Arbitrary application-specific XML data or elements that map to method/procedure calls or code that processes the XML document. Could be fault data -->\n </soapenv:Body>\n</soapenv:Enveloper>\n"},{"_id":"3e225efacc9ef165f1000387","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"39c3a0ed7dfb5960fa00028b","content":"##### Web Services Description Language (WSDL)\n\nSOAP manages the process of communicating information but doesn't define operations, data types or faults of the service.\n\nWSDL is an XML description of a service, generally autogenerated by tools."},{"_id":"3e2262abcc9ef165f1000388","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3e225efacc9ef165f1000387","content":"###### WSDL Elements\n\nIn the specification, there are the following eleents that define a service.\n\n* **types** - the data types used that can be used in the messages\n* **message** - the messages that can be transmitted, which also specifies the types used\n* **portType** - the list of possible operations, linking the input and output messages\n* **binding** - the link between a portType and the specific protocol settings\n* **port** - the definition of a specific location that a particular binding is available.\n* **service** - a collection of ports."},{"_id":"3e21c59ccc9ef165f1000383","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39c3a0ed7dfb5960fa00028b","content":"##### In .NET\n\nGenerates proxy code for you. A set of asynchronous methods are provided:\n\nC#\nBeginMethodName(...)\nEndMethodName(...)\n"},{"_id":"3e21ce50cc9ef165f1000384","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39c3a0ed7dfb5960fa00028b","content":"##### Interoperability in SOAP\n\n> How do you expose types as parameters and return values in a way which in interoperable?\n\nValue types map onto XML Schema types, classes or structs are converted into complex types in the schema.\n\n* Classes must be public\n* Public fields and properties are serialised as elements\n* Methods are not exposed.\n\nArrays and collections are supported by this, but not all types can be mapped easily (e.g. custome types where methods are used to provide access to calculated data). (*A: as you'd expect really*)"},{"_id":"425a8352ba65566a400003f8","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39c3a0ed7dfb5960fa00028b","content":"#### Windows Communication Foundation (WCF)\n\nSplits Application domain from communication domain.\n\nBrings together lots of different interoperability technologies."},{"_id":"425a8db3ba65566a400003f9","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"425a8352ba65566a400003f8","content":"##### Adress"},{"_id":"425a8e92ba65566a400003fa","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"425a8352ba65566a400003f8","content":"##### Binding"},{"_id":"425a92bdba65566a400003fb","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"425a8352ba65566a400003f8","content":"##### Contracts"},{"_id":"3dc6fd9344d9c646cc000358","treeId":"361777d2f26949dff8000005","seq":1,"position":2.5,"parentId":"38ae88ecc633cb537e000196","content":"## Software Development Process\n\nThere is no such thing as a silver bullet for software development processes."},{"_id":"3dc7261644d9c646cc00036b","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3dc6fd9344d9c646cc000358","content":"### Testing\n\nMethods for testing a system."},{"_id":"3dc72c7e44d9c646cc000370","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3dc7261644d9c646cc00036b","content":"#### White/Black Box Testing\n\nA basis for which testing is built on"},{"_id":"3dc7264e44d9c646cc00036c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc7261644d9c646cc00036b","content":"#### Unit Testing\n\nTesting the smallest possible unit."},{"_id":"3dc72f1444d9c646cc000371","treeId":"361777d2f26949dff8000005","seq":1,"position":1.125,"parentId":"3dc7261644d9c646cc00036b","content":"#### Functional Testing\n\nTest that a part provides an expected function."},{"_id":"3dc7302d44d9c646cc000372","treeId":"361777d2f26949dff8000005","seq":1,"position":1.1875,"parentId":"3dc7261644d9c646cc00036b","content":"#### Non-functional Testing\n\nTests that a part will not fail to function under certain circumstances."},{"_id":"3dc728de44d9c646cc00036f","treeId":"361777d2f26949dff8000005","seq":1,"position":1.25,"parentId":"3dc7261644d9c646cc00036b","content":"#### Integration/Subsystem Testing\n\nTesting larger units of work combine together."},{"_id":"3dc7342b44d9c646cc000374","treeId":"361777d2f26949dff8000005","seq":1,"position":1.375,"parentId":"3dc7261644d9c646cc00036b","content":"#### Verification Testing\n\nHave we built the right thing?\n\nDoes it conform to standards."},{"_id":"3dc7277444d9c646cc00036e","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"3dc7261644d9c646cc00036b","content":"#### System Testing\n\nOur testing of the entire system."},{"_id":"3dc7269544d9c646cc00036d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dc7261644d9c646cc00036b","content":"#### Acceptance Testing\n\nTesting the system is acceptable for the client."},{"_id":"3dc703c244d9c646cc00035b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc6fd9344d9c646cc000358","content":"### Formal Methods\n\nWrite a formal specification and then program to that specification so that something can be proved to have worked."},{"_id":"3dc70a8d44d9c646cc000362","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc703c244d9c646cc00035b","content":"#### VDM"},{"_id":"3dc70ab044d9c646cc000363","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dc703c244d9c646cc00035b","content":"#### Z Notation"},{"_id":"3dc7036144d9c646cc00035a","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dc6fd9344d9c646cc000358","content":"### Traditional Methods\n\nFocus on up front design before development"},{"_id":"3dc70bcc44d9c646cc000364","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc7036144d9c646cc00035a","content":"#### Waterfall Model\n\n1. Requirements\n2. Planning\n3. Design\n4. Development\n5. Testing\n6. Deployment\n7. Maintainace"},{"_id":"3dc70c0e44d9c646cc000365","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dc7036144d9c646cc00035a","content":"#### Spiral Model"},{"_id":"3dc70cb944d9c646cc000366","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3dc7036144d9c646cc00035a","content":"#### Iterative Development"},{"_id":"3dc7034244d9c646cc000359","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3dc6fd9344d9c646cc000358","content":"### Agile Methods\n\nFocus on providing features without large amounts of up-front development and client involvement."},{"_id":"3dc7088b44d9c646cc00035f","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc7034244d9c646cc000359","content":"#### Extreme Programming\n\nPromotes no-one authorship of code with refractoring.\n\nPlanning game to put features.\n\nCan use a metaphor to describe the system."},{"_id":"3dc708c544d9c646cc000360","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dc7034244d9c646cc000359","content":"#### Test Driven Development\n\nWrite tests first then produce code to pass those tests (but no more)."},{"_id":"3dc7435f44d9c646cc000377","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3dc7034244d9c646cc000359","content":"#### Feature Driven Development\n\nBreak the system down into user stories, make these stories into features which can then be developed independently.\n\nNeed some overall architecture."},{"_id":"3dc7470844d9c646cc000378","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3dc7034244d9c646cc000359","content":"#### Rapid Application Development\n\nHack it until it works."},{"_id":"3dc7474b44d9c646cc000379","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3dc7034244d9c646cc000359","content":"#### Scrum\n\nSelf organising teams with a focus on co-location of all team members and communication."},{"_id":"3dc7477a44d9c646cc00037a","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3dc7034244d9c646cc000359","content":"#### Model-Driven Engineering\n\n1. Build a model\n2. Test the model\n3. Translate the model into executables\n\nPlatform Independent Model -> Platform Dependent Model.\n\nCan use tools like executable UML."},{"_id":"3dc70d1e44d9c646cc000367","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3dc6fd9344d9c646cc000358","content":"### Open Source\n\nMethods for developing software in a more unmanaged and dynamic way."},{"_id":"3dc70da644d9c646cc000368","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3dc70d1e44d9c646cc000367","content":"#### Cathedral\n\nA big in-house style of development where every developer understands the big picture."},{"_id":"3dc70fcc44d9c646cc000369","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3dc70d1e44d9c646cc000367","content":"#### Bazaar\n\nA very dynamic way of developing, which not every developer has the big picture, but understands their small parts, usually needs some figureheads."},{"_id":"3dc710f944d9c646cc00036a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3dc70d1e44d9c646cc000367","content":"#### Crowd Sourcing\n\nGetting a large amount of people to come up with potential solutions and selecting the best ones."},{"_id":"3dc73d2c44d9c646cc000375","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3dc70d1e44d9c646cc000367","content":"#### Hacking\n\nPlaying with a system and getting it to do tasks it was not necessarily designed to do."},{"_id":"38ae8db2c633cb537e000199","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38ae88ecc633cb537e000196","content":"## Design Issues\n\n*A number of enterprise application design patterns will be reviewed within the context of technologies discussed in 2. Building multi-tier applications requires developers to know more than just technologies, they must also know and use design techniques suited to their development. Students will learn about reusable enterprise design patterns, and in particular those used for the development of distributed, multi-tier applications.*"},{"_id":"424d15c84293d5350d0003be","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38ae8db2c633cb537e000199","content":"### Domain Logic Patterns"},{"_id":"424d16ae4293d5350d0003bf","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d15c84293d5350d0003be","content":"#### Transaction Script\n\nOrganizes business logic by procedures where each procedure handles a single request from the presentation.\n\n![](http://martinfowler.com/eaaCatalog/transactionScriptSketch.gif)"},{"_id":"424d18b94293d5350d0003c0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d15c84293d5350d0003be","content":"#### Domain Model\n\nAn object model of the domain that incorporates both behavior and data.\n\n![](http://martinfowler.com/eaaCatalog/domainModelSketch.gif)"},{"_id":"424d1acc4293d5350d0003c1","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d15c84293d5350d0003be","content":"#### Table Model\n\nA single instance that handles the business logic for all rows in a database table or view.\n\n![](http://martinfowler.com/eaaCatalog/tableModuleSketch.gif)"},{"_id":"424d1c594293d5350d0003c2","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"424d15c84293d5350d0003be","content":"#### Service Layer\n\nDefines an application's boundary with a layer of services that establishes a set of available operations and coordinates the application's response in each operation.\n\n![](http://martinfowler.com/eaaCatalog/ServiceLayerSketch.gif)"},{"_id":"424d1d2c4293d5350d0003c3","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38ae8db2c633cb537e000199","content":"### Data Source Architectural Patterns"},{"_id":"424d1d954293d5350d0003c4","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d1d2c4293d5350d0003c3","content":"#### Table Data Gateway\n\nAn object that acts as a Gateway to a database table. One instance handles all the rows in the table.\n\n![](http://martinfowler.com/eaaCatalog/dbgateTable.gif)"},{"_id":"424d1f3f4293d5350d0003c5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d1d2c4293d5350d0003c3","content":"#### Row Data Gateway\n\nAn object that acts as a Gateway to a single record in a data source. There is one instance per row.\n\n![](http://martinfowler.com/eaaCatalog/dbgateRow.gif)"},{"_id":"424d20e44293d5350d0003c6","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d1d2c4293d5350d0003c3","content":"#### Active Record\n\nAn object that wraps a row in a database table or view, encapsulates the database access, and adds domain logic on that data.\n\n![](http://martinfowler.com/eaaCatalog/activeRecordSketch.gif)"},{"_id":"424d21b84293d5350d0003c7","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"424d1d2c4293d5350d0003c3","content":"#### Data Mapper\n\nA layer of Mappers that moves data between objects and a database while keeping them independent of each other and the mapper itself.\n\n![](http://martinfowler.com/eaaCatalog/databaseMapperSketch.gif)"},{"_id":"424d23804293d5350d0003c8","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38ae8db2c633cb537e000199","content":"### Object-Relational Structural Patterns"},{"_id":"424d24064293d5350d0003c9","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d23804293d5350d0003c8","content":"#### Identity Field\n\nSaves a database ID field in an object to maintain identity between an in-memory object and a database row.\n\n![](http://martinfowler.com/eaaCatalog/idFieldSketch.gif)"},{"_id":"424d24f64293d5350d0003ca","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d23804293d5350d0003c8","content":"#### Foreign Key Mapping\n\nMaps an association between objects to a foreign key reference between tables.\n\n![](http://martinfowler.com/eaaCatalog/foreignKeyMappingSketch.gif)"},{"_id":"424d261e4293d5350d0003cb","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d23804293d5350d0003c8","content":"#### Association Table Mapping\n\nSaves an association as a table with foreign keys to the tables that are linked by the association.\n\n![](http://martinfowler.com/eaaCatalog/associationTableSketch.gif)"},{"_id":"424d27644293d5350d0003cc","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"424d23804293d5350d0003c8","content":"#### Dependent Mapping\n\nHas one class perform the database mapping for a child class.\n\n![](http://martinfowler.com/eaaCatalog/dependentObjectSketch.gif)"},{"_id":"424d296a4293d5350d0003cd","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"424d23804293d5350d0003c8","content":"#### Embedded Value\n\nMaps an object into several fields of another object's table.\n\n![](http://martinfowler.com/eaaCatalog/aggregateMappingSketch.gif)"},{"_id":"424d29ff4293d5350d0003ce","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"424d23804293d5350d0003c8","content":"#### Serialized LOB\n\nSaves a graph of objects by serializing them into a single large object (LOB), which it stores in a database field.\n\n![](http://martinfowler.com/eaaCatalog/serializedLobSketch.gif)"},{"_id":"424d2c344293d5350d0003cf","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"424d23804293d5350d0003c8","content":"#### Single Table Inheritance\n\nRepresents an inheritance hierarchy of classes as a single table that has columns for all the fields of the various classes.\n\n![](http://martinfowler.com/eaaCatalog/singleInheritanceTableSketch.gif)"},{"_id":"424d2d4c4293d5350d0003d0","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"424d23804293d5350d0003c8","content":"#### Class Table Inheritance\n\nRepresents an inheritance hierarchy of classes with one table for each class.\n\n![](http://martinfowler.com/eaaCatalog/classInheritanceTableSketch.gif)"},{"_id":"424d2e504293d5350d0003d1","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"424d23804293d5350d0003c8","content":"#### Concrete Table Inheritance\n\nRepresents an inheritance hierarchy of classes with one table per concrete class in the hierarchy.\n\n![](http://martinfowler.com/eaaCatalog/leafInheritanceTableSketch.gif)"},{"_id":"424d2f704293d5350d0003d2","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"424d23804293d5350d0003c8","content":"#### Inheritance Mappers\n\nA structure to organize database mappers that handle inheritance hierarchies.\n\n![](http://martinfowler.com/eaaCatalog/inheritanceMappersSketch.gif)"},{"_id":"424d31f44293d5350d0003d3","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38ae8db2c633cb537e000199","content":"### Object-Relational Metadata Mapping Patterns"},{"_id":"424d32184293d5350d0003d4","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d31f44293d5350d0003d3","content":"#### Metadata Mapping\n\nHolds details of object-relational mapping in metadata.\n\n![](http://martinfowler.com/eaaCatalog/metaMapperSketch.gif)"},{"_id":"424d32fc4293d5350d0003d5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d31f44293d5350d0003d3","content":"#### Query Object\n\nAn object that represents a database query.\n\n![](http://martinfowler.com/eaaCatalog/queryObjectSketch.gif)"},{"_id":"424d347b4293d5350d0003d6","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d31f44293d5350d0003d3","content":"#### Repository\n\nMediates between the domain and data mapping layers using a collection-like interface for accessing domain objects.\n\n![](http://martinfowler.com/eaaCatalog/repositorySketch.gif)"},{"_id":"424d36984293d5350d0003d7","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"38ae8db2c633cb537e000199","content":"### Web Presentation Patterns"},{"_id":"424d36b64293d5350d0003d8","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d36984293d5350d0003d7","content":"#### Model View Controller\n\nSplits user interface interaction into three distinct roles.\n\n![](http://martinfowler.com/eaaCatalog/mvc-sketch.gif)"},{"_id":"424d37e24293d5350d0003d9","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d36984293d5350d0003d7","content":"#### Page Controller\n\nAn object that handles a request for a specific page or action on a Web site.\n\n![](http://martinfowler.com/eaaCatalog/actionController-sketch.gif)"},{"_id":"424d39644293d5350d0003da","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d36984293d5350d0003d7","content":"#### Front Controller\n\nA controller that handles all requests for a Web site.\n\n![](http://martinfowler.com/eaaCatalog/frontController-sketch.gif)"},{"_id":"424d3a756deca4f8450003db","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"424d36984293d5350d0003d7","content":"#### Template View\n\nRenders information into HTML by embedding markers in an HTML page.\n\n![](http://martinfowler.com/eaaCatalog/templateViewSketch.gif)"},{"_id":"424d3c086deca4f8450003dc","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"424d36984293d5350d0003d7","content":"#### Transform View\n\nA view that processes domain data element by element and transforms it into HTML.\n\n![](http://martinfowler.com/eaaCatalog/transformViewSketch.gif)"},{"_id":"424d3d736deca4f8450003dd","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"424d36984293d5350d0003d7","content":"#### Two Step View\n\nTurns domain data into HTML in two steps: first by forming some kind of logical page, then rendering the logical page into HTML.\n\n![](http://martinfowler.com/eaaCatalog/twoStageViewSketch.gif)"},{"_id":"424d3f0c6deca4f8450003de","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"424d36984293d5350d0003d7","content":"#### Application Controller\n\nA centralized point for handling screen navigation and the flow of an application.\n\n![](http://martinfowler.com/eaaCatalog/appControllerSketch.gif)"},{"_id":"424d40366deca4f8450003df","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"38ae8db2c633cb537e000199","content":"### Distribution Patterns"},{"_id":"424d40816deca4f8450003e0","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d40366deca4f8450003df","content":"#### Remote Facade\n\nProvides a coarse-grained facade on fine-grained objects to improve efficiency over a network.\n\n![](http://martinfowler.com/eaaCatalog/distributedFacadeSketch.gif)"},{"_id":"424d42a86deca4f8450003e1","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d40366deca4f8450003df","content":"#### Data Transfer Object\n\nAn object that carries data between processes in order to reduce the number of method calls.\n\n![](http://martinfowler.com/eaaCatalog/dtoSketch.gif)"},{"_id":"424d43e16deca4f8450003e2","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"38ae8db2c633cb537e000199","content":"### Offline Concurrency Patterns"},{"_id":"424d45a36deca4f8450003e3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d43e16deca4f8450003e2","content":"#### Optimistic Offline Lock\n\nPrevents conflicts between concurrent business transactions by detecting a conflict and rolling back the transaction.\n\n![](http://martinfowler.com/eaaCatalog/OptimisticSketch.gif)"},{"_id":"424d4d326deca4f8450003e4","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d43e16deca4f8450003e2","content":"#### Pessimistic Offline Lock\n\nPrevents conflicts between concurrent business transactions by allowing only one business transaction at a time to access data.\n\n![](http://martinfowler.com/eaaCatalog/PessimisticSketch.gif)"},{"_id":"424d4e3a6deca4f8450003e5","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d43e16deca4f8450003e2","content":"#### Coarse-Grained Lock\n\nLocks a set of related objects with a single lock.\n\n![](http://martinfowler.com/eaaCatalog/coarseGrainedLockSketch.gif)"},{"_id":"424d4fe26deca4f8450003e6","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"424d43e16deca4f8450003e2","content":"#### Implicit Lock\n\nAllows framework or layer supertype code to acquire offline locks.\n\n![](http://martinfowler.com/eaaCatalog/ImplicitLockSketch.gif)"},{"_id":"424d51066deca4f8450003e7","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"38ae8db2c633cb537e000199","content":"### Session State Patterns"},{"_id":"424d51306deca4f8450003e8","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d51066deca4f8450003e7","content":"#### Client Session State\n\nStores session state on the client."},{"_id":"424d520d6deca4f8450003e9","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d51066deca4f8450003e7","content":"#### Server Session State\n\nKeeps the session state on a server system in a serialized form."},{"_id":"424d52b06deca4f8450003ea","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d51066deca4f8450003e7","content":"#### Database Session State\n\nStores session data as committed data in the database."},{"_id":"424d53a86deca4f8450003eb","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"38ae8db2c633cb537e000199","content":"### Base Patterns"},{"_id":"424d54156deca4f8450003ec","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"424d53a86deca4f8450003eb","content":"#### Gateway\n\nAn object that encapsulates access to an external system or resource.\n\n![](http://martinfowler.com/eaaCatalog/gatewaySketch.gif)"},{"_id":"424d54f96deca4f8450003ed","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"424d53a86deca4f8450003eb","content":"#### Mapper\n\nAn object that sets up a communication between two independent objects.\n\n![](http://martinfowler.com/eaaCatalog/mapperSketch.gif)"},{"_id":"424d581c6deca4f8450003ee","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"424d53a86deca4f8450003eb","content":"#### Layer Supertype\n\nA type that acts as the supertype for all types in its layer."},{"_id":"424d58976deca4f8450003ef","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"424d53a86deca4f8450003eb","content":"#### Separated Interface\n\nDefines an interface in a separate package from its implementation.\n\n![](http://martinfowler.com/eaaCatalog/separatedInterfaceSketch.gif)"},{"_id":"424d59c86deca4f8450003f0","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"424d53a86deca4f8450003eb","content":"#### Registry\n\nA well-known object that other objects can use to find common objects and services.\n\n![](http://martinfowler.com/eaaCatalog/registrySketch.gif)"},{"_id":"424d5aea6deca4f8450003f1","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"424d53a86deca4f8450003eb","content":"#### Value Object\n\nA small simple object, like money or a date range, whose equality isn't based on identity."},{"_id":"424d5bae6deca4f8450003f2","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"424d53a86deca4f8450003eb","content":"#### Money\n\nRepresents a monetary value.\n\n![](http://martinfowler.com/eaaCatalog/moneySketch.gif)"},{"_id":"424d5d386deca4f8450003f3","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"424d53a86deca4f8450003eb","content":"#### Special Case\n\nA subclass that provides special behavior for particular cases.\n\n![](http://martinfowler.com/eaaCatalog/specialCaseSketch.gif)"},{"_id":"424d5db76deca4f8450003f4","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"424d53a86deca4f8450003eb","content":"#### Plugin\n\nLinks classes during configuration rather than compilation.\n\n![](http://martinfowler.com/eaaCatalog/pluginsSketch.gif)"},{"_id":"424d5fed6deca4f8450003f5","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"424d53a86deca4f8450003eb","content":"#### Service Stub\n\nRemoves dependence upon problematic services during testing.\n\n![](http://martinfowler.com/eaaCatalog/serviceStubSketch.gif)"},{"_id":"424d618c6deca4f8450003f6","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"424d53a86deca4f8450003eb","content":"#### Record Set\n\nAn in-memory representation of tabular data.\n\n![](http://martinfowler.com/eaaCatalog/recordSetSketch.gif)"},{"_id":"425aad81a04ea0292e0003fc","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"38ae8db2c633cb537e000199","content":"### eBay Example"},{"_id":"425aadf0a04ea0292e0003fd","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"425aad81a04ea0292e0003fc","content":"#### Partition Everything\n\nSplit everything into manageable chunks: data, load and usage.\n\n> If you can't split it, you can't scale it\n\nMotivations:\n\n* Scalability - can scale horizontally and independently\n* Availability - can isolate failures\n* Manageability - can decouple segments and functional areas\n* Cost - can use less expensive hardware"},{"_id":"425ab32ca04ea0292e0003fe","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"425aadf0a04ea0292e0003fd","content":"##### Functional Segmentation\n\nGroup data using standard data modelling techniques.\n\nLogical hosting: abstract the logical representation from hosts physical location.\n\nSupport combining and splitting without code change."},{"_id":"425ab755a04ea0292e0003ff","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"425aadf0a04ea0292e0003fd","content":"##### Horizontal Split\n\nSplit databases horizontally along primary access path.\n\nMultiple split patterns:\n\n* Hashing based on a key\n* Lookup- or range-based\n\nAggregation/routing in Data Access Layer:\n\n* Abstracts developers from split logic.\n* Routes CRUD operations to appropriate split\n* Supports rebalancing through configuration changes"},{"_id":"425abe3da04ea0292e000400","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"425aadf0a04ea0292e0003fd","content":"##### No (cross-database) Transactions\n\nAbsolutely no client-side transactions, two-phase commits.\n\nAuto-commit for vast majority of DB writes.\n\nAnonymous PL/SQL blocks for transactions within single database.\n\nConsistency without transactions using:\n\n* Careful ordering\n* Recovery through:\n * Asynchronous recovery\n * Reconciliation batch\n * Fallover to guaranteed asnyc flow.\n\nHas the added benefits:\n\n* No deadlocks\n* Avoids coupling availability\n* Maximises update correctly."},{"_id":"425aca6ca04ea0292e000401","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"425aadf0a04ea0292e0003fd","content":"##### No session state\n\nUser session flow moves through multiple application pools\n\nAbsolutely no session state in application tier.\n\nTransient state maintained/references by:\n\n* URL rewriting\n* Cookies (*sadface*)\n* Scratch database"},{"_id":"425ad33ca04ea0292e000402","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"425aad81a04ea0292e0003fc","content":"#### Async Everywhere\n\n* Scalability - can scale components independently\n* Availability - Decouples state (up/down), characteristics (always available, best effort), retry operations\n* Latency - Can improve user experience at cost of data/execution latency. Can allocate more time than the user would be willing to do.\n* Cost - can spread peak load over time."},{"_id":"425ada88a04ea0292e000403","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"425ad33ca04ea0292e000402","content":"##### Message Dispatch\n\nConsumers subscribe to event.\n\n* Multiple logical consumers can process each event\n* Each logical consumer processes events independently\n* Within each individual consumer, single consumer instance processes event\n* Guaranteed at least once delivery, no guaranteed order.\n\nManaging timing conditions\n\n* Idempotent - processing event N times should give the same results as processing once.\n* Readback - consumer typically reads back to primary database for latest data."},{"_id":"425ae463a04ea0292e000404","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"425ad33ca04ea0292e000402","content":"##### Search Feeder\n\nRead and transform item updates from primary database.\n\nReliable multicast\n\n* Publish updates to search service\n* Persist messages to intermediate data store for recovery\n* Resent recovery messages when messages are missed\n\nSearch nodes listen to updates\n\n* Listen to assigned subset of messages\n* Update in-memory index\n* Request recovery."},{"_id":"425ae992a04ea0292e000405","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"425ad33ca04ea0292e000402","content":"##### Periodic Batch\n\nSchedule offline batch processes\n\nMost appropriate for:\n\n* Infrequent or scheduled processing\n* Non-incremental computation\n\nOften drives further downstream processing through message dispatching."},{"_id":"425aef4aa04ea0292e000406","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"425aad81a04ea0292e0003fc","content":"#### Automate Everything\n\nPrefer adaptive/automated systems to manual systems.\n\n* Scalability - can scale with machines, not humans\n* Availability/Latency - can adapt to changing environments\n* Cost - machines cheaper than humans\n* Functionality - consider more feature space"},{"_id":"425af274a04ea0292e000407","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"425aef4aa04ea0292e000406","content":"##### Adaptive Configuration\n\nDefine service-level agreement (SLA) for a given logical event.\n\nConsumer dynamically adjusts to meet defined SLA with minimal resources.\n\nAutomatically adapt to changes in:\n\n* Load\n* Event processing time\n* Number of consumer instances"},{"_id":"425af63fa04ea0292e000408","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"425aef4aa04ea0292e000406","content":"##### Machine Learning\n\nDynamically adapt experience\n\n* choose pages, modules and which provide best experience for that user and context\n* Order results by combination of demand, supply and other factors\n\nFeedback loop enables system to learn and improve over time:\n\n* Collect user behaviour\n* Aggregate and analyse offline\n* Deploy updated metadata\n* Decide and serve appropriate experiences\n\nBest practises:\n\n* Perturbation (anneling) for continual improvement\n* Dampening of positive feedback"},{"_id":"425afd9ba04ea0292e000409","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"425aad81a04ea0292e0003fc","content":"#### Remember Everything Fails\n\nBuild all systems to be tolerant of failure.\n\n* Assume every operation will fail\n* Assume every resource will be unavailable\n* Detect failure as rapidly as possible\n* Recover from failure as rapidly as possible\n* Do as much as possible during failure.\n\nMotivation:\n\n* Availability - duh"},{"_id":"425b011aa04ea0292e00040a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"425afd9ba04ea0292e000409","content":"##### Failure Detection\n\nApplication servers log all requests\n\n* Detailed logging of all application activity\n\nMessages broadcast on multicast message bus\n\nListeners automate failure detection and notification."},{"_id":"425b08f0a04ea0292e00040b","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"425afd9ba04ea0292e000409","content":"##### Rollback\n\nAbsolutely no changes to the site cannot be done.\n\nCode deployment: Rollout/Rollback\n\n* Entire site rolled every 2 weeks\n* Many deployments have dependencies between pools\n* Rollout plan contains explicit set (transitive closure) of all rollout dependencies.\n* Automatic tool executes staged rollout, with built-in checkpoints and immediate rollback if necessary.\n\nFeature deployment: Wire on/Wire off\n\n* Every feature has an on/off state driven by central configuration\n* Allows feature to be immediately turned off for operational or business reasons\n* Decouples code deployment from feature deployment\n* Applications can check for feature \"availability\" in the same way as they check for resource availability."},{"_id":"425b214ca04ea0292e00040c","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"425afd9ba04ea0292e000409","content":"##### Markdown\n\nDetecting that a resource is down or slow.\n\nApplication \"marks down\" the resource.\n\n* Stops it from making calls to it\n* Sends alert\n\nNon-critical functionality is removed or ignored\n\n* \"Limp mode\" operation\n\nCritical functionality is retired or deferred\n\n* Fallover to alternative resource\n* Defer process to guarantee aynch message\n\nExplicit \"markup\"\n\n* Allows resource to be restored and brought online in a controlled way."},{"_id":"38ae8e87c633cb537e00019a","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38ae88ecc633cb537e000196","content":"## Wider Issues\n\n*Examination of current issues that are related to 2 and 3, e.g. scalability; approaches to testing and deployment; the use of cloud computing.*"},{"_id":"3e88e3f05c160304c100037a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38ae8e87c633cb537e00019a","content":"### Load Balancing\n\nBalance the load of the request across a number of different machines.\n\nThere are hardware and software solutions for performing this.\n\nBenefits:\n\n* Scalability\n* Manageability\n* Server and Content balancing\n\nHas a single point of failure."},{"_id":"3e9685c0b4e343f9d300037b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3e88e3f05c160304c100037a","content":"#### Round Robin\n\nAllocate in a circular pattern"},{"_id":"3e968652b4e343f9d300037c","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3e88e3f05c160304c100037a","content":"#### Least Connections\n\nAllocate to the machine with the least connections"},{"_id":"3e968696b4e343f9d300037d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3e88e3f05c160304c100037a","content":"#### Response Times\n\nAllocate to the machine with the quickest response time."},{"_id":"3e968802b4e343f9d300037e","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3e88e3f05c160304c100037a","content":"#### Server Probes\n\nGain even more information about the servers and allocate based on this."},{"_id":"3e968846b4e343f9d300037f","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3e88e3f05c160304c100037a","content":"#### Weighting\n\nApply a weighting to each machine and allocate accordingly."},{"_id":"3e96dbabb4e343f9d3000380","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38ae8e87c633cb537e00019a","content":"### Scalability\n\n* Partition by function\n* Split horizontally\n* Avoid distributed transactions\n* Decouple functions asynchronously\n* Move processing to asynchronous flow\n* Virtualise at all levels\n* Cache appropriately"},{"_id":"3e96e531b4e343f9d3000381","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3e96dbabb4e343f9d3000380","content":"#### Scaling\n\n* Scale horizontally (scale out) is preferential. Adding more machines\n* Scale vertically (scale up). Upgrade machines\n\nCost basis - try to keep on commodity hardware."},{"_id":"3e96f0feb4e343f9d3000382","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3e96dbabb4e343f9d3000380","content":"#### Partition Everywhere\n\nFunctional segmentation into logical function (example is the database; split the database into the segments, continue splitting until no more splits can be made).\n\nHorizontal split using an internal ORM implementation, requires additional routing."},{"_id":"3ee5168680f1a05946000380","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38ae8e87c633cb537e00019a","content":"### Deployment\n\n"},{"_id":"3fb896275e49a2ec41000387","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38ae8e87c633cb537e00019a","content":"### Integration\n\n* Integration and the enterprise\n* Distribution vs Integration\n* Coupling\n8 Types of integration\n* Main pattern topics in the [EAI book](http://eiapatterns.com)"},{"_id":"3fb89e335e49a2ec41000388","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3fb896275e49a2ec41000387","content":"#### Integration and the enterprise\n\nIntegrating separate applications so that they work together.\n\nEnterprises tend to have numerous systems which weren't implicitly designed, for example:\n\n* Email\n* Databases\n* Calendars\n* Accounting\n* HR\n* Website\n* CRM\n* Warehouse Management\n* Shipping\n* Stock\n* Disaster Recovery\n\nThese may\n\n* Support different areas of the enterprise\n* Mergers, take overs, ...\n* Different technologies\n* Legacy systems"},{"_id":"3fb8bf695e49a2ec41000389","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3fb896275e49a2ec41000387","content":"#### Coupling\n\nThins \"fused\" (read dependent on another) together.\n\nMulti-tiered applications tend to be tightly coupled.\n\nMessaging systems offer the chance to be loosely coupled by decoupling the ends of the communication, even offering asynchronous communication."},{"_id":"3fb8dae85e49a2ec4100038a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3fb896275e49a2ec41000387","content":"#### Types of integration\n\n* File integration\n* Remote procedure invocation\n* Shared database\n* Messaging"},{"_id":"3fb8de1e5e49a2ec4100038b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3fb8dae85e49a2ec4100038a","content":"##### File Integration\n\n![File Integration](http://eaipatterns.com/img/FileTransferIntegration.gif \"File Integration\")\n\nExport data from one system and import into another using a file system.\n\nWorks with different technologies.\n\nIssues of file format, shared file systems, timing.\n\nQuestion of how data is exported and imported?\n\n* Timed task\n* User managed\n* Other communication\n\nAutomation problems. File locking might be required."},{"_id":"3fb8eb425e49a2ec4100038c","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3fb8dae85e49a2ec4100038a","content":"##### Shared Database\n\n![Shared Database](http://eaipatterns.com/img/SharedDatabaseIntegration.gif \"Shared Database\")\nCollection of applications that need to share common data.\n\nQuick access to information for each application.\n\nDBMS removes a lot of issues from file integration.\n\nTightly coupling the applications to a common area."},{"_id":"3fb8fe6e5e49a2ec4100038d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3fb8dae85e49a2ec4100038a","content":"##### Remote Procedure Invocation\n\n![RPC](http://eaipatterns.com/img/EncapsulatedSynchronousIntegration.gif \"RCP\")\n\nInvoking actions in addition to sharing data, using some form of RPC methodology:\n\n* Sockets\n* SOAP\n* REST\n* etc.\n\nAgain needs a shared understanding of the data. No shared file format.\n\nTiming question of when do we start the transfer.\n\nCommunication might fail, does that affect the coupling of the two applications?"},{"_id":"3ffa2a4dd8a02c580f00038e","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3fb8dae85e49a2ec4100038a","content":"##### Messaging\n\n![Messaging](http://eaipatterns.com/img/Messaging.gif)\n\nShare data by sending Messages over a Message Channel. Application(s) pick up messages and process the information.\n\nFire and forget for the sender.\n\nMessage channel stores and forward to provide reliable message delivery which mimics the real world.\n"},{"_id":"3ffa537ed8a02c580f000390","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3ffa2a4dd8a02c580f00038e","content":"###### Message Formats\n\n* Custom data formats\n* Industry standards for exchange\n* XML"},{"_id":"3ffaa63bd8a02c580f000391","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3fb896275e49a2ec41000387","content":"#### Messaging Systems\n\nExample system using message systems:\n\n![](http://eaipatterns.com/img/WgrusOrders1.gif)"},{"_id":"3ffaab17d8a02c580f000393","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3ffaa63bd8a02c580f000391","content":"##### Message Channel\n\n![](http://eaipatterns.com/img/MessageChannelSolution.gif)\n\n*Logical pipe* between *senders* and *receivers*, the implementation of this vary:\n\n* Direct Connections\n* Central message hub\n\nEach channel has an identity, typically a name.\n\nDifferent channels exist for different methods of solving problems."},{"_id":"3ffad3fbd8a02c580f000394","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3ffaab17d8a02c580f000393","content":"###### Point to Point\n\n![](http://eaipatterns.com/img/PointToPointSolution.gif)"},{"_id":"3ffad42dd8a02c580f000395","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3ffaab17d8a02c580f000393","content":"###### Publish and Subscribe\n\n![](http://eaipatterns.com/img/PublishSubscribeSolution.gif)"},{"_id":"3ffaa681d8a02c580f000392","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3ffaa63bd8a02c580f000391","content":"##### Messages\n\n![](http://eaipatterns.com/img/MessageSolution.gif)\n\nA unit of information containing a header and a body.\n\nDifferent types of message:\n\n1. Messages to send commands\n2. Messages to send documents\n3. Messages to send events\n\nThere are ways to specify how long messages are relevant for"},{"_id":"3ffad6fcd8a02c580f000396","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3ffaa63bd8a02c580f000391","content":"##### Routing\n\n![](http://eaipatterns.com/img/MessageRouter.gif)\n\nSending messages might involve more than just forwarding."},{"_id":"3ffad797d8a02c580f000397","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3ffad6fcd8a02c580f000396","content":"###### Message Filtering\n\nAppling filters to messages"},{"_id":"3ffad802d8a02c580f000398","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3ffad6fcd8a02c580f000396","content":"###### Content-Based Router\n\nRouting messages to other channels and/or filters based on the content of a message"},{"_id":"3ffad907d8a02c580f000399","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3ffad6fcd8a02c580f000396","content":"###### Splitter and Aggregator"},{"_id":"3ffad95cd8a02c580f00039a","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3ffad6fcd8a02c580f000396","content":"###### Recipient List"},{"_id":"3ffad9a8d8a02c580f00039b","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3ffad6fcd8a02c580f000396","content":"###### Others\n\n[See here](http://www.eaipatterns.com/MessageRoutingIntro.html)"},{"_id":"3ffadfbad8a02c580f00039c","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3ffaa63bd8a02c580f000391","content":"##### Endpoints\n\n![](http://eaipatterns.com/img/MessageEndpointSolution.gif)\n\nThe interfaces to the senders and receivers\n\n* How do they link to the message channel\n* Polling consumer\n* Event driven consumer\n* Messaging gateway\n* Idempotent receiver\n* [Other](http://eaipatterns.com/MessagingEndpointsIntro.html)"},{"_id":"3ffae6d8d8a02c580f00039e","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3ffaa63bd8a02c580f000391","content":"##### Transformation\n\n![](http://eaipatterns.com/img/MessageTranslator.gif)\n\nIsolate different stages and then translate later."},{"_id":"3ffaefa4d8a02c580f00039f","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3ffaa63bd8a02c580f000391","content":"##### System Management\n\nThe challenge for these systems is how do we know what's going on, given that there may be many different queues in a system.\n\nObject to object communication is easy(ish) to use a debugger or log.\n\nWeb systems are a little harder, but possible to debug and monitor.\n\nBut how do you monitor message based systems?"},{"_id":"4055c63421761ca57b00039e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3ffaefa4d8a02c580f00039f","content":"###### Message History\n\n![Message History](http://eaipatterns.com/img/MessageHistory.gif \"Message History\")"},{"_id":"4055c67c21761ca57b00039f","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3ffaefa4d8a02c580f00039f","content":"###### Wire tap\n\n![Wire tap](http://eaipatterns.com/img/WireTap.gif \"Wire tap\")"},{"_id":"4055c6b021761ca57b0003a0","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3ffaefa4d8a02c580f00039f","content":"###### Message Store\n\n![Message Store](http://eaipatterns.com/img/MessageStore.gif \"Message Store\")"},{"_id":"4055c70021761ca57b0003a1","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3ffaefa4d8a02c580f00039f","content":"###### [Others](http://eaipatterns.com/SystemManagementIntro.html)"},{"_id":"4055d08521761ca57b0003a3","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3ffaa63bd8a02c580f000391","content":"##### Example - Widgets and Gadgets\n\n![WGRUS Ecosystem](http://eaipatterns.com/img/WgrusContext.gif)"},{"_id":"4055d2a221761ca57b0003a4","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"4055d08521761ca57b0003a3","content":"###### Infrastructure\n\n![WGRUS IT Infrastructure](http://eaipatterns.com/img/WgrusSystems.gif)\n\nWGRUS has four different channels to interact with customers:\n\n1. Web site\n2. Call centre\n3. Fax\n4. Notification by email"},{"_id":"4055d55e21761ca57b0003a5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"4055d08521761ca57b0003a3","content":"###### Taking orders\n\n![Taking Orders From Three Difrerent Channels](http://eaipatterns.com/img/WgrusOrders1.gif)"},{"_id":"4055d8ff21761ca57b0003a6","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"4055d08521761ca57b0003a3","content":"###### Processing Orders\n\n![Activity Diagram for Order Processing](http://eaipatterns.com/img/WgrusActivity.gif)\n"},{"_id":"4055f1ca21761ca57b0003a7","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"4055d08521761ca57b0003a3","content":"\nImplementing this we gets something like this:\n\n![Order Processing Implementation using Asynchronous Messaging](http://eaipatterns.com/img/WgrusProcessingOrders.gif)\n"},{"_id":"4055f1fa21761ca57b0003a8","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"4055d08521761ca57b0003a3","content":"\nLooking in at the inventory request:\n\n![Routing the Inventory Request](http://eaipatterns.com/img/WgrusInventory1.gif)\n"},{"_id":"4055f21821761ca57b0003a9","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"4055d08521761ca57b0003a3","content":"\nBecause an order may have many items, split the order up:\n\n![Processing Order Items Individually](http://eaipatterns.com/img/WgrusInventory2.gif)\n"},{"_id":"4055f22e21761ca57b0003aa","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"4055d08521761ca57b0003a3","content":"\nTo know which item is for which type, we need to enrich the data at the order stage:\n\n![Taking Orders With Enricher](http://eaipatterns.com/img/WgrusOrders2.gif)\n"},{"_id":"4055f24b21761ca57b0003ab","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"4055d08521761ca57b0003a3","content":"\nThe high level view of the order process now looks like this:\n\n![Revised Order Process Implementation](http://eaipatterns.com/img/WgrusProcessingOrders2.gif)"},{"_id":"4055f2b921761ca57b0003ac","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"4055d08521761ca57b0003a3","content":"###### Checking Status\n\nNeed to know the status of the order as it can take some time to process.\n\nUsing a message store we can log the system:\n\n![Adding a Message Store To Track Order Status](http://eaipatterns.com/img/WgrusMessageStore.gif)"},{"_id":"4055f7da21761ca57b0003ad","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"4055d08521761ca57b0003a3","content":"In situations where point-to-point MQs are used a wire tap is needed:\n\n![Tracking Messages with a Wire Tap](http://eaipatterns.com/img/WgrusWireTap.gif)"},{"_id":"4055fa1821761ca57b0003ae","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"4055d08521761ca57b0003a3","content":"A process manage can be added to manage the flow of messages in the queues, providing two main bits of functionality:\n\n1. Storing data between messages\n2. Keeping track of progress and deciding the next step\n\n![Processing Orders With a Process Manager](http://eaipatterns.com/img/WgrusOrderStatus.gif)"},{"_id":"4055ff9c21761ca57b0003af","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"4055d08521761ca57b0003a3","content":"###### Change of Address\n\nWhat happens if an address changes?\n\n![Including Address Data in the New Order Message](http://eaipatterns.com/img/WgrusAddressOrder.gif)\n\nWhat happen if the address change is not part of an order?\n\n![Propagating Address Changes via a Separate Publish-Subscribe Channel](http://eaipatterns.com/img/WgrusAddressPropagate.gif)"},{"_id":"40560b5121761ca57b0003b0","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"4055d08521761ca57b0003a3","content":"###### New Catalog\n\n![Updating Catalog Data via File Transfer](http://eaipatterns.com/img/WgrusCatalog.gif)"},{"_id":"4056180521761ca57b0003b1","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"4055d08521761ca57b0003a3","content":"###### Announcements\n\n![Sending Announcements With a Dynamic Recipient List](http://eaipatterns.com/img/WgrusAnnouncements.gif)"},{"_id":"405631d721761ca57b0003b2","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"38ae8e87c633cb537e00019a","content":"### Cloud\n\nHow can we use *the cloud* for advanced internet applications?"},{"_id":"4056335121761ca57b0003b3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"405631d721761ca57b0003b2","content":"#### Overview\n\nWhat is the cloud?\n\n* The cloud\n* Cloud computing\n\nPrinciples of cloud computing\n\nX as a service"},{"_id":"4056351d21761ca57b0003b5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"405631d721761ca57b0003b2","content":"#### Cloud - Computing as a Utility\n\nLargely a new business model.\n\nJust computers, networking and applications, but arranged different; pay for usage rather than buying the infrastructure, etc."},{"_id":"4056557321761ca57b0003b6","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"405631d721761ca57b0003b2","content":"#### The benefit to business\n\nWhat problems is the cloud trying to solve?\n\nHow can the cloud be used for:\n\n* Small to medium enterprise (SME) manufacturing business\n* Startup company looking to launch an eCommerce site\n* Company gathering data from devices"},{"_id":"405664e521761ca57b0003b7","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"405631d721761ca57b0003b2","content":"#### 5 Aspects of Cloud Computing\n\n1. Pooled computing resources\n2. Virtualised computing resources\n3. Elastic scaling up or down according to need\n4. Automated creation of new virtual machines or deletion of existing ones\n5. Resources only billed as used\n\n*The Cloud at Your Service, Resenberg and Mateos, 2011, Manning Publications*"},{"_id":"40566b4521761ca57b0003b8","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"405631d721761ca57b0003b2","content":"#### Data Centres\n\nCloud providers have large data centres at locations around the world."},{"_id":"4056843a21761ca57b0003b9","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"405631d721761ca57b0003b2","content":"#### SaaS: Software as a Service\n\nThe web browser is your computer.\n\n(Pay?) for resources used.\n\nIs this different from managed servers?\n\nIs this different from web applications?"},{"_id":"405696085d921183470003b8","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"405631d721761ca57b0003b2","content":"#### Platform as a Service (PaaS)"},{"_id":"4056967a5d921183470003b9","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"405631d721761ca57b0003b2","content":"#### Infrastructure as a Service (IaaS)\n\nA lower lever set of infrastructure to choose from:\n\n* Services\n* Data storage\n* Load balancing\n* Content delivery networks\n* Message queues\n\nExamples:\n\n* Amazon Web Services\n* Windows Azure"},{"_id":"3fb815565e49a2ec41000381","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"38ae88ecc633cb537e000196","content":"## Revision\n\n*Preparing for the examination in June*"},{"_id":"421a8dc06362cd346a0003ba","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3fb815565e49a2ec41000381","content":"### 2012-13 Paper"},{"_id":"421a8e346362cd346a0003bb","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"421a8dc06362cd346a0003ba","content":"#### 1. This question is about integration of enterprise systems and is based on an extension of the \ffish marketing system developed during the course."},{"_id":"421a8ed66362cd346a0003bc","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"421a8e346362cd346a0003bb","content":"##### a) Discuss what the terms *interoperability* and *integration* mean within the context of enterprise systems"},{"_id":"3fb815925e49a2ec41000382","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3fb815565e49a2ec41000381","content":"### Example extract from 2011-2012 paper\n\nThis question is about development technologies and enterprise application patterns applied to the HoBo Room Brokering application, developed during the module.\n"},{"_id":"3fb879555e49a2ec41000386","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3fb815925e49a2ec41000382","content":"\n#### a. Describe and compare the facilities provided by .NET and by the Java Platform, Enterprise Edition 6 (Java EE 6) for supporting the implementation of each of the following features within the application."},{"_id":"3fb81dd45e49a2ec41000383","treeId":"361777d2f26949dff8000005","seq":1,"position":0.25,"parentId":"3fb879555e49a2ec41000386","content":"##### i Registration of human users and authentication and authorisation for use of the various aspects of the application by a range of user types\n\n* Java\n * Registration\n * Realms (File, JDBC, LDAP, ...)\n * Group of users\n * Facilities to manage/persist user data\n * Authorisation\n * Roles\n * Authentication\n * Configuration\n * Web server\n* .NET\n * Wizards/template (not many marks for such a galling answer)\n * ASP.NET Identity System\n * Authentication\n * Web.config (protected)\n * SQLServer (.mdf)\n * ActiveDirectory\n * OAuth\n * Authorisation\n * Roles\n "},{"_id":"3fb83ab05e49a2ec41000384","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3fb879555e49a2ec41000386","content":"##### ii Concurrent use of the application by many users, each with their own server-side interaction context.\n\n* Java\n * Session beans\n * Distinguishing between request, session and application\n * Session Management?\n* .NET\n * Session Management\n * Session[\"myKey\"] = ...\n * InProc\n * SQL Server (DB)\n * Session State Server\n * View State"},{"_id":"3fb83fc25e49a2ec41000385","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3fb879555e49a2ec41000386","content":"##### iii Provision to client applications of a SOAP based search service that returns a set of descriptions of establishments with current availability, which meet given criteria.\n\n* Java\n * Annotations\n * WSDL generation of exposed class\n * Operations through @WebMethod on methods\n * @WebService on class\n* .NET\n * Attributes\n * Operations through [WebMethod...] on methods\n * [WebService...] on class\n * .asmx still exists, but older\n * .WCF Windows Communication Foundation\n * **Interface**\n * methods\n * Implementing class\n * Address Bound Contract (ABC)\n * WS* specifications\n * Generate proxy from WSDL (client)\n\nProblems of mapping data types between languages.\n\nPublic properties/fields exposed for sending over a web service (attributes in .NET)\n\nRaw data only.\n\nUnderlying standards and tool support."},{"_id":"3617c5578d057d230c00001f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":null,"content":"# SEM5720 - The Internet And How It Really Works\n\nThe Internet is a complex, multi-organisation network reaching nearly all parts of the world. The functioning of this network and the applications running upon it depend on a complex set of protocols. This module addresses the fundamental aspects of the most important issues that permit the network and its applications to operate successfully. The module also addresses the current threats to the Internet and topics still emerging from R&D studies around the world.\n\n*Postal service analogies: 4*"},{"_id":"3617c6628d057d230c000020","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617c5578d057d230c00001f","content":"## Introduction\n\n*This module discusses the detailed underlying operation of the Internet and its constituent components and is an essential topic in its own right as well as providing a solid foundation for much of the other material covered in the MEng.*"},{"_id":"3617c6a28d057d230c000021","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617c6628d057d230c000020","content":"### Staff\n\n- **[Dave Price](mailto:dap@aber.ac.uk)**\n- [Nitin Naik](mailto:nkn@aber.ac.uk)\n- [Stephen Kingston](mailto:spk@aber.ac.uk)"},{"_id":"3617c75f8d057d230c000022","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617c6628d057d230c000020","content":"### Learning Outcomes\n\n1. Participate in planning networks that are cost effective and realistic in terms of products and services currently available.\n2. Critically assess proposed networking solutions.\n3. Assess the effect of likely technological developments on existing network applications.\n4. Make decisions and provide guidance to others in the choice of appropriate communications technologies to deploy, to solve real world requirements.\n5. Demonstrate extensive knowledge of the internal operation of the Internet and its protocols.\n6. Demonstrate an appreciation of the problems that appear in the management of routing and naming in large networks.\n7. Exercise judgment in the choice of appropriate protocols and services to address the real needs of Internet operators and users.\n8. investigate, and propose solutions to problems of quality of service.\n9. Demonstrate an appreciation of the security issues that surround the Internet and its applications and how these can be mitigated.\n10. Explain the need for a new generation of the Internet and describe current progress towards it."},{"_id":"3617c7a28d057d230c000023","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c6628d057d230c000020","content":"### Assessment\n\n- Assignment **40%** *??/??/2013 to ??/??/????*\n- Exam **60%**"},{"_id":"36f798b9be9d9a30ab00004f","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c6628d057d230c000020","content":"### Commitment\n\n20 credits = 200 hours of work.\n\n44 hours of lectures, around 20 hours of practicals.\n\nThis leaves about 140 hours of personal study, including extra practical work.\n\nThere is an assignment worth 40% of the marks (2000 word report).\n\nText book study and revision.\n\n2 hour exam."},{"_id":"36f7c2ecbe9d9a30ab000050","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617c6628d057d230c000020","content":"### Recommended Reading\n\n* TCP/IP Protocol Suite - *Foruzan B., Fegan S.*\n* RFC or internet drafts available online from [IEFT](http://www.ietf.org/)\n* Other textbooks and journals\n* [The Internet Protocol Journal](http://cisco.com/ipj/) by Cisco Systems"},{"_id":"36f7d0d0be9d9a30ab000052","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"3617c5578d057d230c00001f","content":"## Practicals\n\n*Practical work sessions focusing mainly on the electronics and hardware of network issues.*"},{"_id":"36f7d18fbe9d9a30ab000053","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"36f7d0d0be9d9a30ab000052","content":"### Practical 1\n\nUsing the computer connected digital oscilloscopes or *picoscopes*."},{"_id":"399948918fa575a18100026f","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"36f7d0d0be9d9a30ab000052","content":"### More DNS\n\nnslookup minted.dcs.aber.ac.uk whilst capturing packets on port 53 captured **8** packets.\n\nThe type of the message was of type **A** and of class **IN** and was a **recursive** lookup. There was no response because the message was a query.\n\nThe server this was sent to was 193.60.11.253. In /etc/resolv.conf/ the nameserver: 127.0.1.1 c57net.aber.ac.uk.\n\n**1** question and **3** answers were held in the first answering packet. **4** authoritative records were received specifying the 2 authoritative nameservers from dcs.aber.ac.uk and 2 from yale.ac.uk.\n\nThe additional records provided all possible IP addresses of all nameservers contacted during the lookup to cache the information.\n\nnslookup set type=MX aber.ac.uk was then captured. The answer record contained: Mail exchange: aber-ac-uk.mail.protection.outlook.com.\n\nThe authorative record contained nameservers for: aber.ac.uk (3) and yale.ac.uk (1).\n\nnslookup set type=SOA dcs.aber.ac.uk was then captured.\n\nThe email of the person responsible for this domain is: cs-root.aber.ac.uk.\n\nThere are 4 authoritative nameservers for this domain: dcs.aber.ac.uk (2), aber.ac.uk (1) and yale.ac.uk (1).\n\nnslookup aber-ac-uk.mail.protection.outlook.com. The response from this was from microsoft. 2 IP addresses which can switch (load balanced?).\n\nnslookup 193.60.11.36 had a type of PTR for the name 36.11.60.193.in-addr.arpa. Still used the standard nameservers.\n\nnslookup sillyname gave an authoritative and non-authoritative response (one authoritative for sillyname.c57net.dcs.aber.ac.uk and non-authoritative for sillyname). Uses two different sets of nameservers, the Aberystwyth local ones and the root nameserver.\n\ndig @dns0.aber.ac.uk 98.34.124.144.in-addr.arpa PTR shows lots of packets, initially gathering DNS information, then on 144.124.34.98.\n\ndig www.yahoo.com A shows that yahoo uses CNAME instead, with an IP address of 87.248.122.122.\n"},{"_id":"3617c8c28d057d230c000025","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617c5578d057d230c00001f","content":"## Basic Issues in Data Communication\n\n*A revision of the basic issues in data communication.*"},{"_id":"36f7f710be9d9a30ab000054","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617c8c28d057d230c000025","content":"### Protocol Models and Frameworks\n\nIn the 1970s there was no master plan, overall structure nor agreements on application protocols.\n\nProprietary protocols and architectures lead to a large amount of anarchy."},{"_id":"36f80cfebe9d9a30ab000055","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617c8c28d057d230c000025","content":"### ISO Committees\n\nIn 1977 ISO establishes committees and subcommittees and so on and so forth.\n\nNot just ISO doing this, telecommunications (CCITT) also got involved."},{"_id":"36f82502be9d9a30ab000056","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c8c28d057d230c000025","content":"### OSI Reference Model - IS 7498\n\nProvides a basic framework using a \"divide and conquer\" principle.\n\nUses layering to reduce complexity, where each layer handles one (group of) problem(s).\n\n1. Keep things simple.\n2. Choose boundaries at places that minimise interaction between adjacent layers.\n3. Functions of a different nature or purpose in different layers\n4. Similar function in same layer.\n5. Use all part knowledge and experience.\n6. Hide implementation within layers\n7. Special hardware/processors\n8. Data abstraction levels.\n9. Internal changes do not affect other layers\n10. Only create interfaces to directly surrounding layers (controversial)."},{"_id":"36f8359cbe9d9a30ab000058","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c8c28d057d230c000025","content":"### OSI Reference Model Layers\n\n1. Physical - wires, radio frequency\n2. Data Link - direct link from one to another\n3. Network - global issues like addressing\n4. Transport - methods for ensuring quality of service.\n5. Session - availability of resources, \"checkpoints\", etc.\n6. Presentation - Language/character set encoding\n7. Application - Not supposed to contain or control whole applications, just the useful parts to applications, e.g. directory service"},{"_id":"36f85761be9d9a30ab000059","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617c8c28d057d230c000025","content":"### Exercise\nDiscuss the statement: *The existence of a communications framework like the OSI model promotes competition between companies*.\n\n#### For\n* Companies spend more time actually building products than on firmware to deal with communications. \n* Standardised method of communication allow products to be linked: more scope for different products.\n\n\n#### Against\n* No competition to improve the network process.\n* No differentiation."},{"_id":"3617c9378d057d230c000026","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c5578d057d230c00001f","content":"## Local Area Networks\n\n*A detailed study of variants of the technologies collectively known as Ethernet.*"},{"_id":"3877f2fec986b2fb8a000172","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3617c9378d057d230c000026","content":"### Ethernet \n\nA passive, contention-based broadcast technology that uses baseband signalling."},{"_id":"3877f564c986b2fb8a000173","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3877f2fec986b2fb8a000172","content":"#### Passive \n\nNo one device controlling the network."},{"_id":"3877f5f5c986b2fb8a000174","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3877f2fec986b2fb8a000172","content":"#### Contention-based\n\nEach device must compete with every other device for access to the network."},{"_id":"3877f748c986b2fb8a000175","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3877f2fec986b2fb8a000172","content":"#### Broadcast\n\nEver device on a shared network fears broadcast transmissions.\n"},{"_id":"3877f805c986b2fb8a000176","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3877f2fec986b2fb8a000172","content":"\n#### Baseband Signalling\n\nEntire bandwidth of a cable for a single transmission."},{"_id":"3754016a53e9cb83190000a0","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617c9378d057d230c000026","content":"### 802.3 CSMA/CD Bus (Ethernet)\n\nDerived from work by:\n\n* Xerox\n* Intel\n* Digital (DEC)\n\nPublised in Ethernet (DIS Blue Book) V1.0 September 30th 1980.\n\n802.3 Revision D dated December 1982 publish by IEEE.\n\nRevision F published July 1984 and also issued as draft proposal 8802/3 by ISO."},{"_id":"375414bb53e9cb83190000a1","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617c9378d057d230c000026","content":"### Operation: Carrier Sense Multiple Access with Collision Detection (CSMA/CD)\n\n*Distributed Control*\n\n* Contend for use\n* Acquire access and send a data packet\n* No priority\n\nSimple Algorithm:\n\n\n1.\nif(network active)\n goto 1\ntransmit(data)\ncheck for collision\nif(collision)\n transmit(JAM)\n delay(a random time)\n goto 1\ntransmission complete\n\n\nChecking for collision is the difficult part. Can check:\n\n1. I'm transmitting a 1, is there a 1 on the wire.\n2. Do the signals on the wire look like the output of one station and one station only.\n\nDelay must be random to avoid future collisions and not have priority."},{"_id":"37628fb457ba3edb0d0000b3","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c9378d057d230c000026","content":"### Coaxial cable\n\nVery rigorous specifications. Maximum length of 500m and limits on bend.\n\nThese are to stop the electric current being interfered with.\n\nHard limit on propagation: c (speed of light).\n\nTransceiver (MAU) to link devices to co-ax conveniently.\n\nTerminators absorb the signal at the ends of the cable.\n\nRepeaters repeat the signal onto other cables, repeat a perfect version of the signal (if possible)."},{"_id":"3762b8c857ba3edb0d0000b4","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c9378d057d230c000026","content":"### Broadcast Networks\n\nIf data is inserted into the network, it should reach every member on the network.\n\nNeed to know how long it will take for data to get across the network.\n\nRules tend to be the distance between two extremes in the network is 5 of the co-ax cables and 4 repeaters. 2 of the co-ax cables must be point to point without any devices attached.\n\nBridges, switches, hubs and routers help build larger networks."},{"_id":"3762c74c57ba3edb0d0000b5","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617c9378d057d230c000026","content":"### Co-ac Medium Options 802.3\n\n* Original (10BASE5)\n * 10Mbps\n * Baseband coaxial cable\n * segment length 500m\n * Max 10 taps per segment\n * Max 4 repeaters\n* 10BASE2\n * 10Mbps\n * Thinner coaxial cable\n * 185m segments\n * Max 30 taps per segment."},{"_id":"3762d0e757ba3edb0d0000b6","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617c9378d057d230c000026","content":"### Slot Time\n\nWorst case:\n\nB stars transmitting when As packet has nearly reached B.\n\nB must corrupt, at least, the last bit of As packet.\n\nTherefore, packet length must be such that time to transmit is greater than twice the **transmission delay** for longest route in the network.\n\nFor a 2.5km network, 10MBit/sec, the slot time is 51.2 micro seconds.\n\nSmallest allowed packet needs to be the number of bits it takes to reach from one end of the network to the other, times 2, plus a little extra for luck.\n\n512 bit packets capture the network for 10BASE5.\n\n> *\"Your bits are now all over the network\"* - Dave Price, 10/10/2013"},{"_id":"3762ea8257ba3edb0d0000b7","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617c9378d057d230c000026","content":"### Calculatng Slot Time\n\nSlot time s.\n\nPath time p.\n\ns > 2p\n\n* 3 coax (with stations) = 21.65 bits\n* 2 links (no stations) = 25.65 bits\n* 4 repeater delays = 7.5 bits\n* Transceiver delays = 6.0 bits\n* Transceiver cable delays = 2.57 bits\n* etc.\n\nTotal about 499 bits worst case. Specified as 512 bits to give a safety margin."},{"_id":"3762f06b57ba3edb0d0000b8","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617c9378d057d230c000026","content":"### Network JAMs\n\n* Repeaters required to propagate JAMs.\n* Must make sure all repeaters see JAMs.\n* Time delay of 500m coax about 2.165 micoseconds\n* 32 bits JAM\n..."},{"_id":"3762f22c57ba3edb0d0000b9","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617c9378d057d230c000026","content":"### MAC Frame Format for 802.3\n\n<table><tr><th>Number of Octets</th><th>Field Usage</th></tr><tr><td>7</td><td>Preamble</td></tr><tr><td>1</td><td>Start of frame delimiter</td></tr><tr><td>6</td><td>Destination Address</td></tr><tr><td>6</td><td>Source Address</td></tr><tr><td>2</td><td>Length in 802.3</td></tr><tr><td>1500</td><td>LLC data and padding</td></tr><tr><td>4</td><td>Frame Check Sequence</td></tr></table>\n\n* Preamble synchronises."},{"_id":"37b0147508046c1dcd0000e0","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617c9378d057d230c000026","content":"### Ethernet Addresses\n\n48 bits long. Designed to be globally unique.\n\n![](http://upload.wikimedia.org/wikipedia/commons/thumb/9/94/MAC-48_Address.svg/475px-MAC-48_Address.svg.png)\n\nGlobally unique should be completely unique, not always though.\n\nNot expected to be able to be changed, can now be programmed (simply, apparently; nmap --spoof-mac 0)"},{"_id":"37b0241f08046c1dcd0000e1","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617c9378d057d230c000026","content":"### Frame details\n\nMinimum frame size is 512 bits, not including the preamble.\n\nMaximum frame size is 1518 octets (1500 octets of data).\n\nAbove assumes 48 bit addresses which IEEE 302.3 says \"shall be used\" for 10 Mbps networks.\n\n9.6&micro;s inter-frame gap to allow desynchronisation.\n\nTime for frame is 51.2&micro;s plus 6.4&micro;s for preamble."},{"_id":"37b03ece08046c1dcd0000e2","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"3617c9378d057d230c000026","content":"### Collision Backoff and Retransmission\n\nTransmitter tries to send for a maximum of 16 attempts to send a frame.\n\nThe transmitter waits for an integer multiple slot times determined by the following algorithm prior to each retry.\n\nRescheduling of each transmission uses \"truncated binary exponential backoff\"\n\nThis ensures a random but increasing delay if many collisions occur:\n\nDelaySlots = rand[0 <= r < 2^k]\n\nWhere k = min(n, 10) for the n<sup>th</sup> retansmission"},{"_id":"37b04e5d08046c1dcd0000e3","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3617c9378d057d230c000026","content":"### Probabilistic Characteristics of CSMA/CD\n\nAll access to the 802.3 LAN only completes with some probability. It is thus impossible to guarantee transfer rates. When the net is very busy collisions might go on forever.\n\nDebates often take place on the usability of CSMA/CD LANs for real time use. The answer depends on the true use intended rather than the LAN."},{"_id":"37b0609208046c1dcd0000e4","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"3617c9378d057d230c000026","content":"### Bridges\n\nPartition LAN to segregate load, add reliability, add security.\n\nCombine remote LAN segments into a single logical network.\n\nCombine separately developed and controlled LANs.\n\nIEEE 802 LANs often include bridges.\n\nRepeaters clean and forward all data.\n\nBridges selectively forward data. It will store and forward complete packets.\n\nForwarding based on header information,\n\nSometimes known as *MAC level relay*."},{"_id":"37b0747d08046c1dcd0000e7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37b0609208046c1dcd0000e4","content":"#### Source Routing Bridges\n\nHosts discover the route to each other host and are very aware of the presence of multiple LANs couple by bridges.\n\nNeeds identifiers for bridges and LANs.\n\nData is transmitted with routing attached.\n\nBridges obey the routing.\n\n"},{"_id":"37b075ba08046c1dcd0000e8","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37b0609208046c1dcd0000e4","content":"#### Transparent Bridges\n\nBridge learns (or is told) the LAN on which each address exists. Hosts need not to know anything about the location of other hosts and indeed are not even aware of the presence of the bridges.\n\nFrames which arrive are handled in one of 3 different ways:\n\n1. Same LAN\n2. Different LAN\n3. Unknown destination.\n4. Broadcast address."},{"_id":"37b07bb208046c1dcd0000e9","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Same LAN\n\nIf destination address on same LAN as source address then discard the packet"},{"_id":"37b07c8008046c1dcd0000ea","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Differnet LAN\n\nIf destination address on different LAN, forward packet."},{"_id":"37beda4f9212a51edd00010a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Unknown Destination\n\nIf location of destination address is not known then 'flood'."},{"_id":"37beddc09212a51edd00010c","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Broadcast Address\n\n'flood'."},{"_id":"37bee2a39212a51edd00010d","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Flood\n\nForward the packet to every other network attached to the bridge."},{"_id":"37bee69d9212a51edd00010e","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Address Learning\n\nBridges listen to the traffic and can learn where machines where by looking at the source addresses in the packets."},{"_id":"37beef159212a51edd000110","treeId":"361777d2f26949dff8000005","seq":1,"position":6.5,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Address Tables\n\nNeed to be quite large depending on the network.\n\nGenerally there is a time-out associated with the addresses known."},{"_id":"37beecce9212a51edd00010f","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Bridge Cycles\n\nAddress Learning works well if there are no alternative routes in the internetwork connections (i.e. a tree structure).\n\nHowever there often are alternative routes, so bridges might cause loops.\n\n"},{"_id":"37bf07dc9212a51edd000111","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"37b075ba08046c1dcd0000e8","content":"##### Solution to Bridge Cycles\n\nNeed a protocol to avoid cycles.\n\nResult for graph theory states:\n\n> For any connected graph, there is a *spanning tree* of edges which maintains the connectivity but contains no closed loop.\n\nEach LAN represents a graph node and each bridge corresponds to an edge."},{"_id":"37bf0c609212a51edd000112","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"37b075ba08046c1dcd0000e8","content":"###### Spanning Tree\n\n1. Bridges have numbers\n2. Broadcast number every few seconds\n3. One bridge becomes the *root bridge*\n4. Bridges discover route to *root* via *root port*.\n5. Routes might have costs.\n6. A *designated bridge* is determined for each LAN (minimum cost of path to root).\n7. Only the designated bridge can forward to and from its LAN.\n8. Bridges communicate with a Bridge Protocol Data Unit (BPDU) consisting of:\n * The originating bridge number\n * The number of the bridge thought to be the root\n * The path cost to root.\n\nInitially every bridge thinks it is the root and it broadcasts a BPDU to assert this fact.\n\nIf a bridge gets a BPDU indicated a 'superior' bridge exists it assigns its root port and the path cost to root.\n\nIf a bridge gets a BPDU from a bridge with a shorter root path it releases any claim to be the designated bridge for the segment.\n\nThe lowest numbered bridge becomes the root.\n\nBridge ports which are not root or designated ports are blocks."},{"_id":"37bf3c0d88d29f8b14000110","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37b0609208046c1dcd0000e4","content":"#### Local Bridge\n\nConnect two (or more) adjacent LANs. Throughput is likely to be high. Hosts not likely to notice much performance degradation unless waiting for each packet to be acknowledged."},{"_id":"37bf3e5a88d29f8b14000111","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37b0609208046c1dcd0000e4","content":"#### Remote Bridge\n\nConnect two (or more) LANs which are widely separated. Bridge consists of two 'half bridges' connected by a WAN type link. Link typically 64Kbps to 2Mbps."},{"_id":"37bf432188d29f8b14000112","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"37b0609208046c1dcd0000e4","content":"#### Managed Bridges\n\nBridges often available in a managed form. These are managed from a station and can load the bridges with lots of things.\n\nLots of monitoring, etc.\n\nAnother protocol needed and this needs to be standardised."},{"_id":"3617c9a48d057d230c000027","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c5578d057d230c00001f","content":"## Other Network Technologies\n\n*A brief look at fast and wireless network technologies.*"},{"_id":"386941366516c5b4e100013d","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"3617c9a48d057d230c000027","content":"### Alternative LAN Technologies\n\n* 802.4 - Token Bus\n* 802.5 - Token Ring\n\nStandards differ at the physical layer\n\nDiffer at MAC sublayer of Data Link Layer.\n\nCompatible at the LLC sublayer of the Data Link Layer."},{"_id":"38694d536516c5b4e100013f","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"386941366516c5b4e100013d","content":"#### Token Bus\n\nUses a bus physical topology and ring logical topology. The physical order of nodes does not matter.\n\nCoaxial cable served as a common communication bus.\n\nToken was created bus the token bus protocol to manage access to the bus\n\nAny station that holds the token packet has permission to transmit data.\n\nThe station releases the token when it is done communication or when a higher priority device needs to transmit.\n\nTwo major problems:\n\n1. Bus failure leads to a network failure.\n2. Adding a new node is not simple."},{"_id":"3869567b6516c5b4e1000140","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"386941366516c5b4e100013d","content":"#### Token Ring\n\nSimilar to token bus, but in a ring physical ring topology.\n\nMessages are transferred in one direction along the ring at all times.\n\nToken Ring networks sequentially pass a token to each connected device.\n\nWhen the token arrives at a particular node, the recipient is allowed to transmit data onto the network.\n\nSince only one device may be transmitting at any given time, no data collisions occur.\n\nAccess to the network is guaranteed\n\nTime-sensitive applications can be supported.\n\nStill used for some real-time applications.\n\nBased initially for the mainframe infrastructure.\n\nProblems:\n\n1. Costly\n2. Complex."},{"_id":"38781448c986b2fb8a00017c","treeId":"361777d2f26949dff8000005","seq":1,"position":0.875,"parentId":"3617c9a48d057d230c000027","content":"### Quick notes on Ethernet\n\nA quick summary of 802.3"},{"_id":"3877fb50c986b2fb8a000177","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38781448c986b2fb8a00017c","content":"### Why Ethernet is used\n\n* Inexpensive\n* Easy to install, maintain, troubleshoot and expand\n* Widely accepted industry standard.\n* Structured to allow compatibility with Network Operating Systems.\n* Reliable"},{"_id":"3878025dc986b2fb8a000179","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38781448c986b2fb8a00017c","content":"### Ethernet Versions\n\n1. Ethernet 10 BASE-T/F 802.3 (10 Mbps)\n2. Fast Ethernet 100 BASE-T/F 802.3u (100 Mbps)\n3. Gigabit Ethernet 1000 BASE-T/F 802.3z (1000 Mbps)\n4. 10 Gigabit Ethernet 10 GBASE-F 802.3ae (10 Gbps)\n"},{"_id":"38780929c986b2fb8a00017a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3878025dc986b2fb8a000179","content":"#### Coding Convention\n\n* Network speed\n* Baseband Signalling\n* 2 or 5 stands for coaxial cable and length\n* T stands for Twisted Pair\n* F/FL/S/L Stands for Fiber-Optic\n* X stands for full duplex."},{"_id":"38780e24c986b2fb8a00017b","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38781448c986b2fb8a00017c","content":"### Ethernet Components\n\n* CSMA/CD (No protocol for 10 GigE) as 10 GigE is completely full duplex so it isn't needed.\n* Baseband Signalling.\n* Ethernet cables.\n* Ethernet card or adapter.\n* Ethernet devices."},{"_id":"38782f09c986b2fb8a000183","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38781448c986b2fb8a00017c","content":"#### Ethernet Cables: Twisted Pair (CAT5/CAT5e)\n\n* CAT5: Ethernet and Fast Ethernet.\n* CAT5e: Gigabit Ethernet.\n\nContains four pairs of copper wire.\n\nCable runs are limited to a maximum run length of 100m.\n\nOperates at 100MHz.\n\nCAT5 comes in two main varieties, solid and stranded.\n\nFast Ethernet communications only utilise 2 out of 4 pairs.\n\nCAT5 enhanced (CAT5e) uses all 4 pairs to support GigE over short distances.\n\nCAT5e is backwards compatible with CAT5.\n\nCAT6 (250MHz) and CAT7 (600MHz)."},{"_id":"387815efc986b2fb8a00017d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617c9a48d057d230c000027","content":"### Signalling\n\nBaseband is a single transmission involved (digital signal)\n\nBroadband can handle multiple transmissions with a modulated analogue signal."},{"_id":"38781bcfc986b2fb8a00017e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"387815efc986b2fb8a00017d","content":"#### Baseband Signalling\n\nNetwork uses all available signal frequencies or the entire bandwidth.\n\nOne signal can be transmitted at a time.\n\nLight or electrical pulses based transmission.\n\nRelated to digital technologies, but can be used for analogue technologies.\n\nBi-directional communication (Half duplex) is possible, but difficult.\n\nMultiplexing (using Time Division Multiplexing) allows transfer of multiple signals on a single medium."},{"_id":"3878278dc986b2fb8a000182","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"387815efc986b2fb8a00017d","content":"#### Broadband Signalling\n\nNetwork uses only one frequency or a part of the entire bandwidth.\n\nMultiple signals can be transmitted at a time.\n\nElectromagnetic or optical waves transmission.\n\nRelated to analogue technologies but can be used for digital technologies.\n\nBi-directional communication is possible and fairly easy.\n\nMultiplexing (using Frequency Division Multiplexing) allows transfers of multiple signals on a single medium.\n"},{"_id":"38782547c986b2fb8a00017f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617c9a48d057d230c000027","content":"### Multiplexing and Demultiplexing\n\nPutting more than one signal on a wire at once and getting it back again at the other end."},{"_id":"38782590c986b2fb8a000180","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38782547c986b2fb8a00017f","content":"#### Time Division Multiplexing\n\nGives the illusion of multiplexing.\n\nEach signal is allowed a slot of time to transmit for.\n\n"},{"_id":"387825eac986b2fb8a000181","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38782547c986b2fb8a00017f","content":"#### Frequency Division Multiplexing\n\nActual multiplexing.\n\nEach signal uses a single frequency channel to transmit."},{"_id":"38784489c986b2fb8a000184","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617c9a48d057d230c000027","content":"### Fibre Optic\n\nSupports all Ethernet versions above 10BASE5.\n\nCarries high-bandwidth data through beams of light carrying electromagnetic signals. Not so affected by noise. Can carry signals up to approximately 70 miles without amplification.\n\nLight can be pulsed in a single wavelength to represent 45 Gigabits of information."},{"_id":"38784a4dc986b2fb8a000185","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38784489c986b2fb8a000184","content":"#### Single-Mode Fibre Optic\n\nTransmits one signal per fibre.\n\nDiameter: 8.3 to 10 microns that has one mode of transmission.\n\nSpeed and distance: up to 40Gbps over up to 100km\n\nUsed in telephones and cable TV applications."},{"_id":"38784c84c986b2fb8a000186","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38784489c986b2fb8a000184","content":"####Multi-Mode Fibre Optic\n\nTransmits many signals per fibre.\n\nMulti-modes result from the fact that light will only propergate in the fibre core at discrete angles within the cone of acceptance.\n\nDiameter: 50 to 100 microns.\n\nSpeed and distance: 10Mbps to 1 Gbps over 275m to 2km.\n\nUsed for Computer Networks and LAN Applications."},{"_id":"38c578edf7d3b285720001a6","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617c9a48d057d230c000027","content":"### Network Adapters\n\nAdapters for connecting to ethernets.\n\nEthernet cards, etc."},{"_id":"38c579d5f7d3b285720001a7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38c578edf7d3b285720001a6","content":"#### 10/100 Ethernet\n\nConnect computer using a PCI, PCIe or ISA moethboard interface slot, CAT5/6"},{"_id":"38c57adaf7d3b285720001a8","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38c578edf7d3b285720001a6","content":"#### Gigabit Ethernet\n\nPCIe slots, CAT5/5e/6/7 and Fibre Optic cables."},{"_id":"38c57b99f7d3b285720001a9","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38c578edf7d3b285720001a6","content":"#### Fibre Optics\n\nFor tier 1 and 2 internet backbones, External device, Fibre Optic cables.\n\nSlightly different, can use not only for network but for the backbone (a sophisticated network)."},{"_id":"38c57ca4f7d3b285720001aa","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38c578edf7d3b285720001a6","content":"#### Wireless Network Interface Cards\n\nInternal or external device"},{"_id":"38c57d18f7d3b285720001ab","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"38c578edf7d3b285720001a6","content":"#### Wireless Dongles\n\nExternal device"},{"_id":"38c58214f7d3b285720001ac","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617c9a48d057d230c000027","content":"### Ethernet Devices\n\nNote that most devices are completely tied to a specific function, some repeaters might have some Data Link Layer functions depending on the manufacturer."},{"_id":"38c5828bf7d3b285720001ad","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38c58214f7d3b285720001ac","content":"#### Repeater\n\nRepeat an electrical signal including noise.\n\nTakes an incoming signal and then generates a new, clean copy of that exact signal.\n\nOvercomes signal attenuation problem.\n\nAllows LANs to extend beyond normal distance limitations.\n\nPhysical layer device.\n\nDoesn't read data frames, just repeat the signal unintelligently."},{"_id":"38c586e9f7d3b285720001ae","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38c58214f7d3b285720001ac","content":"#### Hub\n\nMultiport repeater.\n\nBroadcasts frame to all ports and devices.\n\nAllows users to share Ethernet for transmission of data onto a single network (collision domain).\n\nPhysical Layer device.\n\nDoesn't read data frames.\n\nRepeater is usually used for the extension of the length of a network, while the hub is a simple connectivity gadget that is used to broaden a network."},{"_id":"38c58e48f7d3b285720001af","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38c58214f7d3b285720001ac","content":"#### Bridge\n\nConnect two LAN segments of similar or dissimilar types such as Ethernet and Token Ring.\n\nSplit a networking into separate collision domains.\n\nMap the Ethernet addresses of the nodes residing on each network segment and allow only the necessary traffic to pass through the bridge.\n\nDo not forward bad or misaligned packets.\n\nWorks on the Physical and lower Data Link (MAC) Layers"},{"_id":"38c5afd2f7d3b285720001b2","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38c58214f7d3b285720001ac","content":"#### Switch\n\nExpansion of the Bridge.\n\nUsed in heavily loaded networks to isolate data flow and improve performance (parallelism).\n\nUp to on-half of the computers connected to a switch can send data at the same time.\n\nData Link and Network Layer device."},{"_id":"38c5be6ef7d3b285720001b3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38c5afd2f7d3b285720001b2","content":"##### Cut-through Switches\n\nAre faster because they examined the packet destination address only before forwarding it on to its destination segment."},{"_id":"38c5beb5f7d3b285720001b4","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38c5afd2f7d3b285720001b2","content":"##### Store-and-forward Switches\n\nWork like bridges in that they accept and analyse the packet before forwarding it to its destination.\n\nTakes more time to examine the whole packet, although it does allow the switch to catch certain packet errors and keep them from propagating through the network."},{"_id":"38d4464bcbad28f3150001c7","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617c9a48d057d230c000027","content":"### Ethernet Encoding\n\nMethods for encoding bits in different Ethernet technologies."},{"_id":"38d44acecbad28f3150001c8","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38d4464bcbad28f3150001c7","content":"#### Manchester Coding\n\nUsed in 10-Base* \n\nBipolar scheme, synchronisation via a clock."},{"_id":"38d45576cbad28f3150001c9","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617c9a48d057d230c000027","content":"### Fast Ethernet 802.3u\n\nCSMA/CD and Full Duplex\n\nBackwards compatible.\n\nPhysical layer structure (PHY) has been redesigned.\n\nComplex signal encoding mechanisms than the simple Manchester code.\n\nUses three sublayers."},{"_id":"38d45c98cbad28f3150001ca","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38d45576cbad28f3150001c9","content":"#### Convergence Sublayer\n\nIntroduces the concept of auto-negotiation; negotiates between two different medium to make the properties similar to for communication"},{"_id":"38d45d1ccbad28f3150001cb","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38d45576cbad28f3150001c9","content":"#### Media Independent Interface\n\nInterfaces the physical medium used so that it can be handled generically."},{"_id":"38d45daacbad28f3150001cc","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38d45576cbad28f3150001c9","content":"#### Media Dependent Sublayer\n\nDeals with encoding, transmission in a way specific to the medium."},{"_id":"38d47206cbad28f3150001ce","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617c9a48d057d230c000027","content":"### Gigabit Ethernet 802.3z\n\nTwo distinctive approaches for medium access:\n\n1. Half Duplex\n2. Full Duplex\n\nMost follow the full-duplex approach.\n\nStar topology.\n\nSupport standard Ethernet frame format.\n\nUses 802.3x flow control.\n\nBackwards compatible.\n\nPhysical layer is more complex"},{"_id":"38d4750ccbad28f3150001cf","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38d47206cbad28f3150001ce","content":"#### Gigabit Media Independent Interface"},{"_id":"38d4759fcbad28f3150001d0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38d47206cbad28f3150001ce","content":"#### Physical Layer"},{"_id":"38d475ffcbad28f3150001d1","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38d47206cbad28f3150001ce","content":"#### Media Dependent Interface"},{"_id":"38d4764ccbad28f3150001d2","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38d47206cbad28f3150001ce","content":"#### Medium"},{"_id":"3921bdade49a79aaf60001d6","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617c9a48d057d230c000027","content":"### Encoding\n\nDigital to digital encoding schemes."},{"_id":"3921be70e49a79aaf60001d7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3921bdade49a79aaf60001d6","content":"#### Unipolar Encoding\n\nOnly use one pole (+ or -). One pole is used to represent 1 or 0, zero is used to represent the other.\n\n![](http://file1.hpage.com/000143/66/bilder/picture3.png)\n\n![](https://lh6.googleusercontent.com/i_wHvlOcxGA9HilYhdmFM5wjbo1dJ3q9q8qc6vKMkl8gbgqkBW2vhGjzoioF9gS8DA=s400)\n\nTwo problems:\n\n1. DC Component\n2. Synchronisation\n\nDC cannot be transmitted properly through an AC line without noise.\n\nThe receiver cannot synchronise its clock to the sender."},{"_id":"3921bebfe49a79aaf60001d8","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3921bdade49a79aaf60001d6","content":"#### Polar Encoding\n\nUses both poles to represent bits."},{"_id":"3921bf71e49a79aaf60001da","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3921bebfe49a79aaf60001d8","content":"##### Non-Return to Zero (NRZ)"},{"_id":"3921c138e49a79aaf60001dd","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3921bf71e49a79aaf60001da","content":"###### NRZ-Level\n\n1 as positive voltage, 0 as negative voltage.\n\n![](https://lh6.googleusercontent.com/mP9wm9qDd9b5JoiZKmh5FfRDC6aLo7LUd5Vy3lMwRK_7ZBf5rayz67dOzaonQSEY0g=s400)"},{"_id":"3921c18ee49a79aaf60001de","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3921bf71e49a79aaf60001da","content":"###### NRZ-Inverse\n\nVoltage inverts on a 1."},{"_id":"3921c011e49a79aaf60001db","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3921bebfe49a79aaf60001d8","content":"##### Return to Zero (RZ)\n\n* Positive to 0 is 1.\n* Negative to 0 is 0\n\n![](https://lh6.googleusercontent.com/HsrRIApzAFwlGCCoFtthVZmKRsROFZdEpN6cpv8tsQsXOl-PVGbD7wkO6adq2rMqUw=s400)"},{"_id":"3921c050e49a79aaf60001dc","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3921bebfe49a79aaf60001d8","content":"##### Biphase"},{"_id":"3921c200e49a79aaf60001df","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3921c050e49a79aaf60001dc","content":"###### Manchester\n\n![](https://lh4.googleusercontent.com/MA7WfPVKktOw6LLGbu3pQCVMswe4cqHsZnrQ9oNDPqjR28qPOw7j7IjaakklukHDYA=s400)"},{"_id":"3921c232e49a79aaf60001e0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3921c050e49a79aaf60001dc","content":"###### Differential Manchester\n\n![](https://lh6.googleusercontent.com/GsN5RdpXdhqMLMub0RgampWgREFpBMwcot-BmHSzY2GxGPC18HYRUh06YLzj3Mpuig=s400)"},{"_id":"3921bf06e49a79aaf60001d9","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3921bdade49a79aaf60001d6","content":"#### Bipolar Encoding\n\n![](https://lh4.googleusercontent.com/dsAffc-caZWoTueproHHYXmv7b46ebT0bHws-HJNeDVE6YO3rmWLCe9RgoSy0ljo2g=s400)"},{"_id":"3921c3bde49a79aaf60001e1","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3921bf06e49a79aaf60001d9","content":"##### Alternating Mark Inversion"},{"_id":"3921c3f5e49a79aaf60001e2","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3921bf06e49a79aaf60001d9","content":"##### Bipolar 8 Zero Subsitution"},{"_id":"3921c444e49a79aaf60001e3","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3921bf06e49a79aaf60001d9","content":"##### High Density Bipolar 3\n"},{"_id":"39308982f4715fbab70001f9","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617c9a48d057d230c000027","content":"### Broadband"},{"_id":"393089c1f4715fbab70001fa","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39308982f4715fbab70001f9","content":"#### Digital Subscriber Line\n\nUses local telephone lines.\n\nAllows simultaneous void and data transmission."},{"_id":"3930b33df4715fbab70001ff","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"393089c1f4715fbab70001fa","content":"##### Asymmetric Digital Subscriber Line (ADSL)\n\nDesigned to deliver more bandwidth down than up.\n\nRates range from 1.5 to 9 Mbps down, 16 to 640kbps up.\n\nDistances of 18,000 feet over a single copper twisted pair.\n\nA splitter is needed."},{"_id":"3930b6daf4715fbab7000200","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"393089c1f4715fbab70001fa","content":"##### Very high bit-rate Digital Subscriber Line (VDSL)\n\nVDSL is designed to provide higher bandwidths.\n\nUp to 52Mbps down, 16Mbps up."},{"_id":"3930bb84f4715fbab7000201","treeId":"361777d2f26949dff8000005","seq":1,"position":0.875,"parentId":"393089c1f4715fbab70001fa","content":"##### VDSL 2\n\nSupport the wide deployment og triple play services.\n\n100 Mbps down, 20 Mbps up\n\n150 to 500m distance.\n\n500 Mbps transmission rates over copper cabling by using crosstalk cancellation or \"vectorized\" VDSL2 based modems."},{"_id":"39309afef4715fbab70001fc","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"393089c1f4715fbab70001fa","content":"##### BT Infinity\n\nNow rolling out ultrafast fibre optic broadband with speeds of up to 100Mb.\n\nNext step up from FTCC is FTTh (Fibre to the Home).\n\nNegative factor is the costs."},{"_id":"39309b96f4715fbab70001fd","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39309afef4715fbab70001fc","content":"###### Infinity-1\n\nTop speeds are up to 40Mbps down and 10Mbps up"},{"_id":"39309c5ef4715fbab70001fe","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39309afef4715fbab70001fc","content":"###### Infinity-2\n\nTopspeeds are up to 76Mbps down and 19Mbps up."},{"_id":"39308a82f4715fbab70001fb","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39308982f4715fbab70001f9","content":"#### Cable"},{"_id":"397e0357a81803594100020c","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"3617c9a48d057d230c000027","content":"### Wireless LAN (802.11)\n\n"},{"_id":"397e039da81803594100020d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e0357a81803594100020c","content":"#### Station (STA)"},{"_id":"397e0443a81803594100020e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e0357a81803594100020c","content":"#### Access Point (AP)\n\nAccess points act as a central transmitter and receiver of WLAN radio signals."},{"_id":"397e0801a81803594100020f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"397e0357a81803594100020c","content":"#### Basic Service Set (BSS)\n\nA set of STAs that communicate with each other.\n\nWhen two or more stations communicate together they form a BSS."},{"_id":"397e08f4a818035941000210","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e0801a81803594100020f","content":"##### Infrastructure Mode\n\nAll wireless clients are connected to an AP.\n\nGenerally the default mode for the 802.11b cards.\n\nAll mobile STAs communicate with each other via the AP.\n\nNetwork consumes double bandwidth for one communication.\n\nAP provide buffering of traffic for a mobile broadcast."},{"_id":"397e095ea818035941000211","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e0801a81803594100020f","content":"##### Ad-hoc Mode\n\nWireless clients are connected without an AP.\n\nAn ad-hoc network is where stations only communicate peer-to-peer (P2P).\n\nThere is no base and no one gives permission to talk.\n\nMostly these networks are set up spontaneously."},{"_id":"397e0fcca818035941000212","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"397e0357a81803594100020c","content":"#### Distributed System (DS)\n\nTwo or more BSSs are interconnected using a distribution system.\n\nAPs communicate via the DS.\n\nThe DS is the backbone of the WLAN and may be constructed of either wired or wireless networks.\n\nThe DS is also a thin layer in each AP.\n\nThat determines if communications received from the BSS are to be relayed back to a destination in the BSS, forwarded on to the DS to another AP or sent into the wired network infrastructure to a destination not in the ESS"},{"_id":"397e14b0a818035941000213","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"397e0357a81803594100020c","content":"#### Extended Service Set (ESS)\n\nAn ESS is a BSS where APs communicate amongst themselves from one BSS to another..\n\nEntire network looks like an interdependent BSS to the Logical Link Control (LLC).\n\nThis means stations can communicate or even move between BSSs transparently to the LLC."},{"_id":"397e190ca818035941000214","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"397e0357a81803594100020c","content":"#### Portal\n\nThe logical point at which medium access control (MAC) service data units (MSDUs) from a non-IEEE 802.11 local are network (LAN) enter the distribution system (DS) of an extended service set (ESS)."},{"_id":"397e1cb0a818035941000215","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"397e0357a81803594100020c","content":"#### WLAN Frame\n\n"},{"_id":"397e1ec7a818035941000216","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"397e0357a81803594100020c","content":"#### MSDU and AMSDU\n\nMultiple MSDUs are aggregated at the MAC layer and are pushed into a single MPDU.\n\nThey have a single frame header with multiple frames and they are destined for the same client and the same service class."},{"_id":"397e1f15a818035941000217","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e1ec7a818035941000216","content":"##### Mac Service Data Unit (MSDU)\n\nIt is the MAC service data unit. This is the unit o transmission used at the MAC layer which is received from the upper layer."},{"_id":"397e206ea818035941000218","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e1ec7a818035941000216","content":"##### Aggregated Mac Service Data Unit\n\nAggregation of the MSDU directly performed at the MAC layer is called AMSDU.\n\nSuch AMSDUs are now passed to the lower PHY later where they are dealt with as MPDUs"},{"_id":"397e2498a818035941000219","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"397e0357a81803594100020c","content":"#### MPDU and AMPDU"},{"_id":"397e24e9a81803594100021a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e2498a818035941000219","content":"##### Mac Protocol Data Unit (MPDU)\n\nThese are the frames passed from the MAC layers into the PHY later."},{"_id":"397e25f6a81803594100021b","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e2498a818035941000219","content":"##### Aggregated Mac Protocol Data Unit\n\nThese are the aggregated MPDU units which are pushed into a single Physical Protocol Data Unit (PPDU)."},{"_id":"397e2a14a81803594100021c","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"397e0357a81803594100020c","content":"#### DS Services\n\nWhile the implementation for the DS is not specified, 802.11 does specify the services which the DS must support."},{"_id":"397e2c38a81803594100021f","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"397e2a14a81803594100021c","content":"##### Station Mobility"},{"_id":"397e2c89a818035941000220","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e2c38a81803594100021f","content":"###### No Transition\n\nIf a station is not moving within its own BSS or it is not moving"},{"_id":"397e2d59a818035941000221","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e2c38a81803594100021f","content":"###### BSS Transition\n\nIf a station moves between BSSs within the same ESS"},{"_id":"397e2df5a818035941000222","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"397e2c38a81803594100021f","content":"###### ESS Transition\n\nIf the station moves between BSSs of differing ESS."},{"_id":"397e2b32a81803594100021d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e2a14a81803594100021c","content":"##### Station Services (SS)"},{"_id":"397e41b6a818035941000228","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e2b32a81803594100021d","content":"###### Authentication\n\nWith a wireless system, the medium is not exactly bounded as with a wired system.\n\nIn order to control access to the network, stations must first establish their identity.\n\nThe authentication relationship may be between two stations inside an IBSS or to the AP of the BSS.\n\nAuthentication outside of the BSS does not take place.\n\nTwo types of authentication:\n\n1. Open System Authentication\n2. Shared Key Authentication"},{"_id":"397e480ea81803594100022c","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e2b32a81803594100021d","content":"###### Deauthentication\n\nWhen either the station or AP wishes to terminate a stations authentication. "},{"_id":"397e486ea81803594100022d","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"397e2b32a81803594100021d","content":"###### Privacy\n\nAn encryption algorithm, which is used so that other 802.11 users cannot eavesdrop on your LAN traffic."},{"_id":"397e2b76a81803594100021e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e2a14a81803594100021c","content":"##### Distribution Station Services (DSS)\n"},{"_id":"397e304ca818035941000223","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e2b76a81803594100021e","content":"###### Association\n\nA station must affiliate itself with the BSS infrastructure if it wants to use the LAN.\n\nThis is done by Associating itself with an AP. Associations are dynamic in nature because stations can move, turn on or turn off.\n\nA station can only be associated with one AP.\n\nThis ensures that the DS always knowns where the station is.\n\nAssociation supports no-transition mobility, but is not enough to support BSS transition."},{"_id":"397e3364a818035941000224","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e2b76a81803594100021e","content":"###### Reassociation\n\nThe service allows the station to switch its association from one AP to another.\n\nBoth association and reassociation are initiated by the station."},{"_id":"397e33a6a818035941000225","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"397e2b76a81803594100021e","content":"###### Disassociation\n\nWhen the association between the station and the AP is terminated.\n\nCan be initiated by either party.\n\nA disassociated station cannot send or receive data.\n\nESS transition is not supported.\n\nA station can move to a new ESS but will have to reinitiate connections"},{"_id":"397e3405a818035941000226","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"397e2b76a81803594100021e","content":"###### Distribution\n\nGetting data from the sender to the receiver.\n\nThe message is sent to the local AP (input AP) then distributed via the DS to the AP (output AP) that the recipient is associated with.\n\nIf the sender and receiver are on the same BSS the input and output APs are the same.\n\nThe distribution service is not logically invoked whether the data is going through the DS or not."},{"_id":"397e345ca818035941000227","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"397e2b76a81803594100021e","content":"###### Integration\n\nWhere the output AP is a portal. Thus 802.X LANs are integrated into the 802.11 DS."},{"_id":"397e49c0a81803594100022f","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"397e0357a81803594100020c","content":"#### Physical Layer"},{"_id":"397e4a5da818035941000230","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e49c0a81803594100022f","content":"##### Spread Spectrum\n\nThe three physical layers originally defined in 802.11 included two spread-spectrum radio techniques and a diffuse infrared specification.\n\nSpread spectrum is a communication technique that spreads a narrowband communication signal over a wide range of frequencies for transmission then de-spreads it into the original data bandwidth at the receive.\n\nSpread spectrum increases the bandwidth of the signal compared to narrow band by spreading the signal."},{"_id":"397e518ba818035941000236","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e4a5da818035941000230","content":"###### Techniques\n\nThe Code of Federal Regulations (CFR) Part 15 originally only described two spread spectrum techniques to be used in the licensed free Industrial, Scientific, Medical (ISM) band, 2.4 GHz, thus 802.11 and 802.11b.\n\n* Frequency Hopping Spread Spectrum (FHSS) \n* Direct Sequence spread Spectrum (DSSS) \n\nOrthogonal Frequency Division Multiplexing (OFDM) was not covered by the CFR and would have required licensing.\n\n802.11a, employing OFDM, was created to work in the 5GHz."},{"_id":"397e5381a818035941000237","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e4a5da818035941000230","content":"###### Frequency Hopping Spread Spectrum (FHSS)\n\nFHSS spreads the signal by hopping from one frequency to another across a bandwidth of 83 MHz. \n\nThe data is spread over 83 MHz in the 2.4 GHz ISM band. \n\nA short burst of data is sent on one frequency (usually less than half a second).\n\nThen the sender changes to another pseudorandom frequency and broadcasts another burst of data before changing to another frequency, and so on.\n\nThe carrier then repeats this pattern.\n"},{"_id":"397e559aa818035941000238","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"397e4a5da818035941000230","content":"###### Direct Sequence Spread Spectrum (DSSS)\n\nDSSS spreads the signal by adding redundant bits to the signal prior to transmission. \n\nThe signal is divided into many different parts and sent on different frequencies simultaneously.\nSpectrum is divided into 13/14 channels.\n \nHowever, the FCC specifies only 11 channels for non-licensed (ISM band) use in the US."},{"_id":"397e4d38a818035941000232","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e49c0a81803594100022f","content":"##### Narrowband and Wideband\n\nIn communications, band is referred to as the range of frequencies (bandwidth) used in the channel.\n\nDepending on the size of the band (in terms of kHz, MHz or GHz) and some other properties of the communication channel, they can be categorized as narrowband and wideband etc.\n\nNarrowband uses a smaller frequency range (bandwidth)- 300–3400 Hz.\n\nWideband is a relative term, and the size of the band may be in kHz, MHz or GHz depending on the application.\n\n"},{"_id":"397e4f02a818035941000233","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"397e49c0a81803594100022f","content":"##### Narrow Band vs. Spread Spectrum \n"},{"_id":"397e4fa8a818035941000234","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397e4f02a818035941000233","content":"###### Narrow Band\n\nUses only enough frequency spectrum to carry the signal\n \n* High peak power \n* Easily jammed\n* Easy to detect\n* Easy to intercept\n"},{"_id":"397e5082a818035941000235","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397e4f02a818035941000233","content":"###### Spread Spectrum\n\nThe bandwidth is much wider than required to send to the signal\n\n* Low peak power \n* Difficult to jam\n* Hard to detect\n* Hard to intercept\n"},{"_id":"398cd964f0df89663000024f","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3617c9a48d057d230c000027","content":"### Wireless Mobile Communication/Cellular Telephony.\n\nUtilises lower frequency radio spectrum."},{"_id":"398cdbcaf0df896630000250","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398cd964f0df89663000024f","content":"#### Mobile RF Spectrum\n\nTypically delivered over a wide range of radio frequency spectrum bands (e.g. 900MHz, 1800MHz, 2.6GHz, etc.).\n\nMost of which can also reach indoors to some degree."},{"_id":"398cde36f0df896630000251","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398cd964f0df89663000024f","content":"#### Architecture of the GSM Network"},{"_id":"398cdf08f0df896630000252","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398cde36f0df896630000251","content":"##### Base Station Subsystem (BSS)\n\nComposed of one or more BSC.\n\nBSS is the point where all radio transmission related functions are performed.\n\nBTS and BSC connected through the **Abis interface**.\n\nBSS connected to the MSC through the **A interface**."},{"_id":"398ce14df0df896630000255","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"398cdf08f0df896630000252","content":"###### Base Station Controller (BSC)\n\nThe management of several BTS is done by the BSC.\n\nIt also provides all the control functions and physical links amoung the different BTS and between the mobile switching centre (MSC) and the BTSs.\n\nBeing a high-capacity switch, it provides functions such as cell configuration data, control of radio frequency power levels in BTS, frequency hopping, and handovers.\n\nOne MSC serves a number of BSCs."},{"_id":"398ce1c5f0df896630000256","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"398cdf08f0df896630000252","content":"###### Base Transceiver Station (BTS)\n\nIt is a station or site where antennas and radio transmitters and receivers are placed to create a radio coverage area in the mobile network.\n\nContains one or more transceivers (TRC) and antennas.\n\nThe cell site has a 360 degree omni-directional (omni-sector) antenna that is turned to create a cellular area of a specific size.\n\nOmni-sector means the same frequencies are used in all directions.\n\nCommunication from the mobile terminal to the cell site is referred to as uplink.\n\nCell site to mobile terminal is downlink"},{"_id":"398ce058f0df896630000254","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398cdf08f0df896630000252","content":"###### Mobile Station (MS)\n\nMobile phone with ME and SIM.\n\nIt consists of the mobile equipment (uniquely identified by International Mobile Equipment Identity (IMEI)\n\nThe SIM card contains the International Mobile Subscriber Identity (IMSI) used to identify the subscriber to the system, a secret key for authentication and other information.\n\nThe IMEI and the IMSI are independent, thereby allowing personal mobility.\n\nThe SIM card may be protected against unauthorised by a password or PIN."},{"_id":"398cdf8ff0df896630000253","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398cde36f0df896630000251","content":"##### Network Switching Subsystem\n\nContains the network elements MSC, LR, VLR, EIR, AuC and GMSC."},{"_id":"398ce37ef0df896630000257","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398cdf8ff0df896630000253","content":"###### Mobile Switching Centre (MSC)\n\nPrimary service delivery node for GSM and central components of NSS.\n\nIt provides all the functionality needed to handle a mobile subscriber, such as:\n\n* Registraion\n* Authentication\n* Sets up and releases the end-to-end connection\n* Location Updating\n* Handovers\n* Cell routing and roaming subscribers\n\nHLR and VLR, together with the MSC, provide the call-routing and roaming capabilities of GSM.\n\nIt takes care of charging and real time pre-paid account monitoring.\n\nThese services are provided in conjunction with several functional entities, which together form the Network Switching Subsystem (NSS). \n\nThe MSC provides the connection to the fixed networks (such as the PSTN or ISDN). "},{"_id":"398d0539f0df89663000025d","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"398cdf8ff0df896630000253","content":"###### Home Location Register (HLR)\n\nThe database that contains a subscription record for each subscriber of the GSM network.\n\nAll the administrative information related to each subscriber registered in the respective communication network, including the current location of the subscriber, is contained in the HLR.\n\nThe HLR is responsible for the sending of subscription data to the VLR (during registration)\nor GMSC (during mobile terminating call handling).\n\nThe location of the mobile is typically in the form of the signalling address of the VLR associated with the mobile station. \n\nA GSM subscriber is normally associated with one particular HLR. \n\nThere is logically one HLR per GSM network, although it may be implemented as a distributed database.\n"},{"_id":"398ce428f0df896630000258","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398cdf8ff0df896630000253","content":"###### Visitor Location Register (VLR)\n\nThe database that contains subscriber data for subscribers registered in a MSC.\n\nIt contains all the temporary information about the subscribers. \n\nThis information is needed by the MSC to service the visiting subscribers.\n\nEvery MSC contains a VLR. Although MSC and VLR are individually addressable.\n\nThey are always contained in one integrated node."},{"_id":"398d08ebf0df89663000025e","treeId":"361777d2f26949dff8000005","seq":1,"position":2.5,"parentId":"398cdf8ff0df896630000253","content":"###### Equipment Identity Register (EIR)\n\nA database of all valid mobile equipment on the network.\n\nWhere each mobile station is identified by its International Mobile Equipment Identity (IMEI). \n\nAn IMEI is marked as invalid if it has been reported stolen or is not type approved."},{"_id":"398ce4e2f0df896630000259","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398cdf8ff0df896630000253","content":"###### Authentication Centre (AuC)\n\nA protected database that stores a copy of the secret key stored in each subscriber's SIM card which is used for authentication and encryption."},{"_id":"398d0977f0df89663000025f","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"398cdf8ff0df896630000253","content":"######Gateway MSC (GMSC)\n\nSwitching entity that controls mobile terminating calls.\n\nWhen a call is estabished towards a GSM subscriber, a GMSC contacts the HLR of that subscriber, to obtain the address of the MSC where that subscriber is currently registered.\n\nThat MSC address is used to route the call to that subsciber"},{"_id":"398d115af0df896630000261","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398cde36f0df896630000251","content":"##### GSM Interfaces"},{"_id":"398d11a4f0df896630000262","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398d115af0df896630000261","content":"###### A Interface\n\nThe connection between MSC and BSC."},{"_id":"398d11f9f0df896630000263","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398d115af0df896630000261","content":"###### Abis Interface\n\nThe connection between BSC and BTS."},{"_id":"3bc19328dfb2d0e8ef0002eb","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398d115af0df896630000261","content":"######D interface\n\nThe connection between MSC and HLR."},{"_id":"3bc193bcdfb2d0e8ef0002ec","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"398d115af0df896630000261","content":"###### Um interface\n\nThe radio connection between MS and BTS."},{"_id":"398ce57ff0df89663000025a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398cd964f0df89663000024f","content":"#### Cell\n\nCellular telephony derives its name from the partition of geographical area into small cells.\n\nA cell is roughly circular (exactly hexagonal) area with a central transmitter and receiver base station.\n\nThe size and shape of each cell is determined by the features of the surrounding area, such as buildings, trees and hills, which can block signals.\n\nIn a city, there are many small cells, while rural areas may have very large cells."},{"_id":"398ce9e6f0df89663000025b","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"398cd964f0df89663000024f","content":"#### Sector\n\nSite coverage (cell) is partitioned into different directions called sectors.\n\nEach cell is usually split into tree sectors. Which overlap with other sectors of neighbouring cells so network is uninterrupted."},{"_id":"398d12b8f0df896630000265","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"398cd964f0df89663000024f","content":"#### Switched Communications Networks\n\nLong distance transmission between stations (called end devices) is typically done over a network of switching nodes.\n\nSwitching nodes do not concern with content of data.\n\nTheir purpose is to provide a switching facility that will move the data from node to node until they reach their destination.\n\nA collection of nodes and connections forms a communications network.\n\nIn a switched communications network, data entering the network from a station is routed to the destination by being switched from node to node."},{"_id":"398d1706f0df896630000266","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398d12b8f0df896630000265","content":"##### Circuit Switching Network\n\nA dedicated radio channel is allocated to a single transmission\n\nAs long as data transmissions are long and continuous (file transfers) a circuit is used efficiently.\n\nHowever, most data transmissions are bursty, and dedicating an entire circuit to them is usually a waste of valuable wireless bandwidth. \n\nDuring idle periods when no data is being sent, bandwidth is still dedicated to the user and not available for others to use."},{"_id":"398d1a2ef0df896630000267","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398d12b8f0df896630000265","content":"##### Packet Switching Network\n\nAn entire network may be designed just for packet data.\n\nPackets do not have a dedicated path, it is decided by the routers.\n\nMost old wireless data systems offered minimal data rates, usually in the 10Kbps range. However new wireless protocols bond multiple channels to increase data rates."},{"_id":"398d2037f0df896630000268","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"398cd964f0df89663000024f","content":"#### Multiple Access (Multiplexing) Protocol\n\nMobile development is facing the major problem to find protocols that could be used to maximise bandwidth efficiently.\n\nMultiple access enables ..."},{"_id":"398d2216f0df896630000269","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398d2037f0df896630000268","content":"##### Frequency Division Multiple Access (FDMA)"},{"_id":"398d22bcf0df89663000026a","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398d2037f0df896630000268","content":"##### Time Division Multiple Access (TDMA)"},{"_id":"398d240cf0df89663000026b","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398d2037f0df896630000268","content":"##### Code Division Multiple Access (CDMA)\n\nEach user is assigned a different psuedorandom binary sequence that modulates the carrier, spreading the spectrum of the waveform, giving each user a unique code pattern."},{"_id":"398d2699f0df89663000026c","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"398cd964f0df89663000024f","content":"#### Cellular Generations\n\n..."},{"_id":"398d26eef0df89663000026d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398d2699f0df89663000026c","content":"##### 1G"},{"_id":"398d278cf0df89663000026e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398d2699f0df89663000026c","content":"##### 2G\n\n"},{"_id":"398d2f39f0df896630000272","treeId":"361777d2f26949dff8000005","seq":1,"position":2.5,"parentId":"398d2699f0df89663000026c","content":"##### 2.5G"},{"_id":"398d2f74f0df896630000273","treeId":"361777d2f26949dff8000005","seq":1,"position":2.75,"parentId":"398d2699f0df89663000026c","content":"##### 2.75G"},{"_id":"398d27caf0df89663000026f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398d2699f0df89663000026c","content":"##### 3G"},{"_id":"398d2e9bf0df896630000271","treeId":"361777d2f26949dff8000005","seq":1,"position":3.5,"parentId":"398d2699f0df89663000026c","content":"##### 3.5G"},{"_id":"398d2ff1f0df896630000274","treeId":"361777d2f26949dff8000005","seq":1,"position":3.75,"parentId":"398d2699f0df89663000026c","content":"##### 3.75G/Pre-4G"},{"_id":"398d2a65f0df896630000270","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"398d2699f0df89663000026c","content":"##### 4G"},{"_id":"3617ca078d057d230c000028","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617c5578d057d230c00001f","content":"## Standards\n\n*The ISO OSI model.*"},{"_id":"3753de6153e9cb831900009e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617ca078d057d230c000028","content":"### IEEE 802 Standards\n\n![IEEE 802](http://misc.alexanderdbrown.com/ieee802.png \"IEEE 802\")\n\nEncapsulation at each level.\n\n![IEEE 802 Standards](http://misc.alexanderdbrown.com/802-standards.png \"IEEE 802 Standards\")\n"},{"_id":"380c5b433abd4d4800000115","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617ca078d057d230c000028","content":"### Data Link and Physical Layer\n\nMore hardware-based layers.\n\nData Link layer could be divided into two sub-layers:\n\n1. Logical Link Control (LLC)\n2. Media Access Control (MAC)\n\nLLC is more software orientated and interacts with higher layers.\n\nMAC is more hardware orientated and interacts with lower layer.\n\n(R)ARP protocol links hardware addresses to logical addresses at the Network layer."},{"_id":"380c9e023abd4d4800000117","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"380c5b433abd4d4800000115","content":"#### Physical Layer\n\nDefines:\n\n* Physical and electrical properties of the media\n* Mechanical properties of the connectors\n* Bit representation by the signals (encoding)\n* Transmission rate\n* Physical topology\n* Transmission mode\n\n"},{"_id":"380cdcfb3abd4d4800000118","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"380c5b433abd4d4800000115","content":"#### Data Link Layer\n\nDefines:\n\n* Encoding bits into packets prior to transmission\n* Decoding the packets back into bits at the destination\n* Flow control\n* Error control (**A**utomatic **r**epeat re**q**uest (ARQ))\n* Access control\n* Hardware addressing\n* Defining physical layer standards\n"},{"_id":"380d189e3abd4d480000011c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"380cdcfb3abd4d4800000118","content":"##### Logical Link Control\n\n* Frames the Network layer packet\n* Identifies the Network layer protocol.\n\nProvides multiplexing and demultiplexing to and from the network layer.\n\nManages flow control and error control."},{"_id":"380d19f43abd4d480000011d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"380cdcfb3abd4d4800000118","content":"##### Media Access Control\n\n* Addresses the frame\n* Marks the beginning and ending of the frame\n\nManaged access control.\n\nRelated to the MAC address."},{"_id":"380cfa9c3abd4d480000011a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"380c5b433abd4d4800000115","content":"#### LAN Technologies\n\n* Ethernet\n* Fast Ethernet\n* Gig Ethernet\n* 10 Gig Ethernet\n* WiFi\n* FDDI\n* Token Ring\n* ATM LANE"},{"_id":"380cfd9f3abd4d480000011b","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"380c5b433abd4d4800000115","content":"#### WAN Technologies\n\n* X.25\n* Frame Relay\n* T-carrier\n* ISDN\n* DSL Technologies\n* SONET/SDH\n* ATM"},{"_id":"380c77eb3abd4d4800000116","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617ca078d057d230c000028","content":"### OSI Layers\n\nProtocol Data Unit (PDU) is a term to define any one of the following:\n\n* Data (at Application, Presentation and Session layers)\n* Segment (at Transport layer)\n* Packet (at Network layer)\n* Frame (at Data Link Layer)\n* Bits (at Physical Layer)\n\nEach layer, with the exception of the physical layer, adds its own header. This is done because each layer has its own specific function."},{"_id":"3617cadc8d057d230c000029","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617c5578d057d230c00001f","content":"## Unicast Network Level Protocols\n\n*Unicast Network Level Protocols in use in today's Internet. Including further study of protocols such as IPv4, ICMP, ARP, RARP used in unicast applications and IPv4 and IGMP used in multicast applications.*"},{"_id":"381b2986f59be20f78000129","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3617cadc8d057d230c000029","content":"### Internet Protocol version 4 (IPv4)"},{"_id":"370605bf46f243bdf300006e","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"381b2986f59be20f78000129","content":"#### IP Headers\n\nOrganised in octlets as bytes didn't used to be just 8 bits long.\n\nIPv4 designed for 32 bits.\n\n![IPv4 Header from wikipedia](http://misc.alexanderdbrown.com/ipv4.png)\n\nVersion indicates the version of the IP protocol\n\nTime to live stops network loops.\n\nHeader checksum to check the integrity of the header but not the data. Very basic checksum which is used by the router to ensure the packet has not be damaged. \n\nThis does add significant load to the router, not only this, but due to TTL it has to create a new checkum without much gain. There are better checksums to be used and they do not appear in IPv6."},{"_id":"37064cdd46f243bdf3000070","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"381b2986f59be20f78000129","content":"#### The IP Address\n\nTied to an interface, not an actual machine.\n\nCommon to have multiple interfaces (eth0, wlan0, etc.)\n\nCan have multiple addresses on a single interface."},{"_id":"37065d6046f243bdf3000071","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"381b2986f59be20f78000129","content":"#### Classes of Network\n\n5 classes.\n\n* Class A - 0, 7 bits netid, 24 bits hostid many host.\n* Class B - 10, 14 bits netid, 16 bits hostid\n* Class C - 110, 21 bits netid, 8 bits hostid many network.\n* Class D\n* Class E - intended for future use\n\nClass Es will never be used because of Microsoft and lack of value."},{"_id":"37067ba946f243bdf3000072","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"381b2986f59be20f78000129","content":"#### Special Addresses\n\n* X.X.255.255 = Broadcast Address\n* X.X.0.0 = Network\n* 255.255.255.255 = Limited broadcast address, used in auto-configuration (e.g. DHCP)"},{"_id":"37068b2346f243bdf3000073","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"381b2986f59be20f78000129","content":"#### Network masks\n\nIF you own the address:\n\n10.0.0.0\n\nBut want to share the address so that:\n\n10.1.0.0 and 10.2.0.0 are different networks.\n\n10.0.0.0 is a class A address. therefore is is actually: 10.0.0.0/8.\n\nSo if we change the networks to: 10.1.0.0/16 the network id will be expanded to the first 16 bits."},{"_id":"370645d646f243bdf300006f","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"381b2986f59be20f78000129","content":"#### Loopback Interface\n\nMost TCP implementations have a loopback interface with the IP address 127.0.0.1 (127.X) and name localhost (or anything else in /etc/hosts which specifies 127.X as an address).\n\nThe localhost behaves as a separate data link interface,\n\nA packet that is sent to the loopback interface moves down the protocol stack and is returned back by the driver software for the localhost \"device\".\n\nUsed for debugging.\n\nLoopback is done in software, never appears on the network."},{"_id":"3706967b46f243bdf3000074","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"381b2986f59be20f78000129","content":"#### Subnets: An example\n\nTake the university address:\n\n144.124.76.0\n\nSay we want a network per department, can't use a 24 bit address as that doesn't leave enough addresses.\n\nSo they can use a 22 bit network id.\n\n144.124.76.30/22 or 144.124.76.30/255.255.252.0\n\nApply the mask 255.255.252.0 to the IP address to get the host id. Invert for the host address.\n\nNetwork address is: 144.124.76.0\n\nBut what's the broadcast address?\n\n144.124.79.255\n\n*(Look at the bits for this)*\n\nHere, 255.255.252.0 is the subnet mask.\n\nUsed to be allowed to have subnet masks like 255.0.255.255 as it doesn't add anything."},{"_id":"375465a453e9cb83190000a3","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"381b2986f59be20f78000129","content":"#### Classless Interdomain Routing (CIDR) - Supernetting\n\nTreat two contiguous class C networks as a single network.\n\nThis eases routing (supernets). For example supernet on geographic locations to make routing tables easier at a router level.\n\nUsual class C is /24, we make them a /23 if we have to contiguous networks\n\nThis is the answer to the 192 soup.\n\nNon-contiguous versions of this are disallowed. Must choose numbers for which the maths works."},{"_id":"37547cec53e9cb83190000a4","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"381b2986f59be20f78000129","content":"#### Private Address Space\n\nThere are some special IP addresses\n\n* e.g. loopback\n\nRFC 1918 written when started IP addresses to reserve certain IP addresses:\n\nThese can be used for private addressing schemes, but not routable on the internet.\n\n* 10.0.0.0 - 10.255.255.255 (10/8)\n* 172.16.0.0 - 172.31.255.255 (172.16/12)\n* 192.168.0.0 - 192.168.255.255 (192.168/16)\n\n"},{"_id":"375489c453e9cb83190000a5","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"381b2986f59be20f78000129","content":"#### Network Address Translation\n\nRouter has a pool of public IP addresses, when a private IP address attempts to access an external resource. The router maps the private IP address to a public IP address which accesses the resource and returns. The public IP address is then translated back to the private IP address and routed.\n\nIn industry the pool may be a class C network. In home networks there is only a pool of one. They also do port address translation."},{"_id":"37624f5357ba3edb0d0000b0","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617cadc8d057d230c000029","content":"### Address Resolution Protocol (ARP)\n\nIPv4 has the problem that we know *our* IP address and the ones which we want to talk to, either router or machines on the link.\n\nVery first header is the Ethernet header, need this because every machine would need to look at the IP header, which is a process which needs to be done in software. Other network protocols exist too.\n\nEthernet headers can be processed in hardware.\n\nEthernet headers don't contain much, but the machines can automate the process of deciding to ignore the packet in firmware not by the CPU.\n\nThere is a problem of mapping IPv4 address to Ethernet address. There's no direct link between IP addresses and Ethernet addresses so we need more at the data link layer."},{"_id":"3762678357ba3edb0d0000b2","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37624f5357ba3edb0d0000b0","content":"#### ARP Packets\n\n![ARP Packet](http://misc.alexanderdbrown.com/arp.png \"ARP Packet\")\n\nARP is cached for a limited amount of time.\n\nIf no reply, retransmit after stand-off."},{"_id":"37b09a7708046c1dcd0000eb","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3762678357ba3edb0d0000b2","content":"##### Hardware Type\n\nWhich type of hardware are we using"},{"_id":"37b09b0a08046c1dcd0000ec","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3762678357ba3edb0d0000b2","content":"##### Protocol Type\n\nARP can be used with other protocols (other than IP)."},{"_id":"37b09be608046c1dcd0000ed","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3762678357ba3edb0d0000b2","content":"##### Hardware Size & Protocol Size\n\nSize of the addresses (hardware and protocol).\n\nDoesn't map just MAC addresses, etc."},{"_id":"37b09f9808046c1dcd0000ef","treeId":"361777d2f26949dff8000005","seq":1,"position":3.5,"parentId":"3762678357ba3edb0d0000b2","content":"##### Sender Hardware/IP Address\n\nHardware address is repeated as the Ethernet header is harder to access in software."},{"_id":"37b09de308046c1dcd0000ee","treeId":"361777d2f26949dff8000005","seq":1,"position":3.625,"parentId":"3762678357ba3edb0d0000b2","content":"##### Operation\n\nCode to differentiate request/reply.\n\n1. ARP Request\n2. ARP Reply\n3. RARP Request\n4. RARP Reply\n\nRARP - Reverse ARP (looking up IP from MAC). Can be used to discover the machine's own IP address, for example.\n\nUsed before DHCP."},{"_id":"37b0a11308046c1dcd0000f0","treeId":"361777d2f26949dff8000005","seq":1,"position":3.75,"parentId":"3762678357ba3edb0d0000b2","content":"##### Target Hardware Address\n\nIf unknown to the sender, filled with 0s, otherwise the actual address"},{"_id":"37b0a1f508046c1dcd0000f1","treeId":"361777d2f26949dff8000005","seq":1,"position":3.875,"parentId":"3762678357ba3edb0d0000b2","content":"##### Target IP Address\n\nThe address being looked for"},{"_id":"37b0c6e008046c1dcd0000f2","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37624f5357ba3edb0d0000b0","content":"#### ARP Delay\n\nFirst packet:\n\n1. ARP Request.\n2. Processing Time\n3. ARP Reply\n4. ICMP Echo Request\n5. ICMP Echo Reply\n\nFollowing packets:\n\n1. ICMP Echo Request\n2. ICMP Echo Reply"},{"_id":"37b0c96f08046c1dcd0000f3","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37624f5357ba3edb0d0000b0","content":"### Fooling ARP\n\nLocate an interface in promiscuous mode, ARP request not broadcast, a dummy address is used.\n\nSome TCP/IP stacks pass the ARP request up the line.\n\nA reply indicates a machine is in promiscuous mode.\n\nneped"},{"_id":"37b0ee4c08046c1dcd0000f5","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"37624f5357ba3edb0d0000b0","content":"### Gratuitous ARP\n\nA host sends a request for its own MAC.\n\nThe sender's IP and MAC address are broadcast, and other hosts will insert this mapping into their ARP tables.\n\nUseful to detect duplicate IP addresses (should be no reply).\n\nCauses other hosts to update their ARP cache (useful if the network adapter has been changed or if this is a hot spare)."},{"_id":"37b0dc3708046c1dcd0000f4","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"37624f5357ba3edb0d0000b0","content":"#### Why switched networks are not safe\n\nMan-in-the-Middle attacks.\n\n![](http://upload.wikimedia.org/wikipedia/commons/thumb/e/e7/Man_in_the_middle_attack.svg/200px-Man_in_the_middle_attack.svg.png)\n\nARP allows for MITMA as the IP and MAC are learned by the switch. Sending out a false ARP reply **last** will allow you to to spoof the IP address to your MAC address."},{"_id":"37b0f5ef08046c1dcd0000f6","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"37624f5357ba3edb0d0000b0","content":"#### Proxy ARP\n\nSame problems with MITMA"},{"_id":"37625bb357ba3edb0d0000b1","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617cadc8d057d230c000029","content":"### MAC Addresses (IEEE 802)\n\n![MAC Address](http://misc.alexanderdbrown.com/mac.png \"MAC Address\")\n\n* Gotcha: each Octet of MAC frame transmitted low order first (back-to-front).\n* I/G - Individual (0), Group (1) - Unicast or Multicast\n* U/L - Universal (0), Local (1) "},{"_id":"37be77cb9212a51edd000100","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617cadc8d057d230c000029","content":"### Internet Control Message Protocol (ICMP)\n\nThe Internet Control Message Protocol (ICMP) is the protocol used for error and control messages in the Internet\n\nICMP provides an error reporting mechanism of routers to the sources.\n\nAll ICMP packets are encapsulated as IP datagrams."},{"_id":"37be83b39212a51edd000103","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37be77cb9212a51edd000100","content":"#### ICMP Message Types\nICMP messages are either query messages or error messages. \n\n* ICMP query messages:\n * Echo request / Echo reply\n * Router advertisement / Router solicitation\n * Timestamp request / Timestamp reply\n * Address mask request / Address mask reply\n* ICMP error messages:\n * Host unreachable\n * Source quench\n * Time exceeded \n * Parameter problem"},{"_id":"37be860f9212a51edd000104","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37be77cb9212a51edd000100","content":"#### Message Codes\n\nSpecific to message type.\n\nE.g. for message type 3 (destination unreachable):\n\n* 0 = network unreachable\n* 1 = host unreachable\n* 3 = port unreachable \n* 4 = fragmentation needed but don’t fragment bit is set\n* Etc"},{"_id":"37be87c39212a51edd000105","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37be77cb9212a51edd000100","content":"#### ICMP Error Codes\n\nEach ICMP error message contains the header and at least the first 8 bytes of the IP datagram payload that triggered the error message.\n\nTo avoid too many ICMP messages, ICMP error messages are not sent\n\n* for multiple fragments of the same IP datagrams\n* in response to an error message\n* in response to a broadcast packet"},{"_id":"37be8c769212a51edd000106","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37be77cb9212a51edd000100","content":"#### ICMP Codes\n\n![](http://misc.alexanderdbrown.com/icmp-codes.png)"},{"_id":"37be8dd19212a51edd000107","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"37be77cb9212a51edd000100","content":"#### Echo Request/Reply Message Format\n\nIdentifier is set to process the ID of querying process.\n\nSequence numbers are created for each new echo request."},{"_id":"37bea1489212a51edd000108","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"37be77cb9212a51edd000100","content":"#### Port unreachable error\n\nReply telling that a port is not available.\n\nNetwork scanners may make use of this, e.g. NMAP.\n\nMany hosts will not reply."},{"_id":"37beb0499212a51edd000109","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617cadc8d057d230c000029","content":"### Traceroute\n\nSends out ICMP ping messages with increasing TTL starting at 1. For each host that isn't the target, an ICMP time exceeded message is sent back.\n\nOn UNIX uses the port unreachable message instead (using a UDP packet) by default."},{"_id":"381aa3bdf59be20f7800011c","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617cadc8d057d230c000029","content":"### Fragmentation\n\nIf a packet needs to be split then a flag is set to say \"more fragments\". Identification is the same through the fragments. More fragments flag is not set for the last fragment, but is known to be a fragment due to the fragmentation offset.\n\nIf a part of a fragment is missing, after an amount of time packet loss is assumed.\n\nOccurs if MTU < datagram size to be sent out on an interface, \"Don't fragment\" flag allowed: causes ICMP \"Destination unreachable: fragmentation needed but don't fragment bit set\".\n\nReassembly takes place at destination.\n\nFragments may be fragmented.\n\nExperience shows that fragmentation is best avoided."},{"_id":"381ab38af59be20f7800011e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"381aa3bdf59be20f7800011c","content":"#### Avoiding Fragmentation\n\n* Never send a datagram which is greater than the minimum MTU maximum size it can be sent wholly.\n* Path MTU discovery to make sure you never send a datagram which is grater than the smallest MTU maximum size."},{"_id":"381abdc6f59be20f7800011f","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"3617cadc8d057d230c000029","content":"### Path MTU Discovery\n\nIntermediate routers may have lower MTUs.\n\nUses ICMP uncreachable Error: Fragmentation Required\n\nping -s n -M do:\n\n* Set packet size and \"do not fragment\" bi\n* Returns \"message too long\" is s > MTU.\n* RFC 1191 has likely values\n\ntraceroute.pmtu\n\n* Version of tracerout that automates discovery.\n\nFirewalls can break PMTU discovery."},{"_id":"381ae6f6f59be20f78000122","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"3617cadc8d057d230c000029","content":"### Sock Traffic Generator\n\nSock is a test program which can be run as a client or as a server."},{"_id":"381af0f0f59be20f78000124","treeId":"361777d2f26949dff8000005","seq":1,"position":15,"parentId":"3617cadc8d057d230c000029","content":"### Ping\n\nTTL doesn't always start at 255, might be around 64 but not standardised.\n"},{"_id":"381af40cf59be20f78000125","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"381af0f0f59be20f78000124","content":"#### Ping through a router\n\nRouters have many different interfaces. This means, with traceroute, only the nearside interface can be found.\n\nThere is a record route option which can find this: ping -R"},{"_id":"3617cb628d057d230c00002a","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617c5578d057d230c00001f","content":"## Unicast Routing in the Internet\n\n*Example routing problems. Interior and exterior routing protocols. Protocols covered will include RIP, OSPF and BGP.*"},{"_id":"39da4a801ebd467fb900028c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617cb628d057d230c00002a","content":"### IP Routing\n\nSplit into two parts:\n\n1. Packet Forwarding or Packet Switching\n2. Routing"},{"_id":"39da4c9a1ebd467fb900028d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39da4a801ebd467fb900028c","content":"#### Packet Forwarding\n\nNeeds to be fast and efficient, every packet involves a forwarding option.\n\nBased on prior knowledge the packet is moved towards the destination."},{"_id":"39da4e981ebd467fb900028e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39da4a801ebd467fb900028c","content":"#### Routing\n\nFilling routing tables. This requires knowledge of the connectivity in some sense.\n\nThis needs to be stable and should converge relatively quickly.\n\nThis task should not be performed frequently"},{"_id":"39da53b11ebd467fb900028f","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617cb628d057d230c00002a","content":"### Classifying Routes\n\nRoutes can be classified into three different categories:\n\n1. Default Routes\n2. Static Routes\n3. Dynamic Routes\n\nCould also classify by interior and exterior routing."},{"_id":"39da54101ebd467fb9000290","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39da53b11ebd467fb900028f","content":"#### Default Routes\n\nA default route which is used as a fallback if all other routing fails."},{"_id":"39da54741ebd467fb9000291","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39da53b11ebd467fb900028f","content":"#### Static Routes\n\nManually configured information.\n\nNot very scalable."},{"_id":"39da54ad1ebd467fb9000292","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39da53b11ebd467fb900028f","content":"#### Dynamic Routes\n\nAutomatically use information from other participating routers."},{"_id":"39da565f1ebd467fb9000293","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617cb628d057d230c00002a","content":"### Routing Algorithms/Protocols\n\nDifferent methods for finding out routes."},{"_id":"39da57161ebd467fb9000294","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39da565f1ebd467fb9000293","content":"#### Distance View Routing\n\nUses the Bellman-Ford algorithm.\n\nRegularly broadcast the entire routing table, containing known networks and the \"distance\" to each (usually a number of hops).\n\nHas the problem of routing loops and convergence after change."},{"_id":"39da6f991ebd467fb9000298","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"39da565f1ebd467fb9000293","content":"#### Routing Internet Protocol (RIP)\n\nUses Distance View Routing"},{"_id":"39da71a71ebd467fb9000299","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39da6f991ebd467fb9000298","content":"##### RIPv1 (RFC 1058)\n\nClassful routing with no ability to pass netmasks.\n\nTypically broadcasts every 30 seconds.\n\nMetrics range from 1 to 16 (infinity).\n\n\"Split Horizon\" often used.\n\n\"Triggered Updates\" send an update when something (close) changes to improve convergence.\n\nSent via UDP to the IP broadcast address (usually) to port 520."},{"_id":"39e9214a52982f5a190002d1","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39da71a71ebd467fb9000299","content":"###### Single Splint Horizon\n\nDon't repeat information to the originator."},{"_id":"39e92b4f52982f5a190002d2","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39da71a71ebd467fb9000299","content":"###### Poison Reverse Horizon\n\nRepeat back information, but metric is set to infinity"},{"_id":"39da71da1ebd467fb900029a","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39da6f991ebd467fb9000298","content":"##### RIPv2 (RFC 1723)\n\nRefinement of RIPv1.\n\nIncludes netmasks and some support for authentication and multicast."},{"_id":"39da576b1ebd467fb9000295","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39da565f1ebd467fb9000293","content":"#### Link State Routing\n\nEach router sends the state of all its links to all adjacent routers.\n\n* Link State Advertisements (LSA)\n\n<!-- .. -->\n\nEach router independently calculates its routing table based on the link state database it has constructed.\n\nNormally uses Dijkstra Shortest Path (Shortest Path First)."},{"_id":"3a368ec6a6c7d193b80002c6","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39da576b1ebd467fb9000295","content":"#### Open Shortest Path First (OSPF)\n\nUses IP directly.\n\nEarly versions could calculate a different set of routes for each value of the IP Type-Of-Service (ToS) field, but this was abandoned in the latest RFC.\n\nInterfaces have a dimension-less costs (these were potentially different for each value of ToS).\n\nSupports equal cost load balancing.\n\nSupports subnet mask and thus CIDR.\n\nPoint-to-point links can be used without IP addresses.\n\nSupports authentication\n\nUses multicasting to reduce load.\n\nOn a multi-access network (e.g. ethernet), two routers are elected as Designated Router and Backup Designated Router."},{"_id":"39da57d71ebd467fb9000296","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39da565f1ebd467fb9000293","content":"#### IP Address Class Based Only"},{"_id":"39da587d1ebd467fb9000297","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"39da565f1ebd467fb9000293","content":"#### Classless Inter-domain Routing"},{"_id":"3617cbe88d057d230c00002b","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617c5578d057d230c00001f","content":"## Multicast Routing in the Internet\n\n*Example routing problems. Protocols covered will include PIM-DM, PIM-SM and MSDP. We will also cover the role of the Rendezvous Point, Anycast IP, and issues still under debate in the technical community.*"},{"_id":"397eab97a81803594100023a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617cbe88d057d230c00002b","content":"### Multicast\n\nRefers to the sending of data from one to many or many to many registered recipients.\n\nContrast to broadcast, which floods the network with data, which all hosts will receive whether they want it or not.\n\nUnicast is the sending of data to a single recipient.\n\nUnlike unicast, multicast is scalable,if ten clients request a connection then unicast must provide those ten connections with their own copy of the data.\n\nMulticast, whether there are 1, 10 or 100 members of a ground, only one copy of the data is transmitted and is only replicated where there are group members on different paths to and from the router."},{"_id":"397eb233a81803594100023b","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617cbe88d057d230c00002b","content":"### Media Access Control (MAC)\n\nAll devices have a unique 48-bit MAC address.\n\nDevices on the LAN keep a table that maps unicast IP to MAC.\n\nA special range of MAC addresses is used for multicast as a multicast address does not correspond to a single end host."},{"_id":"397ecd29a81803594100023c","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617cbe88d057d230c00002b","content":"### 1:32 IP Multicast to MAC Multicast Mapping\n\nClass D address range: 224.0.0.0 - 239.255.255.255\n\nHigh order 4 bits of the first octet of a class D address are always 1110 (0xE)\n\nTo provide a 1:1 mapping between MAC and multicast IP addresses the remaining 28 bits of the IP address would need a unique representation in MAC addresses.\n\nMAC address range assigned for multicast is only 24 bits. The high order bit is reserved, leaving 23 bits.\n\nThus, 28 bits of IP addresses need to be mapped to just 23 bits of the MAC address.\n\nThis corresponds to a 1:32 mapping MAC multicast addresses to IP multicast addresses."},{"_id":"397ed783a81803594100023d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"397ecd29a81803594100023c","content":"#### Translation\n\nSix octets in an Ethernet header. Three high order octets are constant 01-00-5E.\n\nThe remaining three octets have a range of 00-00-00 to 7F-FF-FF (high order bit is always 0 for IP multicast.\n\nAn IP address of 224.1.1.1 maps to 01-00-5E-01-01-01. Byt the MAC address also maps to 31 other IP addresses."},{"_id":"398c5a20f0df89663000023a","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"397ecd29a81803594100023c","content":"#### Host Behaviour Reception\n\nDiscarding of unwanted packets has to be handled by the IP stack.\n\nHosts interesting in 224.1.1.1 will also receive (if on LAN) the other 31 possibilities.\n\nAfter de-capsulation the Ethernet fram and discovering the IP address of an unwanted packet, the host discards the packet.\n\nThe probability of this are quite slim at the moment"},{"_id":"398c5f8ff0df89663000023b","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617cbe88d057d230c00002b","content":"### Special Multicast Addresses\n\n"},{"_id":"398c6000f0df89663000023c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398c5f8ff0df89663000023b","content":"#### Local Network Control Block\n\n224.0.0.0 - 244.0.0.255 (224.0.0.0/24)\n\nShould never leave the local network."},{"_id":"398c619cf0df89663000023e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398c5f8ff0df89663000023b","content":"#### Internetwork Control Block\n\n224.0.1.0 - 244.0.1.255 (244.0.0.1/24)"},{"_id":"398c6381f0df89663000023f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398c5f8ff0df89663000023b","content":"#### Session Description Protocol (SDP)/Session Announcement Protocol (SAP) Block\n\n224.2.0.0 - 224.2.255.255 (224.2/16)"},{"_id":"398c668af0df896630000241","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"398c5f8ff0df89663000023b","content":"#### Source Specific Multicast\n\n232.000.000.000 - 232.255.255.255\n\nSpecifically permit or block source addresses."},{"_id":"398c681cf0df896630000242","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"398c5f8ff0df89663000023b","content":"#### GLOP Block\n\n233.000.000.000 - 233.255.255.255\n\nEnsure that addresses are specific to an administrative domain. Low number of specific addresses (255)."},{"_id":"398c6ab0f0df896630000243","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"398c5f8ff0df89663000023b","content":"#### Administratively Scoped\n\n239.000.000.000 - 239.255.255.255\n\nPrivate multicast addresses."},{"_id":"398c757ff0df896630000244","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617cbe88d057d230c00002b","content":"### IP Group Management\n\nProtocol used is Internet Group Management Protocol (IGMP)\n\n* IGMPv1 - RFC1112\n* IGMPv2 - RFC2236\n* IGMPv3 - RFC3376"},{"_id":"398c7a28f0df896630000245","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398c757ff0df896630000244","content":"#### IGMPv1\n\nNo explicit leave message.\n\nIGMP Report Suppression"},{"_id":"398c7abbf0df896630000246","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398c7a28f0df896630000245","content":"##### Membership Queries\n\nSent by routers to ask for existence of hosts interested in receiving multicast groups."},{"_id":"398c7bbaf0df896630000247","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398c7a28f0df896630000245","content":"##### Membership Reports\n\nSent by hosts in response to Queries,\n\nAlso sent by the host if they wish to join a new group."},{"_id":"398c877ef0df896630000248","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398c7a28f0df896630000245","content":"##### Message Format\n\n![](http://routemyworld.com/wp-content/uploads/2009/01/igmpv1header.png)"},{"_id":"398c9480f0df896630000249","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398c757ff0df896630000244","content":"#### IGMPv2\n\nMajor change, introduces an explicit Leave Message"},{"_id":"398c959af0df89663000024a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398c9480f0df896630000249","content":"##### Membership Queries\n\nGeneral Query as before.\n\nGroup-Specific Query. Used to query if there are any members of a group left after a leave message."},{"_id":"398cb13af0df89663000024b","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"398c757ff0df896630000244","content":"#### IGMPv1 and IGMPv2 Interoperability\n\nIGMPv2 Hosts **must** send IGMPv1 if they spot an IGMPv1 router is the querier.\n\nIGMPv2 Hosts **may** suppress Leave Messages if they spot an IGMPv1 router is the querier.\n\nIGMPv2 Hosts **must** suppress reports if they see others using IGMPv1 or IGMPv2 reports for a given group.\n\nIGMPv2 routers **must** ignore Leave messages if IGMPv1 hosts are present.\n\nIf any IGMPv1 routers are present must use IGMPv1"},{"_id":"398cb6acf0df89663000024c","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"398c757ff0df896630000244","content":"#### IGMPv3\n\nMajor change: supports the specification of sources in messages.\n\nHost now do **not** suppress Reports.\n\nThus, supports the concept of Source Specific Multicast.\n\nProtocol messages are now more complex."},{"_id":"398cb7bdf0df89663000024d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"398cb6acf0df89663000024c","content":"##### Membership Queries\n\nNow contain source address information."},{"_id":"398cb859f0df89663000024e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"398cb6acf0df89663000024c","content":"##### Membership Reports\n\nNow contain information relating to multiple groups and each group report can contain source address information."},{"_id":"3a4569cb1699d499000002cf","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617cbe88d057d230c00002b","content":"### Multicast Distribution Trees\n\nThe set of links and connections that traffic will follow to get to a destination."},{"_id":"3a4572ac1699d499000002d0","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a4569cb1699d499000002cf","content":"#### Source Trees\n\nSometimes called Shortest Path Trees (SPT)\n\nA tree where the root is the source of the data.\n\nA different forwarding tree for every combination of source (S) and group (G). N groups and M sources implies ![](http://smarturl.it/math?M\\times~N\\) trees.\n\nThis makes it difficult to calculate the best tree.\n\nRouters need to maintain separate states for all trees.\n\n(S,G) notation."},{"_id":"3a4572fb1699d499000002d1","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3a4569cb1699d499000002cf","content":"#### Shared Trees\n\nRendezvous Point Trees or Core Based Trees.\n\nTraffic follows some form of common path, unlike source trees in which two different trees can send data through different paths, at least most of the route will follow a common tree.\n\nEach group in the system uses the same tree. N trees implies N groups, no matter how many sources.\n\nNormally, each group has a nominated router as the Rendezvous Point, which is the root of the tree.\n\nAll sources send towards the Rendezvous Point.\n\nCan potentially lead to a single point of failure if no backup is specified.\n\n(*, G) Notation"},{"_id":"3a45937c1699d499000002d2","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617cbe88d057d230c00002b","content":"### Multicast Forwarding\n\nRouters must no just forward all multicast traffic. Potentially there could be customers anywhere, unlike with unicast. However, forwarding all multicast would be broadcast instead and would lead to chaos.\n\nTechniques include:\n\n* Reverse Path Forwarding\n* Multicast Forwarding Caches\n* TTL Thresholds\n* Administratively Scoped Boundaries"},{"_id":"3a4597d61699d499000002d3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a45937c1699d499000002d2","content":"#### Reverse Path Forwarding\n\nNote the source address of the arriving packet and interface of arrival. The IP tables are checked for the correct interface towards the source.\n\nIf the packet has arrived into the expected interface, it can be forwarded onwards. If not it can be discarded."},{"_id":"3a4598361699d499000002d4","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3a45937c1699d499000002d2","content":"#### Multicast Forwarding Caches\n\nUsed to help avoid some RPF calculations\n\nSometimes called multicast routing tables.\n\nUsed to help make decisions for routing tables."},{"_id":"3a4598811699d499000002d5","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3a45937c1699d499000002d2","content":"#### TTL Thresholds\n\nTTL normally used by IP and decremented as each router passed. When this TTL reaches zero, the packet is dropped.\n\nMulticast routers often set TTL Thresholds on interfaces, if the TTL of the packet is less than this threshold then the packet isn't forwarding.\n\nIf traffic was only designed to reach internal locations, the TTL would be set such that it could reach all internal routers, but external routers would have high enough threshold to stop this traffic, but not those expected to reach external locations."},{"_id":"3a4598be1699d499000002d6","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3a45937c1699d499000002d2","content":"#### Administratively Scoped Boundaries\n\nThese boundaries don't pass certain multicast addresses."},{"_id":"3a45ad341699d499000002d7","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617cbe88d057d230c00002b","content":"### Multicast Routing Protocols"},{"_id":"3a45ad741699d499000002d8","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a45ad341699d499000002d7","content":"#### Dense Mode Protocol\n\nSend all valid packets out of all interfaces, flooding the network.\n\nWhen a router receives unwanted packets it sends a prune message upstream.\n\nWhen a prune message is received, the router removes the interface it was received on from the forwarding table for the specified group.\n\nPrune times out in typically 2 to 3 minutes."},{"_id":"3a45ae7e1699d499000002db","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a45ad741699d499000002d8","content":"##### DVMRP"},{"_id":"3a45af0c1699d499000002dc","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3a45ad741699d499000002d8","content":"##### Protocol Independant Multicast - Dense Mode (PIM-DM)\n\n"},{"_id":"3a45add41699d499000002d9","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3a45ad341699d499000002d7","content":"#### Sparse Mode Protocol\n\nRouters send no traffic onwards unless asked.\n\nShared tree branch constructed from rendezvous point (root) to any interested receiver.\n\nJoin messages are sent from the receiver to the root via other routes, creating a shared tree where it goes.\n\nPrune sent when the traffic is no longer wanted."},{"_id":"3a45af621699d499000002dd","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a45add41699d499000002d9","content":"##### Protocol Independant Multicast - Sparse Mode (PIM-SM)\n\nHas a rendezvous point using a shared tree, but uses source trees to get data from sources to the rendezvous point. Also allows the final router feeding receivers to switchover to a source tree from the source if the traffic level exceeds some threshold (in Cisco routers the default value for the threshold is zero)."},{"_id":"3a45afa01699d499000002de","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3a45add41699d499000002d9","content":"##### CBT"},{"_id":"3a45ae2b1699d499000002da","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3a45ad341699d499000002d7","content":"#### Link State Protocol"},{"_id":"3a45afdd1699d499000002df","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a45ae2b1699d499000002da","content":"##### MOSPF"},{"_id":"3617ccd68d057d230c00002c","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617c5578d057d230c00001f","content":"## Transport Level Protocols\n\n*An in-depth study addressing the behaviour of TCP and UDP. Connection establishment and termination, flow control under various load conditions, timeouts and retransmission, newer features and performance.*"},{"_id":"381b2319f59be20f78000127","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3617ccd68d057d230c00002c","content":"### User Datagram Protocol (UDP)\n\nRFC 768\n\n* Datagram orientated\n* Unreliable, connectionless\n* Simple\n* Unicast and multicast\n* Useful for only a few application\n* Used a lot for services\n\nNo handshake required which allows it to be fast, especially for many short connections.\n\nApplications must handle failures."},{"_id":"381b42b1f59be20f7800012e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"381b2319f59be20f78000127","content":"#### UDP Header\n\n![UDP Header](http://misc.alexanderdbrown.com/udp-header.png \"UDP Header\")\n\nChecksum is the same as the IPv4 checksum, but is over the UDP header, the data, and the UDP pseudo header"},{"_id":"381b4618f59be20f7800012f","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"381b42b1f59be20f7800012e","content":"##### IPv4 UDP Pseudo Header\n\n![IPv4 UDP Pseudo Header](http://misc.alexanderdbrown.com/udp-pseudo-header.png \"IPv4 UDP Pseudo Header\")"},{"_id":"381b5be7943b23bc1a000128","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"381b42b1f59be20f7800012e","content":"##### IPv6 UDP Pseudo Header\n\n![IPv6 UDP Pseudo Header](http://misc.alexanderdbrown.com/ipv6-udp-pseudo-header.png \"IPv6 UDP Pseudo Header\")"},{"_id":"381b60d2943b23bc1a000129","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"381b2319f59be20f78000127","content":"#### Example: Trivial File Transfer Protocol (TFTP)\n\nTFTP used UDP, uses a stop-and-wait flow window control algorithm:\n\n* Stop for ACK before sending the next data packet\n* A lost packet causes timeout and retransmission.\n\nDesigned for diskless systems to download configuration files during bootstrapping.\n\nDoes waste a lot of network time."},{"_id":"381b239ef59be20f78000128","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"3617ccd68d057d230c00002c","content":"### Transmission Control Protocol (TCP)\n\n* Stream orientated\n* Reliable, connection-orientated\n* Complex\n* Only unicast\n* Used for most internet applications\n\nDone by creating connections between two points and aim to provide data integrity.\n\nAlso provides flow control."},{"_id":"381b7d646522c93d1300012a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"381b239ef59be20f78000128","content":"#### TCP Header\n\n![TCP Header](http://misc.alexanderdbrown.com/tcp-header.png \"TCP Header\")"},{"_id":"3869ac0764ffa6b70b000140","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"381b7d646522c93d1300012a","content":"##### Source Port Number"},{"_id":"3869ace564ffa6b70b000141","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"381b7d646522c93d1300012a","content":"##### Destination Port Number"},{"_id":"3869ad4864ffa6b70b000142","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"381b7d646522c93d1300012a","content":"##### Sequence Number\n\nEnsures ordering of packets (is actually a byte count of the first byte count in the packet of data).\n\nDoesn't start at 1."},{"_id":"3869ad9164ffa6b70b000143","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"381b7d646522c93d1300012a","content":"##### Acknowledgement Number\n\nHelps find missing packets, is the last byte of the packet."},{"_id":"3869adf364ffa6b70b000144","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"381b7d646522c93d1300012a","content":"##### Header Length\n\nDescribes the length of the header."},{"_id":"3869ae2964ffa6b70b000145","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"381b7d646522c93d1300012a","content":"##### Reserved"},{"_id":"3869b39164ffa6b70b000150","treeId":"361777d2f26949dff8000005","seq":1,"position":6.5,"parentId":"381b7d646522c93d1300012a","content":"##### Flags"},{"_id":"3869bffa64ffa6b70b000151","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3869b39164ffa6b70b000150","content":"###### Urgent (URG)\n\nThe value in the Urgent field is valid."},{"_id":"3869c05764ffa6b70b000152","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3869b39164ffa6b70b000150","content":"###### Acknowledge (ACK)\n\nThe value in the Acknowledge field is valid."},{"_id":"3869c0b064ffa6b70b000153","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3869b39164ffa6b70b000150","content":"###### Push (PSH)\n\nPush the data up to the application as quickly as possible."},{"_id":"3869c34864ffa6b70b000154","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3869b39164ffa6b70b000150","content":"###### Reset (RST)\n\nReset the connection"},{"_id":"3869c3b464ffa6b70b000155","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3869b39164ffa6b70b000150","content":"###### Synchronise (SYN)\n\nUsed to set up connections"},{"_id":"3869c42464ffa6b70b000156","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3869b39164ffa6b70b000150","content":"###### Finish (FIN)\n\nUsed to tear down connections"},{"_id":"3869afd964ffa6b70b00014c","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"381b7d646522c93d1300012a","content":"##### Window Size"},{"_id":"3869b00b64ffa6b70b00014d","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"381b7d646522c93d1300012a","content":"##### TCP Checksum\n\nSame as UDP Checksum"},{"_id":"3869b05564ffa6b70b00014e","treeId":"361777d2f26949dff8000005","seq":1,"position":15,"parentId":"381b7d646522c93d1300012a","content":"##### Urgent Pointer"},{"_id":"3869b09964ffa6b70b00014f","treeId":"361777d2f26949dff8000005","seq":1,"position":16,"parentId":"381b7d646522c93d1300012a","content":"##### Options"},{"_id":"3869c9b964ffa6b70b000158","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"381b239ef59be20f78000128","content":"#### Connections\n\nHow TCP establishes, keeps and tears down connections."},{"_id":"3877699fc986b2fb8a000156","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3869c9b964ffa6b70b000158","content":"##### States\n\n![](http://upload.wikimedia.org/wikipedia/commons/thumb/a/a2/Tcp_state_diagram_fixed.svg/796px-Tcp_state_diagram_fixed.svg.png)"},{"_id":"387769d7c986b2fb8a000157","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3877699fc986b2fb8a000156","content":"###### Listening\n\nWaiting for a connection"},{"_id":"38776a40c986b2fb8a000158","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3877699fc986b2fb8a000156","content":"###### SYN Sent\n\nWaiting for acknowledgement of the first send of a SYN"},{"_id":"38776b7ec986b2fb8a000159","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3877699fc986b2fb8a000156","content":"###### SYN Received\n"},{"_id":"38776c52c986b2fb8a00015b","treeId":"361777d2f26949dff8000005","seq":1,"position":3.5,"parentId":"3877699fc986b2fb8a000156","content":"###### Established"},{"_id":"38776c07c986b2fb8a00015a","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3877699fc986b2fb8a000156","content":"###### FIN Wait 1\n\nWait for an ACK of a sent FIN"},{"_id":"38776cf8c986b2fb8a00015c","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3877699fc986b2fb8a000156","content":"###### FIN Wait 2\n\nWait for a FIN from an acknowledged FIN."},{"_id":"38776e9fc986b2fb8a00015d","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3877699fc986b2fb8a000156","content":"###### Close Wait\n\nAcknowledged a FIN but still need the connection to send data."},{"_id":"38776ecfc986b2fb8a00015e","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3877699fc986b2fb8a000156","content":"###### Last ACK\n\nFinal FIN sent, waiting for the last ACK."},{"_id":"38776f8dc986b2fb8a00015f","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3877699fc986b2fb8a000156","content":"###### Time Wait\n\nFinal FIN received and ACK sent, wait for a number of seconds before closing.\n\nDone in case the ACK is not received by the other party."},{"_id":"38776fbdc986b2fb8a000160","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3877699fc986b2fb8a000156","content":"###### Closed\n\nNot listening, connection closed."},{"_id":"38778816c986b2fb8a000163","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"3869c9b964ffa6b70b000158","content":"##### Wait States\n\nTIME_WAIT is also called the 2MSL wait state.\n\n* MSL - Maximum segment life.\n* RFC 793 specifies MSL as 2 minutes.\n* 30 seconds, 1 minute, 2 minutes are common implementations.\n\n"},{"_id":"3869ca3364ffa6b70b000159","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3869c9b964ffa6b70b000158","content":"##### Connection Establishment\n\n1. **Server** listens on a given port (no network traffic).\n2. **Client** sends a TCP packet with the SYN flag set to a random number.\n3. **Server** receives the SYN, the 0 offset is the value of the SYN flag. Server goes into SYN Received state.\n4. **Server** sends a TCP packet with a different SYN flag and an ACK flag, returning the Client's SYN flag plus one*.\n5. **Client** returns an ACK flag.\n\n\n\\* The SYN flag is assumed to have consumed 1 byte.\n\nIf no ACK is received at SYN Received state then the SYN is resent after a timeout.\n\nKnown as the *three way handshake*.\n\n**Note:** Initial sequence numbers are important! Both client and server choose different ISNs."},{"_id":"38776535c986b2fb8a000155","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"3869c9b964ffa6b70b000158","content":"##### Half-Open\n\nWhen you have a connection between two machines, but one crashes. There's no data sent between them so one still believes it is connected."},{"_id":"38778306c986b2fb8a000161","treeId":"361777d2f26949dff8000005","seq":1,"position":1.75,"parentId":"3869c9b964ffa6b70b000158","content":"##### Simultaneous Open\n\nPossible (but unlikely) that two applications will perform active open to one another. Not Client/Server, each opens to a known port.\n\nResults in a single open connection.\n\nFour-way handshake required."},{"_id":"3869f61464ffa6b70b00015a","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3869c9b964ffa6b70b000158","content":"##### Connection Termination\n\n1. **Client** sends a FIN\n2. **Server** sends an AWK and a FIN\n3. **Client** sends an AWK.\n\n*Three way closedown*.\n\nACK and FIN might not be sent together (server might still be transmitting data)."},{"_id":"38776344c986b2fb8a000154","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3869c9b964ffa6b70b000158","content":"##### Half-Close\n\nWhen a FIN is sent to the server but there is still more data to be sent should not close fully until a FIN AWK is sent and the AWK returned. Microsoft broke this by sending a RST instead of a proper AWK"},{"_id":"387785a6c986b2fb8a000162","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3869c9b964ffa6b70b000158","content":"##### Simultaneous Close\n\nBoth sides of a connection might perform an active close.\n\nFour segments required, which s not unusual."},{"_id":"38778c57c986b2fb8a000164","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"381b239ef59be20f78000128","content":"#### TCP Options\n\nTCP Header also supports options.\n\nOriginally only MSS, NOOP and EOS were specified."},{"_id":"38778ed4c986b2fb8a000166","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"38778c57c986b2fb8a000164","content":"##### End of Option List (0)"},{"_id":"38778f64c986b2fb8a000167","treeId":"361777d2f26949dff8000005","seq":1,"position":0.75,"parentId":"38778c57c986b2fb8a000164","content":"##### No Operation (NOOP) (1)"},{"_id":"38778e1cc986b2fb8a000165","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38778c57c986b2fb8a000164","content":"##### Maximum Segment Size (MSS) (2)\n\nLength is 4\n\n2 byte MSS. Usually based on the MTU size."},{"_id":"3877908dc986b2fb8a000168","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38778c57c986b2fb8a000164","content":"##### Window Scale Factor (3)\n\nLength is 3\n\n1 byte shift count."},{"_id":"387791aac986b2fb8a000169","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38778c57c986b2fb8a000164","content":"##### Timestamp (4)\n\nLength is 10\n\n4 bytes timestamp value\n4 bytes timestamp echo reply"},{"_id":"3877939ec986b2fb8a00016b","treeId":"361777d2f26949dff8000005","seq":1,"position":3.5,"parentId":"381b239ef59be20f78000128","content":"#### Bulk Data Transfer\n\nBulk data transfer (e.g. FTP) has different requirements.\n\nLow overhead from headers.\n\nReceiving systems have limited buffers.\n\nSliding windows used for flow control.\n\nPacket loss is expensive; timeouts are the simplest way, but there are better.\n\nWant to send as many packets as possible without flooding the network."},{"_id":"3877d2dbc986b2fb8a000171","treeId":"361777d2f26949dff8000005","seq":1,"position":3.75,"parentId":"381b239ef59be20f78000128","content":"#### Flow Control In TCP for Bulk Data Transfer\n\nSliding window flow control is carried out by the receiver.\n\nCWND flow control is carried out by the receiver.\n"},{"_id":"38779338c986b2fb8a00016a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3877d2dbc986b2fb8a000171","content":"##### Sliding Windows Flow Control\n\nThe idea is that in every ACK we also advertise a window. The window is a number of bytes, usually a multiple of the MSS.\n\nThe initial window size will be the size of the buffer TCP has available.\n\nSender can send up to the limit of the window.\n\nWhen a segment is acknowledged, the window slides making another slot in the window available.\n\nThe window is said to close when the left-hand edge moves to the right.\n\nThe window is said to open when the right-hand edge moves to the right.\n\nThe window is said to shrink if the right-hand edge moves to the left."},{"_id":"3877ccb7c986b2fb8a000170","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"38779338c986b2fb8a00016a","content":"###### Window Scaling\n\nScale factor is actually a shift.\n\nLargest scaling factor is 14 (maximum window size of 1,073,741,823 bytes).\n\nRemember this increases the size of the header.\n\nUsed for high capacity networks.\n\nRFC 1323, TCP Extensions for High Performance."},{"_id":"3877be76c986b2fb8a00016e","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38779338c986b2fb8a00016a","content":"###### Calculating Optimal Window Size\n\nCan never reach optimal capacity but can approach it."},{"_id":"3877bf23c986b2fb8a00016f","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38779338c986b2fb8a00016a","content":"###### Bandwidth delay product\n\nCapacity(bits) = bandwidth (bits/s) * RTT (sec)\n\nIncrease Round Trip Time (RTT) and data travels more slowly, thus higher capacity.\n\nLikewise increased bandwidth involves higher capacity.\n\nMax window size of 65535 bytes, but window scale option can increase this to 1024MB.\n\nAround 10% of the capacity is a good size for the TCP buffer size."},{"_id":"38c63fbdf7d3b285720001c0","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3877d2dbc986b2fb8a000171","content":"##### TCP Slow Start (RFC 2001)\n\nIntermediate routers must queue packets - congestion may occur at routers.\n\nCongestion window (CWND).\n\n1. Initially set to 1 segment (based on announced MSS).\n2. On first ACK, increase CWND by 1 segments of bytes.\n3. Now 2 segments are sent and ACK'd. CWND is increased to 4 segments.\n4. Exponentiall increase until peak flow reached or router discards packets.\n5. Sender can transmit up to the minimu of the sliding window size and CWND.\n\nHas two phases:\n\n1. Exponential increase.\n2. Linear increase.\n\nBased on a threshold (the slow start threshold).\n\nDrops drastically when there is packet loss."},{"_id":"38c64b445a916b48280001bd","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3877d2dbc986b2fb8a000171","content":"##### Fast Retransmit and Fast Recovery (TCP Reno)\n\nProblem: TCP timeouts lead to idle periods.\n\nFast retransmit: use 3 duplicate ACKs to trigger retransmission.\n\nFast recovery: start CWND at SSTHRESH and do incremental increase after fast retransmit."},{"_id":"38d3b48bcbad28f3150001bd","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38c64b445a916b48280001bd","content":"###### Problems with Fast Retransmit and Fast Recovery\n\nWiFi and very fast networks.\n\nCan be a problem on high capacity networks."},{"_id":"38d3c42acbad28f3150001be","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3877d2dbc986b2fb8a000171","content":"#### TCP Westwood +\n\nImproved congestion control algorithm for fast, high latency links and lossy links.\n\nCan take many hours to reach optimal throughput with TCP Reno as packet loss has a large affect on throughput.\n\nWestwood carries out end to end bandwidth estimate (BWE) using received ACKs and RTT monitoring.\n\nTCP Reno overreacts to random loss by cutting cwnd in half.\n\nA small fraction of random packet loss does not impact the BWE.\n\nThus the ssthresh remains unchanged, allowing Westwood to be much more efficient than Reno."},{"_id":"38d3c5eacbad28f3150001bf","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38d3c42acbad28f3150001be","content":"###### On ACK Reception\n\nIncrease cwnd according to Reno algorithm.\n\nEstimate available bandwidth."},{"_id":"38d3c6fdcbad28f3150001c0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38d3c42acbad28f3150001be","content":"###### When 3 Duplicate ACKs received\n\n![](http://www.texify.com/img/%5Cnormalsize%5C%21%5Ctext%7BSsthresh%7D%20%3D%20%5Ctext%7Bmax%7D%5Cleft%282%2C%20%5Cfrac%7B%5Ctext%7BBWE%7D%20%5Ctimes%20%5Ctext%7BRTT%7D_%7B%5Ctext%7Bmin%7D%7D%7D%7B%5Ctext%7BSeg%5C_size%7D%5Cright%29.gif)\n\ncwnd is then set to ssthresh."},{"_id":"38d3d721cbad28f3150001c1","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38d3c42acbad28f3150001be","content":"###### On RTO (coarse timeout)\n![](http://www.texify.com/img/%5Cnormalsize%5C%21%5Ctext%7BSsthresh%7D%20%3D%20%5Ctext%7Bmax%7D%5Cleft%282%2C%20%5Cfrac%7B%5Ctext%7BBWE%7D%20%5Ctimes%20%5Ctext%7BRTT%7D_%7B%5Ctext%7Bmin%7D%7D%7D%7B%5Ctext%7BSeg%5C_size%7D%5Cright%29.gif)\n\ncwnd is then set to 1."},{"_id":"38d3e782cbad28f3150001c2","treeId":"361777d2f26949dff8000005","seq":1,"position":4.375,"parentId":"381b239ef59be20f78000128","content":"#### Flow Control in TCP for Interactive Data Transfer\n\nInteractive data transfer can result in many small segments which, together with their ACKs, can lead to congestion.\n\nACKs are, therefore, piggybacked onto data segments - delayed ACKs.\n\nNagle's algorithm result in some collection of data to produce larger segments."},{"_id":"38d3eddfcbad28f3150001c3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38d3e782cbad28f3150001c2","content":"##### Nagle Algorithm\n\nMany small datagrams results in very large overhead.\n\nCan cause congestion, particularly on a WAN.\n\n* Only one outstanding segement not ACK'd\n* Cannot send any more small segments until ACK received.\n* Whilst waiting for ACK, TCP will collect small segments together to send as a single segment.\n* On a fast network, more segments are sent.\n* On a congested network less segments are sent, but data still get through (with less overhead).\n\nSometimes desirable to disable Nagle algorithm, e.g., X mouse movements need to be sent without delay."},{"_id":"3877ac76c986b2fb8a00016c","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"381b239ef59be20f78000128","content":"#### Persist Timer\n\nKeeps window size information flowing even if the other end closes its receive window.\n\nPossible situation where an ACK is lost and both ends waiting.\n\n* Sender waiting for acknowledgement with window update so that it can send more data.\n* Receiver waiting to receive the data as it indicated a non-zero window in the acknowledgement that go lost.\n\nSending TCP uses a persist timer to periodically query the receiver to see if the window size has updated."},{"_id":"3877be59c986b2fb8a00016d","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"381b239ef59be20f78000128","content":"#### Timeout and Retransmission\n\nFundamental to the use of acknowledgements is the need for timeout and re-transmission of packets.\n\nTCP keeps four different timers for a connection and performs exponential backoff when a packet goes unacknowledged.\n\nTCP also has a congestion avoidance algorithms to complement the slow start algorithm to cope with packet loss caused by congestion."},{"_id":"38c5f78af7d3b285720001b7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3877be59c986b2fb8a00016d","content":"##### Timers"},{"_id":"38c5f7dcf7d3b285720001b8","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38c5f78af7d3b285720001b7","content":"###### Retransmission Timer\n\nUsed when expecting an acknowledgement from the other end."},{"_id":"38c5f8aff7d3b285720001b9","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38c5f78af7d3b285720001b7","content":"###### Persist Timer\n\nKeeps window size information flowing even if the other end closes its receive window."},{"_id":"38c5f9b9f7d3b285720001ba","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"38c5f78af7d3b285720001b7","content":"###### Keepalive Timer\n\nDetects when the other end of a connection has crashed or re-booted."},{"_id":"38c5faf8f7d3b285720001bb","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"38c5f78af7d3b285720001b7","content":"###### 2MSL Timer"},{"_id":"38c608aef7d3b285720001bd","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3877be59c986b2fb8a00016d","content":"##### Round Trip Time Measurement\n\nUsed to calculate retransmission timeout (RTO).\n\nMean deviation is used to allow arithmetic to be carried out with integers and without square roots.\n\n![](http://www.texify.com/img/%5Cnormalsize%5C%21Err%20%3D%20M%20-%20A%5C%5CA%20%5Cleftarrow%20A%20%2B%20gErr%20%5C%5C%20D%20%5Cleftarrow%20D%20%2B%20h%20%28%20%7C%20Err%20%7C%20-%20D%20%29%5C%5C%20RTO%20%3D%20A%20%2B%204D.gif)\n\nWhere:\n\n* D is the smoothed mean deviation\n* M is the latest measured RTT value\n* Gain (g) for average is set to 1/8\n* Gain (h) for deviation is set to 1/4"},{"_id":"38c6219ff7d3b285720001be","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3877be59c986b2fb8a00016d","content":"##### Karn's Algorithm\nIf a packet times out and there is a retransmission, when an ACK is received, whose was it.\n\nKarn's algorithms specifies that RTT estimate cannot be update when a timeout and retransmission occur.\n\nRe-use the RTO after such an exponential back off until an acknowledgement is received."},{"_id":"38d3ff26cbad28f3150001c4","treeId":"361777d2f26949dff8000005","seq":1,"position":0.8125,"parentId":"3617ccd68d057d230c00002c","content":"### Transactional Transmission Control Protocol (T/TCP) RFC 1644\n\nTCP for transactions.\n\nNearly as fast as UDP."},{"_id":"38d401c5cbad28f3150001c5","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"38d3ff26cbad28f3150001c4","content":"#### TCP Accelerated Open (TAO)\n\nReduces minimum number of packets required to three in many circumstances.\n\nData and FIN are piggybacked on the ACK.\n\nConnection Count (CC) used to avoid duplicate SYNs.\n\nSecurity issues caused due to this."},{"_id":"38d40510cbad28f3150001c6","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"38d3ff26cbad28f3150001c4","content":"#### Truncation of TIME_WAIT State\n\n2MSL state is abandonded.\n\n8 times RTO used instead.\n\nAllows retransmission of final ACK.\n\nA new incarnation of the same connection, using TAO, implicitly acknowledges the ACK of FIN."},{"_id":"381b4248f59be20f7800012d","treeId":"361777d2f26949dff8000005","seq":1,"position":0.875,"parentId":"3617ccd68d057d230c00002c","content":"### Port Numbers\n\n..."},{"_id":"3705d3a146f243bdf300006b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617ccd68d057d230c00002c","content":"### Demultiplexing\n\nLayered like the OSI model (but pre-dates the OSI model).\n\nEthernet driver captures the incoming frame, strips the Ethernet header and passes to IP\n\nIP layer strips out the IP header and passes it to the transport layer, etc.\n\nLevels:\n\n* Application\n* Transport\n* Network\n* Link\n* Physical\n\nThe process of moving things up and down layers is demultiplexing and multiplexing."},{"_id":"3705eaa946f243bdf300006d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617ccd68d057d230c00002c","content":"### Data Encapsulation\n\nDon't sent arbitrary length methods, to allow the multiplexing of networking.\n\n(In TCP) Data is encapsulated into frames, frames have a frame header, trailer and a datagram.\n\nThis datagram contains an IP Header and a segment or protocol data unit (PDU)\n\nThe PDU has the (TCP) protocol header and the actual data.\n\nThe frame header is used to drop the packet onto the local link. The address used in the frame header is embedded in the hardware in the network card (MAC address), this is why the IP address is not used. This is for efficiency.\n\nFrame headers are: source address, destination address, protocol and checksum."},{"_id":"3617cd8b8d057d230c00002d","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617c5578d057d230c00001f","content":"## Naming and Directory Services\n\n*Including the DNS and LDAP and their use.*"},{"_id":"3922415ee49a79aaf60001e4","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617cd8b8d057d230c00002d","content":"### Domain Name Service (DNS)\n\nA distributed database mapping hostnames to IP addresses and vice versa."},{"_id":"392258b9e49a79aaf60001e7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3922415ee49a79aaf60001e4","content":"#### How DNS is used\n\n* Applications access the information in the DNS by way of resolver programs\n * gethostbyname() returns an IP address in response on a hostname\n * gethostbyaddr() returns a hostname in response to an IP address.\n* People access information by way of client programs\n * nslookup\n * dig\n* Common implementation of DNS client and server is BIND (Berkeley Internet Domain Server).\n * Server is **named**\n* The DNS defines a protocol (see RFCs) that is used for communication between client and server."},{"_id":"39226521e49a79aaf60001e8","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3922415ee49a79aaf60001e4","content":"#### The DNS namespace\n\nDNS is stored as a tree:\n\n![](http://bio3d.colorado.edu/tor/sadocs/dns/dns-1.png)\n\n13 canonical name servers which server information for the root \"unnamed\" root."},{"_id":"3922712ee49a79aaf60001e9","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39226521e49a79aaf60001e8","content":"##### .arpa\n\nA special domain which is used for reverse lookup.\n\nNow .ipv6"},{"_id":"392287c5e49a79aaf60001ea","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39226521e49a79aaf60001e8","content":"##### Fully qualified domain names\n\nwww.google.com. is a fully qualified domain name. Missing the trailing . allows the DNS to lookup other entries based on the domain it resides on."},{"_id":"39229024e49a79aaf60001eb","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3922415ee49a79aaf60001e4","content":"#### DNS Lookup\n\nIs a recursive process and therefore quite slow. Results are cached to improve performance.\n\nTo try and reduce the effects of this when changing hostnames the TTL of the cache is reduced prior to performing this."},{"_id":"3922aaf8e49a79aaf60001ec","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3922415ee49a79aaf60001e4","content":"#### Name Ownership\n\nNo one company owns all names"},{"_id":"3922ac60e49a79aaf60001ed","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3922415ee49a79aaf60001e4","content":"#### Name Server Zones and Boundaries\n\nCan have zones within a name server."},{"_id":"393004d481763cde3d0001ee","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3922415ee49a79aaf60001e4","content":"#### Resource Record\n\nThis is where DNS gets its information from.\n\n![](http://www.tcpipguide.com/free/diagrams/dnsrrformat.png)\n\nExamples:\n\n3www4aber2ac2uk0\n\n3www6google3com0\n\nThe 0 occurs because the top-level domain has no name. This is how the end of the string is reached."},{"_id":"3930056881763cde3d0001ef","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"393004d481763cde3d0001ee","content":"##### SOA\n\nName of primary source of info for zeon"},{"_id":"393005fb81763cde3d0001f0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"393004d481763cde3d0001ee","content":"##### A\n\nIP address of host"},{"_id":"3930063b81763cde3d0001f1","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"393004d481763cde3d0001ee","content":"##### CNAME\n\nCanonical name"},{"_id":"3930069181763cde3d0001f2","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"393004d481763cde3d0001ee","content":"##### PTR\n\nAlias for an IP address for reverse lookups"},{"_id":"3930072a81763cde3d0001f3","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"393004d481763cde3d0001ee","content":"##### MX\n\nMail exchange information"},{"_id":"3930078d81763cde3d0001f4","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"393004d481763cde3d0001ee","content":"##### NS\n\nThe Name of the nameserver"},{"_id":"393007e281763cde3d0001f5","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"393004d481763cde3d0001ee","content":"##### AAAA\n\nIPv6 address of host"},{"_id":"3930087981763cde3d0001f6","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"393004d481763cde3d0001ee","content":"##### A6\n\nExperimental IPv6 address."},{"_id":"393008ee81763cde3d0001f7","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"393004d481763cde3d0001ee","content":"##### HINFO\n\nHost information (CPU and OS)."},{"_id":"3930096e81763cde3d0001f8","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"393004d481763cde3d0001ee","content":"##### LOC\n\nLocation of host."},{"_id":"39224320e49a79aaf60001e6","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"3617cd8b8d057d230c00002d","content":"### Dynamic Host Configuration Protocol (DHCP)"},{"_id":"39db1a4e1ebd467fb900054b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39224320e49a79aaf60001e6","content":"### DHCP Timeline\n\n![](http://www.tarunz.org/~vassilii/TAU/protocols/dhcp/alloc.gif)\n\nRequest are broadcast address 255.255.255.255.\n\nOften used during host configuration.\n\nNever forwarded by a route, by a DHCP/BOOTP relay agent can be used to forward this onto the DHCP server.\n\nReplies are routed normally."},{"_id":"392241ffe49a79aaf60001e5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617cd8b8d057d230c00002d","content":"### Lightweight Directory Access Protocol (LDAP)"},{"_id":"39dac9481ebd467fb9000548","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"392241ffe49a79aaf60001e5","content":"### The Directory Information Tree\n\nSimilar to the DNS tree, but the whole world doesn't typically use the same tree."},{"_id":"39dafc1f1ebd467fb9000549","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"392241ffe49a79aaf60001e5","content":"### The Information Model\n\nService model based on **entries**.\n\nAn **entry** is a collection of **attributes**, that has a **distinguished name (DN)**."},{"_id":"39dafe191ebd467fb900054a","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39dafc1f1ebd467fb9000549","content":"#### Attributes\n\nType/value pairs, e.g.:\n\nC = GB\n\no = University of Wales\n\nAttributes described by a schema."},{"_id":"3617ce478d057d230c00002e","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617c5578d057d230c00001f","content":"## Quality of Service\n\n*The need for and the provision of Quality of Service (QoS) within packet based networks such as the Internet which are inherently best efforts at heart.*"},{"_id":"3aa13641ec4ed0e7a00002de","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617ce478d057d230c00002e","content":"### Challenges\n\n* QoS needs to be end-to-end, involving numerous management domains.\n* QoS service should address all requirements - not just 'top quality'\n* QoS *policy* distribution, maintenance and monitoring will increase in importance.\n* Better to implement QoS earlier - provides scalability, experience. Pro-active not reactive."},{"_id":"3aa1847dec4ed0e7a00002e0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617ce478d057d230c00002e","content":"### Queueing Disciplines\n\nWays in which resources can be allocated to priority traffic best."},{"_id":"3aa184c1ec4ed0e7a00002e1","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3aa1847dec4ed0e7a00002e0","content":"#### Priority Queue\n\nOther queues only get any resources at all when the priority queue is empty.\n\nSimple and effective.\n\nTraffic must be policed to stay within low limit as other traffic can get starved or the priority queue reverts to Best Effort"},{"_id":"3aa187fcec4ed0e7a00002e2","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3aa1847dec4ed0e7a00002e0","content":"#### Weighted Round Robin\n\nMultiple queues, each queue gets a guaranteed minimum of resource even under congestion conditions.\n\nCan be combined with Priority Queues."},{"_id":"3617cf298d057d230c00002f","treeId":"361777d2f26949dff8000005","seq":1,"position":12,"parentId":"3617c5578d057d230c00001f","content":"## Security Issues\n\n*The inherent risks within networks such as the Internet, cracking, viruses, trojans, worms and denial of service attacks. The role of the Firewall and the problems it can bring.*"},{"_id":"39e888be52982f5a190002c4","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617cf298d057d230c00002f","content":"### Data Encryption\n\nFour aspects of security to consider:\n\n1. Privacy\n2. Authentication\n3. Integrity\n4. Nonrepudiation"},{"_id":"39e89dc452982f5a190002ca","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"39e888be52982f5a190002c4","content":"#### Aspects of Security"},{"_id":"39e8976d52982f5a190002c6","treeId":"361777d2f26949dff8000005","seq":1,"position":0.125,"parentId":"39e89dc452982f5a190002ca","content":"#### Privacy\n\nSnoopers should not be able to read confidential data"},{"_id":"39e897f652982f5a190002c7","treeId":"361777d2f26949dff8000005","seq":1,"position":0.25,"parentId":"39e89dc452982f5a190002ca","content":"#### Authentication\n\nVerifies that the apparent sender really sent a message, and not an imposter."},{"_id":"39e898a952982f5a190002c8","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"39e89dc452982f5a190002ca","content":"#### Integrity\n\nVerifies that data has not been corrupted or altered in transmission"},{"_id":"39e899b652982f5a190002c9","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39e89dc452982f5a190002ca","content":"#### Nonrepudiation\n\nEnsures that the sender or receiver cannot deny sending or receiving a piece of information."},{"_id":"39e8a10152982f5a190002cb","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"39e888be52982f5a190002c4","content":"#### Encryption Techniques\n\nClassical encryption techniques:\n\n* Permutation: The order of the plaintext characters is changed\n* Substitution: a plaintext alphabet is mapped to a different one.\n\nA cipher used to perform the encryption.\n\n* Stream ciphers encrypt data bit by bit or byte by byte.\n* Block ciphers first pack data bits into a fixed length block, then encrypt the whole block into a ciphertext block."},{"_id":"39e8aa9e52982f5a190002cc","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"39e8a10152982f5a190002cb","content":"#### Symmetric Key Encryption\n\nUse a shared secret key to encrypt and decrypt.\n\nFor ![](http://smarturl.it/math?n\\) users, ![](http://smarturl.it/math?\\sum{n}\\) keys required.\n\nCan be done in hardware."},{"_id":"39e8b9f052982f5a190002cd","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"39e8a10152982f5a190002cb","content":"#### Public Key Encryption\n\nThe key is split into two: a public key and a private key.\n\nAnything encrypted by the public key can only be decrypted by the private key.\n\nThe private key must be kept private, but the public key can be shared without worry.\n\nCannot be done in hardware."},{"_id":"39e8c0de52982f5a190002ce","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"39e8a10152982f5a190002cb","content":"#### Combining Both\n\nCreate a shared secret based from public key encryption."},{"_id":"39e8cafa52982f5a190002cf","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617cf298d057d230c00002f","content":"### Transport Layer Security (TLS)\n\nClient sends a \"hello\" message with TLS version number and prefernces.\n\nServer sends a certificate including a public key.\n\n* Public key encrypted by some CAs.\n* Client has a list of CAs and their keys and uses a corresponding key to decrypt the server key.\n * This authenticates the server, unless it is self-signed.\n\nClient sends a secret key encrypted with the server's public key.\n\nServer decrypts message and then encrypts a response with secret key which the client decrypts."},{"_id":"39e8f92852982f5a190002d0","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617cf298d057d230c00002f","content":"### Hashing and Message Authentication\n\nHashing is the operation that maps the message of variable length into a hash value with fixed length.\n\nHashing is not reversible.\n\nHashing can be used to generate a digest of the message, called the Message Authentication Code.\n\nThe receiver can use the digest to verify if the message is authentic."},{"_id":"3617cffd8d057d230c000030","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3617c5578d057d230c00001f","content":"## Current and Future Issues\n\n*The (still) emerging IPv6 protocol and other active issues.*"},{"_id":"37549c8353e9cb83190000a6","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617cffd8d057d230c000030","content":"### Internet Protocol Version 6 (IPv6)\n\nProblems with IPv4 is that 32 bit addresses is too small.\n\n* 128 bit address space solves the problem for the long term.\n* Large space allows addresses to be more structured."},{"_id":"3754ab9253e9cb83190000a7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37549c8353e9cb83190000a6","content":"### An IPv6 Address\n\nfe80::2c0:dfff:fee4:bd87/10\n\nLoopback address: ::1/128\n\n:: is a string of 0s of indeterminate length.\n\nIPv4 addresses are encapsulated in IPv6 are expressed with dotted decimal for last four octlets: ::194.123.1.2\n\nIPv6 addresses are leased (possibly infinitely).\n\n#### Current Allocation\n\n* 0000 0000 - Reserved\n* 0000 001  - NSAP Allocation \n* 001  - Aggregatable Global Unicast\n* 1111 1110 10 - Link-Local Unicast\n* 1111 1110 11 - Site-Local Unicast\n* 1111 1111 - Multicast"},{"_id":"3762446057ba3edb0d0000ae","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37549c8353e9cb83190000a6","content":"### Link-Local Addresses\n\nFormat Prefix: 1111 1110 10 or FE80::/64\n\nPostfix is usually the last 24 bits of MAC address. middle byte is fffe due to IEEE standards.\n\nfe80::00ff:fe00:0000 for MAC address: 00:00:00:00:00:00"},{"_id":"37624c4c57ba3edb0d0000af","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37549c8353e9cb83190000a6","content":"### Site-Local Addresses\n\nFormat Prefix 1111 1110 11 or FEC0"},{"_id":"3a44e1f31699d499000002c8","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37549c8353e9cb83190000a6","content":"### Neighbour Discovery"},{"_id":"3a44e7f91699d499000002c9","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"37549c8353e9cb83190000a6","content":"### Router Advertisements"},{"_id":"3a44e8b11699d499000002ca","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"37549c8353e9cb83190000a6","content":"### DHCPv6\n\nWhere autoconfiguration is undesirable for operational reasons.\n\nSimilar in concept to DHCP for IPv4\n\nCompatible with autoconfiguration\n\nNodes may request multiple addresses.\n\nAuthentication of nodes.\n\nMakes use of address deprecation and reconfiguration-init message..."},{"_id":"3a44eb7c1699d499000002cc","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"37549c8353e9cb83190000a6","content":"### Co-existence and Tunnelling\n\n"},{"_id":"3a45241b1699d499000002cd","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"3617c5578d057d230c00001f","content":"## Exam Preparation\n\n*Some chances to get a feel for what is expected in the exam.*"},{"_id":"3a45255e1699d499000002ce","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3a45241b1699d499000002cd","content":"### Steve Kingston\n\ns/(Use a diagram) is necessary/\\1/g"},{"_id":"3b8ff5cd3809b9fdaf0002f1","treeId":"361777d2f26949dff8000005","seq":1,"position":15,"parentId":"3617c5578d057d230c00001f","content":"## Past Paper 2012-113"},{"_id":"3b8ff68e3809b9fdaf0002f2","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3b8ff5cd3809b9fdaf0002f1","content":"### 1. This is a question about the Transport Layer Protocols"},{"_id":"3b8ff79f3809b9fdaf0002f3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3b8ff68e3809b9fdaf0002f2","content":"#### a) With reference to the User Datagram Protocol (UDP) and the Transmission Control Protocol (TCP), describe features that are provided by transport layer protocols. In your answer distinguish between features provided just by TCP and those provided by both UDP and TCP.\n\n* Both use port numbers. Server listens of a specific port and client sends data to that port.\n* UDP Connectionless\n * No acknowledgement that data is recieved\n * Up to the application to manage successful transmission of data\n* TCP sets up a connection between two machines\n * Connection must first be established\n * All sent packets (except ACK's) must be acknowledged by the other party\n * Support for flow control using sliding window protocol\n * Must also terminate the connection\n * Protocol ensures sucessful delivery of data (or failure)."},{"_id":"3b9004493809b9fdaf0002f4","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3b8ff68e3809b9fdaf0002f2","content":"b) Describe with the aid of diagrams the TCP/IP connection establishment processes, and explain how the initial sequence number (ISN) is exchanged between two nodes during connection establishment. Label the diagrams with the TCP connection states at each stage.\n\n* Server listens on a specified port\n* Client sends a SYN packet to that with a random ISN and a receiving port number (usually fairly high).\n* Server responds to the client with an ACK with a sequence one higher than the SYN's ISN (the SYN is seen to have taken up one byte of data).\n* Server also responds with a SYN to the client, the ISN here is generated by the server and is different to the clients.\n* Client responds to the server's SYN with an ACK, again here the sequence number of this packet will be the ISN of the Servers SYN packet + 1.\n* At this point the connection is established.\n\nThe ISNs must be different as they are used to acknowledge how much data was actually received later in the connection.\n\nSequence numbers returned in the ACK are the sequence number of the acknowledge packets plus the size of that packet (which can then be used for flow control)."},{"_id":"3b90355f3809b9fdaf0002f5","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3b8ff68e3809b9fdaf0002f2","content":"#### c) What is meant by a flow control mechanism? In your answer describe the likely effect of not employing flow control on TCP connections.\n\n* Flow control used to send multiple packets of data and acknowledging them all in a single packet.\n* Flow control is also used to stop flooding the network with packets that would just be dropped by the receiver because it's buffers are full.\n\nNot using flow control would either:\n\n1. Require the sender to wait for the receiver to acknowledge a single packet before sending the next one, meaning the whole transmission would be very slow.\n2. Allow the sender to flood the network with packets which would eventually be dropped by the receiver as its buffers fill up to maximum (or by intermediary devices to the same effect). The sender would receive acknowledgements for some of the packets and would have to constantly resend dropped packets after a timeout period, leading to a lot of traffic on the network, especially when the receiver does not process the information quickly.\n"},{"_id":"3b90a3ee3809b9fdaf0002f6","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3b8ff68e3809b9fdaf0002f2","content":"#### d) Describe, with the aid of diagrams, the problem with transferring very large files using the slow start /congestion avoidance flow control mechanism on fast (e.g. gigabit) but high latency networks. Explain in your answer how the TCP Westwood+ algorithm modifies the mechanism to provide better throughput whilst retaining a concept of fair access.\n\n"},{"_id":"3b90bf2e3809b9fdaf0002f9","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"3b90a3ee3809b9fdaf0002f6","content":"* Slow start sets the window to 1 to begin with and grows it exponentially after each ACK received. Once it reaches the slow start threshold (ssthres), this growth is linear (by 1 from each ACK) - this is congestion avoidance.\n* Eventually the congestion will be encountered, and a packet will not be ACK'd before a timeout. The size of sstresh is set to one half of the current window size and then the size of the window is reset to 1. The process then repeats endlessly.\n* This tends to lead to \"sawtooth\" graphs.\n* Problem of slow start is that it has to wait for a timeout to occur before it knows congestion has occurred."},{"_id":"3b90bed43809b9fdaf0002f7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3b90a3ee3809b9fdaf0002f6","content":"* To change this, TCP Reno was implemented; if the receiver does not receive the next expected packet (i.e. it receives one with a higher sequence number than expected) it will send a duplicate ACK of the last ACK it sent.\n* If this ACK is received by the sender 3 times it triggers retransmission and will retransmit the next packet from that sequence number.\n* The receiver may then acknowledge further packets in the sequence in the next ACK.\n* Instead of reseting the window size to 1, it is started at sstresh instead and grown incramentally."},{"_id":"3b90bf513809b9fdaf0002fa","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3b90a3ee3809b9fdaf0002f6","content":"* TCP Reno still leads to sawtooth graphs, but is less affected by congestion.\n* TCP Westwood+ implemented to further improve TCP connections.\n* Westwood+ estimates the bandwidth available using received ACKs and Round Trip Time monitoring.\n* In both cases of 3 duplicate ACKs or coarse timeout, the ssthresh is set to max(2, (BWE * RTTmin) / Seg_size). The congestion window is set to ssthresh in the case of 3 dup ACKs or 1 in the case of coarse timeout.\n* A small fraction of randomly lost packets doesn't affect the BWE and therefore the ssthresh, unlike with Reno."},{"_id":"3617d47c8d057d230c000031","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":null,"content":"# SEM6120 - Introduction to Intelligent Systems\n\nThis module introduces the key ideas in Artificial Intelligence and ensures all students are at roughly the same level before moving on to the specialist modules."},{"_id":"3617d61b8d057d230c000032","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617d47c8d057d230c000031","content":"## Introduction\n\n*General introduction to Artificial Intelligence (AI), including discussion of what AI is, its history, definitions, and philosophical debates on the issue (the Turing test and the Chinese room). Ethical issues (3 hours).*"},{"_id":"3617d72c8d057d230c000033","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617d61b8d057d230c000032","content":"### Staff\n\n- **[Richard Jensen](mailto:rkj@aber.ac.uk)**\n- [Adrian Shaw](ais@aber.ac.uk)"},{"_id":"3617d8a18d057d230c000034","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617d61b8d057d230c000032","content":"### Learning Outcomes\n\n1. Describe and use the basic principles of Artificial Intelligence and Machine Learning.\n2. Be able to reflect on project needs.\n3. Practically apply AI and ML principles to meet those needs.\n4. Present the material they have learned in an informed, clear manner.\n5. Demonstrate understanding and insight into the material that they are presenting."},{"_id":"3617dad98d057d230c000035","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617d61b8d057d230c000032","content":"### Assessment\n\n- Presentation **20%** *01/10/2013-18/10/2013*\n- Report **20%** *01/10/2013-25/10/2013*\n- Essay **60%** (coding + report) *10/10/2013-01/11/2013*\n\n*Tips: if you disagree with a paper, you should comment on why, this will be a good thing :)*"},{"_id":"36e9811d1172cce9b5000043","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617d61b8d057d230c000032","content":"### Commitment\n\n* 26h seminars\n* 6h practicals\n* The rest of the time is spent on background reading and assignments."},{"_id":"36e9999f1172cce9b5000044","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617d61b8d057d230c000032","content":"### Booklist\n\n* **Artificial Intelligence: A Modern Approach** Russell, S. and Norvig, P.\n* **Artificial Intelligence: Structures and Strategies for Complex Problem Solving.** - Luger G.\n* **Artificial Intelligence Illuminated** - Coppin B."},{"_id":"36e99eb61172cce9b5000045","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617d61b8d057d230c000032","content":"### What is Artificial Intelligence?\n\n* Understand intelligent entities; learning more about ourselves?\n* Building intelligent entites; creating things which exhibit \"intelligence\".\n\nTwo ways of looking at this:\n\n* Scientific goal\n* Engineering goal\n\nMany definitions, all potentially valid.\n\nProblem: what is intelligence and how do we prove a system is intelligent."},{"_id":"36f6c43cbe9d9a30ab000046","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617d61b8d057d230c000032","content":"### Strong versus Weak AI\n\n* Strong AI can actually think intelligently.\n* Weak AI can possibly act intelligently."},{"_id":"36f6c683be9d9a30ab000047","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617d61b8d057d230c000032","content":"### Turing Test\n\nHuman interrogator talks to another system (human or AI), if the interrogator cannot tell the difference then the argument is we must acknowledge it is able to think like a human.\n\nHas not yet been passed."},{"_id":"36f6dc79be9d9a30ab000048","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617d61b8d057d230c000032","content":"### The Chinese Room\n\nBehaving intelligently may not be enough.\n\nComputers are just a symbol manipulation device and therefore cannot have mental states."},{"_id":"36f70330be9d9a30ab000049","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617d61b8d057d230c000032","content":"### Ethics and AI\n\nWe have investigated whether we *can* develop AI, but not whether we *should*.\n\nProblems of AI:\n\n* Job losses\n* Too much/little leisure\n* Privacy rights\n* Accountability\n* End of the human race?\n * Harm in the wrong hands"},{"_id":"36f71afabe9d9a30ab00004a","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617d61b8d057d230c000032","content":"### Branches of AI\n\n* Logical AI\n* Search\n* Pattern recognition\n* Representation\n* Inference\n* Common-sense knowledge and reasoning\n* Learning from experience\n* Planning\n* Epistemology\n* Ontology\n* Heuristics\n* Genetic Programming\n"},{"_id":"3617dca68d057d230c000036","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617d47c8d057d230c000031","content":"## Search\n\n*Why search is important in AI and how to go about it. This includes both informed and uninformed strategies. Evolutionary search (6 hours)*."},{"_id":"3752d7970b5069bddc000094","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617dca68d057d230c000036","content":"### Defining the Problem\n\nMany AI problems can be framed in terms of a search problem.\n\nRepresentation is very important.\n\nThe search strategy is the way in which searching is performed:\n\n* Uninformed\n* Informed (Heuristic)\n\nCan't always evaluate all the search space. Massive search space (e.g. Chess) or even infinite."},{"_id":"3753015b0b5069bddc000096","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"3617dca68d057d230c000036","content":"### Terminology\n\n"},{"_id":"37a258a467beb538300000c4","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3753015b0b5069bddc000096","content":"#### Search State\nSummarises the state of search.\n\nMay not lead to a solution.\n\n*e.g. Representation of a chess board.*"},{"_id":"37a2599867beb538300000c5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3753015b0b5069bddc000096","content":"#### Initial State\nThe first search state."},{"_id":"37a259e867beb538300000c6","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3753015b0b5069bddc000096","content":"#### Solution\nA special example of a search state. It solves the problem."},{"_id":"37a25a4167beb538300000c7","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3753015b0b5069bddc000096","content":"#### Goal State\nThe state trying to be reached."},{"_id":"37a25a7767beb538300000c8","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3753015b0b5069bddc000096","content":"#### State Space\nAll possible search states."},{"_id":"37a25aa867beb538300000c9","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3753015b0b5069bddc000096","content":"#### Successor Function\nWays to move around in the state space (action/operators)."},{"_id":"37a25adf67beb538300000ca","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3753015b0b5069bddc000096","content":"#### Goal Function\nTo check if the goal has been reached."},{"_id":"37a25b4c67beb538300000cb","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3753015b0b5069bddc000096","content":"#### Cost Function\nMeasures the path cost."},{"_id":"37533a6e0b5069bddc000097","treeId":"361777d2f26949dff8000005","seq":1,"position":1.75,"parentId":"3617dca68d057d230c000036","content":"### Search Trees\n\nVisualise the progression of a particular algorithm.\n\nShouldn't evaluate every possibility of the state space.\n\nInitial state is the root, goal is a leaf.\n\nDon't store the whole search tree. Requires a lot of space. Can discard explored nodes.\n\nStore the frontier of search (i.e. nodes in search tree with some unexplored children)."},{"_id":"37534bf40b5069bddc000098","treeId":"361777d2f26949dff8000005","seq":1,"position":1.875,"parentId":"3617dca68d057d230c000036","content":"### Evaluation"},{"_id":"37a25bf867beb538300000cc","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37534bf40b5069bddc000098","content":"#### Time Complexity\nIn big O notation. Number of nodes generated during a search (worst case)."},{"_id":"37a25c4c67beb538300000cd","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37534bf40b5069bddc000098","content":"#### Space complexity\nIn big O notation. Maximum number of nodes stored in memory."},{"_id":"37a25c8667beb538300000ce","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37534bf40b5069bddc000098","content":"#### Optimality\nIs it guaranteed to find the optimal solution?"},{"_id":"37a25cc067beb538300000cf","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37534bf40b5069bddc000098","content":"#### Completeness\nIf there is a solution, will it be found?"},{"_id":"37a25cf367beb538300000d0","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"37534bf40b5069bddc000098","content":"#### Branching Factor \nb\n\nMaximum number of successors of any node"},{"_id":"37a25d2667beb538300000d1","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"37534bf40b5069bddc000098","content":"#### Depth of shallowest goal \nd"},{"_id":"37a25d5b67beb538300000d2","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"37534bf40b5069bddc000098","content":"#### Maximum length of any path in the state space \nm"},{"_id":"3752d9690b5069bddc000095","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617dca68d057d230c000036","content":"### Breadth First Search\n\nBranching factor b and depth of solution d.\n\n* Time complexity: O(b^d)\n* Space complexity: O(b^d)\n* Optimal (given step costs are identical)\n* Complete (provided b is finite)\n"},{"_id":"375365110b5069bddc00009a","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617dca68d057d230c000036","content":"### Depth First Search\n\nBranching factor b, depth of solution d and maximum depth m.\n\n* Time complexity: O(b^m)\n* Space complexity: O(bm)\n* Not optimal\n* Not complete (complete if no loops)"},{"_id":"375383fb0b5069bddc00009b","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617dca68d057d230c000036","content":"### Depth Limited Search\n\nA Depth First Search with a limited maximum depth.\n\nDepth limit l.\n\n* Time Complexity: O(b^l)\n* Space Complexity: O(bl)\n* Complete if l >= d\n* Not optimal"},{"_id":"375388e90b5069bddc00009c","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617dca68d057d230c000036","content":"### Uniform Cost Search\n\nA form of Breadth First Search, using a Priority Queue.\n\nNode with the lowest total path cost is expanded.\n\nIf all the cost steps are equal, it is exactly the same as BFS.\n\n\nComplete and Optimal if no negative path costs."},{"_id":"375397050b5069bddc00009d","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617dca68d057d230c000036","content":"### Iterative Deepening\n\nA depth-limited search where the limit is increased iteratively.\n\nAvoids the space complexity of BFS.\n\n* Time Complexity: O(b^d)\n* Space Complexity: O(bd)\n* Optimal\n* Complete"},{"_id":"37605f380d6aa43af50000a7","treeId":"361777d2f26949dff8000005","seq":1,"position":6.5,"parentId":"3617dca68d057d230c000036","content":"### Iterative Improvement\n\nPaths not retained - low memory"},{"_id":"37605e010d6aa43af50000a6","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617dca68d057d230c000036","content":"### Heuristic Search\n\nHeuristic is a sort of rule of thumb."},{"_id":"376062b80d6aa43af50000a8","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"37605e010d6aa43af50000a6","content":"### Hill Climbing\n\nHeuristic best child chosen at each point until goal reached or no change in current state.\n\nNo backtracking."},{"_id":"37606d5c0d6aa43af50000aa","treeId":"361777d2f26949dff8000005","seq":1,"position":0.875,"parentId":"37605e010d6aa43af50000a6","content":"### Best First Search\n\nPriority queue based on heuristic. Like BFS other than that."},{"_id":"376075620d6aa43af50000ab","treeId":"361777d2f26949dff8000005","seq":1,"position":1.0625,"parentId":"37605e010d6aa43af50000a6","content":"### Greedy Best First Search\n\nf(n) = h(n)"},{"_id":"376066b70d6aa43af50000a9","treeId":"361777d2f26949dff8000005","seq":1,"position":1.25,"parentId":"37605e010d6aa43af50000a6","content":"### A*\n\nA best first search which takes into account current path cost.\n\nf(n) = g(n) + h(n)"},{"_id":"3760c2f80d6aa43af50000ac","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37605e010d6aa43af50000a6","content":"### Dominance/Informedness\n\nIf h2(n) >= h1(n) then h2 dominates h1."},{"_id":"37464704ec7ef000fc000091","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3617dca68d057d230c000036","content":"### Genetic Algorithms\n\nEncode solutions in Chromosomes.\n\nMutate and crossover chromosomes.\n\nEvaluate the new population and select the best."},{"_id":"374660c1ec7ef000fc000092","treeId":"361777d2f26949dff8000005","seq":1,"position":13.25,"parentId":"3617dca68d057d230c000036","content":"### Genetic Programming\n\nA branch of genetic algorithms which uses programming statements as genes.\n\nEasy to do in LISP.\n\nUsually represented as trees."},{"_id":"37a209cf67beb538300000be","treeId":"361777d2f26949dff8000005","seq":1,"position":0.5,"parentId":"374660c1ec7ef000fc000092","content":"#### Koza's Algorithms\n\n* Tree consists of functions and terminals\n* Choose a set of functions and terminals\n * e.g.: {+,-,*,/,sqrt},{A,B}\n* Generate random population which are syntactically correct.\n* Follow GA-like procedure."},{"_id":"37a22b6a67beb538300000bf","treeId":"361777d2f26949dff8000005","seq":1,"position":13.5,"parentId":"3617dca68d057d230c000036","content":"### Ant Colony Optimisation\n\nIn nature, ants could solve complex problems unsupervised. Capable of finding the shortest route between a food source and the nest.\n\nCan react to changes in the environment,\n\n* Each ant moves \"randomly\"\n* Pheromone is deposited on path\n* Ants detect lead ant's path, inclined to follow.\n* More pheromone on a path increases the probability of that path being followed.\n* Pheromone decays over time."},{"_id":"37a24be567beb538300000c1","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37a22b6a67beb538300000bf","content":"#### Mechanics of ACO\n\n* Graph Representation\n* Heuristic desirability of edges\n* Construction of feasible solutions\n* Pheromone update rule (attached to edges)."},{"_id":"37a24c1c67beb538300000c2","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37a22b6a67beb538300000bf","content":"#### Algorithm for one ant\n\n* Select starting node at random.\n* While not finished:\n * Evaluate all edges from this node.\n * Select the best-looking edge via probabilistic transition rule\n * Deposite artificial pheromon on the chosen edge.\n* Finished path is a potential solution, analysed for optimality."},{"_id":"37a264b067beb538300000d4","treeId":"361777d2f26949dff8000005","seq":1,"position":15,"parentId":"3617dca68d057d230c000036","content":"### Particle Swarm Optimisation\n\nEach particle is searching for the optimum and encodes a solution (like a GA).\n\nEach particle is *moving* (can't search otherwise), and hence has a *velocity*. It also maintains the position it was in where it had its best result so far (its *personal best*).\n\nThe particles co-operate, exchanging information about what they've discovered in the places they've visited.\n\nThis co-operation only needs to be very simple;\n\n* A particle has a *neighbourhood* associated with it\n* A particle knows the fitness of those in its neighbourhood, and uses the *position* of the one with the best fitness.\n* Adjusts using this."},{"_id":"37a296ca67beb538300000d5","treeId":"361777d2f26949dff8000005","seq":1,"position":16,"parentId":"3617dca68d057d230c000036","content":"### Multi-objective Optimisation\n\nSometimes an answer has to be optimal in several aspects.\n\nExamples:\n\n* Quickest and cheapest flights\n* Lightest and strongest construction material."},{"_id":"3617de548d057d230c000037","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617d47c8d057d230c000031","content":"## Knowledge Representation\n\n*Ways of representing knowledge in a computer-understandable way. Semantic networks, rules. Examples of the importance of KR (4 hours).*"},{"_id":"37af23618b4569f1020000d3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617de548d057d230c000037","content":"### What is Knowledge?\n\nAI Agents deal with knowledge (data).\n\n* Facts\n* Procedures\n* Meaning"},{"_id":"37af3c058b4569f1020000d5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617de548d057d230c000037","content":"### Logic Representation"},{"_id":"37af47ea8b4569f1020000d6","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617de548d057d230c000037","content":"### Non-logical Representation\n\nLogical representations have restrictions which can be hard to work with."},{"_id":"37af49988b4569f1020000d7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37af47ea8b4569f1020000d6","content":"#### Classes Ignored in Logic\n\nObjects in the world tend to be related to each other:\n\n* Classes, super- and sub- classes.\n* Part or whole hierarchies\n* Properties which are inherited.\n\nThe state of the world changing over time.\n\n* Explicit representation of time.\n* Frame problem.\n* Non-monotonic reasoning.\n\nClosed world assumption.\n\nUncertainty or fuzzy knowledge."},{"_id":"37af5c038b4569f1020000d8","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37af47ea8b4569f1020000d6","content":"#### Classes and Object-Orientated Representations\n\nClasses define Objects, Objects are instances of Classes.\n\nObject &isin; Class\n\nClass &sub; Superclass\n\nFacts and rules can be encoded."},{"_id":"37af6e608b4569f1020000d9","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37af47ea8b4569f1020000d6","content":"#### Semantic Networks\n\nEssentially a generalisation of inheritance hierarchies.\n\nEach node is an object, class, concept or event.\n\nEach link is a relationship which makes sense in context.\n\nInheritance is as expected.\n\nExample:\n\n![](http://upload.wikimedia.org/wikipedia/commons/thumb/6/67/Semantic_Net.svg/320px-Semantic_Net.svg.png)\n\n**Note:** pre-dated OOP."},{"_id":"37af7e308b4569f1020000da","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37af47ea8b4569f1020000d6","content":"#### Frames\n\nIncorporates certain valuable human thinking characteristics:\n\n* Expectations\n* Assumptions\n* Stereotypes\n* Exceptions\n* Fuzzy boundaries\n\nRepresent what is *typical* unless an *exception* is known.\n\nFrames allow more convenient \"packaging\" of facts about an object.\n\nFrames often allow things which are typical of a class and which are definitional and can't be overridden.\n\nFrames also support multiple inheritance.\n\nFrames are represented as semantic networks where nodes have structure. A frame has a number of slots (age, height, etc.), each of these slots stores specific information.\n\nWhen new information is gained slots can be filled in, this can cause the triggering of actions, which may trigger the retrieval of other frames."},{"_id":"37afa08e8b4569f1020000db","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"37af47ea8b4569f1020000d6","content":"#### Scripts\n\nCan fill in missing detail that is assumed."},{"_id":"37afa52b8b4569f1020000dd","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617de548d057d230c000037","content":"### Non-monotonic Logic\n\nOnce true doesn't mean always true.\n\nAs information arrives, truth values can change.\n\nA number of implementations for this,\n\n* Circumscription:\n * Brid(x) and not abnormal(x) -> flies(x)\n * We can assume not abnormal(x) unless we know abnormal(x).\n* Default logic:\n * \"x is true given x does not conflict with anything we already know.\""},{"_id":"37afac778b4569f1020000df","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37afa52b8b4569f1020000dd","content":"#### Truth Maintenance Systems\n\nThese systems allow truth values to be changed during reasoning (belief revision).\n\nWhen retracting to a fact, must also retract to any other fact derived from it.\n\n<pre>\nPenelope is a bird (can fly)\nPenelope is a penguin (cannot fly)\nPenelope is magical (can fly)\nRetract magical (cannot fly)\nRetract penguin (can fly)\n</pre>"},{"_id":"37afb2d08b4569f1020000e0","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37afac778b4569f1020000df","content":"##### Justification-based TMS\n\nFor each fact, track its justification\n\nWhen a fact is retracted, retract all facts that have justifications leading back to that fact, unless they have independent justifications."},{"_id":"37afb4a78b4569f1020000e1","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37afac778b4569f1020000df","content":"##### Assumption-based TMS\n\nRepresent all possible states simultaneously"},{"_id":"3617df6a8d057d230c000038","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617d47c8d057d230c000031","content":"## Neural Networks and subsymbolic learning\n\n*We can find solutions using search, but how can we remember solutions, learn from them and adapt them to new situations? This will cover perceptrons, single-layer and multi-layer networks (5 hours).*"},{"_id":"37115e983d054036f0000075","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617df6a8d057d230c000038","content":"### Symbolic Learning\n\nWhen we use some sort of rule-based system, we generally have to understand the rules. This means we understand the conclusions it draws, because it can tell us.\n\nWhen a system learns from such rules, it processes in a way which can be understood."},{"_id":"371162143d054036f0000076","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617df6a8d057d230c000038","content":"### Subsymbolic Learning\n\nDon't really understand, or have control over, the way in which solutions are found.\n\nANNs, GAs, GP and sometimes statistical methods.\n\nMight be related to the randomness factor."},{"_id":"37116a573d054036f0000077","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617df6a8d057d230c000038","content":"### Artificial Neural Networks\n\n*(A: time to not understand backprop again)*\n\nInputs (variables) -> network -> Outputs (results).\n\nX and Y matrices of the statistical models are analogous to the training inputs and outputs of ANNs."},{"_id":"37460f78ec7ef000fc00008c","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37116a573d054036f0000077","content":"### Backpropagation\n\nMost common learning rule for ANNs.\n\nConnections between nodes given random initial weights.\n\nWe therefore get a value at the output node(s) which happens when these random weights are applied to the data at the input."},{"_id":"374625c2ec7ef000fc00008e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37116a573d054036f0000077","content":"### Epoch\n\nAn iteration, that is, finding the error then adjusting weighting, is called an epoch.\n\nThere may be many thousands of epochs in one training."},{"_id":"37462738ec7ef000fc00008f","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37116a573d054036f0000077","content":"### Overfitting\n\nNeed to be able to *generalise* the model to unseen data.\n\nToo much training will lead to a lack of generalisation."},{"_id":"3746422bec7ef000fc000090","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37116a573d054036f0000077","content":"### Kohonen Neural Networks\n\nSelf-organising neural networks.\n\nRandom initialisation of a grid, see which nodes best match the input and change nodes around it."},{"_id":"3617e17d8d057d230c000039","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617d47c8d057d230c000031","content":"## Propositional and First-Order Logic\n\n*The backbone of knowledge representation (4 hours).*"},{"_id":"36f739fcbe9d9a30ab00004d","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617e17d8d057d230c000039","content":"### Types of Knowledge\n\n* Declarative - Facts\n* Procedural\n* Meta - knowledge about knowledge\n* Heuristic - rules of thumb"},{"_id":"36f73e7bbe9d9a30ab00004e","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3617e17d8d057d230c000039","content":"### Representing Knowledge: Object-attribute-value\n\nEncoding a fact in three pieces of information; the object, it's attributes and the values of these attributes.\n\nThe facts a human knows are not obvious to a computer; needs to be encoded.\n\ne.g.: Tree(species, oak)\n\nThe encoding doesn't matter, so long as its uniform to the system.\n\nCan include an uncertainty factors is a number which can be taken into account by the system when making decisions.\n\nThe final conclusion of any program where uncertainty was used in the input is likely to also have an uncertainty factor (if you're not sure of the facts, can can the result be certain?)\n\nEncoding uncertainty might be encoded something like this: Tree(species, oak, 0.8) (the certainty that the tree is an oak tree is 80%).\n\nAgain encoding doesn't matter, so long as its uniform to the system."},{"_id":"3703d03fd4ca44af9a000055","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3617e17d8d057d230c000039","content":"### Rules\n\nA knowledge base may have rules associated.\n\nIF premises THEN conclusion. There may be more than one premises and may contain logical function\n\n* AND, OR and NOT for example\n\nIf a premise evaluates to TRUE the rule *fires*.\n\ne.g. \n\nIF tree(species, oak) THEN tree(type, deciduous)\n\nRules may contradict another rule. Different strategies can be applied to choose the most specific or most relevant rules."},{"_id":"3703dd99d4ca44af9a000056","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3617e17d8d057d230c000039","content":"### Meta Rules\n\n<pre>\nIF\n tree is conifer\nTHEN\n load conifer data\nELSE\n load deciduous data\n</pre>"},{"_id":"3703e04dd4ca44af9a000058","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3617e17d8d057d230c000039","content":"### Logic\n\nWe can represent knowledge using logic. There are two types: *propositional* and *predicate* (or first-order logic or predicate calculus)"},{"_id":"3703e277d4ca44af9a000059","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617e17d8d057d230c000039","content":"### Propositional Logic\n\nIn propositional logic formulas are constructed using variables, TRUE and FALSE constants and connectors:\n\n* AND (∧)\n* OR (∨)\n* NOT (¬)\n* IMPLIES (→)"},{"_id":"3703e4e7d4ca44af9a00005a","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617e17d8d057d230c000039","content":"### Predicate Logic\n\nProlog is based on this.\n\nA predicate is like a function that returns TRUE or FALSE\n\nTree(a) is true if a is oak, false if a is daffodil."},{"_id":"3703eac6d4ca44af9a00005b","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617e17d8d057d230c000039","content":"### Implication\n\nOak(a) → Tree(a)\n\nIf the first clause is satisfied, the second clause is also satisfied."},{"_id":"3703eeefd4ca44af9a00005c","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617e17d8d057d230c000039","content":"### Assertions\n\nThe symbol ∀ can be read as \"for all\".\n\n∀a(Oak(a) → Tree(a)"},{"_id":"3703f17bd4ca44af9a00005d","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617e17d8d057d230c000039","content":"### Existence\n\nThe symbol ∃ can be read as \"exists\"\n\n∃a(Beech(a) ∧ ¬Green(a))"},{"_id":"3703f429d4ca44af9a00005e","treeId":"361777d2f26949dff8000005","seq":1,"position":11,"parentId":"3617e17d8d057d230c000039","content":"### The Atomic Formula\n\nbeech(a) is known as an atomic formula.\n\nCan have multiple parameters."},{"_id":"3703fe77d4ca44af9a000060","treeId":"361777d2f26949dff8000005","seq":1,"position":13,"parentId":"3617e17d8d057d230c000039","content":"### Human Reasoning\n\nWe use two standard rules:\n\n* Deductive\n 1. Modus Ponens - if we know P→Q then if P is true, Q must also be true\n 2. Modus Tollens - if we know P→Q then if Q is false, P must also be false\n* Inductive\n * Difficult for machines\n * Observations:\n * Oak trees have green leaves\n * Pine trees have green leaves\n * Induce\n * All trees have green leaves\n * Unfortunately, that's not true, but it is useful."},{"_id":"37040fd9d4ca44af9a000061","treeId":"361777d2f26949dff8000005","seq":1,"position":14,"parentId":"3617e17d8d057d230c000039","content":"### Non-monotonic\n\nClassic monotonic reasoning cannot contain contradictions\n\nPut formally:\n\nX ⊆ Y → Deriv(X) ⊆ Deriv(Y) where Deriv(X) is a set of facts derived from X"},{"_id":"37041e8bd4ca44af9a000062","treeId":"361777d2f26949dff8000005","seq":1,"position":15,"parentId":"3617e17d8d057d230c000039","content":"### Temporal Reasoning\n\nReasoning changes over time. Can introduce this into machines by introducing a concept of time."},{"_id":"37041fced4ca44af9a000063","treeId":"361777d2f26949dff8000005","seq":1,"position":16,"parentId":"3617e17d8d057d230c000039","content":"### Machine Inference\n\nMachine inference is used to deduce new facts from a knowledge base which is held in working memory.\n\nKnowledge Base -> Inference Engine -> Working memory\n\nCan be very complex"},{"_id":"37042443d4ca44af9a000064","treeId":"361777d2f26949dff8000005","seq":1,"position":17,"parentId":"3617e17d8d057d230c000039","content":"### Deducing New Facts\n\nTwo principal methods\n\n1. Forwards chaining - based on modus ponens.\n2. Backwards chaining - based on modus tollens."},{"_id":"37042607d4ca44af9a000065","treeId":"361777d2f26949dff8000005","seq":1,"position":18,"parentId":"3617e17d8d057d230c000039","content":"### Forward Chaining\n\nModens Ponens:\n\nstudent(S) ∧ studies(S, ai) → studies(S, prolog)\nstudent(T) ∧ studies(S, expsys) → studies(T, ai)\nstudent(joe)\nstudies(joe, expsys)\n\nTherefore we can deduce:\n\nstudies(joe, prolog)\n\nProof:\n\nstudent(joe) ∧ studies(joe, expsys) → studies(joe, ai)\nstudent(joe) ∧ studies(joe, ai) → studies(joe, prolog)\n\nQ.E.D.\n\nForwards chaining can fire any rules which match the knowledge held in its working memory. This can potentially come up with a huge amount of new knowledge, most of which is probably completely irrelevant."},{"_id":"370431dbd4ca44af9a000066","treeId":"361777d2f26949dff8000005","seq":1,"position":19,"parentId":"3617e17d8d057d230c000039","content":"### Backwards chaining\n\nBackwards chaining sets out to prove a piece of information.\n\nThe information will either be true or false, but doesn't generate unwanted results.\n\nUse the *resolution* proof method for now.\n\nSay we have:\n\nA1 ∨ A2 ∨ ... ∨ An ∨ B and  ¬B ∨ C1 ∨ C2 ∨ ... ∨ Cm\n\nResolvent of clauses is:\n\nA1 ∨ .. ∨ An ∨ C1 ∨ ... ∨ Cm"},{"_id":"37043ab1d4ca44af9a000067","treeId":"361777d2f26949dff8000005","seq":1,"position":20,"parentId":"3617e17d8d057d230c000039","content":"### Resolution\n\nNow take the two clauses:\n\nA1 ∨ A2 ∨ ... ∨ An ∨ B and D ∨ C1 ∨ C2 ∨ ... ∨ Cm\n\nIf there is some subset where B and D are negations of each other Theta\n\nIf we have two clauses Clause1 and Clause2, and these both have a resolvant R, then if Clause1 and Clause2 are both satisfiable, so must R be.\n\nThe idea: take a clause, containing a goal we want to prove, and negate that goal. If we then resole this with other clauses, over and over and we get to the empty clause (which is never satisfiable), we have proved our goal."},{"_id":"3704411bd4ca44af9a000068","treeId":"361777d2f26949dff8000005","seq":1,"position":21,"parentId":"3617e17d8d057d230c000039","content":"### Clause form\n\nWe can express any predicate calculus statement in clause form.\n\nThis enables us to work with OR and NOT rather than any other clause.\n\np → q ≡ ¬p ∨ q\n\nA ∧ B ≡ ¬(¬A ∨ ¬B)"},{"_id":"37044bffd4ca44af9a000069","treeId":"361777d2f26949dff8000005","seq":1,"position":22,"parentId":"3617e17d8d057d230c000039","content":"### Example of Resolution\n\nUse a previous example in clause form:\n\n1. ¬student(S) ∨ ¬studies(S, ai) ∨ studies(S, prolog)\n2. ¬student(T) ∨ ¬studies(T, expsys) ∨ studies(T, ai)\n3. student(joe)\n4. studies(joe, expsys)\n\nSolution to studies(S, prolog) means we must negate it:\n\n¬studies(S, prolog)\n\nResolve the clause 1:\n\n¬student(S) ∨ ¬studies(S, ai)\n\nResolve with clause (2) (S=T)\n\n¬student(S) ∨ ¬studies(S, expsys)\n\nResolve with clause (4) (S = joe):\n\n¬student(joe)\n\nResolve with clause (3):\n\nØ\n\nTherefore studies(joe, prolog) is true.\n\nQ.E.D."},{"_id":"37045bead4ca44af9a00006a","treeId":"361777d2f26949dff8000005","seq":1,"position":23,"parentId":"3617e17d8d057d230c000039","content":"### Horn Clauses\n\nThe same thing, but expressed differently. This is how Prolog does it.\n\nA horn clause is a series of disjuncts (ORs)\n\nWe can take:\n\nA ∨ ¬B ∨ ¬C\n\nand write it:\n\nA ← B ∧ C\n\nIf B and C then A\n\nAll the same thing:\n\n1. studies(S, prolog) ← student(S) and studies(S, ai)\n2. studies(T, ai) ← student(T and studies(T, expsys)\n3. student(joe) ←\n4. studies(joe, expsys) ←"},{"_id":"37046495d4ca44af9a00006b","treeId":"361777d2f26949dff8000005","seq":1,"position":24,"parentId":"3617e17d8d057d230c000039","content":"### Resolving Horn Clauses\n\nAll the negatives are one side of the ← sign.\n\n← studies(S, prolog)\nstudies(S, prolog) ← student(S) ∧ studies(S, ai)\n\n← student(S) ∧ studies(S, ai)\nstudies(T, ai) ← student(T) ∧ studies(T, expsys)\n\nS = T\n\n← student(S) ∧ studies(S, expsys)\nstudent(joe) ←\n\nS = joe\n\n← studies(joe, expsys)\nstudies(joe, expsys) ←\n\n←\n\nQ.E.D."},{"_id":"37047e39d4ca44af9a00006c","treeId":"361777d2f26949dff8000005","seq":1,"position":25,"parentId":"3617e17d8d057d230c000039","content":"### Prolog Example\n\n[Prolog Tutorial](http://users.aber.ac.uk/ais/Prolog/)"},{"_id":"3710eef13d054036f0000074","treeId":"361777d2f26949dff8000005","seq":1,"position":26,"parentId":"3617e17d8d057d230c000039","content":"### Prolog\n\n**Pro**gramming with **log**ic.\n\nUses backwards chaining through horn clauses."},{"_id":"3617e2ea8d057d230c00003a","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3617d47c8d057d230c000031","content":"## Programming for Intelligent Systems\n\n*Practical introduction to programming for Intelligent Systems, used to illustrate search, KR and first-order logic (3 hours).*"},{"_id":"3617e40b8d057d230c00003b","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3617d47c8d057d230c000031","content":"## Rule-based Systems\n\n*How can human expertise be automated? How to build an expert system - system concepts and architectures. Rule-based systems: design, operation, reasoning, backward and forward chaining (3 hours).*"},{"_id":"37afb5f38b4569f1020000e2","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3617e40b8d057d230c00003b","content":"### RBS\n\nKnowledge base contains the rules.\n\nDatabase contains the facts.\n\nInference engine uses both of these to match facts to rules to derive new facts, etc.\n\nJustifiable and transparent."},{"_id":"3617e5618d057d230c00003c","treeId":"361777d2f26949dff8000005","seq":1,"position":8,"parentId":"3617d47c8d057d230c000031","content":"## Knowledge Acquisition\n\n*Knowledge Acquisition and its importance in KR and RBS (2 hours).*"},{"_id":"371175163d054036f000007a","treeId":"361777d2f26949dff8000005","seq":1,"position":9,"parentId":"3617d47c8d057d230c000031","content":"## Statistical Methods\n\n*Multivariate analysis and statistical methods for solving problems.*"},{"_id":"3711761f3d054036f000007b","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"371175163d054036f000007a","content":"### Multivariate Analysis\n\nAnalysis of high-dimensional data. Often not possible to identify or quantify an object from one dimension.\n\nTwo methods:\n\n1. Statistical\n2. AI methods"},{"_id":"371198f33d054036f000007d","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"371175163d054036f000007a","content":"### Statistical Models\n\nAlways produces the same result from a given set of data.\n\nWill always find the best result within the constraints of their abilities."},{"_id":"3745a687ec7ef000fc000083","treeId":"361777d2f26949dff8000005","seq":1,"position":2.5,"parentId":"371175163d054036f000007a","content":"### X Values\n\nAll the factors which might affect the outcome so that the analysis can find some form of *correlation*."},{"_id":"3745ada5ec7ef000fc000084","treeId":"361777d2f26949dff8000005","seq":1,"position":2.75,"parentId":"371175163d054036f000007a","content":"### Y Values\n\nThe set of objects and associated variables."},{"_id":"3745b8e0ec7ef000fc000085","treeId":"361777d2f26949dff8000005","seq":1,"position":2.875,"parentId":"371175163d054036f000007a","content":"### Realigning Axes.\n\nUsually statistics are in high-dimensional space. No way of visualising this data.\n\nIn a 3D space, can fit a plane to any 3 points to make the problem a 2D one.\n\nCan approximate the plane to more than 3 points and fit the best plane using root mean square error. This is done using regression, but does mean there will be **error** in the model.\n\nCan do this with a 3D plane, but the idea is to keep the model as simple as possible."},{"_id":"3745a143ec7ef000fc000082","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"371175163d054036f000007a","content":"### Principal Component Analysis\n\nThe line through multi-dimensional space which describes the most variation in the data (the one with the widest space) is the First Principal Component.\n\nThe following Principal Components are always perpendicular and are ordered by the amount of variation from the data and have less importance.\n\nCan analyse the principal components to see which of the original X values contributed most.\n\nPrincipal components help understand the data better."},{"_id":"3745d00fec7ef000fc000086","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"371175163d054036f000007a","content":"### Principal Components Regression\n\nThe main principal components help to explain what factors had most bearing on the results.\n\nThey form a model that could be used for predicting results.\n\nUsing a PCA model to predict is known as Principal Components Regression (PRC).\n\nClosely related is PCL."},{"_id":"3745f44fec7ef000fc000089","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"371175163d054036f000007a","content":"### Principal of Parsimony\n\nFewer variables, if they produce a model just as good in testing, should be preferred."},{"_id":"37afc6aa8b4569f1020000e3","treeId":"361777d2f26949dff8000005","seq":1,"position":10,"parentId":"3617d47c8d057d230c000031","content":"## Fuzzy Logic\n\nNot clear cut for a definite value. (i.e. not boolean logic).\n\n![](http://upload.wikimedia.org/wikipedia/commons/6/61/Fuzzy_logic_temperature_en.svg)"},{"_id":"37b2bc1301f4a1e2be0000f5","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":null,"content":"# Seminars\n\nSeminars from Aberystwyth University"},{"_id":"37b2bcf301f4a1e2be0000f6","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37b2bc1301f4a1e2be0000f5","content":"## Learning from Big Random Weight Networks and Their Training Algorithms\n\nby Xizhao Wang *Fellow; IEEE Editor-in-Chief, IJMLC*\n\n"},{"_id":"37b2c0e601f4a1e2be0000f7","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37b2bcf301f4a1e2be0000f6","content":"### Introduction to Big Data\n\nThe internet, financial institutions, media, medical treatment, scientific research, etc. provide a huge amount of data.\n\nThis data is only increasing in size. Big Data is the explosion of information.\n\nStoring Big Data is, as expected, very difficult."},{"_id":"37b2ca1601f4a1e2be0000fc","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"37b2c0e601f4a1e2be0000f7","content":"#### Variety\n\nStructured data is becoming unstructured."},{"_id":"37b2caaf01f4a1e2be0000fd","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37b2c0e601f4a1e2be0000f7","content":"#### Velocity\n\nMoving from batch jobs to the streaming of data."},{"_id":"37b2cb9901f4a1e2be0000fe","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"37b2c0e601f4a1e2be0000f7","content":"#### Volume\n\nNow around Zettabytes of data around."},{"_id":"37b2cca201f4a1e2be0000ff","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"37b2c0e601f4a1e2be0000f7","content":"#### Value"},{"_id":"37b2d1b301f4a1e2be000100","treeId":"361777d2f26949dff8000005","seq":1,"position":1.5,"parentId":"37b2bcf301f4a1e2be0000f6","content":"### Uncertainty of Big Data\n\nThere is lots of uncertainty in Big Data, there can be a lot of ambiguity in symbolic data, etc."},{"_id":"3c70313ce12ba87a3c0002ec","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"37b2bc1301f4a1e2be0000f5","content":"## Some cybersecurity issues of Smart Buildings, Smart Metering, not-so-Smart Cars and the Smart Grid\n\n*Martyn Thomas CBE FREng*"},{"_id":"3c7031e7e12ba87a3c0002ed","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3c70313ce12ba87a3c0002ec","content":"### Smart Buildings\n\nOffer significant benefits **and new vulnerabilities**."},{"_id":"3c70351fe12ba87a3c0002ee","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3c7031e7e12ba87a3c0002ed","content":"#### Benefits\n\n* Access Passes, Attendance monitoring, follow me printing\n* Calendar, room booking, etc.\n* CCTV, WiFi, Remote and central monitoring and control\n* Dynamic displays, emergency messages, fire alarms"},{"_id":"3c70376ee12ba87a3c0002ef","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3c7031e7e12ba87a3c0002ed","content":"#### Vulnerabilities\n\n* Denial of access, unauthorised access, data compromise\n* Disruption, wasted energy, damage\n* Intrusion, loss of control,\n* Safety."},{"_id":"3c7043a7e12ba87a3c0002f0","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3c70313ce12ba87a3c0002ec","content":"### Smart Cars\n\nMichael Barr's expert report in the Bookout v Toyota lawsuit. [See here](http://www.safetyresearch.net/Library/BarrSlides_FINAL_SCRUBBED.pdf)."},{"_id":"3c705594e12ba87a3c0002f1","treeId":"361777d2f26949dff8000005","seq":1,"position":3,"parentId":"3c70313ce12ba87a3c0002ec","content":"### Safety World\n\nSafety world works on probabilities, but in security there is a direct attacker - can't argue independence."},{"_id":"3c705774e12ba87a3c0002f2","treeId":"361777d2f26949dff8000005","seq":1,"position":4,"parentId":"3c70313ce12ba87a3c0002ec","content":"### Smart Meter Security\n\nEnd-to-end security: \"No trusted components\".\n\nWhether this works or not is unknown."},{"_id":"3c706b3ee12ba87a3c0002f3","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3c705774e12ba87a3c0002f2","content":"#### Vulnerabilities\n\n* Meters contain clocks and billing data, if these are changed, bills can be manipulated.\n* Meters contain an off switch, misuse could cause distress, harm or substantial disruption.\n* Meter firmware will need to be updated.\n* The Gas meter can only handle low-grade encryption."},{"_id":"3c707347e12ba87a3c0002f4","treeId":"361777d2f26949dff8000005","seq":1,"position":1,"parentId":"3c706b3ee12ba87a3c0002f3","content":"##### Who controls the off switch?\n\nAnyone who has the authority to send the relevant messaged through the DCC.\n\nAnyone who can mount a successful **cyber attack** on the network."},{"_id":"3c707621e12ba87a3c0002f5","treeId":"361777d2f26949dff8000005","seq":1,"position":2,"parentId":"3c706b3ee12ba87a3c0002f3","content":"##### How will security be assured?\n\n* Human review of the spec.s\n* Testing the system\n* Focuesed pentesting\n\nTesting only shows that faults **do** exist, not that there are no faults.\n\nFor high confidence you need formal methods."},{"_id":"3c7079b0e12ba87a3c0002f6","treeId":"361777d2f26949dff8000005","seq":1,"position":5,"parentId":"3c70313ce12ba87a3c0002ec","content":"### Cyber Security\n\nIs a through-life discipline.\n\n* Planning\n* Control\n* Monitoring\n* Response\n\n\n\n* From design through to decommissioning\n* Lifetimes of 20+ years\n* Don't run anti-virus\n* Monitoring is difficult (and uncommon)\n* How to respond to incidents?\n* Insider threats\n* Lifetime security needs discipline and excellent configuration control through years of maintenance and upgrades."},{"_id":"3c708d15e12ba87a3c0002f7","treeId":"361777d2f26949dff8000005","seq":1,"position":6,"parentId":"3c70313ce12ba87a3c0002ec","content":"### [M2M and the IoT](http://www.wired.com/opinion/2014/01/theres-no-good-way-to-patch-the-internet-of-things-and-thats-a-huge-problem/)"},{"_id":"3c709318e12ba87a3c0002f8","treeId":"361777d2f26949dff8000005","seq":1,"position":7,"parentId":"3c70313ce12ba87a3c0002ec","content":"### Cyber Security\n\nIs a tier one threat."}],"tree":{"_id":"361777d2f26949dff8000005","name":"Aberystwyth Level M Notes","publicUrl":"aber-level-m"}}