Akil manati
·
Difference between "Scatter gather"
and "For Each".
è
Scatter Gather: The routing message
processor Scatter-Gather sends a request message to multiple targets
concurrently. It collects the responses from all routes and aggregates them
into a single message.
è
For Each: The Foreach scope splits a
collection into elements and processes them iteratively through the processors
embedded in the scope, then returns the original message to the flow.
·
Which Flow Strategy used in Mule flow.
è
A flow processing strategy determines how Mule
implements message processing for a given flow.
è
Should the message be processed synchronously
(on the same thread) or asynchronously (on a different thread)?
è
If asynchronously, what are the properties of
the pool of threads used to process the messages?
è
If asynchronously, how will messages wait for
their turn to be processed in the second thread?
·
How to you create the URL in RAML
"https://api.github.com" <--- baseUri
+
"/gists"
<--- gists resource relative URI
+
"/public" <--- public gists resource relative
URI
=
"https://api.github.com/gists/public" <--- public gists absolute URI
·
What are the resources in RAML
è
As the API designer YOU control the consumption.
For example, consider the functionality of the “BookMobile” API. You know you
want your users to be able to keep track of what they've read and their
favorites. Users should also be able to discover new books and look at other
titles written by their favorite authors. To do this, you define various
collections as your resources.
Ex: /users:
/authors:
/books:
è
Resources and Nested Resources:
A resource is identified by its relative URI, which MUST begin with a
slash (/). Every node whose key begins with a slash and is either at the root
of the API definition or is the child node of a resource node, is such a
resource node.
A resource defined as a root-level node is called a top-level resource.
The key of the root-level node is the URI of the resource relative to the
baseUri if there is one. A resource defined as a child node of another resource
is called a nested resource. The key of the child node is the URI of the nested
resource relative to the parent resource URI.
This
example shows an API definition with one top-level resource, /gists, and one
nested resource, /public.
#%RAML 1.0
title: GitHub API
version: v3
baseUri: https://api.github.com
/gists:
displayName: Gists
/public:
displayName: Public Gists
The key of a resource node, its relative URI, MAY consist of multiple URI
path fragments separated by slashes. For example, /bom/items might indicate the
collection of items in a bill of materials as a single resource. However, if
the individual URI path fragments are themselves resources, the API definition
SHOULD use nested resources to describe this structure. For example, if /bom is
itself a resource, then /items SHOULD be a nested resource of /bom, versus
using /bom/items as a non-nested resource.
Absolute URIs are not explicitly specified. They are computed by
appending the relative URI of the top-level resource, and then successively
appending the relative URI values for each nested resource until the target
resource is reached. In this formation of the absolute URI, if a baseUri is
defined, it is prepended before the relative URI of the top-level resource; any
trailing slashes in the baseUri are removed before prepending.
Continuing
with the previous example, the absolute URI of the public gists resource is
formed as follows.
"https://api.github.com" <--- baseUri
+
"/gists" <--- gists resource relative URI
+
"/public" <--- public gists resource relative URI
=
"https://api.github.com/gists/public" <--- public gists absolute URI
·
Difference between PUT and POST
è
GET - Retrieve the information defined in the
request URI.
è
PUT - Replace the addressed collection. At the
object-level, create or update it.
è
POST - Create a new entry in the collection.
This method is generally not used at the object-level.
è
DELETE - Delete the information defined in the
request URI.
è
In this example, you want developers to be able
to work at the collection level. For example, your API consumers can retrieve a
book from the collection (GET), add a book (POST), or update the entire library
(PUT). You do not want them to be able to delete information at the highest
level. Let's focus on building out the /books resource.
/books:
get:
post:
put:
NOTE: Reference links for RAML below
·
What are the Methods in HTTPS connector
è
GET, POST, Etc.
·
I have 2 custom salesforce objects and how to
connect to database
è
To create a custom salesforce object:
Click "Reset Security Token" and it will send a security token
to your registered email. Create an Accounts View with Postal Code in
Salesforce. Create a new object as per the requirement or use an existing one.
è
Salesforce to Database Example:
This application illustrates how to use batch processing to synchronize
Salesforce information with a database
Batch: Batch Processing allows you to split a payload into
individual elements to process each individually. This functionality is
particularly useful when working with streaming input or when engineering
"near real-time" data integration between SaaS applications.
Database Connector: The Database Connector provides a standardized
way to access to any JDBC relational database, consistently using one same
interface for every case. This connector allows you to run diverse SQL
operations on your database, including Select, Insert, Update, Delete, and even
Stored Procedures.
Message Enriching: Mule uses Message Enrichers to enrich message
payloads with data (i.e. add to the payload), rather than changing payload
contents. Mule enriches a message’s payload so that other message processors in
the application can access the original payload.
Example Use Case: This application queries a Salesforce account
for new or updated contacts at a regular interval, then processes the returned
payload one record at a time. It checks to see if a contact currently exists in
the database, then updates or creates a new contact accordingly. Once the
process is complete for the entire batch, a success message is logged.
Although
this use case could be met without using batch processing – treating the entire
list of contacts returned by Salesforce as a whole – using batch makes this
process more reliable as any errors that occur in single record will not
propagate beyond record level.
NOTE: Next full process can find in the following link - https://docs.mulesoft.com/mule-user-guide/v/3.5/salesforce-to-database-example
·
Mule Application architecture
NOTE: This page describes typical application architecture in
terms of flows, the default structure with which you build applications in
Mule. Note, however, that Mule also supports batch jobs for large and streaming
messages. Batch jobs can be combined with flows in the same application, but
their structure and functionality differ from that described here. To learn
more, see Batch
Processing.
è
At the simplest level, Mule applications accept
one message at a time, processing received messages in the order in which they
are received. Such processing can lead to a variety of results. Sometimes, the
Mule application returns an altered or replacement message to the source of the
original message. Additionally, or instead, the application can send the
message in its original or altered form to one or more third parties. In still
other cases, Mule can decline to process the message if it has not met specific
criteria.
1.
Flow Building Blocks: As the name
implies, it is a block (a block of code, really) that you can
arrange with other blocks to form a
structure. In this case, you are arranging building
blocks to form a Mule flow.
Message sources accept messages into flows
from other sources or services.
ü
Message Source: The first building block
in most flows is a message source, which receives messages from one or more
external sources, thus triggering a flow instance. Each time it receives
another message, the message source triggers another flow instance.
ü
Typically, a message source comes in the form of
an Anypoint Connector.
2.
Processing Strategies:
ü
Synchronous: when the message source is
configured with a request-response exchange pattern, Mule sets the processing
strategy to synchronous.
ü
Asynchronous: when the flow is configured
for a one-way exchange pattern and is non-transactional (i.e. no response to the original message sender
is required, and it isn’t necessary to verify that all steps in the flow have
been completed), Mule sets the processing strategy to queued
asynchronous.
3.
Exception Strategies: An exception strategy determines how Mule
responds when an error occurs during the course of message processing. In the
simplest case, the error is simply logged to a file.
You
can configure a custom exception strategy to respond in a variety of ways to a
variety of conditions. For example, if an exception is thrown after a message
has been transformed, you can set Mule to commit the message as it existed
after being transformed, but immediately before the error occurred, so that the
message cannot inadvertently be processed twice.
Note: Error Handling.
4.
Flow Architecture: It is a combination of different connectors
to connect the source, scopes to enhance the functionality of message process and
different transformers to transform the data formats and to control the flow
using “Flow controls” like APIKit routers, choice and scatter gather. Using
error handling and security methods.
5.
Flow Configuration: As per the flow
architecture will configure the components with
Do you realize there's a 12 word phrase you can speak to your partner... that will induce intense feelings of love and instinctual appeal for you buried within his chest?
ReplyDeleteThat's because hidden in these 12 words is a "secret signal" that fuels a man's instinct to love, cherish and care for you with all his heart...
12 Words Who Trigger A Man's Desire Response
This instinct is so hardwired into a man's mind that it will drive him to try harder than before to do his best at looking after your relationship.
As a matter of fact, triggering this dominant instinct is absolutely essential to getting the best ever relationship with your man that as soon as you send your man one of these "Secret Signals"...
...You will immediately notice him open his heart and soul to you in such a way he never experienced before and he'll perceive you as the only woman in the galaxy who has ever truly understood him.