API Changes in 8.2

#1

Regards all,

We're struggling to get a web game rolling. I downloaded the "development" version linked from tavendo/AutobahnJS

https://autobahn.s3.amazonaws.com/js/autobahn.js

but eventually realized that this is not at all what the things in the new WAMP2 AutobahnPython examples are written against, which is

https://autobahn.s3.amazonaws.com/autobahnjs/latest/autobahn.js

So, I pulled that down and managed to get a pubsub example working by looking at the RPC example, the code, and guessing. My minimal test case (generated from your examples) is at:

https://github.com/majdal/modex/tree/master/scratch/autobake

So, it works finally, which is a huge relief, but only marginally. There are two bugs, which I think represent API inconsistencies: 1) a payloadless publish causes a TypeError, 2) though the server payload serializes all 6 pieces of data, the javascript only gives the first of them (of course, if I manually wrap the 6 data pieces in a dict on the server side, they come through fine). This is documented in my wamp.html, if that wasn't clear enough.

Can you give us a cluestick?

Thanks in advance
-Nick Guenther
4B Joint Stats/CS
University of Waterloo

0 Likes

#2

Regards all,

Hi Nick,

we are currently in the mid of transitioning all the Autobahn subprojects from WAMPv1 to WAMPv2.

This is a big change, since WAMP v2 is a major upgrade from v1. It has the same concepts, but lots of changes/extensions.

So during this process, there will be issues. I am sorry, but it needs to happen .. now.

We're struggling to get a web game rolling. I downloaded the
"development" version linked from tavendo/AutobahnJS

https://autobahn.s3.amazonaws.com/js/autobahn.js

but eventually realized that this is not at all what the things in the
new WAMP2 AutobahnPython examples are written against, which is

https://autobahn.s3.amazonaws.com/autobahnjs/latest/autobahn.js

Yes. I added info to the readme:

https://github.com/tavendo/AutobahnJS#browsers

So, I pulled that down and managed to get a pubsub example working by
looking at the RPC example, the code, and guessing. My minimal test case
(generated from your examples) is at:

https://github.com/majdal/modex/tree/master/scratch/autobake

So, it works finally, which is a huge relief, but only marginally. There
are two bugs, which I think represent API inconsistencies: 1) a
payloadless publish causes a TypeError, 2) though the server payload
serializes all 6 pieces of data, the javascript only gives the first of
them (of course, if I manually wrap the 6 data pieces in a dict on the
server side, they come through fine). This is documented in my
wamp.html, if that wasn't clear enough.

Can you give us a cluestick?

We've just pushed a new AutobahnJS release, and I also added the missing JS variants of the PubSub examples here:

https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/basic

Need to write a minimal doc about API still ..

Hope this helps,
/Tobias

···

Am 13.02.2014 03:53, schrieb Nick Guenther:

Thanks in advance
-Nick Guenther
4B Joint Stats/CS
University of Waterloo

0 Likes

#3

‘1’

Ah. That's more or less what I thought. I'm still confused about why my handler is only receiving the first of args; so I'll play with it and get back with more questions soon.

By the way, the guide at
https://github.com/tavendo/AutobahnPython/tree/master/examples/twisted/wamp/basic#router-with-embedded-application-backend-component
is wrong. It says rpc.timeservice.TimeServiceBackend but it needs to be rpc.timeservice.backend.Component. It would be helpful if that same point was in the example code, too; I missed the README at first and couldn't figure out how to actually spawn anything for an hour.

-Nick

···

On Thu, Feb 13, 2014 at 11:02 AM, Tobias Oberstein <tobias.o...@gmail.com> wrote:

Am 13.02.2014 03:53, schrieb Nick Guenther:

0 Likes

#4

...oh, okay, this last commit solved my major problem, which was that I was only getting one of my arguments out, and seems to have fixed the crash on nil-payloads:
https://github.com/tavendo/AutobahnJS/commit/f21d532a672339aea48c94a79bc9c1acad6ae4b2#diff-84754c1561f6d42662194a93a39f0e42L366
Thanks! That is all we needed to get going.

Do you have an idea of when the API will stabilize? Are we going to get bit in a month if we write this now?

Is the AutobahnJS version synced with AutobahnPython? We thought it was, but then there were API inconsistencies.

···

On Thu, Feb 13, 2014 at 12:30 PM, Nick Guenther <ngue...@uwaterloo.ca> wrote:

On Thu, Feb 13, 2014 at 11:02 AM, Tobias Oberstein > <tobias.o...@gmail.com> wrote:

Am 13.02.2014 03:53, schrieb Nick Guenther:

‘1’

Ah. That's more or less what I thought. I'm still confused about why my handler is only receiving the first of args; so I'll play with it and get back with more questions soon.

0 Likes

#5

...oh, okay, this last commit solved my major problem, which was that I
was only getting one of my arguments out, and seems to have fixed the
crash on nil-payloads:
https://github.com/tavendo/AutobahnJS/commit/f21d532a672339aea48c94a79bc9c1acad6ae4b2#diff-84754c1561f6d42662194a93a39f0e42L366

Yep. That's the commit where above is fixed.

Thanks! That is all we needed to get going.

Great! Any feedback is appreciated. There are still missing parts and there will likely be bugs.

Do you have an idea of when the API will stabilize? Are we going to get
bit in a month if we write this now?

The core API, that is how connections and session are created, and the signature of Session.call|register|publish|subscribe is probably quite done. There is stuff thats definitely undergoing change and/or extension, like all the options and details parameters and argument attributes.

Is the AutobahnJS version synced with AutobahnPython? We thought it was,
but then there were API inconsistencies.

Autobahn>Python 0.8.1 should work with Autobahn|JS 0.9.0-3. If not, that's a bug in one or both;)

Any usage and bug reports are very welcome! As said, the introduction of WAMPv2 is still work in progress ..

Cheers,
/Tobias

0 Likes