Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the advantages and disadvantages of mule

2025-01-29 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

What are the advantages and disadvantages of mule? I believe many inexperienced people don't know what to do about it. Therefore, this paper summarizes the causes and solutions of the problems. Through this article, I hope you can solve this problem.

Advantages

1. Open source https://github.com/mulesoft/mule

two。 Rich connector, which can connect various systems such as JMS, Web Service, JDBC, HTTP, etc.

There are many 3.components (components), and there are many ways to deal with data.

4.transformers is also rich, extensible json, xml, dom, binary, wsdl, java, etc.

5.mule esb is implemented by java, and one of the advantages of java is to develop enterprise applications. The role of esb is to provide an interactive platform between various systems: data transmission bus, using open source Java implementation is also one of the choices of many companies, the use of more enterprises, will develop faster and more mature

6. Without modifying the existing components, the low-coupling business logic and message logic are completely separated.

7. Support clustering, failover and load balancing, multiple deployment methods: Tomcat, BEA WebLogic, JBoss. After research, it is found that its own mule-standalone-3.9.0 is good to use.

Shortcoming

1. The cluster is very weak. Only one master instance and one slave instance can be configured. Flow and pattern-based configurations are not supported. Nginx clusters can be used, and the effect is acceptable.

two。 The difference between Enterprise Edition and Community Edition https://www.mulesoft.com/cn/platform/soa/mule-esb-enterprise

Tutorials

Https://developer.mulesoft.com/tutorials-and-how-tos

Connect to the mysql database and deploy it in the mule-standalone-3.6.0 container. After testing, the query database can be connected normally (there is a problem with the deployment of version 4.1.1).

Testing deployment under Tomcat container (the official website demo has errors), and using nginx to cluster

Deployed successfully under tomcat. But it is very troublesome to deploy under tomcat.

1 Project needs to be modified to Maven project, and web.xml is configured.

Many jar packages of mule need to be configured in 2tomcat, which is tedious and error-prone.

3 compatibility of various versions

4 slow start deployment requires 107710ms

Http://192.168.1.39/Test

After investigation and research, we can use the official mule-standalone container provided by mule. After testing and deploying successfully, we have done load balancing with nginx. Two mule applications have been deployed and can be accessed, but the port number of http in mule needs to be modified.

It cannot be modified in the mule-standalone container, which is different from tomcat. The listening port configured in the mule project will not take effect until it is configured with the Http in the project. In theory, you can listen to any port.

The Http configuration in the project must be configured so that All Interfaces [0.0.0.0] (Default) cannot be configured with localhost, otherwise it is deployed under linux and can only be accessed by local localhost. A big pit (attention)

Demo

Https://docs.mulesoft.com/mule-user-guide/v/3.9/mel-cheat-sheet

CE Community Edition EE Enterprise Edition

Https://docs.mulesoft.com/anypoint-mq/

Jersey tutorial

Https://jersey.github.io/documentation/latest/index.html

Mule MEL

Https://docs.mulesoft.com/mule-user-guide/v/3.9/mule-expression-language-mel

Mule Expression Language Reference

Brother Yuan video mule

Http://i.youku.com/tavenli

1. Must be familiar with MEL (Mule Expression Language) language

two。 Understanding MuleMessage structures and Payload objects

3. Be familiar with commonly used connector, scoper, component, transformer, filter, flowControl and errorHanding

4. Know APIKit Router and APIKit Console, be familiar with RAML

MEL expression

# [expression]

# [server.dateTime] get server time

# [2x2 = = 4]

# [message.inboundProperties ['http.query.params'] [' uId']] get the uId parameters of the http request

# [message.inboundProperties.city] / # [message.inboundProperties ['city']]

# [xpath ('/ user/username') .text]

# [payload]

# [json:visitGuid]

In general, when you use the POST method to pass JSON data to a HTTP component, if you place a Logger component at this time, you will find that after the HTTP component, the type of payload is actually org.glassfish.grizzly.utils.BufferInputStream, because the load is changed into the form of flow after HTTP.

If you need to revert to an JSON format string, there are two methods:

(1) after the HTTP component, use the Object to String component to convert payload to String, which is the easiest way.

(2) use the MEL expression # [message.payloadAs (java.lang.String)]

(3) AbstractMessageTransformer can be inherited in java, and then through the getPayloadAsString () method of the MuleMessage class

Four objects of mule

Server / mule / app / message

Message Variables is divided into 2.

FlowVars is only used in the same Flow

SessionVars is only used by all Flow under the same appliaction

Install security components

Http://security-update-site.s3.amazonaws.com

Garbled code problem in mule call

After reading the above, have you mastered the advantages and disadvantages of mule? If you want to learn more skills or want to know more about it, you are welcome to follow the industry information channel, thank you for reading!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report