-
Notifications
You must be signed in to change notification settings - Fork 1k
Add php-enqueue/amqp-lib (queue-interop/amqp-interop) shim interface #500
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Can we take a step back and explain what's the goal of this PR? If |
The main reason of the PR is to make messaging easy to do and open new opportunities for our PHP ecosystem. I am welcome you to join the queue interop group. Let's build it together
|
@makasim I understand the premise of shim libraries and sometimes they make sense. My question is not so much about why
The former approach is common for really popular shims (SLF4J in the JVM ecosystem, for example). When a shim is not particularly ubiquitous, it provides implementations for all the underlying "implementation" libraries. Is |
@michaelklishin The solution does not rely on any enqueue lib part and does not require it. It needs only amqp interop interfaces. The queue and amqp interops were originally developed as part of enqueue project but we decided to move it to a separate org. So it is clear to everyone that it's two different projects. |
This interop is similar to this lib https://github.com/rabbitmq/rabbitmq-jms-client and shares a lot as they both based on JMS |
@makasim perhaps I should put this more bluntly (I don't mean to offend you personally or your efforts with Why should the maintainers of this library sign up for maintaining this code, which is specific to |
@makasim JMS has been ubiquitous in the JVM community for over a decade. It makes sense for any messaging related project to proivde a JMS interface implementation to the extent possible, in fact, some only provide a JMS interface.
Unless @nubeiro or @hairyhum feel enthusiastic about accepting this PR, I think it's not a wise move for |
I would like to stress out that the solution I am proposing has no direct relation to php-eqnueue. I've worked on this stuff for a year and I am going to continue, that's what I paid for. I can support. |
Symfony (one of the biggest PHP frameworks) incorporates AMQP extension. If they decide to support AMQPlib they will have to copy past 90% of their code. If it is based on interop interfaces it will remain the same. We are working on a PR that does same things as theirs but based on the interop, so this library could be used too. I am serious about this stuff and I am not going to leave it anytime soon. |
Also, the interop interfaces are cool, really. I am going to come back with reworked examples. |
I add |
Added interop examples |
@makasim you are trying to sell me on the wrong idea and ignore my actual concerns. As I said, shim libraries can be useful. Only really popular shim libraries are supported by individual "implementations" of their interface and your projects aren't quite there yet. You are trying to make this library carry/maintain/indirectly promote your projects without offering any benefit for the maintainers or the majority of users (who are not aware of your interop libraries). Your projects are objectively immature, largely unknown (at least not yet), don't have any technical reasons to include their bits into libraries such as this one. Unless @nubeiro or @hairyhum really like the idea, I'd say please come back in a couple of years. |
@makasim please no more arguments about how "interop is cool, really" or I am locking this discussion. Our concern is: why should we include/maintain/support your shim libraries forever (since removing something is quite hard once you include it)? Do you have a reason that goes beyond "but wouldn't it be cool if we were all singing and dancing users of the same common API"? |
We can go on our own indeed but it'll take much more time to spread and adapt it to PHP community. If you accept this we can go quicker and persuade other projects to join the group. That's our plan and have just started. Why do you need it? Well, all my arguments are based on the idea of shared\common interfaces and their wide adoption. I am not new to open source: I created Payum library which is quite popular (I've been supporting for 5 years) as well as other projects that I maintained or contributed too. So I am going to support this. I'll do my best so this won't bother you at all. |
@makasim is trying to get everyone on the same page. Like it happened with the PSR/LogInterface and PSR/CacheInterface. the newset PSR/Containerinterface. The point is that One can use the library it wants and if the library doesn't support what he needs he can then switch elsewhere without rewriting a ton of code. |
@mvrhov you are beating a dead horse. See #500 (comment). |
I don't see any change to php-amqplib in this PR. It looks like an separate library, which can perfectly exist on it's own and depend on php-amqplib. |
PR ports eqnueue/amqp-lib which is built on top of ampq-interop. The solution is fully functional and already tested (I'll port tests once we agree on this). The reason to have it instead of stand alone library is that it will be adopted by more developers which is good for a amqp interop and PHP community.
Here's usage examples
The main reason of the PR is to make messaging easy to do and open new opportunities for our PHP ecosystem. I am welcome you to join the queue interop group. Let's build it together
psr/log
orpsr7
but for messaging.I'll add tests and docs if there is an approved from maintainers