SlideShare una empresa de Scribd logo
1 de 21
Robust Software –Robust Software –
Dotting the I’s andDotting the I’s and
Crossing the T’sCrossing the T’s
Chris OldwoodChris Oldwood
ACCU Conference 2013ACCU Conference 2013
@chrisoldwood / gort@cix.co.uk@chrisoldwood / gort@cix.co.uk
The I’s & T’sThe I’s & T’s
 RobustnessRobustness
 Handling ErrorsHandling Errors
 Safely Ignoring ErrorsSafely Ignoring Errors
 TimeoutsTimeouts
 Unit Testing FailuresUnit Testing Failures
 Flexible ConfigurationFlexible Configuration
 Monitoring ClarityMonitoring Clarity
RobustnessRobustness
Stable in the face ofStable in the face of
unexpected behaviourunexpected behaviour
Pop Quiz – Exit Code?Pop Quiz – Exit Code?
int main(int argc, char* argv[])
{
throw UnhandledException();
}
Exit Code ConventionExit Code Convention
program.exe
if %errorlevel% neq 0 (
echo ERROR: Program failed
exit /b 1
)
Big Outer Try BlockBig Outer Try Block
int main(int argc, char* argv[])
{
try
{
return DoUsefulWork(argc, argv);
}
catch (const std::exception& e)
{ /* Report failure */ }
catch (…)
{ /* Report failure */ }
return EXIT_FAILURE;
}
Module BoundariesModule Boundaries
HRESULT DoSomething(...)
{
try
{
return Impl::DoSomething(...);
}
catch (const std::bad_alloc& e)
{ return E_OUTOFMEMORY; }
catch (const std::exception& e)
{ return E_FAIL; }
catch (...)
{ return E_UNEXPECTED; }
}
Exception Safety GuaranteesException Safety Guarantees
 NoneNone
 BasicBasic
 StrongStrong
 No ThrowNo Throw
Exception Unsafe CodeException Unsafe Code
IServicePtr AcquireService()
{
if (!m_service)
{
m_service = new Service();
m_service.CreateInstance();
}
return m_service;
}
IServicePtr m_service;
Exception Safe CodeException Safe Code
IServicePtr AcquireService()
{
if (!m_service)
{
ServicePtr service = new Service();
service.CreateInstance();
m_service.swap(service);
}
return m_service;
}
IServicePtr m_service;
Forever is a Really Long TimeForever is a Really Long Time
Handle completed = BeginAsyncOperation();
. . .
Wait(completed, INFINITE);
Cancellable OperationsCancellable Operations
Handle completed = BeginAsyncOperation();
Handle aborted = GetAbortHandle();
Handle waitables[] = { aborted, completed };
. . .
Handle signalled = Wait(waitables, timeout);
if (signalled == aborted)
{
Retries: immediate then queuedRetries: immediate then queued
Unit Testing FailuresUnit Testing Failures
Testing Write+Rename IdiomTesting Write+Rename Idiom
[Test]
public Void OriginalFilePreservedOnException()
{
var fakeIo = new FakeIo();
fakeIo.Write = (file, buffer) =>
{ throw new IoException(); }
var writer = new WriterService(fakeIo);
var filename = “original.txt”;
Assert.Throws(() => writer.WriteFile(filename));
Assert.True(fakeIo.FileExists(filename));
Assert.That(. . .);
}
Flexible ConfigurationFlexible Configuration
Monitoring ClarityMonitoring Clarity
Release It!Release It!
Questions?Questions?
Blog:Blog:
http://chrisoldwood.blogspot.comhttp://chrisoldwood.blogspot.com
@chrisoldwood / gort@cix.co.uk@chrisoldwood / gort@cix.co.uk

Más contenido relacionado

Similar a Robust Software

Shift Left Security
Shift Left SecurityShift Left Security
Shift Left SecurityBATbern
 
The Safety Net of Functional Web Testing
The Safety Net of Functional Web TestingThe Safety Net of Functional Web Testing
The Safety Net of Functional Web Testingogborstad
 
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_executionCSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_executionCanSecWest
 
Recent Trends in Cyber Security
Recent Trends in Cyber SecurityRecent Trends in Cyber Security
Recent Trends in Cyber SecurityAyoma Wijethunga
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)Steve Upton
 
Its not about the tooling
Its not about the toolingIts not about the tooling
Its not about the toolingBram Vogelaar
 
Automotive Cybersecurity: Test Like a Hacker
Automotive Cybersecurity: Test Like a HackerAutomotive Cybersecurity: Test Like a Hacker
Automotive Cybersecurity: Test Like a HackerForAllSecure
 
Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts
Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts
Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts Mike Boudreaux
 
Testing the Internet of Everything
Testing the Internet of EverythingTesting the Internet of Everything
Testing the Internet of EverythingTechWell
 
A look inside the European Covid Green Certificate (Codemotion 2021)
A look inside the European Covid Green Certificate (Codemotion 2021)A look inside the European Covid Green Certificate (Codemotion 2021)
A look inside the European Covid Green Certificate (Codemotion 2021)Luciano Mammino
 
Case Studies in Terrible Testing
Case Studies in Terrible TestingCase Studies in Terrible Testing
Case Studies in Terrible TestingTodd Gardner
 
Mathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ CodeMathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ CodePauline Schellenberger
 
Peter Brown resume
Peter Brown resumePeter Brown resume
Peter Brown resumePeter Brown
 
DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)Patricia Aas
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Skills Matter
 
Teaching Elephants to Dance, Burr Sutter
Teaching Elephants to Dance, Burr SutterTeaching Elephants to Dance, Burr Sutter
Teaching Elephants to Dance, Burr SutterJudy Breedlove
 

Similar a Robust Software (20)

Build Automate and Test Strategies - BATMAN
Build Automate and Test Strategies - BATMAN Build Automate and Test Strategies - BATMAN
Build Automate and Test Strategies - BATMAN
 
Shift Left Security
Shift Left SecurityShift Left Security
Shift Left Security
 
The Safety Net of Functional Web Testing
The Safety Net of Functional Web TestingThe Safety Net of Functional Web Testing
The Safety Net of Functional Web Testing
 
Basic of SSDLC
Basic of SSDLCBasic of SSDLC
Basic of SSDLC
 
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_executionCSW2017 Weston miller csw17_mitigating_native_remote_code_execution
CSW2017 Weston miller csw17_mitigating_native_remote_code_execution
 
Recent Trends in Cyber Security
Recent Trends in Cyber SecurityRecent Trends in Cyber Security
Recent Trends in Cyber Security
 
DSR Testing (Part 1)
DSR Testing (Part 1)DSR Testing (Part 1)
DSR Testing (Part 1)
 
Its not about the tooling
Its not about the toolingIts not about the tooling
Its not about the tooling
 
Automotive Cybersecurity: Test Like a Hacker
Automotive Cybersecurity: Test Like a HackerAutomotive Cybersecurity: Test Like a Hacker
Automotive Cybersecurity: Test Like a Hacker
 
Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts
Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts
Safety Lifecycle Management - Emerson Exchange 2010 - Meet the Experts
 
Testing the Internet of Everything
Testing the Internet of EverythingTesting the Internet of Everything
Testing the Internet of Everything
 
A look inside the European Covid Green Certificate (Codemotion 2021)
A look inside the European Covid Green Certificate (Codemotion 2021)A look inside the European Covid Green Certificate (Codemotion 2021)
A look inside the European Covid Green Certificate (Codemotion 2021)
 
Using Robots for App Testing
Using Robots for App Testing Using Robots for App Testing
Using Robots for App Testing
 
Case Studies in Terrible Testing
Case Studies in Terrible TestingCase Studies in Terrible Testing
Case Studies in Terrible Testing
 
Mathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ CodeMathematically Guaranteed C and C++ Code
Mathematically Guaranteed C and C++ Code
 
Peter Brown resume
Peter Brown resumePeter Brown resume
Peter Brown resume
 
DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)DevSecOps for Developers, How To Start (ETC 2020)
DevSecOps for Developers, How To Start (ETC 2020)
 
BSides LA/PDX
BSides LA/PDXBSides LA/PDX
BSides LA/PDX
 
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
Agile testing & bdd e xchange nyc 2013 gojko adzic on bond villain guide to s...
 
Teaching Elephants to Dance, Burr Sutter
Teaching Elephants to Dance, Burr SutterTeaching Elephants to Dance, Burr Sutter
Teaching Elephants to Dance, Burr Sutter
 

Más de Chris Oldwood

In The Toolbox - LIVE!
In The Toolbox - LIVE!In The Toolbox - LIVE!
In The Toolbox - LIVE!Chris Oldwood
 
Waltzing with Branches [ACCU]
Waltzing with Branches [ACCU]Waltzing with Branches [ACCU]
Waltzing with Branches [ACCU]Chris Oldwood
 
Becoming a Bitter Programmer
Becoming a Bitter ProgrammerBecoming a Bitter Programmer
Becoming a Bitter ProgrammerChris Oldwood
 
Waltzing with Branches [Agile o/t Beach]
Waltzing with Branches [Agile o/t Beach]Waltzing with Branches [Agile o/t Beach]
Waltzing with Branches [Agile o/t Beach]Chris Oldwood
 
Using xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitUsing xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitChris Oldwood
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database TestingChris Oldwood
 
Version Control - Patterns and Practices
Version Control - Patterns and PracticesVersion Control - Patterns and Practices
Version Control - Patterns and PracticesChris Oldwood
 
Requiem (For Windows XP)
Requiem (For Windows XP)Requiem (For Windows XP)
Requiem (For Windows XP)Chris Oldwood
 
(Re)Reading the Classics
(Re)Reading the Classics(Re)Reading the Classics
(Re)Reading the ClassicsChris Oldwood
 

Más de Chris Oldwood (16)

The __far* Side
The __far* SideThe __far* Side
The __far* Side
 
Monolithic Delivery
Monolithic DeliveryMonolithic Delivery
Monolithic Delivery
 
A Test of Strength
A Test of StrengthA Test of Strength
A Test of Strength
 
In The Toolbox - LIVE!
In The Toolbox - LIVE!In The Toolbox - LIVE!
In The Toolbox - LIVE!
 
Test-Driven SQL
Test-Driven SQLTest-Driven SQL
Test-Driven SQL
 
Waltzing with Branches [ACCU]
Waltzing with Branches [ACCU]Waltzing with Branches [ACCU]
Waltzing with Branches [ACCU]
 
Continuous Delivery
Continuous DeliveryContinuous Delivery
Continuous Delivery
 
Becoming a Bitter Programmer
Becoming a Bitter ProgrammerBecoming a Bitter Programmer
Becoming a Bitter Programmer
 
Waltzing with Branches [Agile o/t Beach]
Waltzing with Branches [Agile o/t Beach]Waltzing with Branches [Agile o/t Beach]
Waltzing with Branches [Agile o/t Beach]
 
Using xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing ToolkitUsing xUnit as a Swiss-Aarmy Testing Toolkit
Using xUnit as a Swiss-Aarmy Testing Toolkit
 
xUnit Style Database Testing
xUnit Style Database TestingxUnit Style Database Testing
xUnit Style Database Testing
 
Version Control - Patterns and Practices
Version Control - Patterns and PracticesVersion Control - Patterns and Practices
Version Control - Patterns and Practices
 
Requiem (For Windows XP)
Requiem (For Windows XP)Requiem (For Windows XP)
Requiem (For Windows XP)
 
(Re)Reading the Classics
(Re)Reading the Classics(Re)Reading the Classics
(Re)Reading the Classics
 
Recycle Bin 101
Recycle Bin 101Recycle Bin 101
Recycle Bin 101
 
The Art of Code
The Art of CodeThe Art of Code
The Art of Code
 

Último

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfCionsystems
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfkalichargn70th171
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationkaushalgiri8080
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AIABDERRAOUF MEHENNI
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantAxelRicardoTrocheRiq
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsAndolasoft Inc
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendArshad QA
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 

Último (20)

Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Active Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdfActive Directory Penetration Testing, cionsystems.com.pdf
Active Directory Penetration Testing, cionsystems.com.pdf
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdfThe Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
The Essentials of Digital Experience Monitoring_ A Comprehensive Guide.pdf
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Project Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanationProject Based Learning (A.I).pptx detail explanation
Project Based Learning (A.I).pptx detail explanation
 
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AISyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
SyndBuddy AI 2k Review 2024: Revolutionizing Content Syndication with AI
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Salesforce Certified Field Service Consultant
Salesforce Certified Field Service ConsultantSalesforce Certified Field Service Consultant
Salesforce Certified Field Service Consultant
 
How To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.jsHow To Use Server-Side Rendering with Nuxt.js
How To Use Server-Side Rendering with Nuxt.js
 
Test Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and BackendTest Automation Strategy for Frontend and Backend
Test Automation Strategy for Frontend and Backend
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 

Robust Software

Notas del editor

  1. Who am I
  2. Quick walkthrough of the schedule
  3. What do I mean by Robustness? Not so much about reliability Chair – sitting, to standing, stacking, etc. – from specified to unknown
  4. Why is it important? Bedrock for sustainable development of new features. Not over-engineering, just consideration of failures
  5. What do some runtimes do when an unhandled exceptional failure occurs? Nothing! See QM #6
  6. The exit code convention is 0 for success Note, that’s “success == !true” just for extra confusion The parent can’t react and recover if you don’t give them the chance to Exceptions only exists within languages once you cross module boundaries it’s back to return codes
  7. Assume failure by default Don’t assume the runtime will do the right thing It’s int main(), not void main() – always return an exit code
  8. Required at any module boundary, e.g. Win32 callback, COM component, WCF service, etc. Service recovery – shutdown may be worse – black hole effect
  9. Recap the Abrahams exception safety guarantees These apply equally to C#, Java, etc. as well Basic can be implemented with RAII in C++ and Dispose pattern in C# otherwise a manual try/catch block
  10. Example of real-world code, caused process to fail all work rapidly
  11. When recovery is not foremost in the method, be exception agnostic Still hard - more recent example was slowly losing engines due to subtle out-of-memory exception Two phase construction is a bad idea anyway, always prefer just the constructor or factory method to do it all
  12. Don’t wait forever, there must be an upper limit on how long a user/system actor will actually wait Don’t even start work if the users has already got bored Status message example – received every 60 secs so no point waiting any longer
  13. Infinite waits acceptable when operation can be cancelled through other means Long running operations should be cancellable to allow graceful termination/shutdown
  14. Fast and slow retries – perhaps retry much later (queued) if there is a specific blockage
  15. Test more than just the happy path (disks fill up, networks hang, access gets denied) If expecting automatic retry on a cluster failover, mock the service and simulate one to test recovery
  16. Write + rename is equivalent to create + swap earlier Build facades to allow unit testing of I/O operations and for simulating errors, e.g. out of disk space
  17. In-house production can be simpler as change is tightly controlled, development is where the action happens Never hard-code anything, all service endpoints and paths must be configurable (on different levels) Testing often drives the need for flexibility due to shared resources, e.g. developers workstation DR also a driver, but can be useful outside DR too (e.g. active/passive failover) But also default sensibly where possible to avoid bloated configuration files
  18. Calm and considered – pages of errors and alarm bells make it harder to diagnose You’ll never dream up every possible failure, but you can design ways to allow for it
  19. An excellent book probably the best on the subject – good case studies