Download - Herausforderung „Multi-Channel Architecture”
#WISSENTEILEN
„Lightweight“-ArchitecturesLars Röwekamp | CIO New Technologies | @mobileLarson
open knowledge | #WISSENTEILEN
ÜBER MICH
Wer bin ich - und wen ja, wie viele?
• CIO New Technologies • Enterprise & Mobile • Autor, Speaker, Coach & Mentor
• Snowboard & MTB Enthusiast• Mehrfacher Vater, einfacher Ehemann
Lars Röwekamp (a.k.a. @mobileLarson)
#WISSENTEILEN
LR
#WISSENTEILEN
„Where do you use the
followingdevices in a
typical week?“
Motivation
(Quelle: Mobile Mindshift Online Survey USA)
ArchitekturLightweight Architecture:
• Resources statt Views• Push statt Pull• Domain Services• Modularization• PaaS
Versionierung
• Client/Server entwickeln sich unterschiedlich• Request /Response passen nicht zueinander
• Fehlende/unbekannte Request Attribute• Fehlende/unbekannte Response Attribute
• Geänderte Semantik von Attributen • Geänderte Semantik von Defaults
Omni-Channel Architecture
#WISSENTEILEN
Versionierung
Best Practices strategisch
• so lang wie möglich verhindern• enge Koppelung vermeiden• Consumer-Driven Contracts
• Semantic Versioning (Major.Minor.Patch)• Koexistenz verschiedener Endpoints• konkurrierende Service Versionen
Omni-Channel Architecture
#WISSENTEILEN
Versionierung
Best Practices technisch
• gar nicht• gar nicht (via neue Ressourcen) • gar nicht (via erweiterbarer Datenformate)• Versionsnummer in der URL• Version Request Header• Content Negotiation
Omni-Channel Architecture
#WISSENTEILEN
VersionierungOmni-Channel Architecture
#WISSENTEILEN
// Versioning via adaptable data format
{ "items" : [ {"name" : "coffee","quantity" : 1,"milk" : "semi","size" : "large",
} ],"location" : ”take-away"
}
VersionierungOmni-Channel Architecture
#WISSENTEILEN
// Versioning via adaptable data format
{ ”items" : [ {"name" : "coffee","quantity" : 1,"milk" : "semi","size" : "large","price" : "4.00 USD"} ],"location" : "take-away"
}
VersionierungOmni-Channel Architecture
#WISSENTEILEN
// Versioning via adaptable data format
{ ”items" : [ {"name" : "coffee","quantity" : 1,"milk" : "semi","size" : "large","price" : "4.00 USD"} ],“total-price" : "4.00 USD""location" : "take-away"
}
VersionierungOmni-Channel Architecture
#WISSENTEILEN
// Versioning via adaptable data format
{ ”items" : [ {"name" : "coffee","quantity" : 1,"milk" : "semi","size" : "large","price" : "4.00 USD"} ],“price" : "4.00 USD""location" : "take-away"
}
„Are you a tolerant reader?“
VersionierungOmni-Channel Architecture
#WISSENTEILEN
„Be conservative in what youdo, be liberal in what youaccept from others.“
John Postel
Error Handling
„Is it a bug or a feature?“
• Error Handling • Compensation Algorithmn
Omni-Channel Architecture
#WISSENTEILEN
Error Handling
Status Codes - Pro Tipp: Use them!
• 1xx: Hold on ...• 2xx: Here you go!• 3xx: Go away!• 4xx: You f#!?ed up!• 5xx: I f#!?ed up!
Omni-Channel Architecture
#WISSENTEILEN
Error Handling
Status Codes - Pro Tipp: Use them!
• 1xx: Hold on ...• 2xx: Here you go!• 3xx: Go away!• 4xx: You f#!?ed up!• 5xx: I f#!?ed up!
Omni-Channel Architecture
#WISSENTEILEN
Omni-Channel Architecture
#WISSENTEILEN
// GET order with more than 5 itemsGET /orders?itemcount>=5 HTTP/1.1[various other headers]
// No order found for this query. // Response has no content (by purpose)HTTP/1.1. 204 No content
Error Handling
StatusCodes
Error Handling
Manchmal kommt es anders als man denkt!
• „Code for Code“: Status Code & Appliction Level Code• „Message for People“: Für Logs, Ausgaben, ...• „Payload and Format“: genormte Error-Payload Format
• Kein Stacktrace• Exception Mapper als Provider auf äußerster Ebene
Omni-Channel Architecture
#WISSENTEILEN
Error Handling
Compensation Algorithm
• Service not available• Eventual Consistency
Wichtig: Fachlicher „Plan B“
Omni-Channel Architecture
#WISSENTEILEN
Error Handling
Compensation Algorithm
• Transactions • Eventual Consistency• Service not available
Multi-Channel Architecture
#WISSENTEILEN
„Starbucks does not useTwo-Phase Commit“
http://www.enterpriseintegrationpatterns.com/ramblings/18_starbucks.html
Chaching & Sync
Always remember: „The Web is your Friend“
• das Web bietet tolle Möglichkeiten • RESTful Service nutzen das Web bzw. HTTP
Omni-Channel Architecture
#WISSENTEILEN
Chaching & Sync
Aber wer cached eigentlich was?
• Client (Web Browser, REST Client, ...) • Proxy Caches („man in the middle cache“)• Content Delivery Networks (CDNs)
Omni-Channel Architecture
#WISSENTEILEN
Chaching & Sync
Wie funktioniert HTTP Caching?
• Expires Header (HTTP 1.0)• Cache-Control (HTTP 1.1)
• Revalidation & Conditional GETs
Omni-Channel Architecture
#WISSENTEILEN
Security
OWASP Top 10 (Open Web Application Security Project)
1. Injection2. Broken Authentication & Session Management3. Cross-Site Scripting (XSS)4. Insecure Direct Object References5. Security Misconfiguration
... 5 more to come ...
Omni-Channel Architecture
#WISSENTEILEN
Analytics
Wider dem Kontrollverlust: Analytics als Grundlage für strategische Entscheidungen
• Was macht der User eigentlich?• Und in welchem Kontext?
• Werden meine Konzepte und Daten genutzt?• Wenn ja, wie? Wenn nein, warum nicht?
Omni-Channel Architecture
#WISSENTEILEN
Analytics
Monitore
• deine Ratings• deinen Traffic• deine UX
BTW: App ist nicht Web! Einmal deinstalliert ist immer deinstalliert.
Omni-Channel Architecture
#WISSENTEILEN
FazitLightweight Omni-Channel Architecture
#WISSENTEILEN
„Mit Multi-Channel verlagere ich bestehendes Business.
Mit Omni-Channel generiere ich neues Business!“
Fazit
„Time-to-Market“ via
• Resources statt Views• Events statt Request/Response• Domain Services statt Application• Modularization statt Monolith
Lightweight Omni-Channel Architecture
#WISSENTEILEN
Fazit
„Time-to-Market“ via
• Resources statt Views• Events statt Request/Response• Domain Services statt Application• Modularization statt Monolith
Nebenwirkungen nicht ausgeschlossen!
Lightweight Omni-Channel Architecture
#WISSENTEILEN
Kontakt
LARS RÖWEKAMPCIO NEW TECHNOLOGIES
[email protected]+49 (0)441 4082 – 101
@mobileLarson@_openknowledge
OFFENKUNDIGGUT
#WISSENTEILEN