What is Orchestration and Anypoint platform?

Mule 4 Indepth Introduction to Mule
20 minutes
Share the link to this page
Copied
  Completed

Transcript

In this video, we are going to understand about what is orchestration, what is mule and what is any point platform for the formula. So, let us get started with the use case. Firstly, let us try to understand about what is orchestration. So to explain this scenario, let's assume that there are three services, service one. So it's two and service three, whether it might be a soap service or web or REST service or whatever type of services, the three services. Now what I want to do is I want to write an application, which will integrate with all these three services and get some work done.

So let's assume that this is my application. My application receives a request and assume that this is my code in my application, My code will create a message and keep it in memory queue as we understood earlier. So now, what I can do is I can configure a component, which can read from this queue and invoke service one. Let's assume that service one is returning a response. Let's say the response type is x. Now, my component will create one more message whose payload is x and keep it inside this in memory queue.

Then we'll configure one more component which will take this message whose payload is x and then invoke service to next assume itself. To returning a payload, and let's say why then I can configure this component to store this variable, the response why in some variable, then I can keep the message here in another queue. Now what will be the payload payload will distill x, because I can configure this component not to modify the payload. The original payload here is x. and here also you can configure the bird to be x. But what happened to the payload, the response from S to the response from S to is y, and I can I can configure this to store the response in a variable. Okay.

Then what I can do is here can configure a transformer which can extract some data from the variable. And also, which can extract the data from the original message whose parent is x transform the message, let's assume that it is keeping it inside the skill. Then I will configure one more component, which will take the transformed message in work, so three, and let's assume that the payload is said. Then this component will return whatever is a response. And the response is given back to the client. So let's assume that I have written application in this way.

My application is taking requests from external client then it is creating a message and putting it inside the skill. The first component is invoking service one And the resultant messages captured under the queue. The second component is invoking service to the resultant response is kept in a variable and the original message is positive this cube excu then the Transformers taking the original message right and just and it is creating some transform message using the variable and the original message and keeping the transform message inside of the queue. My last component is taking that transform message invoking service three, return value is set. Okay, so can I say that in this case, my application is coordinating with service one service to service three and getting the desired work done. Yes So, the process of coordinating with multiple services and getting the desired work done we call this as orchestration.

So, I can say that my application is doing orchestration Okay. Can I say that my message is flowing from first component to another component and my application is having orchestration logic? Yes. So, normally in mule what we do is, we write such kind of flows, where a message flows from one component to another and each flow will contain orchestration logic. So, in a mule application there can be any number of such flows. So, one application one mule application is nothing but a combination of a number of such plus.

So, in mule all these flows are written using XML. So, a mule application is nothing but a set of XML which contains such flow definitions and each flow will contain orchestration logic. So, good you understood about what a blue application contains a mule application contains n number of such flows, which contain orchestration logic, then where can these flows run these flows have to deploy it inside mule runtime. So, mule soft provides us mule runtime where we can deploy our mule applications. As I told you each mule application Contains examples. And each XML may contain a number of flows which container orchestration logic.

Okay, so we deploy our mule applications inside mule runtime. One thing here Can we deploy web applications inside mule runtime? No. That is not the purpose of mule mule is not for deploying web applications. Then how do we use mule in real applications? Normally, let's assume that this is my web application.

Let us consider an example what I gave in my earlier video we were discussing earlier about this website smart bricks.com whenever I Want to buy any product I will search for the product in spot pricks.com let's say I want to buy an iPhone it is showing the prices in various ecommerce websites like Amazon This is the cost Flipkart Tata click shop close right. So basically if I am developing this application this application has to integrate with Amazon Flipkart, Tata, click shop clothes, etc. Right? So I don't want to write such integration logic inside my web application. So whenever my web application gets a request, my application will delegate requests to mule application which contains a flow. So, web application will invoke my mule flow, which contains a component in my mule flow is interacting with Amazon or Flipkart or any other third party services.

Giving the result back. So, in a web application, we will not write integration logic integration logic is written in separate mule application. Now, if web application has to invoke my mule flow, the flow has to be exposed as some API a REST API or soap API right. So let us consider that I want to expose my mule flows. The flows in my mule application as REST API. First of all, I need to design my API says it.

Yes. So is there any specification for designing rest API's? No, if I ask you, how do you actually define your soap sub contract, transfer will be visible. But for rust API's, there is no such standard but mule soft supports it called us ramble. RESTful API modeling language. So this can be used to describe your rest API's.

Right? Now what we want to describe what our mule application is exposing using ramble. So how to design a camel? So mule soft is providing a tool called as API designer. By using which we can design our API's. Okay, that's fine.

This API designer has a good features to easily design ramify Okay, that's fine. So normally, whenever we are developing our applications, what is the best approach code first output or contract first approach? contract first approach right. So firstly, what we normally do is we design our API's in API designer. Once the design is done, we can implement that API using mule and deploy that inside mule runtime. Okay, then what else do we want?

We want to expose this API to my customers, it will be good if I have a place where I can actually publish my API's. Internal inside my organization also I want to publish my API's. So to publish our API's in mule soft they have something called us and API exchange or any point exchange actually it is not a pay exchange, any point exchange. So exchange is an application where we can Publish API's or even new applications, whatever we want to share across our organization. Don't worry we'll discuss more on any point exchange in dedicated videos later. But just in this video, I'm going to give you an overall view about what all components are all products given by mule soft Okay.

Now we understand about AP, any point exchange, any point exchange is a product or an application where we can publish our API's, we can publish or mobile applications etc. so that we can share this across our organization. Then, I want these API's to be shared to my external client users using a portal. It will be good if somebody can such process My APA snip portal Yes. mule soft, provides one more thing called us API portal where we actually share the API's or whatever we have designed, and this portal URL will be given to our clients or customers. And in this API portal, anybody can search for the API's.

Okay. Then what else do we want? Now, I don't want to expose my mule application directly to the client. before when we will expose snares mule application is hit. I want to check whether the client is a valid client or not. Maybe I want to check security.

I don't want to write security logic inside my virginal mule application So what we can do is in mule, they have one more product called as API manager. API manager. So what I go, what I do is, I'll go to API manager and tell to API manager, what is the URL of my original mule application? So this API manager will create a proxy application which can be downloaded. Now what I want is I can deploy this proxy in another runtime provided by mule soft Carla's API gateway. So what is this API gateway API gateway is also similar to mule runtime.

This is also runtime to actually host new applications. But this is a runtime specially designed for hosting proxies. So whatever proxy, I download it from my API manager, I'll be deploying that proxy to gateway. So the proxy of my application is now deployed in gateway. Now, I will not expose my original endpoint URL to my customers, I'll expose this proxy. So if any consumer or customer or client wants to hit my API, they will actually hit the proxy.

Proxy will hit the original implementation. But let's say I want to secure my AP. What I will do is in the API manager UI API manager has a very good web UI. In the API manager web interface, I'll configure some policies security policy in this case. Whenever I configure some security policy, the gateway will download a corresponding XML document. with whatever information I have configured on the web interface of API manager, the gateway will download an XML document, which contains all the information whatever I configured, the gateway will download.

So now the gateway knows what our security policy have configured. Next time when the request is coming to proxy. The request will be intercepted by some security policy interceptor the gateway, the security interceptor will be executed. If everything is fine, then the request will go to original application. If something is wrong, that means if the request is not coming from a valid client, then the response will be given by the interceptor itself. That means, I can just declare my policies in APA manager, automatically that's false will be downloaded by the gateway.

And the polls are implemented. Right? So I don't need to write security logic in my application security logic is already provided to you declaratively. We just have to declare a manager. Security Policy automatically is implemented by gateway. What else do we want?

Yes. So starting from the API designing, deployment. publishing your APS to exchange portal and managing your API's, mule soft is providing our His products to manage all this right? Yep, not only this, where do we define our new applications where we create or design our new applications? Yes, we use a tool called as ad point studio. So this is ID, where we design our mule applications.

So basically mule soft is providing all these products by using which we can integrate any application with any application any point to any point. So that's why we say that mule soft is providing a platform for integrating any application with any application. Okay? Not only does it MuleSoft also provides something called as IPS. integration platform as a service, and they call that as cloud hub. Cloud hub is a platform where you can deploy your mule applications, cloud based a pass integration platform as a service.

So if you want to deploy your mule applications in cloud, you can deploy it inside cloud our cloud also is part of any point platform. So now, till now you understand what what is this any point? platform, basically this any point platform contains all these products, starting from Cloud API gateway API manager, any points to a designer mule runtime, any point exchange a Portland much more. Great. So you understood what is Any point platform from your orders Thanks. See you in next video.

Sign Up

Share

Share with friends, get 20% off
Invite your friends to LearnDesk learning marketplace. For each purchase they make, you get 20% off (upto $10) on your next purchase.