Apache Camel究竟是什么?

本文翻译自:What exactly is Apache Camel?

I don't understand what exactly Camel does. 我不明白Camel到底是做什么的。

If you could give in 101 words an introduction to Camel: 如果你能用101个单词介绍骆驼:

  • What exactly is it? 究竟是什么?
  • How does it interact with an application written in Java? 它如何与用Java编写的应用程序交互?
  • Is it something that goes together with the server? 它与服务器一起出现了什么?
  • Is it an independent program? 这是一个独立的计划吗?

Please explain what Camel is. 请解释一下Camel是什么。


#1楼

参考:https://stackoom.com/question/b72I/Apache-Camel究竟是什么


#2楼

Creating a project description should not be complicated. 创建项目描述不应该很复杂。

I say: 我说:

Apache Camel is messaging technology glue with routing. Apache Camel是具有路由功能的消息传递技术。 It joins together messaging start and end points allowing the transference of messages from different sources to different destinations. 它将消息传递开始和结束点连接在一起,允许将来自不同源的消息传输到不同的目的地。 For example: JMS -> JSON, HTTP -> JMS or funneling FTP -> JMS, HTTP -> JMS, JSON -> JMS 例如:JMS - > JSON,HTTP - > JMS或漏斗FTP - > JMS,HTTP - > JMS,JSON - > JMS

Wikipedia says: 维基百科说:

Apache Camel is a rule-based routing and mediation engine which provides a Java object based implementation of the Enterprise Integration Patterns using an API (or declarative Java Domain Specific Language) to configure routing and mediation rules. Apache Camel是一个基于规则的路由和中介引擎,它使用API​​(或声明性Java域特定语言)提供基于Java对象的企业集成模式实现,以配置路由和中介规则。 The domain specific language means that Apache Camel can support type-safe smart completion of routing rules in your IDE using regular Java code without huge amounts of XML configuration files; 特定于域的语言意味着Apache Camel可以使用常规Java代码在IDE中支持类型安全的智能完成路由规则,而无需大量的XML配置文件; though XML configuration inside Spring is also supported. 虽然Spring中的XML配置也受支持。

See? 看到? That wasn't hard was it? 那不是很难吗?

扫描二维码关注公众号,回复: 10555299 查看本文章

#3楼

My take to describe this in a more accessible way... 我想以更容易理解的方式描述这个......

In order to understand what Apache Camel is, you need to understand what Enterprise Integration Patterns are. 为了理解Apache Camel是什么,您需要了解企业集成模式是什么。

Let's start with what we presumably already know: The Singleton pattern, the Factory pattern, etc; 让我们从我们可能已经知道的东西开始:Singleton模式,Factory模式等; They are merely ways of organizing your solution to the problem, but they are not solutions themselves. 它们只是组织解决问题的方法,但它们本身并不是解决方案。 These patterns were analyzed and extracted for the rest of us by the Gang of Four, when they published their book: Design Patterns . 当他们出版他们的书“ 设计模式”时,四人帮对我们其余人进行了分析和提取。 They saved some of us tremendous effort in thinking of how to best structure our code. 他们在思考如何最好地构建代码方面为我们付出了巨大的努力。

Much like the Gang of Four, Gregor Hohpe and Bobby Woolf authored the book Enterprise Integration Patterns (EIP) in which they propose and document a set of new patterns and blueprints for how we could best design large component-based systems, where components can be running on the same process or in a different machine. 与Gang of Four一样,Gregor Hohpe和Bobby Woolf撰写了企业集成模式 (EIP)一书,其中他们提出并记录了一套新的模式和蓝图,以便我们如何最好地设计基于组件的大型系统,其中组件可以是在相同的进程或不同的机器上运行。

They basically propose that we structure our system to be message oriented -- where components communicate with each others using messages as inputs and outputs and absolutely nothing else. 他们基本上建议我们将我们的系统构建为面向消息的 - 组件使用消息作为输入和输出彼此通信,而绝对没有别的。 They show us a complete set of patterns that we may choose from and implement in our different components that will together form the whole system. 它们向我们展示了一整套模式,我们可以从中选择并在我们的不同组件中实现这些模式,这些组件将共同构成整个系统。

So what is Apache Camel? 那么什么是Apache Camel?

Apache Camel offers you the interfaces for the EIPs, the base objects, commonly needed implementations, debugging tools, a configuration system, and many other helpers which will save you a ton of time when you want to implement your solution to follow the EIPs. Apache Camel为您提供EIP接口,基础对象,常用实现,调试工具,配置系统以及许多其他帮助程序,当您希望实施解决方案以遵循EIP时,这将为您节省大量时间。

Take MVC. 以MVC为例。 MVC is pretty simple in theory and we could implement it without any framework help. MVC在理论上非常简单,我们可以在没有任何框架帮助的情况下实现它。 But good MVC frameworks provide us with the structure ready-to-use and have gone the extra mile and thought out all the other "side" things you need when you create a large MVC project and that's why we use them most of the time. 但是,良好的MVC框架为我们提供了随时可用的结构,并且在创建大型MVC项目时考虑了所需的所有其他“侧面”事项,这就是我们在大多数时间使用它们的原因。

That's exactly what Apache Camel is for EIPs. 这正是Apache Camel对EIP的看法。 It's a complete production-ready framework for people who want to implement their solution to follow the EIPs. 对于想要实施其解决方案以遵循EIP的人来说,这是一个完整的生产就绪框架。


#4楼

A definition from another perspective: 另一个角度的定义:

Apache Camel is an integration framework. Apache Camel是一个集成框架。 It consists of some Java libraries, which helps you implementing integration problems on the Java platform. 它由一些Java库组成,可帮助您在Java平台上实现集成问题。 What this means and how it differs from APIs on the one side and an Enterprise Service Bus (ESB) on the other side is described in my article " When to use Apache Camel ". 这意味着它与一方的API和另一方的企业服务总线(ESB)的不同之处在我的文章“ 何时使用Apache Camel ”中有所描述。


#5楼

In short: 简而言之:

When there is a requirement to connect / integrate systems, you will probably need to connect to some data source and then process this data to match your business requirements. 当需要连接/集成系统时,您可能需要连接到某些数据源,然后处理此数据以满足您的业务需求。

In order to do that: 为了做到这一点:

1) You could develop custom program that would do it (might be time consuming and hard to understand, maintain for other developer) 1)您可以开发自定义程序(可能耗时且难以理解,为其他开发人员维护)

2) Alternatively, you could use Apache Camel to do it in standardised way (it has most of the connectors already developed for you, you just need to set it up and plug your logic - called Process): 2)或者,您可以使用Apache Camel以标准化方式执行它(它已经为您开发了大多数连接器,您只需要设置它并插入您的逻辑 - 称为Process):

Camel will help you to: Camel将帮助您:

  1. Consume data from any source/format 使用任何来源/格式的数据
  2. Process this data 处理这些数据
  3. Output data to any source/format 将数据输出到任何源/格式

By using Apache Camel you will make it easy to understand / maintain / extend your system to another developer. 通过使用Apache Camel,您可以轻松地将系统理解/维护/扩展到另一个开发人员。

Apache Camel is developed with Enterprise Integration Patterns. Apache Camel是使用Enterprise Integration Patterns开发的。 The patterns help you to integrate systems in a good way :-) 这些模式可以帮助您以一种好的方式集成系统:-)


#6楼

Here is another attempt at it. 这是另一种尝试。

You know how there are/were things like Webmethods, ICAN Seebeyond, Tibco BW, IBM Broker. 您知道Webmethods,ICAN Seebeyond,Tibco BW,IBM Broker等等。 They all did help with integration solutions in the enterprise. 他们都帮助企业中的集成解决方案。 These tools are commonly known by the name Enterprise Application Integration (EAI) tools. 这些工具通常称为企业应用程序集成(EAI)工具。

There were mostly drag drop tools built around these technologies and in parts you would have to write adapters in Java. 主要是围绕这些技术构建的拖放工具,部分必须用Java编写适配器。 These adapter code were either untested or had poor tooling/automation around testing. 这些适配器代码未经测试,或者在测试过程中工具/自动化程度较低。

Just like with design patterns in programming, you have Enterprise Integration patterns for common integration solutions. 就像编程中的设计模式一样,您可以使用企业集成模式来实现通用集成解决方案。 They were made famous by a book of the same name by Gregor Hohpe and Bobby Woolf. 他们被Gregor Hohpe和Bobby Woolf的同名书籍所着名。

Although it is quite possible to implement integration solutions which use one or many EIP, Camel is an attempt at doing this within your code base using one of XML, Java, Groovy or Scala. 虽然很有可能实现使用一个或多个EIP的集成解决方案,但Camel尝试使用XML,Java,Groovy或Scala之一在您的代码库中执行此操作。

Camel supports all Enterprise Integration Patterns listed in the book via its rich DSL and routing mechanism. Camel通过其丰富的DSL和路由机制支持本书中列出的所有企业集成模式。

So Camel is a competing technoloy to other EAI tools with better support for testing your integration code. 所以Camel是其他EAI工具的竞争技术,可以更好地支持测试集成代码。 The code is concise because of the Domain Specific Languages (DSLs). 由于域特定语言(DSL),代码简洁。 It is readable by even business users and it is free and makes you productive. 即使是商业用户也可以阅读它,它是免费的,让您高效。

发布了0 篇原创文章 · 获赞 73 · 访问量 55万+

猜你喜欢

转载自blog.csdn.net/w36680130/article/details/105243385