SlideShare a Scribd company logo
3rd Aug,2019
Ahmedabad MuleSoft Meetup #4
All contents © MuleSoft Inc.
Agenda
• 10:00 AM Introduction
• 10:15 AM Mule Migration 3 to 4
• 10:45 AM Anypoint Runtime Manager
• 11:15 AM Q & A
• 11:30 AM Topic for Next Meetup
• 12:00 AM Refreshments
2
Abhishek Patel Suraj Tekchandani
ZYMR BasilRoot Technologies Private Limited
Lead Software Engineer Consultant
Meetup Orator
Introduction
High Level Mule 4 Migration Guide
5
All contents © MuleSoft Inc.
High Level Migration Guide
• Mule 4 Mule Event structure is different than Mule3.
– No Inbound/Outbound properties.
– No records, session, etc. variables.
– No Inbound/Outbound Attachments.
• Mule 4 does not require explicit transformers like <object-to-string/>
or <object-to-json>. Mule 4 handles it automatically.
• Most of Mule 4 connectors configuration has been changed along
with added features.
6
All contents © MuleSoft Inc.
High Level Migration Guide(continue…)
• Mule 4 has deprecated MEL. Dataweave2 is the only expression
language. (It’s one of challenge to migrate MEL into Dataweave2!!)
– You can generate or extract data, can’t modify it using dataweave2.
– Use alternative available in Mule4 – vars, attributes, correlationId, error, etc
– Use Java Module – Invoke Static, Invoke instance and Scripting Module
– Use Dataweave2 modules – Core, Arrays, Runtime, System, etc.
• Mule 4 spring module allows to use any spring version instead of
sticking to underlying Mule Runtime spring version.
– Define beans in separate xml
• Mule 4 has simple error handling mechanism – continue or propagate
7
All contents © MuleSoft Inc.
High Level Migration Guide(continue…)
• Mule 4 class loading isolation has changed the way we should use
third-party libraries, project specific classes, modules.
– Each module has separate class loader
– Concept of defining Shared Libraries in pom.xml
– Exporting resources through mule-artifact.json
- Examples :
- How to use custom java class in spring module or java module?
- How spring module can access classes defined in third-party library?
- How to resolve Mule access restriction warning coming in Anypoint studio?
• Always refer migration cheat sheet. It’s awesome. (I mean it !!)
https://docs.mulesoft.com/mule-runtime/4.2/migration-core
8
Few Migration Challenges and
Solutions(Workaround)
9
All contents © MuleSoft Inc.
Mule4 OAuth2 Configuration
• In Mule3, we have domain project which has HTTP Listener and API
project which uses this common HTTP Listener. This API project also
has OAuth2 configuration which uses the same Domain project’s
HTTP Listener. This HTTP listener is single entry point to all APIs
including OAuth endpoint.
• Issue with Mule4 – We can’t use Domain project’s HTTP Listener in
OAuth2 configuration. OAuth2 can only use local HTTP listener with
different port. Mulesoft considered it as Bug on raising the issue with
them.
• Workaround with Mule4 – We have created proxy OAuth2 app which
forwards Token generation request to actual OAuth2 app.
10
All contents © MuleSoft Inc.
Mule4 OAuth2 Configuration
11
All contents © MuleSoft Inc.
Java Invoke with exact class name
• Issue with Mule4 – Java Invoke instance component expects exact
class to specify when calling method on instance. You can’t specify
child class to call parent class method.
<java:invoke doc:name="Invoke" doc:id="0c8a21cf-e77a-4129-8853-642cb8a905fe"
instance="#[payload]" class="java.util.LinkedHashMap" method="toString()"></java:invoke>
• Workaround Solution
<java:invoke doc:name="Invoke toString" doc:id="03e375b5-dd3b-420f-8c21-5a78faf08e98"
target="StringPayload" class="java.util.AbstractMap" method="toString()" instance="#[payload]">
<java:args><![CDATA[#[payload]]]></java:args>
</java:invoke>
As Java Developer, you will always think that you can call any method(s) of parent class or same using
instance of child class.
12
All contents © MuleSoft Inc.
Attributes become null after http:request
• Issue with Mule4 – After calling HTTP Request component, attributes
becomes null if you specify “Target Variable”. Hence, You don’t have
access to response headers, HTTP status code,etc.
• Workaround Solution. Use full “message” instead of default “payload”
on target variable on http:request component
<http:request method="GET" doc:name="Request" doc:id="d8db61e1-26e6-4d98-ac93-f1df2d35926c"
config-ref="HTTP_Request_configuration" path="/employees" target="EmployeesData"
targetValue="#[message]"></http:request>
<logger level="INFO" doc:name="Logger" doc:id="b7109ef3-5286-45c5-a34c-dc1fc3a3d8d1"
message="Response : #[vars.EmployeesData.payload], HttpStatus :
#[vars.EmployeesData.attributes.statusCode]"/>
13
All contents © MuleSoft Inc.
Variable list become empty on APIKIT exception
• Mule3 Implementation – You can access session variables within flow
or it’s exception handler of APIKIT.
• Issue with Mule4 – If any exception is thrown in any route of APIKIT,
you don’t have access to any variables in exception handler defined
in APIKIT.
• Workaround Solution from MuleSoft is using Object Store. You have
to save all variables in route flow against “correlationId” in
ObjectStore and retrieve it in APIKIT exception handler using same
“correlationId”. This approach has it’s own pros and cons. (I was
satisfied with it workaround solution !)
14
AnyPoint Runtime Manager
15
All contents © MuleSoft Inc.
Runtime Manager
CloudhubRuntime Fabric
Runtime Manager
On Prem Servers,
Server Groups or
Clusters
16
All contents © MuleSoft Inc.
Runtime Manager: Architecture
Cloud Version supports deployments on
Cloudhub or elsewhere
On Prem Version supports deployments
except Cloudhub
Insights, Analytics and Monitoring fully
supported with cloud version of Runtime
On Prem can send the data to third parties
17
Runtime Manager: Key Capabilities
18
Deployment
19
Deployment Strategies
Runtime
Manager
Anypoint Platform
Private Cloud Edition
Runtime Manager – Cloud
Console
App Deployment Target -
Cloudhub
Runtime Manager – Cloud
Console
App Deployment Target –
Your Own Servers
Runtime Manager – Private
Cloud Edition
App Deployment Target –
Your Own Servers
Runtime Manager – Private
Cloud Edition
App Deployment Target –
PCF Repository
20
All contents © MuleSoft Inc.
Runtime Manager On-Premises
21
• On premises Involve a tool called as MMC and Mule Runtime Manager
that needs to be registered with MMC. This can help create a DMZ
within the intranet of company.
• DMZ : A DMZ, or demilitarized zone, is used to help improve the
security of an organization's network by segregating devices,
such as computers and servers, on the opposite sides of a
firewall.
• MMC : Mule Management Console centralizes management and
monitoring functions for all your on-premise Mule ESB
Enterprise deployments, whether they are running as
standalone instances, as a cluster, or embedded in application
servers.
• We need to configure DMZ and MMC
All contents © MuleSoft Inc.
Mule Management Console Feature
22
• Centralized Management and Monitoring
• Fine-Grained ESB Control
• Enterprise-Level Security
• Deep Diagnostics and Auditing
• Flexible Cluster Management
All contents © MuleSoft Inc.
Mulesoft Cloud-Hub
23
• All features are manage by MuleSoft Cloud-Hub
All contents © MuleSoft Inc.
Mulesoft Cloud
• MuleSoft cloud where we can run our application
• MuleSoft Cloud is also known as MuleSoft Cloud worker
• MuleSoft Application Running on cloud as a mule instance
• There are many automatic facilities provided by MuleSoft cloud
24
All contents © MuleSoft Inc.
Cloud-Hub Worker
• This is an elastic cloud of Mule instances that run integration
applications.
• Cloud-Hub offers worker clouds in 12 different regions of the world:
North America, South America, the European Union, and Asia-Pacific.
• Worker Size : By default size is 200MB but we can expand this size
as per our Requirement
25
All contents © MuleSoft Inc.
Worker Core Size
• Each worker is a dedicated instance of Mule that runs your
integration application. Workers may have a different memory
capacity and processing power depending on how you configure
them at application level. Workers can be scaled vertically by
selecting one of the available worker sizes
• Locality: Each worker runs in a specific worker cloud, the US, EU,
Asia-Pacific, etc.
• Capacity: Each worker has a specific amount of capacity to process
data. You can select the size of your worker.
26
All contents © MuleSoft Inc.
Different Size of Workers
• 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
27
All contents © MuleSoft Inc.
Hybrid Cloud
28
• A hybrid integration platform is
on-premises and cloud-based
integration technologies
securely connected so that it
supports the integration of
on-premises endpoints, cloud
endpoints and combination of
the two, for all integration
patterns
All contents © MuleSoft Inc.
Why Hybrid Cloud ?
29
• Regulatory Compliance
– Some data must stay in Data Center
– Some Data can not leave the Country of origin
• Security and Privacy
– Concerns around processing data in cloud
– Need to process sensitive data on-premises, cloud data in the cloud
All contents © MuleSoft Inc.
What is PCF (Pivotal Cloud Foundry)
• The Anypoint Platform for Pivotal Cloud Foundry (PCF) component is
a fully integrated solution that enables organizations to design,
develop, deploy, manage, and operate APIs, connectivity apps and
microservices within the infrastructure provided by Pivotal Cloud
Foundry.
The Anypoint Platform for PCF solution enables you to:
• Deploy Mule applications to PCF using the Runtime Manager UI.
• Create and deploy a Mule proxy application to PCF. A proxy
application intercepts traffic to a non-Mule application, enabling you
to apply policies and view usage metrics.
30
All contents © MuleSoft Inc.
PCF Services
• If you are using Anypoint Platform for PCF and you have multiple PCF
installations, each must be linked to its own separate installation of
Anypoint Platform Private Cloud Edition.
• If you have a PCF installation with multiple spaces, you must run
the Space Configuration Tool on each of these spaces. If your
Anypoint Platform organization uses multiple environments, it is
recommended that you have one PCF space for each.
31
All contents © MuleSoft Inc.
And…
• Runtime Manager Service: exposes PCF as a deployment target
within the Anypoint Runtime Manager and lets you deploy Mule
applications to PCF, alongside other deployment targets.
• API Gateway Service: enables you to create and deploy a Mule API
proxy that intercepts traffic to a non-Mule application running on
PCF. This allows you to use the MuleSoft interface to apply policies
over the API and the PCF interface to view usage and policy metrics.
• Anypoint Metering Service: provides an API that enables you to
view usage metrics for Mule applications deployed to PCF. You can
view usage metrics for production, pre-production, staging, and
development environments.
32
All contents © MuleSoft Inc.
Comparison: Deployment Strategies
PCF
Object Store
Infrastructure
Monitoring
Troubleshooting
Scheduling
Load Balancing
Shared Resource
Support
Automatic
Automatic
Automatic
Automatic
Automatic
Automatic
By Client
By Client
Custom
Custom
Custom
By Client
By Client
By Client
By Client
By Client
By Client
By Client
By Client
By Client
By Client
By Client
By Client
By Client
33
All contents © MuleSoft Inc.
End Game
34
How to Deploy
All contents © MuleSoft Inc.
How to Deploy a Mule Application
• Steps We need to take while Deployment
• From Anypoint Studio :
1) Create Mule Application
2) Application Must Contain Exception Strategy
3) Must include Maven Dependencies
4) Test it on Mule server
5) Export Mule Application as a Mule Deployable Archive it has
(.JAR) Extension we need to store it in specific folder And this
file going to be Deploy on Mule Cloud-Hub.
36
All contents © MuleSoft Inc.
How to Deploy a Mule Application
• Step we need to take while Deployment
• From Cloud-Hub :
1) Login into your Anypoint Account
2) Download Mule Agent (Standalone Server Version must be > 1.8 )
https://docs.mulesoft.com/release-notes/mule-runtime/mule-4.1.4-release-notes
3) Configure And Start Standalone Server
4) Create a Server With Specific Name
5) After Creation of Server Deploy your Application on Cloud-Hub if everything
goes well then you will get Success Message from Cloud-Hub
37
All contents © MuleSoft Inc.
How We Can Access Our Deployed API ?
– Note : API URL given by the Cloud-Hub itself
If Deployed Application name As hostedapp Then URL is like :
hostedapp.us-e2.cloudhub.io
38
Advantages
All contents © MuleSoft Inc.
Monitoring in Runtime Manager
40
All contents © MuleSoft Inc.
Runtime Analysis and Usage Map
41
All contents © MuleSoft Inc.
Features
42
• Save the log
• Load Balancing and on More data usage alert notification
• Monitoring our API usage graphically
• Analytical Support : which country use our API most
• Data Security : Preventing from SQL injection
Demo Time
Q A
See you next time, Thank You…
Please send topic suggestions to the organizer
Let US all have a GROUP PHOTO with T-shirt.

More Related Content

PPTX
MuleSoft Meetup Virtual_ 2_Charlotte
PPTX
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
PPTX
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
PDF
MuleSoft Manchester Meetup #2 slides 29th October 2019
PPTX
Warsaw MuleSoft Meetup #6 - CI/CD
PPTX
Meet up slides_mumbai_05022020_final
PPTX
Warsaw MuleSoft Meetup #7 - custom policy
PDF
MuleSoft Online Meetup - MuleSoft integration with snowflake and kafka
MuleSoft Meetup Virtual_ 2_Charlotte
MuleSoft Meetup slides_kualalumpur_19thSept_Undisturbed REST: Achieving Undis...
Ahmadabad mule soft_meetup_11_october_2020_errorhanlingandmonitoringalerts
MuleSoft Manchester Meetup #2 slides 29th October 2019
Warsaw MuleSoft Meetup #6 - CI/CD
Meet up slides_mumbai_05022020_final
Warsaw MuleSoft Meetup #7 - custom policy
MuleSoft Online Meetup - MuleSoft integration with snowflake and kafka

What's hot (20)

PPTX
Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4
PPTX
Warsaw MuleSoft Meetup - Runtime Fabric
PPTX
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
PPTX
Mumbai MuleSoft Meetup 12
PDF
Custom policies in mule 4 and a circuit breaker example
PPTX
Mumbai MuleSoft Meetup 11
PPTX
Mulesoft KL Meetup 2
PPTX
Ahmedabad MuleSoft Meetup #1
PDF
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
PPTX
MuleSoft Meetup Warsaw Group #1
PPTX
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
PPT
Error Handling in Mulesoft
PPTX
Mule meetup 25thjan
PPTX
mulesoft meetup @ bangalore
PPTX
Ahmadabad mule soft_meetup_6march2021_azure_CICD
PPTX
How to Secure Mule API's With a Demo
PDF
Mule Meetup Hyderabad - Aug 2020
PPTX
Perth MuleSoft Meetup Feb 2019
PPTX
Manila MuleSoft Meetup - September 2018
PDF
Hyd virtual meetupslides11jul
Hyd MuleSoft-Meetup-May 29,2021 | Migrating Mule 3 Java related code to Mule 4
Warsaw MuleSoft Meetup - Runtime Fabric
Clustering, Server setup and Hybrid deployment setup using Anypoint Runtime M...
Mumbai MuleSoft Meetup 12
Custom policies in mule 4 and a circuit breaker example
Mumbai MuleSoft Meetup 11
Mulesoft KL Meetup 2
Ahmedabad MuleSoft Meetup #1
MuleSoft approach to the integration - Warsaw MuleSoft Meetup
MuleSoft Meetup Warsaw Group #1
Mulesoft with ELK (Elastic Search, Log stash, Kibana)
Error Handling in Mulesoft
Mule meetup 25thjan
mulesoft meetup @ bangalore
Ahmadabad mule soft_meetup_6march2021_azure_CICD
How to Secure Mule API's With a Demo
Mule Meetup Hyderabad - Aug 2020
Perth MuleSoft Meetup Feb 2019
Manila MuleSoft Meetup - September 2018
Hyd virtual meetupslides11jul
Ad

Similar to Ahmedabad MuleSoft Meetup #4 (20)

PDF
Ahmedabad MuleSoft 3rd Meetup
PPTX
MuleSoft Meetup Charlotte 2 - 2019
PPTX
Mule soft meetup warsaw november 13th, 2019
PPTX
Cracow MuleSoft Meetup #1
PPTX
Cmm vm 002
PPTX
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
PDF
Meetup hyderabad mule-4.x
PPTX
Custom Connector development using Mule SDK
PPTX
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
PPTX
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
PDF
MuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
PPTX
Mulesoft meetup 9thmay Thiruvananthapuram
PPTX
Second Caracas MuleSoft Meetup Slides
PDF
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...
PPTX
Mule soft Meetup #3
PPTX
Mulesoftmeetup Thiruvanathapuram #4
PPTX
Connect the Dots: Logging and Custom Connectors
PPTX
Baltimore jan2019 mule4
PPTX
Introduction to CloudHub 2.0
PDF
WHISHWORKS-MuleSoft Hyderabad Meetup -April 2019
Ahmedabad MuleSoft 3rd Meetup
MuleSoft Meetup Charlotte 2 - 2019
Mule soft meetup warsaw november 13th, 2019
Cracow MuleSoft Meetup #1
Cmm vm 002
Tips and Tricks for the Advanced Mule Developer with Tesla and Twitter
Meetup hyderabad mule-4.x
Custom Connector development using Mule SDK
How to Expand Anypoint Platform's Capabilities by Developing Custom Connectors
MuleSoft Meetup Mumbai Mule 4 Presentation Slide
MuleSoft Meetup Singapore - Reliable Messaging & RTF Operations
Mulesoft meetup 9thmay Thiruvananthapuram
Second Caracas MuleSoft Meetup Slides
MuleSoft Surat Virtual Meetup#35 - Setting up MuleSoft Runtime and Anypoint C...
Mule soft Meetup #3
Mulesoftmeetup Thiruvanathapuram #4
Connect the Dots: Logging and Custom Connectors
Baltimore jan2019 mule4
Introduction to CloudHub 2.0
WHISHWORKS-MuleSoft Hyderabad Meetup -April 2019
Ad

Recently uploaded (20)

PDF
Business Ethics Teaching Materials for college
PPTX
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
PDF
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
PDF
Abdominal Access Techniques with Prof. Dr. R K Mishra
PDF
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
PPTX
Cell Types and Its function , kingdom of life
PPTX
Final Presentation General Medicine 03-08-2024.pptx
PDF
RMMM.pdf make it easy to upload and study
PDF
O7-L3 Supply Chain Operations - ICLT Program
PPTX
Cell Structure & Organelles in detailed.
PDF
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
PPTX
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
PPTX
master seminar digital applications in india
PDF
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
PDF
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
PPTX
Pharma ospi slides which help in ospi learning
PDF
102 student loan defaulters named and shamed – Is someone you know on the list?
PPTX
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
PPTX
human mycosis Human fungal infections are called human mycosis..pptx
PDF
Pre independence Education in Inndia.pdf
Business Ethics Teaching Materials for college
The Healthy Child – Unit II | Child Health Nursing I | B.Sc Nursing 5th Semester
Chapter 2 Heredity, Prenatal Development, and Birth.pdf
Abdominal Access Techniques with Prof. Dr. R K Mishra
Physiotherapy_for_Respiratory_and_Cardiac_Problems WEBBER.pdf
Cell Types and Its function , kingdom of life
Final Presentation General Medicine 03-08-2024.pptx
RMMM.pdf make it easy to upload and study
O7-L3 Supply Chain Operations - ICLT Program
Cell Structure & Organelles in detailed.
The Lost Whites of Pakistan by Jahanzaib Mughal.pdf
Introduction to Child Health Nursing – Unit I | Child Health Nursing I | B.Sc...
master seminar digital applications in india
Saundersa Comprehensive Review for the NCLEX-RN Examination.pdf
3rd Neelam Sanjeevareddy Memorial Lecture.pdf
Pharma ospi slides which help in ospi learning
102 student loan defaulters named and shamed – Is someone you know on the list?
IMMUNITY IMMUNITY refers to protection against infection, and the immune syst...
human mycosis Human fungal infections are called human mycosis..pptx
Pre independence Education in Inndia.pdf

Ahmedabad MuleSoft Meetup #4

  • 2. All contents © MuleSoft Inc. Agenda • 10:00 AM Introduction • 10:15 AM Mule Migration 3 to 4 • 10:45 AM Anypoint Runtime Manager • 11:15 AM Q & A • 11:30 AM Topic for Next Meetup • 12:00 AM Refreshments 2
  • 3. Abhishek Patel Suraj Tekchandani ZYMR BasilRoot Technologies Private Limited Lead Software Engineer Consultant Meetup Orator
  • 5. High Level Mule 4 Migration Guide 5
  • 6. All contents © MuleSoft Inc. High Level Migration Guide • Mule 4 Mule Event structure is different than Mule3. – No Inbound/Outbound properties. – No records, session, etc. variables. – No Inbound/Outbound Attachments. • Mule 4 does not require explicit transformers like <object-to-string/> or <object-to-json>. Mule 4 handles it automatically. • Most of Mule 4 connectors configuration has been changed along with added features. 6
  • 7. All contents © MuleSoft Inc. High Level Migration Guide(continue…) • Mule 4 has deprecated MEL. Dataweave2 is the only expression language. (It’s one of challenge to migrate MEL into Dataweave2!!) – You can generate or extract data, can’t modify it using dataweave2. – Use alternative available in Mule4 – vars, attributes, correlationId, error, etc – Use Java Module – Invoke Static, Invoke instance and Scripting Module – Use Dataweave2 modules – Core, Arrays, Runtime, System, etc. • Mule 4 spring module allows to use any spring version instead of sticking to underlying Mule Runtime spring version. – Define beans in separate xml • Mule 4 has simple error handling mechanism – continue or propagate 7
  • 8. All contents © MuleSoft Inc. High Level Migration Guide(continue…) • Mule 4 class loading isolation has changed the way we should use third-party libraries, project specific classes, modules. – Each module has separate class loader – Concept of defining Shared Libraries in pom.xml – Exporting resources through mule-artifact.json - Examples : - How to use custom java class in spring module or java module? - How spring module can access classes defined in third-party library? - How to resolve Mule access restriction warning coming in Anypoint studio? • Always refer migration cheat sheet. It’s awesome. (I mean it !!) https://docs.mulesoft.com/mule-runtime/4.2/migration-core 8
  • 9. Few Migration Challenges and Solutions(Workaround) 9
  • 10. All contents © MuleSoft Inc. Mule4 OAuth2 Configuration • In Mule3, we have domain project which has HTTP Listener and API project which uses this common HTTP Listener. This API project also has OAuth2 configuration which uses the same Domain project’s HTTP Listener. This HTTP listener is single entry point to all APIs including OAuth endpoint. • Issue with Mule4 – We can’t use Domain project’s HTTP Listener in OAuth2 configuration. OAuth2 can only use local HTTP listener with different port. Mulesoft considered it as Bug on raising the issue with them. • Workaround with Mule4 – We have created proxy OAuth2 app which forwards Token generation request to actual OAuth2 app. 10
  • 11. All contents © MuleSoft Inc. Mule4 OAuth2 Configuration 11
  • 12. All contents © MuleSoft Inc. Java Invoke with exact class name • Issue with Mule4 – Java Invoke instance component expects exact class to specify when calling method on instance. You can’t specify child class to call parent class method. <java:invoke doc:name="Invoke" doc:id="0c8a21cf-e77a-4129-8853-642cb8a905fe" instance="#[payload]" class="java.util.LinkedHashMap" method="toString()"></java:invoke> • Workaround Solution <java:invoke doc:name="Invoke toString" doc:id="03e375b5-dd3b-420f-8c21-5a78faf08e98" target="StringPayload" class="java.util.AbstractMap" method="toString()" instance="#[payload]"> <java:args><![CDATA[#[payload]]]></java:args> </java:invoke> As Java Developer, you will always think that you can call any method(s) of parent class or same using instance of child class. 12
  • 13. All contents © MuleSoft Inc. Attributes become null after http:request • Issue with Mule4 – After calling HTTP Request component, attributes becomes null if you specify “Target Variable”. Hence, You don’t have access to response headers, HTTP status code,etc. • Workaround Solution. Use full “message” instead of default “payload” on target variable on http:request component <http:request method="GET" doc:name="Request" doc:id="d8db61e1-26e6-4d98-ac93-f1df2d35926c" config-ref="HTTP_Request_configuration" path="/employees" target="EmployeesData" targetValue="#[message]"></http:request> <logger level="INFO" doc:name="Logger" doc:id="b7109ef3-5286-45c5-a34c-dc1fc3a3d8d1" message="Response : #[vars.EmployeesData.payload], HttpStatus : #[vars.EmployeesData.attributes.statusCode]"/> 13
  • 14. All contents © MuleSoft Inc. Variable list become empty on APIKIT exception • Mule3 Implementation – You can access session variables within flow or it’s exception handler of APIKIT. • Issue with Mule4 – If any exception is thrown in any route of APIKIT, you don’t have access to any variables in exception handler defined in APIKIT. • Workaround Solution from MuleSoft is using Object Store. You have to save all variables in route flow against “correlationId” in ObjectStore and retrieve it in APIKIT exception handler using same “correlationId”. This approach has it’s own pros and cons. (I was satisfied with it workaround solution !) 14
  • 16. All contents © MuleSoft Inc. Runtime Manager CloudhubRuntime Fabric Runtime Manager On Prem Servers, Server Groups or Clusters 16
  • 17. All contents © MuleSoft Inc. Runtime Manager: Architecture Cloud Version supports deployments on Cloudhub or elsewhere On Prem Version supports deployments except Cloudhub Insights, Analytics and Monitoring fully supported with cloud version of Runtime On Prem can send the data to third parties 17
  • 18. Runtime Manager: Key Capabilities 18
  • 20. Deployment Strategies Runtime Manager Anypoint Platform Private Cloud Edition Runtime Manager – Cloud Console App Deployment Target - Cloudhub Runtime Manager – Cloud Console App Deployment Target – Your Own Servers Runtime Manager – Private Cloud Edition App Deployment Target – Your Own Servers Runtime Manager – Private Cloud Edition App Deployment Target – PCF Repository 20
  • 21. All contents © MuleSoft Inc. Runtime Manager On-Premises 21 • On premises Involve a tool called as MMC and Mule Runtime Manager that needs to be registered with MMC. This can help create a DMZ within the intranet of company. • DMZ : A DMZ, or demilitarized zone, is used to help improve the security of an organization's network by segregating devices, such as computers and servers, on the opposite sides of a firewall. • MMC : Mule Management Console centralizes management and monitoring functions for all your on-premise Mule ESB Enterprise deployments, whether they are running as standalone instances, as a cluster, or embedded in application servers. • We need to configure DMZ and MMC
  • 22. All contents © MuleSoft Inc. Mule Management Console Feature 22 • Centralized Management and Monitoring • Fine-Grained ESB Control • Enterprise-Level Security • Deep Diagnostics and Auditing • Flexible Cluster Management
  • 23. All contents © MuleSoft Inc. Mulesoft Cloud-Hub 23 • All features are manage by MuleSoft Cloud-Hub
  • 24. All contents © MuleSoft Inc. Mulesoft Cloud • MuleSoft cloud where we can run our application • MuleSoft Cloud is also known as MuleSoft Cloud worker • MuleSoft Application Running on cloud as a mule instance • There are many automatic facilities provided by MuleSoft cloud 24
  • 25. All contents © MuleSoft Inc. Cloud-Hub Worker • This is an elastic cloud of Mule instances that run integration applications. • Cloud-Hub offers worker clouds in 12 different regions of the world: North America, South America, the European Union, and Asia-Pacific. • Worker Size : By default size is 200MB but we can expand this size as per our Requirement 25
  • 26. All contents © MuleSoft Inc. Worker Core Size • Each worker is a dedicated instance of Mule that runs your integration application. Workers may have a different memory capacity and processing power depending on how you configure them at application level. Workers can be scaled vertically by selecting one of the available worker sizes • Locality: Each worker runs in a specific worker cloud, the US, EU, Asia-Pacific, etc. • Capacity: Each worker has a specific amount of capacity to process data. You can select the size of your worker. 26
  • 27. All contents © MuleSoft Inc. Different Size of Workers • 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 27
  • 28. All contents © MuleSoft Inc. Hybrid Cloud 28 • A hybrid integration platform is on-premises and cloud-based integration technologies securely connected so that it supports the integration of on-premises endpoints, cloud endpoints and combination of the two, for all integration patterns
  • 29. All contents © MuleSoft Inc. Why Hybrid Cloud ? 29 • Regulatory Compliance – Some data must stay in Data Center – Some Data can not leave the Country of origin • Security and Privacy – Concerns around processing data in cloud – Need to process sensitive data on-premises, cloud data in the cloud
  • 30. All contents © MuleSoft Inc. What is PCF (Pivotal Cloud Foundry) • The Anypoint Platform for Pivotal Cloud Foundry (PCF) component is a fully integrated solution that enables organizations to design, develop, deploy, manage, and operate APIs, connectivity apps and microservices within the infrastructure provided by Pivotal Cloud Foundry. The Anypoint Platform for PCF solution enables you to: • Deploy Mule applications to PCF using the Runtime Manager UI. • Create and deploy a Mule proxy application to PCF. A proxy application intercepts traffic to a non-Mule application, enabling you to apply policies and view usage metrics. 30
  • 31. All contents © MuleSoft Inc. PCF Services • If you are using Anypoint Platform for PCF and you have multiple PCF installations, each must be linked to its own separate installation of Anypoint Platform Private Cloud Edition. • If you have a PCF installation with multiple spaces, you must run the Space Configuration Tool on each of these spaces. If your Anypoint Platform organization uses multiple environments, it is recommended that you have one PCF space for each. 31
  • 32. All contents © MuleSoft Inc. And… • Runtime Manager Service: exposes PCF as a deployment target within the Anypoint Runtime Manager and lets you deploy Mule applications to PCF, alongside other deployment targets. • API Gateway Service: enables you to create and deploy a Mule API proxy that intercepts traffic to a non-Mule application running on PCF. This allows you to use the MuleSoft interface to apply policies over the API and the PCF interface to view usage and policy metrics. • Anypoint Metering Service: provides an API that enables you to view usage metrics for Mule applications deployed to PCF. You can view usage metrics for production, pre-production, staging, and development environments. 32
  • 33. All contents © MuleSoft Inc. Comparison: Deployment Strategies PCF Object Store Infrastructure Monitoring Troubleshooting Scheduling Load Balancing Shared Resource Support Automatic Automatic Automatic Automatic Automatic Automatic By Client By Client Custom Custom Custom By Client By Client By Client By Client By Client By Client By Client By Client By Client By Client By Client By Client By Client 33
  • 34. All contents © MuleSoft Inc. End Game 34
  • 36. All contents © MuleSoft Inc. How to Deploy a Mule Application • Steps We need to take while Deployment • From Anypoint Studio : 1) Create Mule Application 2) Application Must Contain Exception Strategy 3) Must include Maven Dependencies 4) Test it on Mule server 5) Export Mule Application as a Mule Deployable Archive it has (.JAR) Extension we need to store it in specific folder And this file going to be Deploy on Mule Cloud-Hub. 36
  • 37. All contents © MuleSoft Inc. How to Deploy a Mule Application • Step we need to take while Deployment • From Cloud-Hub : 1) Login into your Anypoint Account 2) Download Mule Agent (Standalone Server Version must be > 1.8 ) https://docs.mulesoft.com/release-notes/mule-runtime/mule-4.1.4-release-notes 3) Configure And Start Standalone Server 4) Create a Server With Specific Name 5) After Creation of Server Deploy your Application on Cloud-Hub if everything goes well then you will get Success Message from Cloud-Hub 37
  • 38. All contents © MuleSoft Inc. How We Can Access Our Deployed API ? – Note : API URL given by the Cloud-Hub itself If Deployed Application name As hostedapp Then URL is like : hostedapp.us-e2.cloudhub.io 38
  • 40. All contents © MuleSoft Inc. Monitoring in Runtime Manager 40
  • 41. All contents © MuleSoft Inc. Runtime Analysis and Usage Map 41
  • 42. All contents © MuleSoft Inc. Features 42 • Save the log • Load Balancing and on More data usage alert notification • Monitoring our API usage graphically • Analytical Support : which country use our API most • Data Security : Preventing from SQL injection
  • 44. Q A
  • 45. See you next time, Thank You… Please send topic suggestions to the organizer
  • 46. Let US all have a GROUP PHOTO with T-shirt.