简体   繁体   中英

PHP and ESB (with Mule) (ESB: Enterprise Service Bus)

Where, when and why did you use ESB in a PHP-project?

Where, when and why do you think that it would make sense to use ESB in a PHP-project?

Does ESB (and ESB-facilitators like Mule) do provide any capability PHP and native LAMP-technologies are lacking?

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. 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.

Edit 2

regarding Houcem's reply to my comment to his post ... what would be a native LAMP-answer to ESB/Mule?

Edit 3

Seems like Tuxedo might be a more PHP-native alternative to Mule/ESB. Somebody got experience using this tool?

An ESB is a general solution to a scalability problem; 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

Admittedly, most PHP sites are small scale and would usually find it difficult to justify the administrative and technological overhead of an 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. This may make them re-evaluate their application integration issues, and an ESB is a good solution to that problem.

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. But FWIW, many ESB products provide bindings for PHP and other OSS platforms, so the platform that the ESB runs on isn't crucial.

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.

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 :

  • Mix of opensource development and software editors tools (including ERPs). Development are often made using Java EE in order to rely on Java EE stacks (and its vendors IBM, Oracle, ...)
  • Full Microsoft (no need of ESB, Microsoft provide EAI/ESB like tools)

PHP is most used for web application (even for big companies, but web oriented).

An ESB is a big cost, and is only usefull/needed when the number of interconnected application is raising. 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.

A potential use case for a PHP application would be an internet site of a travel agency quering multiple flight/train/hotels companies. 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.

I would recommend Windows Azure Service Bus, which provides a PHP SDK here 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. You can even communicate with apps that are written in Java, C#, VS C++ from PHP easily.

ESB could be used in different ways :

  • 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. Another form of asynchronous processing : using mule to execute php scripts (using command line) in a non blocking way.

  • 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. This is used in big web sites which does a lot of complex processing and need flexible and powerful language like 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

There is no native php integration with Mule in PHP world. To do it you should use web services (SOAP)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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