简体   繁体   English

PHP和ESB(使用Mule)(ESB:企业服务总线)

[英]PHP and ESB (with Mule) (ESB: Enterprise Service Bus)

Where, when and why did you use ESB in a PHP-project? 您在何时,何地以及为何在PHP项目中使用ESB?

Where, when and why do you think that it would make sense to use ESB in a PHP-project? 在哪里,何时以及为什么认为在PHP项目中使用ESB是有意义的?

Does ESB (and ESB-facilitators like Mule) do provide any capability PHP and native LAMP-technologies are lacking? ESB(以及像Mule这样的ESB辅导员)是否提供PHP和本机LAMP技术所缺乏的任何功能?

Edit 编辑

My motivation for this question is stemming from my assumption that you actually never really need Mule. 我对这个问题的动机源于我的假设,你实际上从未真正需要骡子。 Mule will facilitate communication with external services which you could handle without mule. 骡子将促进与外部服务的沟通,您可以在没有骡子的情况下处理。 At the end of the day also Mule will create costs and overhead. 在一天结束时,Mule也会产生成本和开销。 So my question is steering at having somebody tell me about scenarios where you really benefit of ESB and tools like Mule or to second my guess with solid knowledge. 所以我的问题是指导有人告诉我你真正受益于ESB和Mule这样的工具的场景,或者凭借扎实的知识来猜测。

Edit 2 编辑2

regarding Houcem's reply to my comment to his post ... what would be a native LAMP-answer to ESB/Mule? 关于Houcem回复我对他的帖子的评论...什么是ESB / Mule的原生LAMP答案?

Edit 3 编辑3

Seems like Tuxedo might be a more PHP-native alternative to Mule/ESB. 看起来像Tuxedo可能是Mule / ESB的PHP本地替代品。 Somebody got experience using this tool? 有人有使用这个工具的经验吗?

An ESB is a general solution to a scalability problem; ESB是可伸缩性问题的通用解决方案; a problem in managing the overhead, cost and complexity of a large number of application interfaces. 管理大量应用程序接口的开销,成本和复杂性的问题。 I wrote a short article about the rationale for ESB/EAI solutions at http://psicom.com.au/solutions/eai 我在http://psicom.com.au/solutions/eai写了一篇关于ESB / EAI解决方案基本原理的简短文章。

Admittedly, most PHP sites are small scale and would usually find it difficult to justify the administrative and technological overhead of an ESB. 不可否认,大多数PHP站点规模较小,通常很难证明ESB的管理和技术开销是合理的。 But it is now quite feasible to meet all of a business's application needs with OSS PHP products, and there is also increasing cost pressure on organisations, so I expect there will be increasing numbers of PHP shops that will start to feel the kinds of growing pains that I wrote about. 但现在用OSS PHP产品满足所有业务应用程序的需求是相当可行的,并且组织的成本压力也越来越大,所以我预计会有越来越多的PHP商店开始感受到成长的痛苦我写过的。 This may make them re-evaluate their application integration issues, and an ESB is a good solution to that problem. 这可能会使他们重新评估他们的应用程序集成问题,而ESB是解决该问题的一个很好的解决方案。

As far as I know there are no ESB products developed in PHP, and I don't expect to see this in the near future. 据我所知,没有用PHP开发的ESB产品,我不希望在不久的将来看到这一点。 But FWIW, many ESB products provide bindings for PHP and other OSS platforms, so the platform that the ESB runs on isn't crucial. 但是,FWIW,许多ESB产品为PHP和其他OSS平台提供绑定,因此运行ESB的平台并不重要。

The ESB (Enterprise Service Bus) is a kind of backbone for the integration of the several heterogeneous applications of the enterprise, that may originate from different vendors, technologies, and even be redundant. ESB(企业服务总线)是集成企业的多个异构应用程序的一种主干,可能源自不同的供应商,技术,甚至是冗余的。

The fact it seems more linked to Java world than PHP or any other language is that usually big companies information systems are made of : 它似乎与PHP世界相关的事实比PHP或任何其他语言更通常是大公司信息系统由以下组成:

  • Mix of opensource development and software editors tools (including ERPs). 开源开发和软件编辑工具(包括ERP)的组合。 Development are often made using Java EE in order to rely on Java EE stacks (and its vendors IBM, Oracle, ...) 开发通常使用Java EE来依赖Java EE堆栈(及其供应商IBM,Oracle,...)
  • Full Microsoft (no need of ESB, Microsoft provide EAI/ESB like tools) 完整的Microsoft(不需要ESB,Microsoft提供EAI / ESB之类的工具)

PHP is most used for web application (even for big companies, but web oriented). PHP最常用于Web应用程序(即使对于大公司,但面向Web)。

An ESB is a big cost, and is only usefull/needed when the number of interconnected application is raising. ESB是一项巨大的成本,只有在互连应用程序数量增加时才有用/需要。 When you have only few connections (between Java, PHP or whatever), you can handle it at a network level, using DNS, and at application level using configuration keys and performing protocol exchanges and small business integration for each point to point connection. 当您只有很少的连接(在Java,PHP或其他之间)时,您可以在网络级别使用DNS处理它,在应用程序级别使用配置键并为每个点对点连接执行协议交换和小型业务集成。

A potential use case for a PHP application would be an internet site of a travel agency quering multiple flight/train/hotels companies. PHP应用程序的潜在用例将是旅行社的一个互联网站点,该网站可以查询多个航班/火车/酒店公司。 And even in a such case, it won't be mad to develop a full cross quering system since it is the core of the business for such a site/company. 即使在这样的情况下,也不会因为它是企业对这样的网站/公司的核心是疯了,开发出全十字quering系统。

I would recommend Windows Azure Service Bus, which provides a PHP SDK here https://github.com/WindowsAzure/azure-sdk-for-php 我建议使用Windows Azure Service Bus,它在这里提供PHP SDK https://github.com/WindowsAzure/azure-sdk-for-php

service bus is great but maintaining one is not. 服务总线很棒,但保持一个不是。 Windows Azure Service Bus solved all the maintenance overhead for you, and it is PHP compatible. Windows Azure Service Bus为您解决了所有维护开销,并且与PHP兼容。 You can even communicate with apps that are written in Java, C#, VS C++ from PHP easily. 您甚至可以轻松地与PHP中使用Java,C#,VS C ++编写的应用程序进行通信。

ESB could be used in different ways : ESB可以以不同的方式使用:

  • Providing asynchronous processing : Example : If you have a web site that does a lot of emailing .. and sending an email takes a lot of time which may block the execution of your page : you may use an ESB to send the email data to Mule and route it to an Email outbound channel, this way you can say that you have implemented a mail message queue. 提供异步处理:示例:如果您的网站发送了大量电子邮件...并且发送电子邮件需要花费大量时间来阻止页面的执行:您可以使用ESB将电子邮件数据发送给Mule并将其路由到电子邮件出站通道,这样您就可以说已实现了邮件消息队列。 Another form of asynchronous processing : using mule to execute php scripts (using command line) in a non blocking way. 另一种形式的异步处理:使用mule以非阻塞方式执行php脚本(使用命令行)。

  • Integration with java applications : You can send Messages to mule using php and implement some java business using mule API in java, php messages will be received by your java business components. 与java应用程序集成:您可以使用php将消息发送到mule并使用java中的mule API实现一些java业务,您的Java业务组件将接收php消息。 This is used in big web sites which does a lot of complex processing and need flexible and powerful language like java. 这用于大型网站,它们进行大量复杂的处理,需要灵活而强大的语言,如java。

What you need to know : ESB should be used like a Bus which means collecting data from heterogenous environments in a standard form (Mule messages) .. do business logic and then output data (after routing) to different environment 你需要知道的是:ESB应该像Bus一样使用,这意味着以标准形式(Mule消息)从异构环境中收集数据..做业务逻辑然后输出数据(路由后)到不同的环境

There is no native php integration with Mule in PHP world. 在PHP世界中没有与Mule的本机php集成。 To do it you should use web services (SOAP) 要做到这一点,你应该使用Web服务(SOAP)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM