Mule Developer I Module 1 - 7

¡Supera tus tareas y exámenes ahora con Quizwiz!

Accessing event attributes

#[ _some message component_] is used. I.e.: #[attributes.method] will show http method #[Payload.someParameterName] will return value of someParameterName parameter

Access metadata editor

-From Transform Message component -Metadata tab in most event processors -Project's menu in package explorer

Transform Message Component

-GUI wiht payload aware development -Dataweave can be used for transform

Dataweave

-Packaged in mule -Core functions are imported automatically -Functions with 2 parameters have alternate syntax - #[contains(payload,max)] - #[payload contains "max"] -Reference: https://docs.mulesoft.com/mule-runtime/4.1/dataweave

Flow Reference

-Synchronous reference to another flow

API Layers (Mule API-led Connectivity)

-Systems -Process -Experience

Inline expressions

#[ ] enclosed -Used to dynamically set value of properties in an event processor or global config element

HTTP Response Codes

-1xx: Informational -2xx: Success -3xx: Redirection -4xx: Client errors -5xx: Server errors

What is Anypoint Exchange

-A library of assets -The central repo for building app network -Ensures assets are published for reuse

API Manager vs API Gateay

-API Manager manages access to the proxies: define SLA and apply runtime policies (*note: API Manager is a licensed product - optional) -API Gateway enforces the policies

Application Logic Flow

-Flow receiving from Queue VM -Delivers the message from an inbound VM endpoint to the business logic. -May include multiple transactions

Private flows

-Flows without event sources

Variables

-#[vars.foo] -Uses Set Varaible component -Persistent through flow references -Not through transport barrier (i.e. VM queues)

Worker Sizes

-0.1 vCores + 500 MB Heap Memory -0.2 vCores + 1 GB Heap Memory -1 vCores + 1.5 GB Heap Memory -2 vCores + 3.5 GB Heap Memory -4 vCores + 7.5 GB Heap Memory -8 vCores + 15 GB Heap Memory -16 vCores + 32 GB Heap Memory

Worker Scaling Limits

-128 vCores -8 workers -Availability determined by subscription/license -Batch jobs only run on 1 worker

Systems API

-Access the core systems of record -Insulates user from complexity of underlying systems -User can access data without need to learn underlying systems -App Dev

Creating new flows/subflows

-Add a new scope: Flow or subflow -Drag any event processor on the canvas -Right-click processors and Extract to

Organizing Global Configs

-All global configs can be placed into a new Mule config file and referenced by other flows in the same project/app.

SLA Based Policy

-Allows access to AIP using SLA tiers -Requires applications to 1 Register for access to a specific tier from api portal in exchange 2 Pass their client credentials in the calls

API Proxy

-An application that controls access to a web service -Restricts access and usage through an API Gateway

VM Connector

-Asynchronous flow to flow comm -Achieve parallelism in processing -Allow more specific tuning with the flow architecture -Distribute work across a cluster -Communicate with another app in the same domain -Implement simple queuing

API Portal

-Auto-generated when a REST API is added to Exchange -Has: *Auto-generated API docs *API Console for consuming and testing *Auto-generated endpoint and mocking service -Can be shared with internal and external users

Customer-hosted Mule Runtimes

-Bare metal or cloud service provider: AWS, Azure, and Pivotal Cloud Foundry -Can run multiple apps -Uses Java Service Wrapper that controls JVM from OS and starts Mule -Can be managed by Runtime Manager in private or hosted Anypoint Platform

Debugging a mule application

-Breakpoints on processors to step. Watch: -Event properties and values -Dataweave expressions (and evaluate) -Default listens for incoming TCP from port 6666

Worker Characteristics

-Capacity: Each worker has a specific amount of capacity to process data, you can select the size of your workers when configuring an application. -Isolation: Each worker runs in a separate container from every other application. -Manageability: Each worker is deployed and monitored independently. -Locality: Each worker runs in a specific worker cloud, the US, EU, Asia-Pacific, etc. (12 regions)

Flows vs. Subflows

-Flows: Can have their own error handling, subflows cannot

Defining Application Properties

-Create config.yaml in resources folder -Define hierarchical properties -Create config properties global element

Using API Manager to manage access to APIs

-Create proxy applications -Deploy proxies to an API Gateway runtime -Specify throttling, security, and other policies -Specify tiers with different access -Control access -Promote managed APIs between environments -Review analytics

CloudHub Workers

-Dedicated instance of mule that runs an app -Can be scaled in processing or memory

Application Properties

-Easier way to manage connector properties, credentials, configs -Replace static values -Defined in .yaml or .properties -Implemented with property placeholders -Can be encrypted -Can be overridden by system properties

Deployment options

-Embedded runtime in Anypoint Studio -CloudHub -Customer-hosted Mule runtimes

Reliable Acquisition Flow

-Flow feeding Queue VM -Delivers a message to an outbound VM endpoint. -If the flow cannot put the message into the VM queue, it returns an "unsuccessful request" response to the client to retry

Persistent Queue

-Guarantees delivery of message -Allows parallel processing between workers on the same data -View in Queues tab of runtime manager -4 days retention -Optional data-at-rest encryption -Does not guarantee one-time-only delivery

Event data populated by HTTP request

-Header content becomes json attributes -Data becomes payload

Persistent VM Queue

-Holds messages committed by reliable acquisition flow -Processing error or timeout results in rollback which places message back on queue

Requesting access to SLA tiers

-If an API has an SLA-based policy, a request API access button in API portal will appear -Belong to Anypoint Platform org and logged in (they need to have Exchange access) -Register/add an app to their Anypoint Platform account -Select a tier

Using Application Properties

-In configs and processors: ${db.port} -In DW: {port: p('db.port')}

Viewing event data at run time

-In the client making a request (since that's where the event data originates...) -Log files -Console -Using Visual Debugger

Process API

-Interact with and shape data within a single system or across systems -Created without dependence on: --Source systems from which data originates --Target channels through which that data is delivered -LoB Dev/IT

Mule Runtime

-Java-based ESB that allows developers to connect apps together to exchange data -Decouples point-to-point as all other apps interface with the bus (Mule runtime) -Can be deployed anywhere: realtime or batch -Enforces policies for API governance?

Approving SLA tier access

-Manual approval: Emails are sent to the org admin -Org admin can review the app in API manager and approve, reject, or revoke -Client Id is generated -Client Id and secret requirements need to be added to header

Experience API

-Means by which data can be reconfigured so that it is most easily consumed by its intended audience from a common data source (rather than point-to-point integration for each channel) -Created with API-first principles where API is designed with specific users in mind -Central IT

Mule 4 flow composition

-Mule event source (can be triggered) -Mule event processors *Transform, filter, enrich, etc...

CloudHub worker

-MuleSoft-hosted Mule runtime that runs Mule apps created in flow designer -Each worker runs in a separate container and is deployed / monitored independently -Workers can be scaled for different memory and processing capabilities -Workers in different environments (Design, Sandbox, Prod) and can be promoted

CloudHub Benefits

-No hardware -Continuous updates -Provided infrastructure for DNS and load-balancing -Built-in elastic scalability for high demand -99.99% uptime SLA -PCI, HiTrust, and SSAE-16 certified

APIkit

-Open-source toolkit that includes an Anypiont Studio plugin -Generate an interface automatically from RAML -Generates a routing flow and flows for each of resource/method pairs -Add processors to hook up backend logic https://docs.mulesoft.com/apikit/3.x/apikit-basic-anatomy

Policies to restrict access

-Out of box: Rate limiting, spoke control, security -Custom policies with XML and YAML -Apply multiple policies

System Properties

-Override property values (i.e. when deploying between environments) -Set in Anypoint Studio: Run Configurations -> Arguments -Can be set in command line of standalone mule instance

CloudHub

-PaaS component of Anypoint Platform -MuleSoft-hosted Mule runtimes on AWS -Fully managed, multi-tenant, gobal, secure, etc...

What does Exchange contain

-Public assets provided by Mule -Private content for the org, including thorough documentation

Mule Application

-Receives events, processes them, and routes them to other endpoints -Accepts and processes a Mule event through a series of processors plugged together in a flow -Consists of one or more flows (that can be connected together)

SLA Tiers

-Restrict access by client restrict by client Id -Defines the # of requests that can be made per time frame -Request approval can be set to automatic (free) or manual (for tiers that cost $)

API Gateway

-Runtime designed and optimized to host an API or to open a connection to an API deployed to another runtime -Determines which traffic is authorized -Meters the traffic -Logs / collects data / tracks for analytics -Enforce governance: rate limiting, throttling, caching

Maven

-Tool for building and managing Java-based project -Users project object model xml (POM) for build, reporting and documentation -Maven build produces artifacts with: group Id, artifact Id and version

Viewing event data at design time

-Transform Message component -DataSense Explorer -Writing expressions using auto-completion (Is this the metadata in the flow?)

VM Connector: Queues

-Transient: faster, but volatile -Persistent: slower but non-vola

Domain project

-Used to share global configs between apps -Expose multiple services within domain on same port -Share connections to persistent storage -Call flows in other apps with VM connector -***Not available on CloudHub***

Scaling Workers

-Vertically by changing the worker size -Horizontaly by adding multiple workers

Logger component

-View mule event data -Visible in Console and log files

Design Center: Flow Designer

-Web app for building integration apps that connect systems and consume api -Simplified capabilities from Anypoint Studio -When an app is created, it is deployed to an run by CloudHub worker, a Mule hosted runtime

REST Connectors in Exchange

-When RAML spec is added, a connector is created *REST Connect: Connector can be used in Mule app to make calls to the API

CloudHub features

-Worker scale out -Persistent queue -Enabled: -When deploying app to CloudHub -From deployment tab in Runtime Manager

POM

-XML file with project and config data -Used by Maven to build project -Holds: -Project info (version, description, devs, etc...) -Project dependencies -Plugin

Selectors in Dataweave expressions

-single value select = #[payload.parameter] -array = #[payload[0].name] -array, multi-selector = #[payload.*name] -array, descendants selector = #[payload..zip]

DataSense

Ability to proactively discover metadata: -i.e. Table schema from SQL

Mocking Service

Allows live simulation of API. Run from the API console.

Auto-discovery

Allows a deployed Mule application to connect with API Manager to download policies and act as it's own API proxy

Operators in dataweave

Arithmetic - +,=,/,* Equality - ==, !=, ~= Relational - >, >=, <, <=, is Conditional - and,or, not Type coercion - 'as' Default value - 'default'

VM Connector: Publish vs. Publish Consume

Connector queue is asynchronous, so: -Publish Consume: consumes the processed event from the consumer. -Publish: publishes and continues - does not receive the processed event from consumer.

Embedded Runtime

Deployment option during development

Design Center: Anypoint Studio

Desktop IDE for implementing APIs and building integration apps

Anatomy of a flow

Event Source Event Processors Error handling

DataWeave 2.0

Expression language in Mule to access, query, and transform Mule event data

Worker Multitenancy

First, the worker cloud is a multitenant cloud of virtual machines. These VMs provide the security and isolation needed for your integrations to run custom code without affecting others. Second, the management console and the platform services have a "shared everything" architecture - all tenants share the same web UI, monitoring services, load balancers, etc. These services do not process or transmit your data.

Deploying applications to CloudHub

From: -Anypoint Studio* -Anypoint Platform* *Must set worker size and number -Flow Designer -Cloudhub requires Enterprise or Partner license!

HTTP Methods

GET - retrieves a representation of a re- urce. PUT - replaces all current representations of the target resource with the -ploaded content. DELETE - removes a resource from a specified URL. POST - uploads a representation of a resource to a server at a known URL PATCH - partial modification / update to a resource

MUnit

Mule app testing framework

Mule event structure

Mule message: Data the passes through flows in the app Attributes: -Metadata of the mule message. -Contained in the message header Payload: data that is to be processed Variables: Metadata for the Mule event

Anypoint Studio Anatomy

Package Explorer Canvas Palette Console

CloudHub Benefits

Provides: -Scalability -Workload distribution (load-balancing) -Persistent Queueiing

RAML

Restful API Modeling Language

Global configuration element

Reusable configuration for many operations Defines a connection to a resource

Referencing mule objects in Dataweave

Server = #[server.osName] mule = #[mule.version] app = #[app.name] flow = #[flow.name] message = #[message.payload] attributes = #[attributes.queryParams.param1] payload = #[payload] vars = #[vars.foo]

Design Center: API Designer

Web app for designing, documenting and mocking APIs.

if / else if / else in dataweave

if (payload.age < 15) group: "child" else if (payload.age < 25) group: "youth" else group: "senior"


Conjuntos de estudio relacionados

Pugs : Knights of Labor and American Fed Labor

View Set

Special Right Triangles Assignment and Quiz

View Set

Systems Analysis and Design - Chapter 1

View Set

HUMS 213 Assessment Exam Practice Questions

View Set