4/29/18
Module 2: Introducing Anypoint
Platform
At the end of this module, you should be able to
• Describe the benefits of Anypoint Platform and MuleSoft’s approach to
be successful with it
• Describe the role of each component in building application networks
• Navigate Anypoint Platform
• Locate APIs and other assets needed to build integrations and APIs in
Anypoint Exchange
• Build basic integrations to connect systems using flow designer
All contents © MuleSoft Inc. 2
1
4/29/18
Introducing Anypoint Platform
Anypoint Platform uniquely enables the building of
an application network
Anypoint Platform Application network
Anypoint Design Center Anypoint Management Center
Anypoint Exchange
Experience
Process
System
Mule Runtime
Anypoint Connectors
Runtime services
Hybrid cloud
All contents © MuleSoft Inc. 4
2
4/29/18
API
SaaS
Mgmt
ETL B2B The most advanced
enterprise platform
for designing,
Pub
/Sub
IoT developing and
managing APIs and
integrations
ESB Micro
/SOA services
● Uniquely built as
a single product
Anypoint Platform ● Deploy anywhere
● Wide range of
use cases
All contents © MuleSoft Inc.
1 Design Center, 1 Mgmt Center, 1 Runtime
Admin, Ops, Ad-hoc
Specialists App devs
DevOps integrators
Rapid Collaboration Visibility
development and self-service and control
Design Center Exchange Management Center
Lean runtime
Mule
On-premises & Hybrid Hosted by Cloud service providers
Private Cloud MuleSoft
All contents © MuleSoft Inc.
3
4/29/18
Design once, deploy anywhere
Anypoint Design Center
Anypoint Management Center
On-prem Private cloud fully managed iPaaS
Databases FTP, Files Web services SaaS Apps On-prem Apps Social Apps IoT Partners
All contents © MuleSoft Inc.
Unique benefits for each layer
Speed of delivery
Application network
Actionable visibility
API-led connectivity
Secure by design
Integration API mgmt Future-proof architecture
Intentional self-service
All contents © MuleSoft Inc.
4
4/29/18
Achieving success with Anypoint
Platform
MuleSoft’s approach is centered around 3 core pillars
Business
outcomes
Customer
success
Technology Organization
delivery enablement
All contents © MuleSoft Inc. 10
5
4/29/18
Defining the path to achieve success
Plan for success Establish the foundation Build to scale Measure impact
Business outcomes
Business
outcomes
Anypoint Platform
Technology Projects
delivery
Center for Enablement “C4E”
Internal support
Org
enablement Training
All contents © MuleSoft Inc. 11
MuleSoft has a blueprint for you to follow
Plan for success Establish the foundation Build to scale Measure impact
Agree on business outcomes
and KPIs Measure business
Business Develop the overall success Monitor and manage Refresh the success plan outcomes
outcomes plan
Define Anypoint platform vision
and roadmap Refine and scale Anypoint Measure Anypoint
Design Anypoint platform Deploy Anypoint Platform Platform platform KPIs
architecture and implementation
plan
Technology
Prioritize IT projects and quick
delivery Define reference architecture Onboard additional project
wins Measure project KPIs
Launch initial projects and teams
Staff and onboard the project
teams quick wins Launch additional projects
Build and publish
Assess integration capabilities foundational assets
Drive consumption Measure C4E KPIs
Establish the C4E operating model Evangelize
Onboard MuleSoft Staff, train and launch team
Org Monitor Anypoint Platform Measure support KPIs
Determine the internal support Publish support guidance and
enablement operating model self-serve materials
Develop the broader training plan
Agree on initial roles
Launch experiential learning Update training plan Conduct skills assessment
Train the initial team(s)
opportunities
All contents © MuleSoft Inc. Note: For details about individual steps, contact your MuleSoft Customer Success Manager
6
4/29/18
Introducing the components of
Anypoint Platform
API development cycle: API specification
API
spec
(RAML)
All contents © MuleSoft Inc. 14
7
4/29/18
API development cycle: API implementation
Service
with APIs
API
spec
(RAML)
All contents © MuleSoft Inc. 15
API development cycle: API management
Service
with APIs
API
Spec
(RAML)
All contents © MuleSoft Inc. 16
8
4/29/18
API lifecycle: Discovery and consumption
flow designer
Consumption
Discoverable
Exchange Reusable
assets
Feedback and
usage metrics
Self-service
Production
All contents © MuleSoft Inc. 17
Anypoint Exchange
• A library of assets
• The central repository that is critical to the success
of building an application network
• Ensures assets are published somewhere they can
be discovered and reused
All contents © MuleSoft Inc. 20
9
4/29/18
What does (and should) Exchange contain?
• MuleSoft-provided public assets available in all accounts
to all users
– You can work with MuleSoft to get APIs and connectors certified
and added
• Private content only available to people in your org
– Assets added by anyone in your org are added to your private
Exchange
• Your organization should populate it to contain
everything you need to build your integration projects
– Including APIs, connectors, diagrams, videos, links, and more
All contents © MuleSoft Inc. 21
REST APIs and API portals in Anypoint Exchange
• When a REST API is added to Exchange, an API portal is
automatically created for it
• An API portal has
– Auto-generated API documentation
– An API console for consuming and testing APIs
– An automatically generated API endpoint that uses a mocking service to
allow the API to be tested without having to implement it
• API portals can be shared with both internal and external users
• In the last module, you used a public API portal created from
Anypoint Exchange for a private organization (Muletraining)
All contents © MuleSoft Inc. 22
10
4/29/18
REST connectors in Anypoint Exchange
• When a RAML 1.0 API specification is added to Exchange, a
connector is automatically created for it
– The connector can be use in Mule applications to make calls to that API
– REST Connect is the name of the technology that performs this conversion
All contents © MuleSoft Inc. 23
Using Exchange: Success of C4E in action
LoB Project 1
Is there an Should we
asset? create one?
Exchange
Central
APIs
IT Templates
Innovation
teams
All contents © MuleSoft Inc. Project 2 24
11
4/29/18
Walkthrough 2-1: Explore Anypoint Platform and
Anypoint Exchange
• Explore Anypoint Platform
• Browse Anypoint Exchange
• Review an API portal for a REST API in Exchange
• Discover and make calls to the Training: American Flights API in the
public Exchange
All contents © MuleSoft Inc. 25
Building integration applications
and APIs with Design Center
12
4/29/18
Design Center anatomy
Created with API designer
Created with flow designer
All contents © MuleSoft Inc.
Design Center applications
Application Purpose In this course Additional courses
flow Web app for building integration 2 WTs • Anypoint Platform:
designer apps that connect systems and Flow Design
consume APIs
API Web app for designing, Module 3 • Anypoint Platform:
designer documenting, and mocking APIs API Design
Anypoint Desktop IDE for implementing Module 4
Studio APIs and building integration In Fundamentals:
applications Modules 6-13
All contents © MuleSoft Inc. 28
13
4/29/18
Both flow designer and Anypoint Studio create Mule
applications
• Mule applications can be created
– Visually using flow designer or Anypoint Studio
– By writing code (primarily XML) using Anypoint Studio (or other tools)
• Under the hood, Mule applications are Java applications using Spring
• Mule applications are deployed to a Mule runtime
– Mule runtimes can be MuleSoft-hosted in the cloud (CloudHub) or customer-
hosted in the cloud or on-prem
All contents © MuleSoft Inc. 29
Mule is the runtime engine of Anypoint Platform
• A lightweight Java-based enterprise service bus (ESB) and
integration platform that allows developers to connect apps together
quickly and easily, enabling them to exchange data
– Acts as a transit system for carrying data between apps (the Mule)
– Can connect all systems including web services, JMS, JDBC, HTTP, & more
• Decouples point-to-point integrations by having all (non-Mule) apps
talk to the bus (to a Mule runtime) instead of directly to each other
• Can be deployed anywhere, can integrate and orchestrate events in
real time or in batch, and has universal connectivity
• Enforces policies for API governance
All contents © MuleSoft Inc. 30
14
4/29/18
Mule 4 applications and flows
• Mule applications receive events, process them, and route them to
other endpoints
• Mule applications accept and process a Mule event through a
series of Mule event processors plugged together in a flow
Flow
Mule event Mule event Mule event Connector
source processor(s) processor(s) endpoint
Mule event Mule event Mule event
• An application can consist of
– A single flow
– Multiple flows
– Multiple flows connected together
All contents © MuleSoft Inc. 31
What’s in a typical Mule 4 flow?
• A Mule event source that initiates the execution of the flow
– Can be triggered by an event like
• A consumer request from a mobile device
• A change to data in a database
• The creation of a new customer ID in a SaaS application
• Mule event processors that transform, filter, enrich, and process
the event and its message
Flow
Mule event Mule event Mule event Connector
source processor(s) processor(s) endpoint
Mule event Mule event Mule event
All contents © MuleSoft Inc. 32
15
4/29/18
Creating integration
applications with flow designer
Flow designer anatomy
Application
status
Project
explorer
Cards
Logs
All contents © MuleSoft Inc. 34
16
4/29/18
Running flow designer applications
• When you create a Mule application project in Design Center
– A new application is created and opened in flow designer
– The application is deployed to a MuleSoft-hosted Mule runtime
(called a CloudHub worker) in the cloud and started
MuleSoft-hosted
runtime
• When you make changes to the application in flow designer and are
ready to test it
– You need to run the application again – which updates the application deployed
to the worker
All contents © MuleSoft Inc. 35
CloudHub workers
• A worker is a dedicated instance of Mule that runs an app
• Each worker
– Runs in a separate container from every other application
– Is deployed and monitored independently
– Runs in a specific worker cloud in a region of the world
• Workers can have a different memory capacity and
processing power
– Apps can be scaled vertically by changing the worker size
– Apps can be scaled horizontally by adding multiple workers
• There are workers in different environments
– Design (for flow designer apps only), Sandbox, Production..
– Apps can be promoted from one environment to another
All contents © MuleSoft Inc. 36
17
4/29/18
Walkthrough 2-2: Create a Mule application with
flow designer
• Create a new Mule application project in Design Center
• Create an HTTP trigger for a flow in the application
• Add a Logger component
• Run and test the application
• View application information in Runtime Manager
All contents © MuleSoft Inc. 38
Accessing, querying, and
transforming data
18
4/29/18
Accessing and modifying Mule 4 event data
Mule event
The data that passes through flows
Mule message in the app
Attributes Metadata contained in the message
header
Payload
The core info of the message -
the data the app processes
Metadata for the Mule event -
Variables can be defined and referenced in
the app processing the event
All contents © MuleSoft Inc. 40
Transforming data with DataWeave
• DataWeave 2.0 is the expression language for Mule
to access, query, and transform Mule 4 event data
• A JSON-like language that's built just for data query and
transformation use cases
– Full-featured and fully native framework
• Fully integrated with flow designer (and Anypoint Studio)
– Graphical interface with payload-aware development
All contents © MuleSoft Inc. 41
19
4/29/18
The Transform component
• Has input, output, and preview sections with both drag-and-drop and
script editors
All contents © MuleSoft Inc. 42
Walkthrough 2-3: Create an integration application
with flow designer that consumes an API
• Examine Mule event data for calls to an application
• Use the American Flights API in Anypoint Exchange to get all flights
• Transform data returned from an API to another format
All contents © MuleSoft Inc. 43
20
4/29/18
Summary
Summary: Anypoint Platform
• Anypoint Platform is a unified, hybrid integration platform that
creates a seamless application network of apps, data, and devices
with API-led connectivity
Anypoint Platform
Design
Anypoint Design Center
Secure Engage Manage
Anypoint Security Anypoint Exchange Anypoint Management
Center
Run
Mule
All contents © MuleSoft Inc.
21
4/29/18
Summary
• Use Anypoint Exchange as a central repository for assets so they
can be discovered and reused
– Populate it with everything you need to build your integration projects
• Use flow designer to build integration applications
– These are Mule 4 applications that are deployed to a Mule runtime
– To learn more, take the 1-day Anypoint Platform: Flow Design course
• Mule runtimes can be MuleSoft-hosted in the cloud (CloudHub) or
customer-hosted in the cloud or on-prem
• DataWeave 2.0 is the expression language for Mule to access, query,
and transform Mule 4 event data
All contents © MuleSoft Inc.
22