Chinna Udemy MCD Course Ppts
Chinna Udemy MCD Course Ppts
DEVELOPER ARCHITECT
• Postman installation
Web services
• Web service : A web service is a program which runs in server and whose results are sharable over network/integration to make data transfer
between applications.
• The types of web services are of two types SOAP and REST.
• SOAP services are legacy approach, and the development of SOAP services is very less comparing to REST.
• Before implementation of REST services, we should understand about a URL that we usually interact every day because we interact with
REST API using URL.
• http-protocol://host:port/base-path/sub-path
• Example: http://localhost:8081/customer-sapi/customers
• Example: http://mule-dev-customer-sapi.cloudhub.io/customer-sapi/customers
• Example: https://mule-dev-customer-sapi.cloudhub.io/customer-sapi/customers
request body
• JSON payload
• XML payload
Example: 200, OK. 400, Bad Request. 500 Server Error. etc.
response headers
Process request
• http response status code, status message
and sends back
response body response
• JSON payload
• XML payload
Use case development of session : hello-mule-api
request body
• JSON payload
• XML payload
Mule event message
Mule event
Mule message structure
request headers
• Headers
• URI params
• Query params
• Etc.
request body
attributes.headers.’Content-Type’
• JSON payload
• XML payload
attributes.uriParams.fieldName
attributes.queryParams.fieldName
payload.fieldName
vars.variablename
create-employee rest service
⬥ URL: http://localhost:8091/emp-sapi/create-employee (POST)
{
"employeeID": 100,
"employeeName": "Chinna",
"employeeStatus": "A"
}
{
"status": 200,
"message": “Success”
}
update-employee rest service
⬥ URL: http://localhost:8091/emp-sapi/update-employee (PUT)
Mule flows
Event source
Error handling
Error handling
• Error handling: The process of handling errors in flow and responding back user friendly messages instead of
system error messages is known as error handling.
response headers
500, Server error
response body
Could not obtain connection from data source
response headers
503, Service unavailable
response body
{
"code":503,
"message":"Service unavailable",
"description":"The service is temporarily not available",
"dateTime":"2024-05-31T06:18:02Z",
"transactionId":"48n32920-69ne-47b4-907d-
fa15869f3c4d"
}
Error handling
NAMESPACE:IDENTIFIER
On error propagate vs on error continue
Error handling b/w parent flow & sub flow
2 1
3 3
Error handling b/w parent flow & sub flow
3 1
4
2
Error handling b/w parent flow & sub flow
3 1
4
2
Error handling b/w parent flow & sub flow
3 4 1
2
Mule API life cycle
DESIGN
DEVELOPMENT
MUNIT TESTING
MANUAL DEPLOYMENT
CICD DEPLOYMENT
API MANAGEMENT
Designing API’s
Designing API’s
Rest API
• Response headers: 200, OK. 400, Bad Request. 500 Server Error. Etc
9 8
10
11 12
Fragments in RAML
Fragments : API fragments are reusable component of RAML to make the design and build
of a reusable API even quicker and easier.
API FRAGMENTS
LOCAL GLOBAL
uhub-sapi
uhub-sapi aws-sapi
who-sapi
Mule project naming standards and structure
Connector names: Firstletter capital word with space b/w words (ex:
Transform Message)
Mule error types
ERRORS
ANY CRITICAL
Properties management : Externalizing properties from mule configuration help us in better code
management and need not touch applications on configurations property changes.
3. Use ${key} expression extract the property from property file or yaml file.
Properties management : Externalizing properties from mule configuration help us in better code
management and need not touch applications on configurations property changes.
1. Use ${secure::key} expression extract the property from property file or yaml file.
DESIGN
DEVELOPMENT
MUNIT TESTING
MANUAL DEPLOYMENT
CICD DEPLOYMENT
API MANAGEMENT
Mule API management
uho-dev-uhub-sapi
Auto discovery
API Instance ID
uhub-sapi 18387974
18387974
uho-dev-uhub-sapi
API Instance ID
uhub-sapi 18387975
18387975
uho-dev-aws-sapi
The Client ID Enforcement policy restricts access to a protected resource by allowing requests only from registered client
applications. The policy ensures that the client credentials sent on each request have been approved to consume the API.
• HTTP Basic Authentication Header: Requires credentials as part of the authorization header. The application
consuming the API must use the basic authentication scheme to send the credentials in the requests.
• Custom Expression: Accepts an expression each for client_id and client_secret in. the headers, indicating where to
extract the credentials from the request.
Rate limiting policy
The Rate Limiting policy enables you to limit the number of requests that an API can accept within a time window. The API
rejects any request that exceeds this limit. You can configure multiple limits with window sizes ranging from milliseconds to
years.
The Rate Limiting policy is combination of rate limiting and client id enforcement that enables you to limit the number of
requests specified by the level of access granted to the requesting application. The API rejects any request that exceeds this
limit. You can configure multiple limits with window sizes ranging from milliseconds to years.
Hospital A
uho-dev-uhub-sapi
2 requests per minute
Diagnostic A
THANK YOU
HAPPY
LEARNING J