Publicité

Cloud Native Patterns with Bluemix Developer Console

STSM, IBM Cloud Developer Services à IBM
25 Mar 2017
Publicité

Contenu connexe

Publicité
Publicité

Cloud Native Patterns with Bluemix Developer Console

  1. InterConnect 2017 Patterns in Omni Channel Cloud Application Development BM0 6321 Matthew Perrins Brett King
  2. Please note IBM’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 in the 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.
  3. • What is Cloud Native • Pattern Overview • Use Case Example • How to deliver it today • Summary Agenda
  4. What is Cloud Native ?
  5. 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
  6. Fault Tolerant Architecture Built for Failure Instant Auto-Scaling (infinite scale) Cross-Geo Availability Continuous Delivery Continuous Integration Loosely Coupled Services …
  7. Can’t handle Internet-scale load Deployment cycles are long (complicated) Operations is costly Architecture is brittle and monolithic Services are over-engineered/designed Increasingly hard to find skills Application Architecture: As-is
  8. 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 Scale Innovation with Cognitive Embrace Polyglot Programming and Open Adopt Microservices Architecture & DevOps Leverage a Cloud Platform Designed for Cloud Native The Cloud Native Approach
  9. 10 IBM Cloud contains out-of-the-box core, tested capabilities to Build a Cloud-Native Apps faster. 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/Storage APIs Integration Compute Authentication Notifications App Analytics Watson Weather Company IoT Services Video Object Storage Cloudant Compose Enterprise •Mongo •Redis •Elastic Search •MySQL, PostgresSQL… Big Insights / Hadoop API Connect Cloud Foundry Containers Open 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
  10. Domain Services Mobile Watson IoT Block Chain Health Video SecurityandCompliance Methods&Services 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.
  11. How patterns form your Cloud Native solution 12 Patterns
  12. 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
  13. 14 Some of the common patterns used in a Cloud Native solution
  14. 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 Developers Mutli Channel New Patterns early adopters Extending new business models Traditional IBM Customers Enterprise Cloud Behavior Startups Multi Team
  15. 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 ?
  16. 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 ?
  17. Those were the patterns you might recognize, we use them everyday Now we need to explain the patterns that make cloud native solutions become amazing and give software engineers the most flexibility to deliver
  18. 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
  19. 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
  20. 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 services Mobile 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 Microservice Actions implemented in Java, Node, Swift Triggered by (whatever) service
  21. 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.
  22. Example: Order Management Use Case Generated SDK System SDK Push Notifications IOS, tvOS, Mac (Swift) Android (Java) Cordova Hybrid HTML5 (JavaScript) Digital Channels User Layer Example Omni Channel application service different use end points and requirements , using Cloud Native Micro Services architecture iOS App Web App Voice App Public API iOS BFF Edge Layer Web BFF Chat BFF API Connect IBM Cloud Product Handling (ms) Business Logic Layer Foundational Layer Orders (ms) Stock (ms) Products (ms) Notification Action (event) Order Handling (ms) Cloud Native Service Cloudant Elastic Search Watson Conversation Storage REST API Node.js, Swift, Java Other polyglot languages Node.js, Swift, Java Other polyglot languages AppIDAuthentication AppIDAuthentication
  23. 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
  24. Why are we doing this ? Building cloud native apps with frameworks and services is hard !! 25 3/25/17 Starting from the from the Catalog With Bluemix Developers 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
  25. Project Generation Bluemix Developer Console Value for Bluemix developers Bluemix DevCLI Bluemix Developer Console 1. Starts with… Bluemix Codes … Check in to… App DevOps Open Toolchains Github Kicks off… Builds & Deploys… Developer Calls … Generates … Source Code IDE Orion, VSCode, Atom, Xcode… Autoscale Logmet BAM Integrates with … Provisions … Local ContainerLocal container generation and management Local build and debug Project scaffolding SDK generation Service provisioning API Model generation Swagger generation
  26. Developer push code into git Micro service build pipeline Gather feedback Hourly Hourly Release Hourly Daily Weekly Deploy to Containers, Clusters, Cloud Foundry or Serverless Select Pattern, Starter and Language, scaffold your starting point fast CI Build Testing Monitor Automated Testing using various frameworks and tools Bluemix Developer Console Developer Life cycle Configure pipeline NPS Local Dev/Text Artefact storage Code analysis Cloud Native Patterns Test tools and frameworks
  27. Example of how Micro services appear to 2 pizza teams Dev Ops
  28. 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 29 3/25/17
  29. Select Web and Mobile from Bluemix Menu Select Web and Mobile Select Create Project
  30. Create a Project by selecting a pattern Select a Starter, help to get you get a production ready starting point 16+ Starters Select your pattern Select your Starter
  31. Complete Creating your Project Select your Language
  32. Bluemix Development Experience + Services + Runtimes + Code Generators = ❤ SDKs SDKs APIs Associate Service Capabilities with your project
  33. 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
  34. Manage you associated capabilities directly in your project view
  35. Create and Run with Dev CLI bx dev createx bx dev runx Run code in a local container Running BFF in minutes Create Project Quickly using CLI
  36. Client SDK ecosystem, automation and quality control
  37. 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
  38. Summary 39
  39. Bluemix Developer Console Authentication Analytics APIManagement Swagger SDK High Value Services Dev Ops Starters (Templates) Blueprints SDKGenerator Dev Ops Digital Channel Code DigitalHub Backend Code Solution Patterns Digital Channel Developer Whisk Operations Enriched SDKs Compute CLI Tools Integration Digital Channel Compute Code Backend / Solution Pattern Compute Code Solution Pattern CF Container s VMs PushService Pull High value Services into your Digital Channels Increase speed to of delivery Increase time to adoption of High Value Services
  40. Backup : Pattern Characteristics What and how do these patterns work and what are the best cloud services for them to integrate with ? 41
  41. #1 Mobile to Service Common App Pattern Design Swagger REST App SDKs Dependency Manager Mobile App SDK Code Gen Swagger Generated SDK System SDK Service SDK SDKs Backend for Front End Bluemix System SDks Enriched Service SDKs that cannot be code generated SDK Generation Public GIT Swift Package Manager Node Package Manager Maven Central (Java) IOS, tvOS, Mac (Swift) Android (Java) Cordova Hybrid HTML5 (JavaScript) Enable Code Gen SDKs Included API Connect and Mobile Foundation REST EndPoints Development System & Service SDKs System SDK Service SDK Core Object Store Authentication Weather Analytics Push Bluemix System level Services that are applied to App IPA/APK REST End Points APPIDAuthentication Analytics Bluemix Services Authentication Notifications App Analytics
  42. 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
  43. #2 Mobile and Web to Backend for Frontend Common App Pattern Design Swagger REST App SDKs Dependency Manager BFF SDK Code Gen Swagger Generated SDK System SDK Service SDK SDKs Micro Services Bluemix System SDks Enriched Service SDKs that cannot be code generated SDK Generation Public GIT Swift Package Manager Node Package Manager Maven Central (Java) Node.js + Express Swift + 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 AnalyticsWeb Browser Mobile System SDK Service SDK Core Object Store Authentication Weather Analytics Push APPIDAuthentication
  44. #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.
  45. #3 Server less Event Handling Common App Pattern Design Swagger REST Service SDKs Dependency Manager Open Whisk SDK Code Gen Swagger Generated SDK System SDK Service SDK SDKs Micro Services Bluemix System SDks for MBaaS Enriched Service SDKs that cannot be code generated SDK Generation Public GIT Swift Package Manager Node Package Manager Swift JavaScript Enable Code Gen SDKs Development System & Service SDKs Bluemix System level Services that are applied to App Runtime REST End Points APPIDAuthentication Analytics BFF System SDK Service SDK Core ObjectStore Authentication Weather Analytics Push APPIDAuthentication
  46. 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.
  47. #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.
  48. API Connect with Micro Services Common App Pattern Design Swagger REST Service SDKs Dependency Manager API Connect SDK Code Gen Swagger Generated SDK System SDK Service SDK SDKs Bluemix Services Bluemix System SDks Enriched Service SDKs that cannot be code generated SDK Generation Public GIT Swift Package Manager Node Package Manager Java Maven Central NodeJS Express Loopback Swift Kitura Java Liberty Enable Code Gen SDKs Included API Connect and Mobile Foundation REST EndPoints Development System & Service SDKs Bluemix System level Services that are included in Micro Service API Management REST End Points APPIDAuthentication Analytics BFF System SDK Service SDK Core ObjectStore Authentication Weather Analytics Push Micro Service Micro Service Micro Service APPIDAuthentication
  49. InterConnect 2017 50 3/25/17
Publicité