33
DEV-1478 - Your App Deserves More – The Art of App Modernization Christian Guedemann - CTO Klaus Bild - System Architect WebGate Consulting AG

Your App Deserves More – The Art of App Modernization

Embed Size (px)

Citation preview

Page 1: Your App Deserves More – The Art of App Modernization

DEV-1478 - Your App Deserves More – The Art of App Modernization

Christian Guedemann - CTO Klaus Bild - System Architect

WebGate Consulting AG

Page 2: Your App Deserves More – The Art of App Modernization

About us

Christian Guedemann

@guedeWebGate

CTO

OpenNTF Chairman

Developer

Klaus Bild

@kbild

Senior System Architect

Admin

Page 3: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Agenda

3

• State of the Art Applications

• How to modernize my current Apps

• Needed Technology

• Example / Demo

Page 4: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Why

4

Users will always find a way how the can solve their problems...

With your Without you.

With your application or without your application.

Page 5: Your App Deserves More – The Art of App Modernization

State of the Art Applications

5

Page 6: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

IDENTITY ADAPTER

Identity Mgmt

Customer

Employee

REST API

WEB UI

RESSOURCE ADAPTER

ERP

USER MGMT

RESSOURCEMGMT

BILLING

PAYMENTSNOTIFICATIONS

DB

DB ADAPTER

6

Past

• Monolithic • Pro:

• Simple to test (really?) • Easy to deploy

• Cons: • Complexity grows • Implementing new

features becomes difficult and time consuming

• Difficult to adopt new frameworks

Page 7: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 237

Monolithic

BusinessProcesses

Human Tasks

BusinessRules

Interface Business Objects Relationships

Message Queue

J2EE Runtime

BusinessProcesses Business Logic Business

Rules

Application Behaviour

Data

NSF Runtime

Page 8: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 238

Past

To summarize:

You have a successful business-critical application that has grown into a

monstrous monolith that very few, if any, developers understand. It is

written using obsolete, unproductive technology that makes hiring talented

developers difficult. The application is difficult to scale and is unreliable. As

a result, agile development and delivery of applications is impossible.

Source: https://www.nginx.com/blog/introduction-to-microservices/

Page 9: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

• Micro Services • Pro:

• Technology Heterogeneity

• Resilience • Scaling • Organizational Alignment • Composability

• Cons: • Distributed System • More complex to deploy,

test, and monitor

9

State of the Art Applications

EMPLOYEE WEB UI

REST API

NOTIFICATIONS

REST API

RESSOURCES

REST API

BILLING

REST API

CUSTOMER WEB UI

REST API

PAYMENTS

REST API

USER MGMT

REST API

Customer

Employee

API GATEWAY

IDENTITY ADAPTER

RESSOURCE ADAPTER

DB ADAPTER

DB ADAPTER

DB ADAPTER

-> 12-Factor-App pattern: https://12factor.net/

Page 10: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 2310

Page 11: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Micro Services and IBM Domino

• Notes Applications contain Business Logic in every Design element

• Accessing Notes Databases (NSF) via Domino Data Services Rest API means bypassing the implemented Business logic

• Turns an NSF into a simple, stupid Data store • Exposes all properties of a document as JSON • Is a security issue, because every User with a Browser and

Access rights can modify the documents (e.g. if the field “Approval” controls the expense approval, a user can set this field to “approved” with only using his browser or Postman)

• A Notes Application contains security layers to protect the business logic

Page 12: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Turn an NSF into a Micro Service with SmartNSF

A new design element in the Domino Designer provides Access to “routes.groovy”

A DEVELOPER DEFINES WITH A DSL (DOMAIN SPECIFIC

LANGUAGE) THE ROUTING OF THE MICRO SERVICE

Page 13: Your App Deserves More – The Art of App Modernization

router.GET(…) router.PUT(…) router.POST(…)

• router.<VERB>(<route>, <Configuration>)

• The router is the object, that let you register some routes and capabilities for the micro service

• All routes are available under “<dbname>.nsf/xsp/.xrest/<ROUTE>

• A REST Call must match the route

• <VERB>: Can be GET, PUT, POST and are mapped to the Methods of the HTTP Protocol

• <ROUTE>: is the Path. e.g. “customers/{id}”

• {id} -> this part of the URL will become available as Variable. Means a call to “.nsf/xsp/.xrest/customers/33221” will be evaluated with the specified route. 33221 will be available as value of the variable {id}

• <CONFIGURATION>: The configuration of this Route

Page 14: Your App Deserves More – The Art of App Modernization

Configuration Elements for a Routerouter.<VERB>(<ROUTE>, <CONFIG>)

strategy• strategy(STRATEGY_NAME, {

viewName “ProjectLookup” keyVariableName “id”}

A strategy defines how to access one or more documents. There are several

strategies implemented and also a CUSTOM strategy available, which

activates a bean

• STRATEGY_NAME: Name of the Strategy. Each strategy has its own configuration.

• GET_DOCUMENT_FROM_VIEW_BY_KEY, GET_BY_UNID, SEARCH_FT, SELECT_BY_FORMULA, ALL_BY_VIEW, ALL_FROM_VIEW_BY_KEY, CUSTOM_STRATEGY;

Page 15: Your App Deserves More – The Art of App Modernization

Configuration Elements for a Routerouter.<VERB>(<ROUTE>, <CONFIG>)

events• events({

VALIDATE { context -> // Some Code to validate the call, // throws a EventException() if something // goes wrong }})

A event can be used to intercept the transformation from a document to JSON and back. There are several

events defined to control the micro service

EVENTS: VALIDATE PRE_SAVE POST_SAVE PRE_LOAD_DOCUMENT POST_LOAD_DOCUMENT PRE_SUBMIT

Page 16: Your App Deserves More – The Art of App Modernization

Configuration Elements for a Routerouter.<VERB>(<ROUTE>, <CONFIG>)

accessPermission• accessPermission

”[DbManager]”,“[MainEditor]” • accessPermission { context ->

//Code that returns a List<String>}

With accessPermission it can be controlled which user can access

the defined route. If a user is not part of the database role or group, its not possible to execute this route for the current

user

Page 17: Your App Deserves More – The Art of App Modernization

Configuration Elements for a Routerouter.<VERB>(<ROUTE>, <CONFIG>)

mapJson• mapJson “projectTitle”,

toJson:’title’, type:’String’ • mapJson “projectOwner”,

toJson:’owner’, type:’Array’ mapJson controls which fields of the document are exposed as Json Object, or in case of a PUT instruction, which Json property is mapped to what field

mapJson: “fieldName” toJson -> name of the Json

Property type – enforces a specific type

(String, Number, Array, …) convertToJson: {value ->} convertFromJson: { value ->}

Page 18: Your App Deserves More – The Art of App Modernization

Technology

18

Page 19: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Technology - IT Infrastructure

19

On-Premises

Platform OS - Middleware - Runtime

Applications Packaged Software

Infrastructure Servers - Storage - Network

IaaS

Platform OS - Middleware - Runtime

Applications Packaged Software

Infrastructure Servers - Storage - Network

PaaS

Platform OS - Middleware - Runtime

Applications Packaged Software

Infrastructure Servers - Storage - Network

SaaS

Platform OS - Middleware - Runtime

Applications Packaged Software

Infrastructure Servers - Storage - Network

MicroService

MicroService

MicroService

Page 20: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Technology - VMs vs Containers

20

Platform OS - Middleware - Runtime

Applications Packaged Software

Infrastructure Servers - Storage - Network

Host OS

Bins/Libs

Infrastructure Servers - Storage - Network

Hypervisor

Guest OS Guest OS Guest OS

App

Bins/Libs

App

Bins/Libs

AppMicro

Service

Host OS

Bins/Libs

Infrastructure Servers - Storage - Network

Docker Engine (Kernel)

App

Bins/Libs

App

Bins/Libs

AppMicro

Service

VM

Container

Page 21: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Docker containers wrap up a piece of software in a complete

filesystem that contains everything it needs to run: code,

runtime, system tools, system libraries – anything you can install on a server. This guarantees that

it will always run the same, regardless of the environment it

is running in.

21

Technology - Docker?

http://www.boycottdocker.org/

Page 22: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 2322

Technology - Docker?

Development VM

QA Server

On-PremisesData Center

Cloud Data Center

Production Cluster

External Developer laptop

Static website User DB Queue Analytics DB

Build Once, Configure Once & Run Anywhere (x86-64)

Content Agnostic

Hardware Agnostic

Page 23: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 2323

Technology - Why containers matter - Standards & Automation

Page 24: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

• Deploy Servers • Install Dependencies • Install Applications • Configure Applications

• Takes days or weeks, even if scripted

• Needs Admins

24

Technology - Deploy Monolith

Page 25: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

• Deploy Containers • On-Premises or Cloud or

both • Orchestrate the Containers

(Kubernetes, OpenShift, IBM Spectrum Conductor for Containers)

• Takes minutes or hours • No Admins needed

25

Technology - DevOps - Deploy Micro Services

Customer

Employee

Sure?!?

Page 26: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Technology

26

http://de.slideshare.net/MichaelDucy/the-future-of-everything-37344357

Page 27: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Technology - Admins - Call for action

27

• Play with: • Docker • Kubernetes

• Try to deploy containers to Bluemix

• Together with your Developers look at: • Cloudfoundry / IBM Bluemix • OpenShift

• Look at OpenSource software: • Message Brokers (Redis, Kafka, ActiveMQ, Mosquitto…) • DBs (MariaDB, ElasticSearch, MongoDB, PostgreSQL…) • Especially time series DBs (InfluxDB, Graphite or commercial IBM Informix) • Visualisation (Kibana, Grafana)

Page 28: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Technology - Developer - Call for action

28

• Play with: • Docker • Kubernetes

• Try to deploy containers to Bluemix

• Together with your Developers look at: • Cloudfoundry / IBM Bluemix • OpenShift

• Look at OpenSource software: • Message Brokers (Redis, Kafka, ActiveMQ, Mosquitto…) • DBs (MariaDB, ElasticSearch, MongoDB, PostgreSQL…) • Especially time series DBs (InfluxDB, Graphite or commercial IBM Informix) • Visualisation (Kibana, Grafana)

Page 29: Your App Deserves More – The Art of App Modernization

Example / Demo

29

Page 30: Your App Deserves More – The Art of App Modernization

IBM Connect 2017 Conference | Moscone West, San Francisco | February 20 - 23

Example Setup

30

• Let‘s do Something CRAZY • We take IBM Verse, extend it and connect a Micro Service

from our Domino Server and combine this with the Watson Alchemy API!

Page 31: Your App Deserves More – The Art of App Modernization

Notices and disclaimers

Copyright © 2017 by International Business Machines Corporation (IBM). No part of this document may be reproduced or transmitted in any form without written permission from IBM.

U.S. Government Users Restricted Rights — Use, duplication or disclosure restricted by GSA ADP Schedule Contract with IBM.

Information in these presentations (including information relating to products that have not yet been announced by IBM) has been reviewed for accuracy as of the date of initial publication and could include unintentional technical or typographical errors. IBM shall have no responsibility to update this information. THIS DOCUMENT IS DISTRIBUTED "AS IS" WITHOUT ANY WARRANTY, EITHER EXPRESS OR IMPLIED. IN NO EVENT SHALL IBM BE LIABLE FOR ANY DAMAGE ARISING FROM THE USE OF THIS INFORMATION, INCLUDING BUT NOT LIMITED TO, LOSS OF DATA, BUSINESS INTERRUPTION, LOSS OF PROFIT OR LOSS OF OPPORTUNITY. IBM products and services are warranted according to the terms and conditions of the agreements under which they are provided.

IBM products are manufactured from new parts or new and used parts. In some cases, a product may not be new and may have been previously installed. Regardless, our warranty terms apply.”

Any statements regarding IBM's future direction, intent or product plans are subject to change or withdrawal without notice.

Performance data contained herein was generally obtained in a controlled, isolated environments. Customer examples are presented as illustrations of how those customers have used IBM products and the results they may have achieved. Actual performance, cost, savings or other results in other operating environments may vary.

References in this document to IBM products, programs, or services does not imply that IBM intends to make such products, programs or services available in all countries in which IBM operates or does business.

Workshops, sessions and associated materials may have been prepared by independent session speakers, and do not necessarily reflect the views of IBM. All materials and discussions are provided for informational purposes only, and are neither intended to, nor shall constitute legal or other guidance or advice to any individual participant or their specific situation.

It is the customer’s responsibility to insure its own compliance with legal requirements and to obtain advice of competent legal counsel as to the identification and interpretation of any relevant laws and regulatory requirements that may affect the customer’s business and any actions the customer may need to take to comply with such laws. IBM does not provide legal advice or represent or warrant that its services or products will ensure that the customer is in compliance with any law

31 1/19/2017

Page 32: Your App Deserves More – The Art of App Modernization

Notices and disclaimers continued

Information concerning non-IBM products was obtained from the suppliers of those products, their published announcements or other publicly available sources. IBM has not tested those products in connection with this publication and cannot confirm the accuracy of performance, compatibility or any other claims related to non-IBM products. Questions on the capabilities of non-IBM products should be addressed to the suppliers of those products. IBM does not warrant the quality of any third-party products, or the ability of any such third-party products to interoperate with IBM’s products. IBM EXPRESSLY DISCLAIMS ALL WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.

The provision of the information contained herein is not intended to, and does not, grant any right or license under any IBM patents, copyrights, trademarks or other intellectual property right.

IBM, the IBM logo, ibm.com, Aspera®, Bluemix, Blueworks Live, CICS, Clearcase, Cognos®, DOORS®, Emptoris®, Enterprise Document Management System™, FASP®, FileNet®, Global Business Services ®, Global Technology Services ®, IBM ExperienceOne™, IBM SmartCloud®, IBM Social Business®, Information on Demand, ILOG, Maximo®, MQIntegrator®, MQSeries®, Netcool®, OMEGAMON, OpenPower, PureAnalytics™, PureApplication®, pureCluster™, PureCoverage®, PureData®, PureExperience®, PureFlex®, pureQuery®, pureScale®, PureSystems®, QRadar®, Rational®, Rhapsody®, Smarter Commerce®, SoDA, SPSS, Sterling Commerce®, StoredIQ, Tealeaf®, Tivoli®, Trusteer®, Unica®, urban{code}®, Watson, WebSphere®, Worklight®, X-Force® and System z® Z/OS, are trademarks of International Business Machines Corporation, registered in many jurisdictions worldwide. Other product and service names might be trademarks of IBM or other companies. A current list of IBM trademarks is available on the Web at "Copyright and trademark information" at: www.ibm.com/legal/copytrade.shtml.

32 1/19/2017

Page 33: Your App Deserves More – The Art of App Modernization

Thank you

33 1/5/17