Difference Between Endpoint and Connector in Mule - mule

What is the difference between Endpoint And Connectors in Mule . For example , there is http endpoint and there is http connector . Are these terms used interchangeably ?

Connectors:
provide abstract layer over data transport mechanisms
Mule specific
provide connections to external resources(Protocols, DB, 3rd party
API)
Are Operation-based or Endpoint-based.
Endpoints:
Flow level elements
Represents specific usage of a Connector
When you drag a Connector from palette into canvas, an Endpoint is
created
Any Connector can function as an Endpoint.

Endpoints are a type of connector. Connectors in Mule are either endpoint-based or operation-based. Endpoint-based connectors follow either a one-way or request-response exchange pattern and are often (but not always) named and based around a standard data communication protocol, such as FTP, JMS, and SMTP. Operation-based connectors follow an information exchange pattern based on the operation that you select and are often (but not always) named and based around one or more specific third-party APIs.

You shouldn't confused about this, its in mule document
https://docs.mulesoft.com/mule-fundamentals/v/3.7/mule-connectors
https://docs.mulesoft.com/mule-user-guide/v/3.7/endpoint-configuration-reference

Related

Should my API gateway handle SOAP/Rest transformation

Here is the situation :
I have a partner service outside of my network. This service is a legacy one, using soap. My internal app needs to fetch data from this service but I don't wan't to work with soap/json. My first reflex is to expose this service on my internal API gateway to consume it but ...
My gateway can of course manage transformation Rest/soap but I want to avoid doing transformation on the gateway as it is resources and time expensive.
I think of a facade component inside my network but this component will have to access public network directly and I feel this is not right.
What can I do ? Isn't it an anti pattern to get out of my network by another door than the gateway ?
there are two type of gateway
1- API gateway : which is for clients and users who need to use your APIs
2- Service gateway : in SOA or MSA your services should not call external services directly (for security reasons and also for decoupling them from each other , maybe one of them working with REST and other one working with SOAP which is your case) rather you should use something which called integration services (integration frameworks) or ESBs (enterprise service bus).
Your problem is you want to use your API gateway instead of service gateway.
Keep your API gateway for your clients but if your services need to call external services use an integration framework or a service bus.
One of the most main features of these tools is that they can convert protocols together for example they have convertors to convert SOAP to REST , it means you call it by REST but it will convert your call to SOAP and call the external service ( you just should config it to which protocol it should convert ).
And also there are many ready to use connectors in them which can connect your service bus to other applications and services like DBs, messaging platforms , linkedIn , ...... .
There are many ready to use ESBs like Apache camel , Mule ESB and .... .

Mule:The difference between the Web Service Consumer and SOAP Connect

Why do we have SOAP connect option while creating a connector when we already have a Web Service Consumer connector? We can configure a wsdl with Web Service Consumer and access a web service. What is the difference between the two options?
"Why do we have SOAP connect option" because MuleSoft want to provide a method for ISV to provide connectors to new and existing endpoints without Mulesoft themselves having to create them. Mulesoft Anypoint Platform success is built on the premise of connecting to anything and therefore SOAP Connect helps this.
Secondly connecting to a using WSDL location for consuming a soap web service involves a developer to know the service pretty well and therefore allowing error and interpretation errors but if you internally create a connector you can reduce implementation time and errors.
Thirdly on WSDL there are often many methods not applicable or and an enterprise does not want to consume and therefore a connector can filter these methods.
Connectors = Re-Use
Web Service Consumer connector = manual process
The Web Service Consumer is an existing connector that you can configure to point to a WSDL location for consuming a soap web service. SOAP Connect is a DevKit wizard that creates an Anypoint Connector that connects to a specific service, which can expose multiple WSDLs of the service.
With Web Service Consumer we have to call each API separately in separate flows. With SOAP Connect, you can package multiple WSDL files and API versions into a single connector, making the process of creating, maintaining and using a connector for SOAP APIs much faster and easier.

Mule API - deploy to a Mule Runtime

I am experimenting with Mule API management these days. What I come to know is we can deploy our API to one of these:
A Mule Runtime
An API Gateway
In the documentation, it is said that we should go with option 1 when we want to separate out the implementation of your API from the orchestration. What does it mean?
Can any one please explain in detail?
Policy management from API Platform and analytics generation can be achieved only by using a correctly configured API Gateway, which is a superset of Mule EE (current version is API Gateway 2.1.0 which contains Mule EE 3.7.2).
Depending on your architecture you may have different solutions.
For example:
Proxy running on API Gateway, implementation API running somewhere
else (eg. Mule EE/CE, Tomcat, cobol server, etc)
Proxy and implementation API running on the same API Gateway
Implementation API
managed directly from API Platform without using the autogenerated
proxies.
HTH :-)
Not exactly sure what they mean there, because on this page: https://developer.mulesoft.com/docs/display/current/API+Gateway they also mention this:
Note that the API Gateway, because it acts as an orchestration layer
for services and APIs implemented elsewhere, is technology-agnostic.
You can proxy non-Mule services or APIs of any kind, as long as they
expose HTTP/HTTPS, VM, Jetty, or APIkit Router endpoints. You can also
proxy APIs that you design and build with API Designer and APIkit to
the API Gateway to separate the orchestration from the implementation
of those APIs.
So both methods technically allow you to separate API from orchestration, as your API gateway application could simply proxy another Mule application elsewhere that performs the orchestration. But my understanding of the two options are:
The API gateway is a limited offering that allows you to use a subset of Mule's connectors, transports and modules such as ApiKit and HTTP, it allows you to expose and API then use http to connect to whatever backend systems you want as a proxy and perform the orchestration in the API layer.
By using the Mule runtime operation, it gives you much more flexibility and allows you to compose as many applications as you want using the full range of connectors etc. and separate out the different aspects of your applications into as many layers as you want as separately deployable entities that you can deploy to on-premise standalone instances or Cloudhub etc.
#Ryan answer is more or less on the mark, however if you do choose the Mule ESB offering you will loose out on the API Management and governance functionality that API gateway provides OOTB.
These include
Lets you enforce runtime policies and collect data for analytics
Applies policies to APIs or endpoints around security, throttling,
rate limiting, and more
Extends PingFederate to serve as identity management and OAuth
provider for your APIs
Lets you require or restrict certain behaviors in a few simple steps
Lets you add or remove policies at runtime with no API downtime
Manages access to your API by issuing contract keys
Monitors the API to confirm it is meeting all contract terms
Ensures compliance with service level agreements (SLAs)
In my opinion go with API Gateway/Manager if your API will be consumed my third party developers with whom you might not have too many interactions (think public API's) else Mule ESB should be good.
You should be able to migrate from Mule ESB to API Manager (and vice versa) also easily if you need to, so I do not think you will get locked into your decision
PS: Content copied from here

Mule as multiple web services host

I am integrating an application with database through Mule. I have exposed database queries as SOAP web services in Mule. In all there are 4 such services. These are in 4 different flows hence will be running on different ports. The problem is there is an internal firewall between application and Mule. I need to tell network administrator upfront the ports that I want to open up for inbound connections from application to Mule.
For any new service I need another HTTP port and ask for changes in firewall rules. One solution I could think of is having common entry flow (hence single HTTP port) which then delegates requests to other flows through VM or JMS transport. However I think it can be designed in better way to remove or minimize dependency on network configurations with multiple HTTP endpoints. Please advise.
If you would be deploying four different web services (i.e. 4 different WSDLs) in a JavaEE container, you would probably use the URL's path to discriminate across the services (say: /accounts /orders...).
You can achieve the same in Mule using a single HTTP endpoint and choice router, since your four services are in 4 different flows (and not 4 different applications, for which case using JMS, or the new shared VM endpoints, would be a must).
In the choice router, you can route the HTTP requests based on the http.request.path inbound property (see: http://www.mulesoft.org/documentation/display/current/HTTP+Transport+Reference#HTTPTransportReference-HTTPProperties )

Difference between Mule Connectors and Transports

I'm trying to evaluate the set of out-of-the-box transports provided by Mule, and compare it with the offerings from e.g. ServiceMix and OpenESB.
On Mule's homepage, I find a list of supported transports at:
http://www.mulesoft.org/documentation/display/current/Transports+Reference
However i also find a list of Connectors at:
http://www.mulesoft.org/connectors
There seem to be at least some overlap between these lists, but some technologies are listed as transports, and not as connectors, for example there is a Quartz transport, but not a connector.
So the question is: What exactly is the difference between a Mule Transport and a Mule Connector, and why is e.g. Quartz a transport and not a connector?
Transports are targeted towards a way of transporting data, i.e. a protocol like HTTP or reading/writing files. These are general concepts and the other party behind such a data channel can be anything, a pure data sink or a party with whom data can be exchanged, own company or other.
Connectors are made for using specific APIs, e.g. those from salesforce.com or facebook. Usually, choosing a connector also determines how the data will be transferred in the end, e.g. HTTP.
From mulesoft.org:
Connectors function like endpoints by sending and receiving data over
a transport. However, while endpoints are generic for a widely-used
protocol (such as JDBC, FTP, HTTP, POP3, etc) each connector is built
to optimize the connection with a specific third-party API, such as
Salesforce or Twitter.
Message sources (inbound or outbound) in Mule make use of transports to carry messages from application to application in the Mule framework. Transports implement message channels and provide consistent connectivity to an underlying data source or message channel. Whenever there is a message source in Mule, there is a corresponding transport working in the background to establish and maintain communication. For example, the HTTP transport handles messages sent to an HTTP endpoint in Mule via HTTP protocol.
The heart of a transport is the connector which maintains the configuration and state for the transport. In other words, connectors contain nearly all the connectivity details that Mule needs to actually connect with another system or application.