82
#WISSENTEILEN „Lightweight“-Architectures Lars Röwekamp | CIO New Technologies | @mobileLarson open knowledge | #WISSENTEILEN

Herausforderung „Multi-Channel Architecture”

Embed Size (px)

Citation preview

#WISSENTEILEN

„Lightweight“-ArchitecturesLars Röwekamp | CIO New Technologies | @mobileLarson

open knowledge | #WISSENTEILEN

ÜBER OPEN KNOWLEDGEBranchenneutrale Softwareentwicklung und IT-Beratung

#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

„Multi-Channel! Warum?“

Motivation

An Era of „Mindshift“

„The expectation that I can get what i want in my immediate context and moments of need!“

„Mindshift“ in ... Verhalten, Erwartungen, Kontrolle

#WISSENTEILEN

„Where do you use the

followingdevices in a

typical week?“

Motivation

(Quelle: Mobile Mindshift Online Survey USA)

„We DO new Things!“

„We DO new Things!““We EXPEXT new Things!“

#WISSENTEILEN

Motivation

#WISSENTEILEN

Motivation

Die Multi-Channel Challenge

#WISSENTEILEN

„Multi-Channel, na klar! Wo liegt das Problem?“

Motivation

#WISSENTEILEN

Multi-Channel

Responsive Design

#WISSENTEILEN

Multi-Channel

„Geht das mit unseremklassischen Backend?“

#WISSENTEILEN

Multi-Channel

„Geht das mit unseremklassischen Backend?“

„Ja klar geht das, aber ...“

#WISSENTEILEN

Multi-Channel

Old Channel

#WISSENTEILEN

Multi-Channel

Old Channel New Channel

#WISSENTEILEN

Multi-Channel

Old Channel New Channel

#WISSENTEILEN

Multi-Channel

Cross-Channel Omni-Channel

vs.

#WISSENTEILEN

Multi-Channel

Hmmm, kind of Fail?

Omni___

#WISSENTEILEN

Multi-Channel

„Bros, not Twins!“

Omni___

#WISSENTEILEN

„One single

MONOLITHto rule them all!“

vs.

„Time to Market“

Multi-ChannelOmni___

#WISSENTEILEN

A responsive Monolithis still a Monolith!

#WISSENTEILEN

Architektur

#WISSENTEILEN

ArchitekturProblemfeld: • Views

Lösung:• ?

#WISSENTEILEN

ArchitekturProblemfeld: • Views

Lösung:• Resources

#WISSENTEILEN

ArchitekturProblemfeld: • „Repetitive Now“

Lösung:• ?

#WISSENTEILEN

ArchitekturProblemfeld: • „Repetitive Now“

Lösung:• Push statt Pull

#WISSENTEILEN

ArchitekturProblemfeld: • Skalierung

Lösung:• ?

#WISSENTEILEN

ArchitekturProblemfeld: • Skalierung

Lösung:• ?

You want to be here!

#WISSENTEILEN

ArchitekturProblemfeld: • Skalierung

Lösung:• Domain Services

#WISSENTEILEN

ArchitekturProblemfeld: • Monolithic Release

Lösung:• ?

Architektur

#WISSENTEILEN

Problemfeld: • Monolithic Release

Lösung:• Modularization

Architektur

#WISSENTEILEN

Problemfeld: • Provisionierung

Lösung:• ?

ArchitekturProblemfeld: • Provisionierung

Lösung:• PaaS (via Cloud)

#WISSENTEILEN

ArchitekturOh, my god!

Microservices! PaaS!

Yeah, all Work done!

Really? All Work done!

ArchitekturLightweight Architecture:

• Resources statt Views• Push statt Pull• Domain Services• Modularization• PaaS

#WISSENTEILEN

ArchitekturHighlyDistributed System

Challenges

Versionierung

Error Handling

Caching & Sync

Analytics

Security

?!

Versionierung

Error Handling

Analytics

(Web) Security

Caching & Sync

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

Koexistenz von Endpoints

Versionierung

Koexistenz von Endpoints

Versionierung

Koexistenz von Endpoints

Versionierung

Konkurrierende Service Versionen

Versionierung

Konkurrierende Service Versionen

Versionierung

Konkurrierende Service Versionen

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

Versionierung

Error Handling

Analytics

(Web) Security

Caching & Sync

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

Versionierung

Error Handling

Analytics

(Web) Security

Caching & Sync

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

Versionierung

Error Handling

Analytics

(Web) Security

Caching & Sync

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

Versionierung

Error Handling

Analytics

(Web) Security

Caching & Sync

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

#WISSENTEILEN

FAZIT

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

? ? ?FRAGEN

#WISSENTEILEN

Kontakt

LARS RÖWEKAMPCIO NEW TECHNOLOGIES

[email protected]+49 (0)441 4082 – 101

@mobileLarson@_openknowledge

OFFENKUNDIGGUT

#WISSENTEILEN

Bildnachweise

#1: © Rawpixel.com - shutterstock.com#5: © OneinchPunch - fotolia.com

All other pictures inside this presentation orginate frompixabay.com.

#WISSENTEILEN