Cloud Native Patterns with Bluemix Developer Console
-
Upload
matthew-perrins -
Category
Technology
-
view
27 -
download
1
Transcript of Cloud Native Patterns with Bluemix Developer Console
InterConnect2017
Patterns in Omni Channel Cloud Application Development
BM0 6321
Matthew PerrinsBrett King
Please noteIBM’s statements regarding its plans, directions, and intent are subject to change or withdrawal without notice at IBM’s sole discretion.
Information regarding potential future products is intended to outline our general product direction and it should not be relied on in making a purchasing decision.
The information mentioned regarding potential future products is not a commitment, promise, or legal obligation to deliver any material, code or functionality. Information about potential future products may not be incorporated into any contract.
The development, release, and timing of any future features or functionality described for our products remains at our sole discretion.
Performance is based on measurements and projections using standard IBM benchmarks in a controlled environment. The actual throughput or performance that any user will experience will vary depending upon many factors, including considerations such as the amount of multiprogramming inthe user’s job stream, the I/O configuration, the storage configuration, and the workload processed. Therefore, no assurance can be given that an individual user will achieve results similar to those stated here.
99.99% + uptime (< 4 mins downtime/month)
1000s of devices support
Thousands of code deployments per day
70 Million members, 190 Countries, 125 Million hours of videos
Fault Tolerant ArchitectureBuilt for FailureInstant Auto-Scaling (infinite scale)Cross-Geo AvailabilityContinuous DeliveryContinuous IntegrationLoosely Coupled Services…
Can’t handle Internet-scale loadDeployment cycles are long (complicated)
Operations is costlyArchitecture is brittle and monolithic
Services are over-engineered/designedIncreasingly hard to find skills
Application Architecture: As-is
9
Agility, Speed Time to Market, Fault Tolerant Apps
Developer Productivity, Using the Right Tool for the Job, Retain and
Hire Talent
Cost Efficiency, Productivity, Apps that Infinitely ScaleInnovation with Cognitive
Embrace Polyglot Programming and Open
Adopt Microservices Architecture & DevOps
Leverage a Cloud Platform Designed for Cloud Native
The Cloud Native Approach
10
IBM Cloud contains out-of-the-box core, tested capabilities to Build a Cloud-Native Appsfaster. IBM Bluemix also has innovative components, such as Cognitive, Internet of Things, Video, Cloud Data Services, and Blockchain so companies can differentiate Cloud-Native Apps.
User-facing High ValueData/StorageAPIs Integration Compute
AuthenticationNotificationsApp Analytics
WatsonWeather CompanyIoT ServicesVideo
Object StorageCloudantCompose Enterprise•Mongo•Redis•Elastic Search•MySQL, PostgresSQL…Big Insights / Hadoop
API Connect Cloud FoundryContainersOpen Whisk
Most Cloud-Native Applications use some or multiple databases. IBM
offers a range data services Transactional, Analytical, Structured
and Unstructured data, Object Storage (for
video et al) and Managed Open Source
databases.
Ready-to-use Digital Capabilities
Domain Services Mobile Watson IoT Block
Chain Health Video
Secu
rity
and
Com
plia
nce
Met
hods
& S
ervi
ces
Developer Services
Data & Analytics Integration App Services DevOps
Tooling
Containers Cloud Foundry Event-Driven
Infrastructure Services Compute Storage Network
Let talk about how Bluemix can support Cloud Native
IBM Bluemix, and it's set of domain services, developer services, infrastructure services, partnered with IBM Bluemix Garage services and expertise are the key offerings to help our clients succeed.
13 3/25/17
What are Patterns ?
In software engineering, a software design pattern is a general reusable solution to a commonly occurring problem within a given context in software design.
Design patterns are formalized best practices that the programmer can use to solve common problems when designing an application or system.
https://en.wikipedia.org/wiki/Software_design_pattern
There are lots more , depending on your adoption of Cloud Native• The following is a summary of the common app patterns for Bluemix this is not a complete list but a
starting point to level set on some basic architecture patterns that you build cloud native solutions with.
• #1 Mobile to Service• Entry level pattern where the Mobile device either Native or Hybrid mobile directly communicates with a High Value
Service.
• #2 Mobile or Web to Backend for Frontend• Entry level pattern when a developer or project needs common logic or multi channel capabilities and abstracts with
REST
• #3 Server less Events• The developer is now extending the features of their application and needs to use server less features for async
processing of integration of services.
• #4 API Connectivity with Micro Services• The developer organization is moving to a Micro Service design and needs to manage the API releases and delivery of
the services.
• #5 Cognitive• The organization is starting to integrate Cognitive features and APIs
• #6 Internet of Things• The organization is starting to consume data in flight and analyze it with data in store
• #7 Async processing of Cloud Services• The organization is and development teams are starting to apply enterprise patterns for cloud service management,
data offload and storage etc.
• #8 Four Tier Forester Architectures• The organization is using mixed Public, Hybrid and Local and delivering complex Systems of Engagement and Systems
of Record
New Developers
Web DevelopersMutli Channel
New Patterns early adopters
Extending new business models
Traditional IBM Customers
Enterprise Cloud Behavior
StartupsMulti Team
A mobile app is a software application developed specifically for use on small, wireless computing devices, such as smartphones and tablets, rather than desktop or laptop computers.
• Apple and Google have the largest market for Mobile Operating Systems
• Often built using Native programming toolset with iOS and Android
What is a Mobile App ?
In computing, a web application or web app is a client–server software application in which the client (or user interface) runs in a web browser
• Evolving to true multi channel• Progressive Web Apps blur
user interaction between the Desktop and Web
• Users start journeys from multiple entry points
What is a Web App ?
Those were the patterns you might recognize, we use them everydayNow we need to explain the patterns that make cloud native solutions become amazing and give software engineers the most flexibility to deliver
A BFF is tightly coupled to a specific user experience, and will typically be maintained by the same team as the user interface, thereby making it easier to define and adapt the API to the user interface requirements.• More flexibility for continuous delivery, no
centrally controlled API
• Enables digital channels to evolve quickly and to business needs
• Contains transformational logic, integration logic, app facing API, possibly RPC in nature
What is a Backend for Frontend
Micro services is a specialization of an implementation approach for service-oriented architectures (SOA) used to build flexible, independently deployable software systems.
Services in a micro service architecture (MSA) are processes that communicate with each other over a network in order to fulfill a goal
Individually managed and deployed and scale and are loosely coupled in nature
Used for heavy lifting business logic
What is a Micro service
IBM is releasing coverage for a number of key Cloud Native patterns for Interconnect 2017
Simple Web App + Cloud services(Java, Node, or Swift)
1
Simple Mobile + Cloud services(iOS, Android, Xamarin, Cordova)
2
Web and Mobile Frontends + BFF + Backend servicesMobile clients: iOS, Android, Xamarin, Cordova
BFF: (Java, Node, or Swift) x (Whisk action, CF App, Containerized server)
3
Managed API Service (API Connect)(Java, Node, Swift)
4
Microservice (container-based)Java, Node, Swift via predefined docker images
Choice of orchestration framework
5
6
OpenWhisk-based MicroserviceActions implemented in Java, Node, Swift
Triggered by (whatever) service
Lets show these patterns in an end to end example
Cloud native solutions evolve over time, often start out with just a few digital channels and a few foundational micro services, as engineers become comfortable with the software delivery model they extend and grow.
Example: Order Management Use Case
Generated SDK System SDK
PushNotifications
IOS, tvOS, Mac (Swift)Android (Java)Cordova HybridHTML5 (JavaScript)
Digital ChannelsUser Layer
Example Omni Channel application service different use end points and requirements , using Cloud Native Micro Services architecture
iOSApp
WebApp
VoiceApp
PublicAPI
iOSBFF
Edge Layer
WebBFF
ChatBFF
APIConnect
IBM Cloud
ProductHandling
(ms)
Business LogicLayer
FoundationalLayer
Orders(ms)
Stock(ms)
Products(ms)
NotificationAction(event)
OrderHandling
(ms)
Cloud NativeService
Cloudant
Elastic Search
Watson Conversation
Storage
REST API
Node.js, Swift, JavaOther polyglot languages
Node.js, Swift, JavaOther polyglot languages
App
IDA
uthentication
App
IDA
uthentication
Introducing the Bluemix Developer Console
A fast way to start your journey towards cloud native application, enabling fast creation of common patterns and integrating with local dev/test and deploy through dev ops pipelines
24
Why are we doing this ?Building cloud native apps with frameworks and services is hard !!
253/25/17
Starting from the from the Catalog
With BluemixDevelopers Console
> 60 steps> 2 days
Lots of Google
< 10 steps< 5 mins
Guided experience through UX and CLI
Runtime x Framework x Service + API = Lots of learn
Project Generation
Bluemix Developer ConsoleValue for Bluemix developers
Blue
mix
Dev
CLI
Bluemix Developer Console
1. Starts with…
Bluemix
Codes …
Check in to…
App
DevOpsOpen Toolchains
Github
Kicks off…
Builds & Deploys…
Developer
Calls …
Generates …
Source Code
IDEOrion, VSCode, Atom, Xcode…
Autoscale Logmet BAM
Integrates with …
Provisions …
Local ContainerLocal container generation and managementLocal build and debug
Project scaffoldingSDK generationService provisioningAPI Model generationSwagger generation
Developerpush code into git
Microservicebuildpipeline
Gatherfeedback
Hourly
Hourly
Release
HourlyDailyWeekly
DeploytoContainers,Clusters,CloudFoundryorServerless
SelectPattern,StarterandLanguage,scaffoldyourstartingpointfast
CI Build
TestingMonitor
AutomatedTestingusingvariousframeworksandtools
Bluemix Developer Console
Developer Life cycle
Configure pipeline
NPS
LocalDev/Text
Artefactstorage
Codeanalysis
Cloud Native Patterns
Testtoolsandframeworks
Lets walk you through the experience
IBM has integrated a set of tools and capabilities directly in the IBM Bluemix console and delivered a comprehensive CLI tool to enable you to start your cloud native story with IBM Cloud
293/25/17
Create a Project by selecting a patternSelect a Starter, help to get you get a production ready starting point16+ Starters
Select your pattern
Select your Starter
Bluemix Development Experience + Services + Runtimes + Code Generators = ❤
SDKs
SDKs
APIs
Associate
Service Capabilities
with your project
34 3/25/17
Scaffold your working code , and run locally in minutes
Click to Generate Code
Install local CLI
Run code in a local container
Create and Run with Dev CLI
bx dev createx
bx dev runx
Run code in a local container
Running BFF in minutes
Create ProjectQuickly using
CLI
Demo
The following demo , will show a BFF being integrated with a Cloudant Database, and exposing Order data in a OpenAPI (Swagger API) and then being integrated to a Mobile iOS App, and displaying the data in a iOS View Controller , end to end in 20 mins using IBM Bluemix.
38
Bluemix Developer Console
Authentication
Analytics
APIManagem
ent
Swagger
SDK
High Value Services
Dev Ops
Starters(Templates)
Blueprints
SDK G
enerator
Dev Ops
Digital ChannelCode
Digital H
ub
BackendCodeSolution Patterns
Digital ChannelDeveloper
Whisk Operations
Enriched SDKs
Compute
CLITools Integration
Digital ChannelCompute Code
Backend / Solution PatternCompute Code
SolutionPattern
CFContainersVMs
PushService
Pull High value Services into your Digital ChannelsIncrease speed to of delivery
Increase time to adoption of High Value Services
Backup :Pattern Characteristics
What and how do these patterns work and what are the best cloud services for them to integrate with ?
41
#1 Mobile to ServiceCommon App Pattern Design
SwaggerREST
App SDKs
DependencyManager
Mobile App
SDK Code Gen
Swagger
Generated SDK
System SDK
Service SDK
SDKs
Backend forFront End
Bluemix System SDks
Enriched Service SDKsthat cannot be code generated
SDK Generation
Public GIT
Swift Package ManagerNode Package ManagerMaven Central (Java)
IOS, tvOS, Mac (Swift)Android (Java)Cordova HybridHTML5 (JavaScript)
Enable Code Gen SDKsIncluded API Connect and Mobile Foundation REST EndPoints
Development System & Service SDKsSystem SDK Service SDK
Core Object Store
Authentication Weather
Analytics Push
Bluemix System level Services that are applied to App
IPA/APK
REST End Points
APPID
Authentication
Analytics
Bluemix Services
AuthenticationNotificationsApp Analytics
Mobile to Service
• This application pattern is often used to integrate backend services directly into mobile solutions, they are not worried about common code or web app.
• This application pattern is only focused on delivering an app to the app store.
• The developer wants to add a small number of services into their mobile app, but are not worried about code abstraction.
• They do want services to be optimized for the mobile developer experience
• They will want to use a dependency manager to pull in common code and service packages
• They will want to use some common MBaaS patterns.• Authenticate with a trusted identity service OAuth, Google, Facebook, etc• They want to trigger a Push notification• They need to persist data seamlessly either connected or not connected• They need to store binary information like images or documents• They want to integrate some simple High value services, like Weather, Watson Dialog, Speech to
Text, Text to Speech with Dialog• They want to collect analytics of the application usage
#2 Mobile and Web to Backend for FrontendCommon App Pattern Design
SwaggerREST
App SDKs
DependencyManager
BFF
SDK Code Gen
Swagger
Generated SDK
System SDK
Service SDK
SDKs
Micro Services
Bluemix System SDks
Enriched Service SDKsthat cannot be code generated
SDK Generation
Public GIT
Swift Package ManagerNode Package ManagerMaven Central (Java)
Node.js + ExpressSwift + Kitura Java + Liberty
Enable Code Gen SDKs
Development System & Service SDKs
Bluemix System level Services that are applied to App
Runtime
REST End Points
Authentication
Analytics
Web Browser
Mobile
System SDK Service SDK
Core Object Store
Authentication Weather
Analytics Push
APPID
Authentication
#3 Mobile or Web to Backend for Frontend
• This application pattern is a sign that a solution is maturing or a different set of requirements are needing to be met. Pattern #1 easily breaks as you scale the number of Service integration and when you need to do heavy integration logic which should not be done in the client OS runtime.
• If a developer needs to deliver a Web experience or needs to abstract common business logic into an application server or they need to support multi channel app patterns.
• The industry recognized way of doing this is with a REST endpoint that can be invoked from either a Mobile App or from a Web Application using Ajax. This approach is agnostic of Server runtime technology of Swift, Node or Java
• Using SDK Generation we can easily generate an SDKs from these REST endpoints.
• The requirement for service integration now means Bluemix services need to be integrated easily and seamlessly into a Server runtime not just within the Mobile Client.
• As a developer I would expect to use the same SDK that I used in #1 Mobile pattern, it is managing the integration to the high value service for me.
• As a developer I would expect to consume this SDK from the same Dependency manager for either a Mobile Client implementation as a Server Implementation.
#3 Server less Event Handling Common App Pattern Design
SwaggerREST
ServiceSDKs
DependencyManager
OpenWhisk
SDK Code Gen
Swagger
Generated SDK
System SDK
Service SDK
SDKs
Micro Services
Bluemix System SDks for MBaaS
Enriched Service SDKsthat cannot be code generated
SDK Generation
Public GIT
Swift Package ManagerNode Package Manager
SwiftJavaScript
Enable Code Gen SDKs
Development System & Service SDKs
Bluemix System level Services that are applied to App
Runtime
REST End Points
APPID
Authentication
Analytics
BFF
System SDK Service SDK
Core ObjectStore
Authentication Weather
Analytics Push
APPID
Authentication
Server less Event• A new emerging programming model is gaining interest in the market and its called Serverless
programming or Event programming
• This is a logical evolution for the cloud, you want to write a small snippet of code and integrate with a Bluemix service and not worry about the scaling and load of this code, its managed automatically by the Cloud Platform.
• IBM had started to deliver on this need with OpenWhisk• Its still early days for IBM customers as they need to understand how it fits into existing programming
model• Mobile App developers will want to use this as its enables simple and quick back ends to be created• We believe that it is complimentary to Pattern #1 and #2 and will be used to manage a wide range of
Asynchronous processing.
• The management tools around scale of development are not in place at the moment to allow large scale development teams to work with OpenWhisk, but this will mature quickly
• What is clear is from Open Whisk is another Server Pattern focused on Swift and JavaScript. They need to access the same Bluemix Services as they would from a Mobile Pattern or Server Pattern.
• Bluemix Mobile Services will extend the same System and Service SDKs from Mobile to be compatible with Server integration.
#4 APIC and Micro Services• As applications begin to scale in functionality or complexity and as more teams are formed to
delivery the solution. Micro Service patterns are now becoming a common approach to delivering this within the Bluemix solution.
• The solution architecture may start to use different runtime technologies to solve the business problem. Bluemix will offer three key language runtimes that are strategic.
• Swift as a modern day systems language to enable a very fast execution and span client and server runtimes
• JavaScript in the form of a Node.js implementation, is often use for fast implementations User Experiences and REST Services
• Java is still heavily used in the industry and has a deep and rich component and package support. It is also has different characteristics to JavaScript as a Systems Language. So will not be going anywhere soon, even thou its 20+ years old.
• Other Systems languages are starting to be considered as more experience of scaling micro service architectures are understood, including Go and C#
• API Connect is IBM Bluemix offering to manage all these micro service teams into packages of API than can be managed and released, so they can be consumed in either Pattern #1 or Pattern #2 Bluemix App Patterns.
API Connect with Micro ServicesCommon App Pattern Design
SwaggerREST
ServiceSDKs
DependencyManager
APIConnect
SDK Code Gen
Swagger
Generated SDK
System SDK
Service SDK
SDKsBluemix Services
Bluemix System SDks
Enriched Service SDKsthat cannot be code generated
SDK Generation
Public GIT
Swift Package ManagerNode Package ManagerJava Maven Central
NodeJS Express LoopbackSwift KituraJava Liberty
Enable Code Gen SDKsIncluded API Connect and Mobile Foundation REST EndPoints
Development System & Service SDKs
Bluemix System level Services that are included in Micro ServiceAPI Management
REST End Points
APPID
Authentication
Analytics
BFF
System SDK Service SDK
Core ObjectStore
Authentication Weather
Analytics Push
MicroService
MicroService
MicroService
APPID
Authentication