Javaland 2015 - Bernd Zuther - Die Jagd nach mehr Konversion - Fluch oder Segen für den Entwickler
-
Upload
bernd-zuther -
Category
Engineering
-
view
118 -
download
1
Transcript of Javaland 2015 - Bernd Zuther - Die Jagd nach mehr Konversion - Fluch oder Segen für den Entwickler
Die Jagd nach mehr KonversionFluch oder Segen für den Entwickler
Bernd Zuther - IT Consultant Big Datacodecentric AG
Bernd Zuther
@Bernd_Z github.com/zutherb [email protected]
How can we increase sales?
A/B Testing
Conversion
Conversion Rate =Number of Goals achieved
Visits
act of converting site visitors into paying customersproportion of visits to a website which take action to go beyond a website visit
··
FeatureToggle
public class TopSellerRecommendationPanel extends AbstractShopBasePanel {
@SpringBean private FeatureToogleBean featureToogleBean;
...
@Override protected void onConfigure() { super.onConfigure(); setVisible(featureToogleBean.isTopSellerFeatureEnabled()); }
...
}
JAVA
Checkout - Variant A
Checkout - Variant B
ProjectScrum + 98% forecast (commitment) guaranteeregular deployment 1 x 2 weekshot fix/feature deployments 2-4 per sprintaround 1 1/2 h to get into production
····
35min per build40min per ITIL stuff:
20min per manual deployment
--
callsticketetc.
---
-
How can we deliver faster?
What have we done?
How does it work?
Disadvantages of a MonolithReduction of development speedIncrease of turnaround timesIncrease of build timeStrange behavior after changesIncrease of time to marketA/B testing of process changes nearly impossibleScalability (e.g. application and teams)
·······
How can we build software smarter?
Microservice
Data
Functionality
Microservice Architecture
Data
Functionality
Data
Functionality
Data
Functionality
Functionality
Data
Functionality
Data
Service-Oriented Architecture (SOA / 1996)SOA is an architectural style that supports service-orientation.Service-orientation is a way of thinking in terms of services.A service:
···
Is a logical representation of a repeatable business activity(e.g., submit order)Is self-containedMay be composed of other servicesIs a “black box” to consumers of the service
-
---
SOA taxonomy
Differences to SOALightweight infrastructure and protocols (e.g. REST)Greater flexibility of architecture (e.g. can contain GUI)Managed as products, with their own lifecycle and deliveryDeployed as processes (Unix packages or Container)
····
Online Shop - Use casesOnline Shop
order products
Buyer
view catalog
<include>
create cart
<include>
Online Shop - Migration
<<device>>Microservice Server
<<web server>>Ngnix
<<service>>Cart Service
<<service>>Product Service
<<device>>Monolith Server
<<application server>>Tomcat
<<artifact>>shop.war
<<artifact>>Catalog View
<<artifact>>cart-service.jar
<<artifact>>product-
service.jar
Challenges of MicroservicesRequire integration.Require a multi deployment pipeline.Require automation of deployment and configuration.Require logging and monitoring.
····
Leavitt - Communication Structure
Type Star Chain Circle Complete Structure
centralization high medium low very low
communication low medium much very much
controllability much medium low very low
Conway's Law
<<device>>Microservice Server
<<web server>>Ngnix
<<service>>Cart Service
<<service>>Product Service
<<device>>Monolith Server
<<application server>>Tomcat
<<artifact>>shop.war
<<artifact>>Catalog View
<<artifact>>cart-service.jar
<<artifact>>product-
service.jar
Rest Communication
{ firstname: "Bernd", lastname: "Zuther", street: "Elsenheimerstraße 55a", city: "München", zip: 80687}
JAVASCRIPT
Rest Communication
{ firstname: "Bernd", lastname: "Zuther", birthday: "1983/08/15", street: "Elsenheimerstraße 55a", city: "München", zip: 80687}
JAVASCRIPT
Rest Communication
{ firstname: "Bernd", lastname: "Zuther", birthday: "1983/08/15", addresses : [{ street: "Elsenheimerstraße 55a", city: "München", zip: 80687, type: "WORK" }]}
JAVASCRIPT
Versionless Rest Communication
{ firstname: "Bernd", lastname: "Zuther", birthday: "1983/08/15", street: "Elsenheimerstraße 55a", city: "München", zip: 80687, addresses : [{ street: "Elsenheimerstraße 55a", city: "München", zip: 80687, type: "WORK" }]}
JAVASCRIPT
AlternativesURL:
Custom request header:
Accept header:
·simply whack the API version into the URL, e.g. https://shop/api/v2/cart/all-
·same URL as before but add a header “api-version: 2”-
·modify accept header to specify the version, e.g. “Accept:application/vnd.cart.v2+json”
-
Multi Deployment Pipeline
Build Test Publish
UI-Test
Build Test Publish
Deployment
Load-Test
Catalog View
Productservice
Deployment
@RestControllerclass CartController {
@Autowired def CartRepository cartRepository;
@RequestMapping(value = "/create", produces = MediaType.APPLICATION_JSON_VALUE, method = RequestMethod.PUT) @ResponseBody def UUID create(@RequestBody CartItem item) { cartRepository .create(item)}
<<executable>>cart-service.jar
build
ConfigurationCART_SERVICE_PROFILES=productionCART_SERVICE_PORT=18100CART_SERVICE_REDIS_URL=redis.microservice.io
release
release
<<package>>cart-service.debrelease
Infrastructure Code#! /bin/shPIDFILE=/var/run/cart.pidBASE_DIRECTORY=/usr/share/shop/cart/bin
Unix Package Repository
How can we describe infrastructureand products?
Docker Environment
<<device>>Docker Deamon
<<container>>Ngnix
<<container>>Cart Service
<<container>>Product Service
<<artifact>>checkout
.war<<artifact>>catalog.tar
<<artifact>>cart-service.jar
<<artifact>>product-
service.jar
<<container>>Tomcat
<<container>>MongoDB
<<container>>Redis
<<container>>Navigation
Service
<<artifact>>navigation-service.jar
Kubernetes - Cluster Management
Pod
kind: PoddesiredState: manifest: containers: - name: mongodb image: dockerfile/mongodb cpu: 100 memory: 50000000 ports: - containerPort: 27017
YAML
Replication Controller
kind: ReplicationController,desiredState: replicas: 4 podTemplate: desiredState: manifest: containers: - name: product image: zutherb/product-service
YAML
Service
Experiment with your customers!
Summary
Pro Needs
better A/B testing monitoring
effective technologies centralised logging
solution orientation fully automated deployment pipeline
incremental migration cluster management
Microservices do not guarantee more conversion!You need to run experiments with your customers!
<Thank You!>
g+ plus.google.com/+BerndZuthertwitter @Bernd_Zwww bernd-zuther.degithub github.com/zutherb/
LinksJava Aktuell 02/15 - Microservices und die Jagd nach mehr KonversionLean StartupTest Driven Business Featuring Lean StartUpContinuous Delivery mit dem FeatureToggle PatternFeatureToggleDo Good Microservices Architectures Spell the Death of the Enterprise ServiceBus?MicroservicesPipeService Oriented Architecture : What Is SOA?The Twelve FactorsThree Golden Rules for Continuous Delivery
······
·····
LinksYour API versioning is wrong, which is why I decided to do it 3 different wrongwaysMicroservices im Zusammenspiel mit Continuous Delivery, Teil 1 – die TheorieFast, isolated development environments using DockerMicroservices versus OSGi: Über Sinn und Unsinn der 'neuen Inkarnation desWebserviceWarnung vor dem Microservice – Versuch einer DefinitionMicro Services in der Praxis: Nie wieder Monolithen!Netflix NebulaDeployment ganz einfach – Microservice Deployment mit Hilfe der LinuxPaketverwaltungSplunk – Marke Eigenbau mit Elasticsearch, Logstash und Kibana (ELK Stack)Scaling Docker with KubernetesAppstash Project
·
···
····
···
ImagesDelivery of semlorFreebooksSOACuba CarLandschaftspark Duisburg-NordUnfall von Herbert StengerLieferwagenIndianapolis ZooDeveloper At WorkIcom IC735 + TunerJust a face in the crowd[119/366] Thumbs UpContainers
·············
ImagesCafé con leche - Milchkaffee (CC)Cloning Experiments: Jess PayneBLM NevadaThere's a light at the end of the tunnel...
····