.NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

25
.NET MSc in .NET MSc in Distributed Distributed Systems Systems David Grey David Grey Rob Miles Rob Miles University of Hull, UK University of Hull, UK

Transcript of .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Page 1: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

.NET MSc in Distributed .NET MSc in Distributed SystemsSystems

David GreyDavid Grey

Rob MilesRob Miles

University of Hull, UKUniversity of Hull, UK

Page 2: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

OverviewOverview Teaching Undergraduate Computer Teaching Undergraduate Computer

ScienceScience Traditional approachesTraditional approaches Challenges and opportunitiesChallenges and opportunities

Making a .NET-based degreeMaking a .NET-based degree Background, aims and contentBackground, aims and content The role of .NET, SSCLI (Rotor) and AA The role of .NET, SSCLI (Rotor) and AA

programmesprogrammes

Example laboratory exerciseExample laboratory exercise

Page 3: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Computing @ HullComputing @ Hull

~ 580 undergraduate students, ~ 580 undergraduate students, ~ 60 taught/~ 40 research postgraduates ~ 60 taught/~ 40 research postgraduates Undergraduate degrees Undergraduate degrees

Computer Science, Software Engineering, Computer Science, Software Engineering, Business Information Engineering, Internet Business Information Engineering, Internet Computing, Games DevelopmentComputing, Games Development

Taught postgraduate degrees Taught postgraduate degrees Graphics and Visualization, Games Graphics and Visualization, Games

Programming, Internet ComputingProgramming, Internet Computing

Page 4: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Undergraduate Computer ScienceUndergraduate Computer Science

Our approach is fairly conventional:Our approach is fairly conventional: Year OneYear One

• Introduce broad range of underlying theory Introduce broad range of underlying theory Year TwoYear Two

• Extend Year One theory with more advanced topics and Extend Year One theory with more advanced topics and greater depth of contentgreater depth of content

Year ThreeYear Three• Individual specialism and further advanced topicsIndividual specialism and further advanced topics• Large individual software projectLarge individual software project

Our graduates have a broad range of skills Our graduates have a broad range of skills which will serve them well in the future, but which will serve them well in the future, but these are not fully developedthese are not fully developed

Page 5: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

The ChallengeThe Challenge

Three years is not enough time!Three years is not enough time! To achieve this breadth of coverage we To achieve this breadth of coverage we

tend to lose the depthtend to lose the depth We do not have time to expose the We do not have time to expose the

students to large systems and appropriate students to large systems and appropriate development techniquesdevelopment techniques

We have little opportunity to give students We have little opportunity to give students all the testing/debugging skills needed by all the testing/debugging skills needed by industryindustry

Page 6: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

The ResultThe Result

In September 2003 we begin teaching the .NET MSc in In September 2003 we begin teaching the .NET MSc in Distributed Systems DevelopmentDistributed Systems Development

This degree:This degree: is a world first, developed in conjunction with Microsoft UK and is a world first, developed in conjunction with Microsoft UK and

the Rotor product team the Rotor product team is a response to the challenges we face at the undergraduate is a response to the challenges we face at the undergraduate

level and the skills that employers requirelevel and the skills that employers require uses Microsoft .NET to explore distributed systems conceptsuses Microsoft .NET to explore distributed systems concepts uses Rotor to explore the design and implementation of modern uses Rotor to explore the design and implementation of modern

languages and distributed computing environments languages and distributed computing environments offers in-depth development of testing and debugging skills offers in-depth development of testing and debugging skills

using the Rotor source as an example of a large, commercial-using the Rotor source as an example of a large, commercial-quality software systemquality software system

Page 7: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

.NET Degree – Aims & Content.NET Degree – Aims & Content

AimsAims Give advanced coverage of modern distributed Give advanced coverage of modern distributed

computing techniquescomputing techniques Develop skills in working with large codebases Develop skills in working with large codebases To develop “active practitioners”To develop “active practitioners” Provide hands-on practical experience underpinned Provide hands-on practical experience underpinned

by advanced theoretical conceptsby advanced theoretical concepts Designed in conjunction with Microsoft, but taught as Designed in conjunction with Microsoft, but taught as

a genuine academic coursea genuine academic course

Page 8: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Degree StructureDegree Structure

Three stages:Three stages: Certificate StageCertificate Stage

Skills to underpin the original workSkills to underpin the original work Diploma StageDiploma Stage

Advanced computing topicsAdvanced computing topics Masters StageMasters Stage

Practical deployment of techniquesPractical deployment of techniques

Page 9: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Certificate StageCertificate StageIntroduction to C# Introduction to .NET Extensible Systems

Object oriented design and development

Object oriented programming using C#

Software engineering/ UML design

Testing and debugging skills

Component based development

Managed code environments

Framework components

Common Language Runtime

Common Type System

Navigating, understanding, modifying and maintaining large-scale, commercial quality source code

Testing and debugging strategies

Commercial development skills

Shared-source .NET as an example of large-scale commercial quality software

Page 10: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Diploma StageDiploma StageDistributed

Programming Virtual Machine Architectures

Trustworthy Computing

Architectures and paradigms for distributed computing

.NET support for networking and distributed computing

Remoting & Web services

Mobile computing, telephony & wireless networking

Requirements for managed code environments

Intermediate languages and their design

Virtual Machine architecture and implementation

Shared source .NET implementation

Security risks and the need for security

Trust and authentication

Security techniques and algorithms

Language security

Security in distributed systems

.NET & Rotor security models

Page 11: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Masters StageMasters Stage

Large, individual project based on real-Large, individual project based on real-world problem using Rotor or other world problem using Rotor or other commercial-grade softwarecommercial-grade software

ExamplesExamples FORTH implementationFORTH implementation Custom Garbage CollectionCustom Garbage Collection Custom Remoting / object mobilityCustom Remoting / object mobility Code profilingCode profiling

Page 12: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

The Role of .NET and RotorThe Role of .NET and Rotor

.NET provides an overreaching example of .NET provides an overreaching example of distributed systems concepts/techniquesdistributed systems concepts/techniques

Rotor provides Rotor provides ““down to the metal” implementation detailsdown to the metal” implementation details excellent environment for enhancing testing/ excellent environment for enhancing testing/

debugging skillsdebugging skills Not simply a .NET degreeNot simply a .NET degree

The techniques which are learnt can be The techniques which are learnt can be applied in any areaapplied in any area

Page 13: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging SkillsDebugging Skills

Teaching what to do when it all goes Teaching what to do when it all goes wrong is difficultwrong is difficult

Students will have to debug their own Students will have to debug their own programs but do not have to spend much programs but do not have to spend much time debugging other peoplestime debugging other peoples

We are setting the “worst case” scenario:We are setting the “worst case” scenario: There is a problem with the underlying There is a problem with the underlying

implementationimplementation Their program is fine, but it still doesn’t work!Their program is fine, but it still doesn’t work!

Page 14: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

A Rotor-based Laboratory ExerciseA Rotor-based Laboratory Exercise

A live demoA live demo A debugging exercise from the Extensible A debugging exercise from the Extensible

Systems module designed to:Systems module designed to: get the students thinking about all aspects of get the students thinking about all aspects of

the compilation/execution cycle (challenges the compilation/execution cycle (challenges some pre-conceptions?)some pre-conceptions?)

provide opportunities to develop debugging provide opportunities to develop debugging and testing skillsand testing skills

familiarise the student with the Rotor code familiarise the student with the Rotor code and the techniques used to implement itand the techniques used to implement it

Page 15: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging Exercise – Step 1Debugging Exercise – Step 1

Student are asked to write a C# program Student are asked to write a C# program to bubble sort the following numbersto bubble sort the following numbersstatic float[] data = {45.0, 6.5, static float[] data = {45.0, 6.5, 435.2, 22.0, 6.3, 100.1, 0.02, 435.2, 22.0, 6.3, 100.1, 0.02, 99.9, 45.0, 17.4, 56.4};99.9, 45.0, 17.4, 56.4};

Being kind people, we even suggest an Being kind people, we even suggest an algorithmalgorithm Simple bubble sortSimple bubble sort

Page 16: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging Exercise – Step 2Debugging Exercise – Step 2

Compile and run the program using the Compile and run the program using the Rotor C# compiler and the Rotor CLIRotor C# compiler and the Rotor CLI

At this point the students have to decide if At this point the students have to decide if their code is at faulttheir code is at fault Inexperienced programmers are prone to Inexperienced programmers are prone to

problems with array boundsproblems with array bounds First they must convince themselves that their First they must convince themselves that their

program is correctprogram is correct They will not expect the language They will not expect the language

implementation to cause problemsimplementation to cause problems

Page 17: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging Exercise – Step 3Debugging Exercise – Step 3

Can we verify the correctness of the code Can we verify the correctness of the code in any way?in any way? Use the .NET C# compiler and CLR Use the .NET C# compiler and CLR

HypothesisHypothesis if it works in .NET our code must be validif it works in .NET our code must be valid

OutcomeOutcome The program works correctly in this The program works correctly in this

environmentenvironment

Page 18: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging Exercise – Step 4Debugging Exercise – Step 4

Conclusion:Conclusion: Something about the Rotor environment or Something about the Rotor environment or

C# compiler causes the problemC# compiler causes the problem HypothesesHypotheses

Something is wrong with the implementation Something is wrong with the implementation of for loops? of for loops?

Something is wrong with the < operatorSomething is wrong with the < operator Write some simple programs to test these Write some simple programs to test these

hypotheseshypotheses

Page 19: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging Exercise – Step 5Debugging Exercise – Step 5

Something is definitely not right… Something is definitely not right… HypothesisHypothesis

The C# compiler generates Common The C# compiler generates Common Intermediate Language code. Perhaps the Intermediate Language code. Perhaps the code generation is incorrect.code generation is incorrect.

Use Use ildasmildasm to disassemble the compiler to disassemble the compiler output to see if this hypothesis is correctoutput to see if this hypothesis is correct

Page 20: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging Exercise – Step 6Debugging Exercise – Step 6

The compiler is outputting the wrong The compiler is outputting the wrong instruction for <. Why?instruction for <. Why?

SolutionSolution Examine the source code of the C# compilerExamine the source code of the C# compiler We find an error in the compiler source code We find an error in the compiler source code

for the ‘less than’ operator. for the ‘less than’ operator. Fix the error and retest Fix the error and retest

The for loop now works The for loop now works The comparison and bubble sort still failThe comparison and bubble sort still fail

Page 21: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Debugging Exercise…Debugging Exercise…

We don’t have time to show it, but there is We don’t have time to show it, but there is an error in the SSCLI JIT compiler relating an error in the SSCLI JIT compiler relating to floating point branch instructionsto floating point branch instructions

Students need to use similar debugging Students need to use similar debugging skills to discover and rectify thisskills to discover and rectify this

Page 22: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

ProcessProcess

This exercise uses Rotor to confront some of the This exercise uses Rotor to confront some of the student’s preconceptions.student’s preconceptions.

Most new graduates would:Most new graduates would: Not produce sufficient test cases to narrow the Not produce sufficient test cases to narrow the

problem down to the floating point comparisonproblem down to the floating point comparison Not suspect the compiler of producing incorrect codeNot suspect the compiler of producing incorrect code Think that they had not fixed the compiler after Think that they had not fixed the compiler after

removing the bugremoving the bug

The Rotor source is large and unfamiliar – The Rotor source is large and unfamiliar – exactly what they will face in the real worldexactly what they will face in the real world

Page 23: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

Learning OutcomesLearning Outcomes

Importance of methodical approach Importance of methodical approach Design of test casesDesign of test cases Navigation of code baseNavigation of code base Debugging toolsDebugging tools Disassembly toolsDisassembly tools An introduction to intermediate language An introduction to intermediate language

and Just-In-Time compilationand Just-In-Time compilation

Page 24: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.

SummarySummary

We feel that our .NET degree will We feel that our .NET degree will significantly enhance the abilities of significantly enhance the abilities of students and build on an undergraduate students and build on an undergraduate coursecourse

We are really looking forward to starting We are really looking forward to starting this coursethis course

It will be as interesting for us as it is for the It will be as interesting for us as it is for the students!students!

Page 25: .NET MSc in Distributed Systems David Grey Rob Miles University of Hull, UK.