A Simple PHP implementation wrapping Thruway

592 views
Skip to first unread message

Abed Halawi

unread,
Nov 23, 2014, 10:36:59 AM11/23/14
to wam...@googlegroups.com
An implementation of the WAMP v2 to have listed within the "implementations" section. The idea behind it is to make it very easy to structure application logic using providers, called Minion.

Tobias Oberstein

unread,
Nov 23, 2014, 2:33:12 PM11/23/14
to wam...@googlegroups.com
Hi Abed,

> An implementation of the WAMP v2 to have listed within the
> "implementations" section. The idea behind it is to make it very easy to
> structure application logic using providers, called Minion
> <http://github.com/vinelab/minion>.

I had a quick look at the README - please correct me if I am wrong:

When a developer creates a PHP application component using Minion, this
component can only be run inside Minion, not together with an arbitrary
WAMP router.

This is different from plain Thruway. A PHP app component created using
Thruway can be run together with any WAMP router. It can also be run as
an internal client to Thruway. But without code change (or minimal change).

Compare that with our own stuff (or any other client library or router
listed on wamp.ws): when you write an application component using one of
the AutobahnXXX client libraries, the component can be run together with
_any_ WAMP router (not only say Crossbar.io). This is by design, and a
principle we rigorously follow: users must _not_ be locked in, and users
should have freedom of choice. We follow this ourself, and we do
everything to convince others that this is a "good thing".

If above is the case (again, please correct if I am wrong), then Minion
is neither a WAMP client library nor a proper WAMP router, and we don't
want to encourage people writing code for a system that creates "lock
in", we cannot list Minion on the WAMP website, and we won't allow the
use of the WAMP trademark related to Minion.

If above is incorrect, please correct me, and we will list Minion and
even promote it. I hope you do understand the thinking behind this ..
this is by no way meant to be discriminating or something.

Let me know what you think ..
Cheers,
/Tobias

Abed Halawi

unread,
Nov 23, 2014, 2:55:38 PM11/23/14
to wam...@googlegroups.com
Thanks Tobias for your reply, I see your point and now I'm reconsidering the request but still confused on whether it belongs in that list or not.

Let me collaborate more on the idea behind Minion,
the reason why it was implemented is to make using Thruway simpler and bring a structure to the application logic using the Internal Client feature.
Thruway is already listed within the implementations of WAMP and whatever you can do with it, can be achieved with Minion since it's a wrapper for it and uses it at the core,
i.e. by extending the Provider of Minion you will be able to register, publish and subscribe to topics without having to keep track of the current session and callee instances,
which are required by Thruway for every action.
You may also register different types of Providers easily, closures, classes or simple functions, without having to keep track of the corresponding instance.

Minion comes bundled with a router that can either be replaced or customized, which in turn runs a Thruway loop.

If the question is: Is Minion an implementation of the WAMP protocol only ? The answer is No, it's based on Thruway which is the core implementation of the protocol and it's job is to make Thruway an application-friendly library to use.

If that does not qualify Minion as a WAMP client/library I would appreciate your acknowledgement of the appropriate terms to be used in that case.

Cheers,
Abed

Abed Halawi

unread,
Nov 23, 2014, 2:58:59 PM11/23/14
to wam...@googlegroups.com
Sorry forgot to mention that in addition to the above, Minion is going to be Framework-compatible i.e. with Laravel and Symfony (so far).

Tobias Oberstein

unread,
Nov 23, 2014, 3:34:55 PM11/23/14
to wam...@googlegroups.com
Hi Abed,

thanks for clarification! I was afraid the answer is as I expected:(

Am 23.11.2014 20:55, schrieb Abed Halawi:
> Thanks Tobias for your reply, I see your point and now I'm reconsidering
> the request but still confused on whether it belongs in that list or not.
>
> Let me collaborate more on the idea behind Minion,
> the reason why it was implemented is to make using Thruway simpler and
> bring a structure to the application logic using the Internal Client
> feature.

The usual (and I think encouraged) way of building WAMP components with
Thruway is _not_ by using internal clients.

Also: http://voryx.net/creating-internal-client-thruway/

Perhaps David or Matt can shed some light on the Thruway project's
perspective on this ...

> Thruway is already listed within the implementations of WAMP and
> whatever you can do with it, can be achieved with Minion since it's a
> wrapper for it and uses it at the core,

Thruway is both a proper WAMP router and client library.

Minion extends Thruway, but it locks users into Minion. I cannot run a
Minion based component together with a different router.

> i.e. by extending the Provider of Minion you will be able to register,
> publish and subscribe to topics without having to keep track of the
> current session and callee instances,
> which are required by Thruway for every action.
> You may also register different types of Providers easily, closures,
> classes or simple functions, without having to keep track of the
> corresponding instance.
>
> Minion comes bundled with a router that can either be replaced or
> customized, which in turn runs a Thruway loop.
>
> If the question is: Is Minion an implementation of the WAMP protocol
> only ? The answer is No, it's based on Thruway which is the core
> implementation of the protocol and it's job is to make Thruway an
> application-friendly library to use.

This is a valid goal, but the way you approach it locks users into
Minion. Could you achieve the same goal without lockin? I mean e.g. by
using normal Thruway clients under the hood?

>
> If that does not qualify Minion as a WAMP client/library I would
> appreciate your acknowledgement of the appropriate terms to be used in
> that case.

You could say that Minion is an extension to Thruway. I'd encourage to
disclose to your users that they will be locked into Minion. But this is
of course up to you.

Please do not announce Minion as a "WAMP Router" or "WAMP Client
Library" - please don't use "WAMP" in relation to Minion other than in
e.g. "Minion extends Thruway, and Thruway is a WAMP router".

I am sorry for all this, but we need to uphold the principles of WAMP
and the integrity and openness of the whole ecosystem.

You can of course publish your code as you like (we don't have any
problem with this), but we can control the use of the term "WAMP":

http://wamp.ws/faq/#why_trademarking

I hope you do understand the thinking behind above. I do think we have
proven that we do not discriminate anyone - look at the list on wamp.ws
.. which lists 3rd party libraries and routers which in a way directly
compete with "our stuff" - Autobahn/Crossbar.io. Others would call that
a "bad business decision" (why promote stuff that competes with you?). I
am deeply convinced that is the right approach.

In fact, this is the first occasion where I am in the somewhat
unpleasant situation to say "nope, sorry" (unless you can achieve your
same goals without lockin).

I say "unpleasant" because I am pretty sure you will have good reasons
why you approach things like you do. But we need to keep the big picture
in mind (openness and integrity of the WAMP ecosystem).

Cheers,
/Tobias

>
> Cheers,
> Abed
>
> On Sunday, November 23, 2014 9:33:12 PM UTC+2, Tobias Oberstein wrote:
>
> Hi Abed,
>
> > An implementation of the WAMP v2 to have listed within the
> > "implementations" section. The idea behind it is to make it very
> easy to
> > structure application logic using providers, called Minion
> > <http://github.com/vinelab/minion
> <http://github.com/vinelab/minion>>.
>
> I had a quick look at the README - please correct me if I am wrong:
>
> When a developer creates a PHP application component using Minion, this
> component can only be run inside Minion, not together with an arbitrary
> WAMP router.
>
> This is different from plain Thruway. A PHP app component created using
> Thruway can be run together with any WAMP router. It can also be run as
> an internal client to Thruway. But without code change (or minimal
> change).
>
> Compare that with our own stuff (or any other client library or router
> listed on wamp.ws <http://wamp.ws>): when you write an application
> component using one of
> the AutobahnXXX client libraries, the component can be run together
> with
> _any_ WAMP router (not only say Crossbar.io). This is by design, and a
> principle we rigorously follow: users must _not_ be locked in, and
> users
> should have freedom of choice. We follow this ourself, and we do
> everything to convince others that this is a "good thing".
>
> If above is the case (again, please correct if I am wrong), then Minion
> is neither a WAMP client library nor a proper WAMP router, and we don't
> want to encourage people writing code for a system that creates "lock
> in", we cannot list Minion on the WAMP website, and we won't allow the
> use of the WAMP trademark related to Minion.
>
> If above is incorrect, please correct me, and we will list Minion and
> even promote it. I hope you do understand the thinking behind this ..
> this is by no way meant to be discriminating or something.
>
> Let me know what you think ..
> Cheers,
> /Tobias
>
> --
> You received this message because you are subscribed to the Google
> Groups "WAMP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to wampws+un...@googlegroups.com
> <mailto:wampws+un...@googlegroups.com>.
> To post to this group, send email to wam...@googlegroups.com
> <mailto:wam...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/wampws.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wampws/cc65ac86-fa9a-415b-8b6b-b6580647fbae%40googlegroups.com
> <https://groups.google.com/d/msgid/wampws/cc65ac86-fa9a-415b-8b6b-b6580647fbae%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit https://groups.google.com/d/optout.

Abed Halawi

unread,
Nov 23, 2014, 3:49:21 PM11/23/14
to wam...@googlegroups.com
Right, I see it clearly now and agree that Minion should not be on that list.

"Minion is a Thruway extension" sounds like a better way to introduce it.
Will make sure to update the Readme accordingly.

Thanks!

Tobias Oberstein

unread,
Nov 23, 2014, 3:54:03 PM11/23/14
to wam...@googlegroups.com
Am 23.11.2014 21:49, schrieb Abed Halawi:
> Right, I see it clearly now and agree that Minion should not be on that
> list.
>
> "Minion is a Thruway extension" sounds like a better way to introduce it.
> Will make sure to update the Readme accordingly.

Thanks for mutual understanding! Good luck to Minion,

/Tobias

David Dan

unread,
Nov 24, 2014, 10:39:14 AM11/24/14
to wam...@googlegroups.com

Abed,

One of WAMP’s greatest strengths is the ability of any WAMP client written in any language to talk to any other WAMP client through any WAMP router.  Locking your users into just the embedded Thruway router will significantly limit your project’s reach.

Since you’re using the Thruway client, it would be trivial to make it talk to other routers like Crossbar, by using the ``PawlTransportProvider``, instead of ``InternalClientTransportProvider``.

The primary purpose of internal clients is to add optional functionality to the router.  For example, the authentication manager is an internal client, which is used to call the authentication URIs for dynamic credentials.

The secondary use cases would be for prototyping and debugging or very simple apps that don’t have a lot of users. 

For all other use cases, you should use a standalone WAMP client.

Thruway is meant to be a general purpose library that can be integrated into any PHP project.  We wanted to build it generic enough that other people could integrate it into their PHP framework of choice.  From looking at Minion, it appears that you have made an integration layer for use in Laravel - this is exactly what we intended with Thruway.  I think you just have to make in not depend exclusively on the Thruway router, so Laraval users can benefit from all that the WAMP eco-system has to offer.

We realize that there are some confusing terms and very little documentation for Thruway, which is something we plan on addressing in the next couple of weeks.

Tobias, we’ve updated the internal client post on voryx.net to try help clear up some of the confusion.

Dave

Tobias Oberstein

unread,
Nov 24, 2014, 2:29:26 PM11/24/14
to wam...@googlegroups.com
Hi Dave,

> Tobias, we’ve updated the internal client post on voryx.net to try help
> clear up some of the confusion.

http://voryx.net/creating-internal-client-thruway/

Awesome! Thanks. I guess that will help developers make an informed
decision.

Cheers,
/Tobias

Abed Halawi

unread,
Nov 25, 2014, 4:13:02 AM11/25/14
to wam...@googlegroups.com
Thank you Dave for clarifying things out, though I'm still confused on where the limitations in Minion exists and how to open them up ?!

Most of my experience goes around building multi-tier real-time applications where many collaborators are involved in the same project and sometimes working on the same feature and I know how things might go out of hand when you don't have a foundational structure that the project is built on, which is where Thruway simply doesn't cut it (please correct me if I'm wrong), we need the application logic to sit somewhere and there will be many classes registering RPCs and handling Pub/Sub events all over the place, if we were to base that only on Thruway our only option is to register an Internal Client and have it handle the works which means we'll be cluttering the ``onSessionStart`` method with almost all of our registrations (please collaborate if I'm missing something here).

As for Minion you may register your classes wherever they exist in your application by passing in their fully qualified namespaces and everything will be scoped inside of each class, but still they can communicate using Pub/Sub of course.

Regarding the integration with Laravel, that's the framework we use so we made it simple to use with it by integrating with the framework's CLI tool (artisan) and supporting inter-framework multi-environment configuration which Thruway - as a general purpose library - is probably never going to have them.

Crossbar support will definitely be there especially when clustering is involved, which is what I'll be working on starting mid this week.

Please help me get a better understanding of how Minion can still achieve its goal and be router-agnostic!

Abed

Abed Halawi

unread,
Nov 25, 2014, 3:23:04 PM11/25/14
to wam...@googlegroups.com
After giving this issue a bit of thought, I think I understand where the problem with Minion resides, it does not allow users to connect to any "external" routers other than the internal client based on Thruway, and what you guys are hinting for is for Minion to provide its service as well as make it configurable - as a WAMP client - to be able to use it with whatever WAMP router implementation out there ?!

If that's the case, could shipping with Thruway as an internal client be considered a helping feature for development/testing purposes ?

Sorry for taking a while here, I'm a noob in the WAMP realm :(

Abed

Abed Halawi

unread,
Nov 26, 2014, 7:03:10 AM11/26/14
to wam...@googlegroups.com
Good news good news!

Finally got the concept behind WAMP's purposes of being a client-agnistic protocol, and in turn re-implemented Minion according to the hint by @Dave of using Thruway's PawlTransportProvider instead of a built-in router implementation, so now you can specify any router's realm, host and port to connect to. The README has been updated accordingly as well.

@Dave I owe you lots of coffee and beer! And thank you @Tobias for your patience with me on the subject, I hope I got it the right way this time.

@Tobias Is it OK for Minion to be described as "a client implementation based on Thruway" in this case ?

Cheers,
Abed

Tobias Oberstein

unread,
Nov 26, 2014, 4:57:53 PM11/26/14
to wam...@googlegroups.com
Hi Abed,

Am 26.11.2014 13:03, schrieb Abed Halawi:
> Good news good news!
>
> Finally got the concept behind WAMP's purposes of being a
> client-agnistic protocol, and in turn re-implemented Minion according to

Great! ;)

> the hint by *@Dave *of using Thruway's PawlTransportProvider instead of
> a built-in router implementation, so now you can specify any router's
> realm, host and port to connect to. The README has been updated
> accordingly as well.

I think this is really good news, since it'll open up the whole WAMP
ecosystem for Minion users! Congrats on this decision.

>
> *@Dave* I owe you lots of coffee and beer! And thank you *@Tobias* for
> your patience with me on the subject, I hope I got it the right way this

No problem!

> time.
>
> *@Tobias* Is it OK for Minion to be described as "a client
> implementation based on Thruway" in this case ?

I haven't tested Minion myself, but I have read the revised README, and
if it works as advertised, this is cool! Since Minion now plays nice
within the ecosystem, use the term "WAMP" in connection with Minion as
you like.

And if you want to have Minion listed on the WAMP Web site, just send me
short sentence how you would like to have it listed.

Personally, I am quite a PHP dummy, so I cannot judge or actually
comprehend the exact added value of Minion above Thruway, but your users
might be interested (probably something for the README?). How does
Thruway (plain) compare to the Minion flavor / extension to Thruway?

Also, not sure: is your README already fully adapted to the new
development? Since the second part beginning with Provider and CLI match
how I would now look at Minion whereas the first part is still talking
about router and internal client - or do you want to preserve that?

Anyway, thanks for your efforts and joining WAMP,

Cheers,
/Tobias

>
> Cheers,
> Abed
>
> On Monday, November 24, 2014 9:29:26 PM UTC+2, Tobias Oberstein wrote:
>
> Hi Dave,
>
> > Tobias, we’ve updated the internal client post on voryx.net
> <http://voryx.net> to try help
> > clear up some of the confusion.
>
> http://voryx.net/creating-internal-client-thruway/
> <http://voryx.net/creating-internal-client-thruway/>
>
> Awesome! Thanks. I guess that will help developers make an informed
> decision.
>
> Cheers,
> /Tobias
>
> --
> You received this message because you are subscribed to the Google
> Groups "WAMP" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to wampws+un...@googlegroups.com
> <mailto:wampws+un...@googlegroups.com>.
> To post to this group, send email to wam...@googlegroups.com
> <mailto:wam...@googlegroups.com>.
> Visit this group at http://groups.google.com/group/wampws.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/wampws/fe3daf29-9721-4883-a22f-ff20069a7374%40googlegroups.com
> <https://groups.google.com/d/msgid/wampws/fe3daf29-9721-4883-a22f-ff20069a7374%40googlegroups.com?utm_medium=email&utm_source=footer>.

Abed Halawi

unread,
Nov 27, 2014, 7:29:56 AM11/27/14
to wam...@googlegroups.com
Hi Tobias,

And if you want to have Minion listed on the WAMP Web site, just send me 
short sentence how you would like to have it listed. 

Wonderful! "A simple and flexible WAMP v2 client and command line tool with Laravel support"

Personally, I am quite a PHP dummy, so I cannot judge or actually 
comprehend the exact added value of Minion above Thruway, but your users 
might be interested (probably something for the README?). How does 
Thruway (plain) compare to the Minion flavor / extension to Thruway? 

Minion makes it easy to structure your application the way you like without having to worry about initialization and registration of your classes wherever they exist by using Minion's `register()` method where you can specify the namespace and class name of your provider classes (the classes responsible for registering and handling RPCs and Pub/Sub). Which is a crucial requirement for large scale applications.

Also, not sure: is your README already fully adapted to the new 
development? Since the second part beginning with Provider and CLI match 
how I would now look at Minion whereas the first part is still talking 
about router and internal client - or do you want to preserve that? 

The Internal Client thing slipped my attention in the README, gone now. And yes the implementation definitely reflects what's in the README (enhanced a bit again today), in fact I've put together a quick start guide as well that you might like to check for that regard.

Glad to join the awesomeness :)

Cheers,
Abed

Tobias Oberstein

unread,
Nov 28, 2014, 5:45:56 PM11/28/14
to wam...@googlegroups.com
Hi Abed,

Am 27.11.2014 13:29, schrieb Abed Halawi:
> Hi Tobias,
>
> And if you want to have Minion listed on the WAMP Web site, just
> send me
> short sentence how you would like to have it listed.
>
>
> Wonderful! "A simple and flexible WAMP v2 client and command line tool
> with Laravel support"

I've added Minion to the Web site.

Cheers,
/Tobias

Reply all
Reply to author
Forward
0 new messages