mulesoft 核心知识点 summary
mulesoft 核心知识点Summary
- 1. Introducing application networks and API-led connectivity
- 2. Introducing Anypoint Platform
- 3. Designing APIs
- 4. Building APIs
- 5. Deploying and managing APIs
- 6. Accessing and modifing Mule events
- 7. Stucturing Mule applications
- 8. Consuming web services
- 9. Controlling event flow
- 10. Handling errors
- 11. Writing DataWeave transformations
- 12. Triggering flows
- 13. Processing records
1. Introducing application networks and API-led connectivity
- Companies today need to rapidly adopt and develop new tecnologies in order to stay relevant to customers & keep competitive
- IT needs to be able to repidly integrate resources and make them available for consumption
- An API-led connectivity approach can help achieve this
- To drive API-led connectivity, create a C4E (Center for Enablement)
- A cross-functional team to ensure assets across the organization are productized, published, and widely consumed
- An application network is a network of applications, data, and devices connected with APIs to make them pluggable and to create reusable services
- A web service is a method of communication that allows two software systems to exchange data over the internet
- An API is an application programming interface that provides into for how to communicate with a software component
- The term API is ofter used to refer to any part of a RESTful web service
- The web service API(definition or specification file)
- The web service interface implementing the API
- The web service implementation itself
- A proxy for the web service to control access to it
- RESTful web services use standard HTTP protocal and are easy to use
- The HTTP request method indicates which operation should be performed on the object identified by the URL
2. Introducing 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
- 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
- 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
3. Designing APIs
- RAML is a non-proprietary, standards-based API description language spec that is simple, succinct, and intuitive to use
- Data structure hierarchy is specified by indentation, not markup characters
- Use API Designer to write API specifications with RAML
- Documentation is auto-generated from a RAML file and displayed in an API console
- A mocking service can be used in API console to test an API and return the example data specified in RAML
- Make an API discoveralbe by adding it to your private Exchange
- API portals are automatically created for the APIs with
- Auto-generated API documentation
- An API console that provides a way to consume and test an API
- 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
- Selectively share APIs in your org’s private Exchange with other internal developers
- Share APIs with external developers by creating and customizing a public portal from Exchange and specifying what APIs you would like to include in it
4. Building APIs
- Anypoint Studio can be used to build Mule applications for integrations and API implementations
- Two-way editing between graphical and XML views
- An embedded Mule runtime for testing applications
- Mule applications accept and process events through a series of event processors plygged together in a flow
- Use the HTTP Listener as an inbound endpoint to trigger a flow with an HTTP reques
- Use the Set Payload transformer to set the payload
- Use the Database connector to connect to JDBC databases
- Use DataWeave and the Transform Message component to transform message from one data type and structure to another
- Create RESTful interfaces for applications
- Manually by creating flows with listeners for each resource/method pairing
- Automatically using Anypoint Studio and APIkit
- Connect web service interfaces to implementations using the Flow Reference component to pass messages to other flows
- Synchronize changes to API specifications between Anypoint Studio and Anypoint Platform using API Sync
5. Deploying and managing APIs
- Deploy appliations to MuleSoft-hosted or customer-hosted Mule runtimes
- CloudHub is the platform as a Service(Pass) component of Anypoint Platform
- Hosted Mule runtimes(workers) on AWS
- An API proxy is an application that controls access to a web service, restricting access and usage through the use of an API gateway
- The API Gateway runtime controls access to APIs by enforcing policies
- Is part of the Mule runtime but requires a separate license
- Use API Manage to
- Create and deploy API proxies
- Define SLA tiers and apply runtime policies
Anypoint Platform has out-of-the box policies for rate-limiting, throttling, security enforcement, and more
SLA tiers defines # of requests that can be made per time to an API
- Define SLA tiers and apply runtime policies
- Approve, reject, or revoke access to APIs by clients
- Promote managed APIs between environments
- Review API analytics
6. Accessing and modifing Mule events
- The best way to view event data is to add breakpoints to a flow and use the Mule Debugger
- Use the Logger component to display data in the console
- Use the Set Payload transformer to set the payload
- Use the properties view to set response data for an HTTP Listener and request data for an HTTP Request operation
- Use the DataWeave language to write inline expressions in #[ ]
- Use the Set Variable transformer to create variables
7. Stucturing Mule applications
- Separate functionality into multiple applications to allow managing and monitoring of them as separate entities
- Mule applications are Maven projects
- A projects’s POM is used by Maven to build, report upon, and document a project
- Maven builds an artifact(a Mule deployable archive JAR) from multiple
dependencies(module JARs)
- Maven builds an artifact(a Mule deployable archive JAR) from multiple
- Separate application functionality into multiple configuration files for easier development and maintenance
- Encapsulate golbal elements into their own separate configuration file
- Share resources between applications by creating a shared domain
- Define application properties in a YAML file and reference them as ${prop}
- Application metadata is stored in application-types.xml
- Create applications composed of multiple flows and subflows for better readability, maintenance, and reusability
- Use a Flow Reference to call flows synchronously
- Use the VM connector to pass event between flows using asynchronous queues
8. Consuming web services
- To consume a web service, first look to see if it has a connecor in Anypoint Exchange
- Easiest way to consume a web service
- Connectors for APIs specifications added to Exchange are generated automatically by REST Connect
- Use the HTTP Request operation to consume any REST web service
- With or without URI parameters and query parameters
- With or without a RAML definition
- Use the Web Service Consumer connector to consume any SOAP web service
- Use the Transform message component to pass arguments to SOAP web service
9. Controlling event flow
- Use different routers and validators to control event flow
- Use the Choice router to send an event to one route based on conditional logic
- Use the Scatter-Gather router to send an event concurrently to multiple routes
- A collection of all results is returned
- Use DataWeave to flatten the collection
- Use the Validation module to specify whether an event can proessed in a flow
10. Handling errors
- An application can have system or messageing errors
- System errors are thrown at the system level and involve no event
- Occur during application start-up or when a connection to an external system fails
- Non-configurable, but logs the error and for connections, executes any reconnection strategy
- Messaging errors are thrown when a proble occurs within a flow
- Normal flow execution stops and the event is passed to an error handler(if one is defined)
- By default, unhandled errors are logged and propagated
- HTTP Listeners return success or error responses depending upon how the error is handled
- Subflows cannot have their own error handlers
- Messaging errors can be handled ata various levels
- For an application, by defining an error handler outside any flow and the configuring the application to use it as the default error handler
- For a flow, by adding error scopes to the error handling section
- For one or more processors, by encapsulating them in a Try scope that has its own error handling section
- Each error handler can have one or more error scopes
- Each specifies for what error type or condition for which it should be executed
- An error is handled by the first error scope with a matching condtion
- On Error Propagate rethrows the error up the execution chain
- On Error Continue handles the error and then continues execution of the parent flow
11. Writing DataWeave transformations
- DataWeave code can be inline, in a DWL file, or in a module of functions
- The data model for a transformation can consist of three different types of data:objects, arrays,and simple literals
- Many formates can be used as input and output including JSON, Java, XML, CSV, Excel, Flat File, Cobol Copybook, Fixed Width, and more
- The DataWeave application/dw fomat can be used to test expression to ensure there are no scripting errors
- Use the map function to apply a transformation function(a lambda) to each item in an array
- A lambda is an anonymous function not bound to an identifier
- When mapping array elements(JSON or JAVA) to XML, wrap the map function in {(…)}
- DataWeave is a functional programming language where variables behave just like functions
- Define global variables in the header with var
- Assign them a constant or a lambda expression
- Use fun directive to access lambdas assigned to variables as traditional functions
- Define local variables in the body with do{}
- The scope of the do statement defines the boundaries of local variables
- Functions are packaged in modules
- Functions in the Core module are imported automatically into DataWeave scripts
- Use the import header directive to import functions in all other modules
- Functions with 2 parameters can be called with 2 different syntas
- Use the metadata format schema property to format #'s and dates
- Use the type header directive to specify custom data types
- Transform objects to POJOs using: as Object {class: “com.myPOJO”}
- Use lookup() to get data by calling other flows
12. Triggering flows
- Use watermarks to synchronize data across data stores
- Use either manual or the automatic watermarking available for som connectors
- Use the family of File, FTP, FTPS, and SFTP connectors to work with files and floders
- Use the On Neew or Updated File listener to trigger flows when files are added, created, or updated
- Use the connector’s automatic watermarking to determine if a file is new based on a creation or modification timestamp
- Use the On Table Row listener when new records are added to a database table
- Use the connector’s automatic watermarking to determine if the record is new
- Use the Scheduler component to schedule flows to run at a certain time or frequency
- Use a watermark to keep a persistent variable between scheduling events
- Use the Object Store connector to persist and share a watermark(or other data) across flow executions
- Use the JMS connector to publish and consume messages
- Connect to any JMS messaging service that implements the JMS spec
13. Processing records
- Use the For Each scope to process individual collection elements sequentially and return the original payload
- Use the Batch Job scope(EE only) for complex batch jobs
- Created especially for processing data sets
- Splits messages into individual records and performs actions upon each record
- Can have multiple batch steps and these can have filters
- Record-level data is persisted across steps using variables
- Can handle record level failures so the job is not aborted
- The batch job returns an object with thw results of the job for insight into which records were processed or failed
mulesoft 核心知识点 summary相关推荐
- 最全最新的的Java核心知识点整理!!! 【推荐】
前言: 想要文档版的小伙伴们可以私信我领取哦,更加清晰 一目了然 ~ Java核心知识点! 博客整理出来的稍微有点乱~ 目录 目录 -1 JVM - 19 2.1. 线程 - 20 2.2. JVM ...
- 牛逼了!8000页Java 核心知识点+面试题整理,超全!
今年金九银十要来了,很多小伙伴都在准备跳槽.小编为大家汇总了份Java核心知识点面试题和答案,基本上涵盖了所有后端技术栈,相信可以帮助大家拿到自己心仪的offer. 截了几张图,大家可以仔细查看左边的 ...
- pmp知识点详解-项目大牛整理_PMP核心知识点—第五章:项目范围管理(1)
一.规划范围管理 Inputs 1.项目管理计划: 质量管理计划 项目生命周期描述 开发方法 2.项目章程: 项目章程记录项目目的.项目概述.假设条件.制约因素以及项目意图实现的高层级需求. 3.事业 ...
- Java核心知识点 --- 线程中如何创建锁和使用锁 Lock , 设计一个缓存系统
理论知识很枯燥,但这些都是基本功,学完可能会忘,但等用的时候,会发觉之前的学习是非常有意义的,学习线程就是这样子的. 1.如何创建锁? Lock lock = new ReentrantLock(); ...
- pmp知识点详解-项目大牛整理_PMP核心知识点第六章:项目进度管理(3)
四.估算活动持续时间 考虑因素: 收益递减规律 资源数量 学习曲线 技术进步 员工激励 Inputs 1.项目管理计划: 进度管理计划 范围基准 2.项目文件: 活动属性 活动清单 假设日志 经验教训 ...
- nsga2多目标优化之核心知识点(快速非支配排序、拥挤距离、精英选择策略)详解(python实现)
文章目录 一.多目标优化算法简介 1.基本知识 二.NSGA2算法 1.基本原理 2.快速非支配排序 2.1快速非支配排序 python实现 3.拥挤距离 3.1 拥挤距离python 实现 4.精英 ...
- java 重用性_Java开发重用性必备的三大核心知识点
互联网开发行业的人在问我提高java代码可重用性有哪些方法措施,那今天我就给大家详细讲下提高java代码可重用性的措施吧,希望不懂的可以从中学习加以理解,懂的也可以加以巩固下这些知识点,我把提高jav ...
- pmp知识点详解-项目大牛整理_PMP第七章:项目成本管理(1)项目管理核心知识点...
一.规划成本管理 Inputs 1.项目管理计划: 进度管理计划 风险管理计划 2.项目章程: 规定了预先批准的财务资源,可据此确定详细的项目成本 规定的项目审批要求也对项目成本管理有影响 3.事业环 ...
- 透过面试题,洞察Hbase 核心知识点
LSM 算法 HFile 索引 ,二级索引 hbase的问题 1.hbase怎么预分区? 2.hbase怎么给web前台提供接口来访问? 3.htable API有没有线程安全问题,在程序中是单例还 ...
最新文章
- Unicode转义(\uXXXX)的编码和解码
- 得到目标元素距离视口的距离以及元素自身的宽度与高度(用于浮层位置的动态改变)...
- 13个AJAX验证框架
- numpy更改形状、类型
- java官方 jax rs_jboss7 Java API for RESTful Web Services (JAX-RS) 官方文档
- akka actor java_现代化的Java(三)——从Hello Akka说起
- linux命令学习_实验楼(一)
- 韩信点兵php,说说大脑的“同时性信息加工功能”
- 从零开始搭建一个群管机器人
- 业务侧-到底应该怎么做A/Btest
- 714. 买卖股票的最佳时机含手续费
- PHPWAMP站点管理的“域名模式”和“端口模式”详解、均支持自定义
- 货运公司古巨基陈慧娴助阵总决赛
- Vue 源码解读 起步(二)
- JavaWeb开发前景
- 盘点:史上最全数据挖掘方法!我火速收藏!
- C语言中关于除法和取余的理解
- BeautifulSoup解析豆瓣即将上映的电影信息
- EventBus 事件驱动
- 错失项目汇报机会是一种罪过
热门文章
- 微信公众号正确使用开放标签wx-open-launch-weapp
- nodejs学习巩固笔记-nodejs基础,Node.js 高级编程(核心模块、模块加载机制)
- Eclipse编写html——讨论charset设置
- 1000 Paleo Recipes
- Chap.10 总结《CL: An Introduction》 (Vyvyan Evans)
- 20届 web前端实习生的应聘过程
- 眼动数据分析——基于Eyelink输出报告
- 解释css sprites 如何使用.,css sprites如何使用?
- Spring Social流程
- win10查看笔记本电池健康度