12/6/17
Module 2: Introducing Anypoint
Platform
At the end of this module, you should be able to
• Identify all the components of Anypoint Platform
• 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
12/6/17
Introducing the components of
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
12/6/17
API development cycle: API specification
Exchange
API notebook
API portal
API
spec
(RAML)
API console
API designer
Mocking service
All contents © MuleSoft Inc. 5
API development cycle: API implementation
MUnit
Service
with APIs
API
spec
(RAML)
Anypoint Studio
All contents © MuleSoft Inc. 6
3
12/6/17
API development cycle: API management
API Analytics
API Manager
Service
with APIs
API
Spec
(RAML)
Runtime Manager
API Manager
All contents © MuleSoft Inc. 7
API lifecycle: Discovery and consumption
flow designer
Anypoint Studio Consumption
Discoverable
Exchange Reusable
assets
Feedback and
usage metrics
Self-service
Production
All contents © MuleSoft Inc. 8
4
12/6/17
Anypoint Platform: The components
All contents © MuleSoft Inc. 9
Anypoint Platform
• A unified, highly productive, hybrid integration platform that
creates a seamless application network of apps, data,
and devices with API-led connectivity
• A collection of runtimes, frameworks, tools, and web applications
– Tools and frameworks for building applications
– Mule runtime for running applications and applying policies
• MuleSoft-hosted in the cloud or customer-hosted (on-prem or in the cloud)
– Web application for
• Discovering and learning about APIs and other assets
• Building integration applications that consume APIs
• Deploying, running, managing, and monitoring applications
• Defining and managing APIs
All contents © MuleSoft Inc. 10
5
12/6/17
Anypoint Platform: The web application
• MuleSoft-hosted in the cloud at [Link]
• Customer-hosted as part of Anypoint Platform Private Cloud Edition
All contents © MuleSoft Inc. 11
Core functionality of the web application
API designer Designing APIs
flow designer Building integration apps that consume APIs
Exchange Sharing, discovering, and exploring all the
resources needed for your integration projects
including creating public portals
API console, mocking Testing and simulating APIs
service, API notebook
Access Management Managing users
Runtime Manager Deploying apps to the cloud or on-prem
Managing and monitoring applications
API Manager Managing and monitoring APIs
All contents © MuleSoft Inc. 12
6
12/6/17
Introducing Anypoint Exchange
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. 14
7
12/6/17
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. 15
REST APIs and API portals in Anypoint Exchange
• API portals are automatically created for REST APIs added to
Exchange
• An API portal has
– Auto-generated API documentation
– An API console that provides a Postman-like experience 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
All contents © MuleSoft Inc. 16
8
12/6/17
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 17
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 & make calls to the
Training: American Flights API
All contents © MuleSoft Inc. 18
9
12/6/17
Building integration applications
and APIs with Design Center
Design Center anatomy
Created with API designer
Created with flow designer
All contents © MuleSoft Inc.
10
12/6/17
Design Center applications
Application Purpose In this course Additional courses
flow Web app for building integration 2 WTs • Anypoint Platform: Flow
designer apps that connect systems and Design
consume APIs
API Web app for designing, Module 3 • Anypoint Platform: API
designer documenting, and mocking APIs Design
Anypoint Desktop IDE for implementing Module 4 • Anypoint Platform
Studio APIs and building integration In Fundamentals: Development: Fundamentals
applications Modules 6-13 • Anypoint Platform
Development: Advanced
• Anypoint Platform
Development: DataWeave
All contents © MuleSoft Inc. 21
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. 22
11
12/6/17
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. 23
Mule runtime editions and versions
• There are different editions of the Mule runtime
– Community edition (CE): Open-source
– Enterprise edition (EE): Hardened code line with support and additional capabilities
• Support, additional connectors, batch, caching, security, templates, and more
• There are different versions of each Mule runtime
– 3.7.X, 3.8.X, and more
• Flow designer uses Mule 4.0.X EE (an early access version of Mule 4)
• By default, the latest Anypoint Studio uses Mule 3.9 EE
– You can install other versions and select which one to use
All contents © MuleSoft Inc. 24
12
12/6/17
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. 25
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. 26
13
12/6/17
Creating integration
applications with flow designer
Flow designer anatomy
Application
status
Project
Cards
explorer
Logs
All contents © MuleSoft Inc. 28
14
12/6/17
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 redeploy and restart the application
All contents © MuleSoft Inc. 29
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. 30
15
12/6/17
Flow designer applications
• Are automatically deployed to the Design environment
– Worker runtime version set to Mule 4.0.X
• Flow designer apps can only be built using Mule 4, currently an early access version
– Worker number is set to 1
– Worker size is set to 0.2
All contents © MuleSoft Inc. 31
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
• Deploy, run, and test
the application
• View application info
in Runtime Manager
All contents © MuleSoft Inc. 32
16
12/6/17
Accessing, querying, and
transforming data
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. 34
17
12/6/17
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. 35
The Transform component
• Has input, output, and preview sections with both drag-and-drop and
script editors
All contents © MuleSoft Inc. 36
18
12/6/17
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. 37
Summary
19
12/6/17
Summary: Anypoint Platform
• Anypoint Platform is a unified, highly productive, hybrid integration
platform that creates a seamless application network of apps, data,
and devices with API-led connectivity
All contents © MuleSoft Inc.
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.
20