Cloud-Computing, Dev-Ops, IOT, einfach eine Verbindung zum lokalen Active Directory oder {jegliches LOB-System hier einsetzen}: Die Anwendungen, die wir bauen sind mehr und mehr verteilt. Dreimal dürfen Sie raten, wer schuld ist, wenn Ihre Anwendung knallt, obwohl ein Drittsystem, außerhalb Ihres Codes und ihrer Zuständigkeit, nicht erreichbar war. Diese Session behandelt das Design, die Entwicklung und Verteilung von Anwendungen, unter widrigen Bedingungen – Auch bekannt als Realität.
2. danielfisher.com
I’m a technician & always concerned about bandwidth
So I ask you to send one packet instead of two
DANIEL
My name is
Any further questions? Just Ask!
3. danielfisher.com
software
I design, develop, deploy, teach, train, coach and speak
HTML5 & WEB, DATA ACCESS & PERFORMANCE,
SCALABLE & TESTABLE DESIGN, DISTRIBUTED SYSTEMS
& SERVICES, SECURITY & TRUST
lennybacon.com my blog url
@lennybacon my twitter handle
info@danielfisher.com my smtp
find my services at danielfisher.com
4. danielfisher.com
THAT IS ALL THAT I DEEPLY BELEVE IN
D I S C L A I M E R
IT FITS MY SHOES
IT MIGHT NOT FIT YOURS
THIS PRESENTATION CONTAINS MY
PERSONAL VIEW ON THE WORLD
IT IS BASED ON MY EXPERIENCE IN SOFTWARE DEVELOPMENT PROJECTS SINCE 1996
MOST THINGS I LEARNED FROM PAIN
OTHERS FROM MOMENTS OF GRACEFULNESS, BRAVENESS & SUCCESS
25. danielfisher.com
DDD Value Object Input Validation
public sealed class ZipCode
: IValueObject
{
public ZipCode(int value)
{
// Input validation!!!
Value = value;
}
public int Value { get; private set;}
}
32. danielfisher.com
A distributed system
is one in which the failure
of a computer you didn't
even know existed can
render
your computer unusable
http://research.microsoft.com/en-us/um/people/lamport/pubs/distributed-system.txt
35. danielfisher.com
Servers get rebooted
Code has bugs
Other users might use it different
Failover means offline
Processing time varies by amount of data
Environments differ
File system is not always available
38. danielfisher.com
Scale like a boss
Asynchronicity
No one waiting for an error
Bulkheads & Replays
Loose coupling for the win
But dare you forget the dead letters
No cascading failures and stack trace
39. danielfisher.com
BASE OVER ACID
Atomic, Consistent, Isolated and Durable
solutions are not a silver bullet.
Basic Availability, Soft-state and Eventual consistency work
better in most distributed scenarios.
BUT YOU MUST THINK DIFFERENT FOR BASE
Use a more relaxed consistency model to reduce coupling
Queues are as transactional as databases
40. danielfisher.com
Idempotency
Non-idempotency is complicated to handle
and increases coupling between participants.
stateless stateless stateless
THIS ALSO REQUIRES YOU TO THINK DIFFERENT
But in the end it is nothing more than divide and conquer with an eye on the results
Functional programming and
immutable types for the win.
41. danielfisher.com
Monitor & Audit
Measure to gain latency control and detect non-
timely responses before they time out.
Learn more about the life of your system to predict its behavior.
If you can’t debug, log is your friend
Respond to detected failures.
20% - 40% logging code
Auditing and Logging can even be party of your architecture
47. danielfisher.com
Nassim Nicholas Taleb wrote two interesting books
about how economical systems behave.
He focusses on what happens under
stress and on unexpected occurrences
of events.
The black swan
Antifragility
49. danielfisher.com
What Doesn't Kill You
Makes You Stronger
Every time something catastrophic
happens that you take on and survive…
… your team and you code becomes
Stronger, Better, Faster, More
50. danielfisher.com
Asymmetric information & options
An opportunity to cope with
the lack of knowledge
ST R AT E GY
Business, Architecture & Code
Long Term vs Short Term
Sustainability vs Reward