Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Anypoint Data Graphs
1. MuleSoft NYC Meetup Group
Anypoint DataGraph
Unify Data From Multiple APIs
into one Data Service
2. Organizer
2
Overall 14 years of Experience in ERP and Integrations.
MuleSoft Mentor- helping people to move to MuleSoft
Working as Development and Integration Specialist @
Casper Inc, NY.
3X MuleSoft Certified, 1X AWS Certified.
Managed multiple End to End ERP Implementation and
Integration Projects.
2X Salesforce SuperBadge Holder(Expeditioner Level)
Neeraj Kumar
Host, NYC Community
3. Speakers
3
Jitendra Bafna
Senior Solution Architect
Overall 13 years of experience in API and Integration Technologies.
MuleSoft Ambassador and Surat/Nashik MuleSoft Meetup Leader
Published overall 300+ YouTube Videos and 150+ Articles on MuleSoft
and Anypoint Platform.
Expertise in setting up MuleSoft platform includes Hybrid
Implementation, CloudHub (Anypoint VPC, VPN and DLB), Customer
Hosted Mule Runtime (Clustering and Server Group).
Expertise in Application Integration using API Led Connectivity and
Event Driven Architecture.
Expertise in Integration with various systems like Salesforce, NetSuite
ERP, Snowflake, Databases, SAP,
Define Integration and migration strategy and roadmap includes
migrating from on premise to CloudHub, migrating to higher version of
Mule Runtime etc.
4. 4
Agenda
Introduction
GraphQL and Anypoint DataGraph
Anypoint DataGraph Use Cases
Live Demonstration
Anypoint DataGraph – Tracing and Monitoring
Anypoint DataGraph – Restrictions
Trivia Quiz
5. GraphQL
5
GraphQL is an open-source query language for Rest API's and it is developed by Facebook in
2012 before releasing publicly in 2015. GraphQL allows you to send the query to your API and get
the required data.
1
REST APIs are powerful and follow a resource-oriented and well-structured approach. However,
when the data is complex and it is not possible to fetch all the data within a single request as it
involved various operations and routes get more complex. GraphQL is very useful in such cases
and structures data in the form of a graph with its powerful query syntax for traversing, retrieving,
and modifying data.
2
GraphQL is capable of aggregating the data, returns predictable data to the clients.
3
6. What is Anypoint DataGraph
6
Anypoint DataGraph
Anypoint DataGraph is a component of Anypoint Platform which allows you to unify the multiple APIs into
a single data service. Anypoint DataGraph is the unified platform for APIs to design, develop and
manage. It allows to discover, manage or serve the data from multiple apis using single DataGraph
request.
This reduces a lot of efforts for developers to call multiple APIs and aggregate the response. With
Anypoint DataGraph, you can request only data you want, no more or no less.
7. Anypoint DataGraph Advantages
7
Unify the multiple APIs into the single data service. With Anypoint DataGraph, you can
serve data from multiple underlying APIs within a single request without writing any
code.
Consume the data from multiple APIs using a single request.
Developer doesn't have to write the code to parse the data from multiple APIs.
Anypoint DataGraph is managed service, no maintenance or patching for IT.
Request the data you want, no more no less.
Reduce development and maintenance efforts.
Anypoint DataGraph is a managed service and no need to worry about underlying
infrastructure and maintenance.
8. Anypoint DataGraph Cont.…
8
Monitor or Trace or Measure the API Performance
With a single UI, it is possible to trace the query response time and logs, ensuring to measure
the performance of query or apis request and meets expected SLA’s.
Authentication Mechanism
DataGraph support below list of Authentication mechanism while calling underlying APIs
Basic Authentication
Client Id Enforcement via Headers
Client Id Enforcement via Query Params
Custom (Add Custom headers or Query Params)
9. Anypoint DataGraph- Restrictions
● Anypoint DataGraph supports:
REST APIs with RAML and OAS specifications
Only GET methods
250 APIs per unified schema
16,000 fields per unified schema
● Anypoint DataGraph restricts downstream REST API calls to:
A maximum of 150 concurrent or ongoing calls per unified schema
A 5 second timeout per call
A maximum of 5 MB of response data per call
● Anypoint DataGraph limits the query service to:
A 30 second timeout per query
A maximum of 100 selected fields per query.
9
10. Use Case 1
Let's consider the scenario, you have a Rest API that returns 10 fields in response but web
application requires only 7 fields whereas mobile application requires only 4 fields. In such cases,
DataGraph is one of the most optimal options where the client can pass whatever data required
as an input request, and DataGraph will return the required fields to the Web Application and
Mobile Application. Below is the illustration of Use Case 1.
10
11. Use Case 2
Let's consider the scenario where you have to call multiple rest endpoints or want to fetch data
from multiple rest endpoints and each APIs will respond with JSON payload. DataGraph will
aggregate all the responses and send back the required data to the client. Below is the
illustration of Use Case 2.
11
12. Use Case 3
Let's consider the scenario where you have to call multiple Rest APIs to fetch account details
and related customer details. Customer details and Account details exist in different APIs.
CustomerId is the primary key in customers apis and accountId is the primary key in accounts
apis. Also, customerId is foreign key in accounts apis. Below is the illustration of Use Case 3.
12
16. 16
● Anypoint DataGraph supports:
a) Only Put Methods
b) Both Get and Post Methods
c) Only Get Methods
d) None of the above
Q1
17. 17
● Anypoint DataGraph supports:
a) Only Put Methods
b) Both Get and Post Methods
c) Only Get Methods
d) None of the above
Q1
18. 18
● Anypoint DataGraph restricts downstream REST API calls to:
a) A maximum of 50 KB of response data per call
b) 50 second timeout per call
c) A maximum of 5 MB of response data per call
d) None of the above
Q2
19. 19
● Anypoint DataGraph restricts downstream REST API calls to:
a) A maximum of 50 KB of response data per call
b) 50 second timeout per call
c) A maximum of 5 MB of response data per call
d) None of the above
Q2
20. 20
● Anypoint DataGraph limits the query service to:
a) 300 second timeout per query
b) 30 second timeout per query
c) maximum of 1000 selected fields per query
d) maximum of 200 selected fields per query
Q3
21. 21
● Anypoint DataGraph limits the query service to:
a) 300 second timeout per query
b) 30 second timeout per query
c) maximum of 1000 selected fields per query
d) maximum of 200 selected fields per query
Q3