Am 16.01.2014 22:41, schrieb Greg Fausak:
> Tobias,
>
> Thanks, I went and integrated Autobahn and Angularjs, actually, no real
> work at all. Since angular is javascript, everything just works as you
> would expect.
>
> I have run in to some interesting problems, though!
What are you using on client, and what on server?
>
> My current implementations all work with ajax calls. Ajax has a fairly
> long setup / execution time, on the order of seconds between calls. I
> reimplemented one project with web sockets. I only 'setup' one time
> now, with each subsequent rpc call riding on the initial
> authentication//authorization, I can run calls so fast that they their
> order is hard to determine. Have you seen that before? I run 3 web
WAMP is fast, since there is no head-of-line blocking, and RPCs are
fully pipelined. But the RPC requests are nevertheless ordered. The RPC
response order depends on how they execute on server-side.
> socket calls from javascript one after the other. On the server side
> they might run at the same time, or in a different order than presented.
If you are using AutobahnJS, a sequence of 3 RPCs will arrive at the
server in exactly that order.
The responses to those 3 RPCs are asynchronous, and order depends on how
they are run at the server.
> It is a very interesting problem having the code execute so quickly
> that I can't rely on 'order'.
>
> I guess one needs to use promises even on the client side to insure
> serialization?
AutobahnJS already uses promises. You can pretty much to as you like:
a) fire off 3 RPCs, and immediately continue in your client code with
other stuff
b) fire off 3 RPCs, and only continue with other stuff if all 3 have
returned (collect the 3 promises returned in a list, create a
Deferred/Promise from that list, and attach a handler to that latter
promise)
c) fire off the 1st RPC, and only fire the 2nd after the 1st returns
(have session.call() called in the response handler for the first
session.call())
Of course you can also combine above.
>
> -g
>
>
> On Monday, January 6, 2014 6:10:34 PM UTC-6, Tobias Oberstein wrote:
>
> Am 07.01.2014 00:29, schrieb Greg Fausak:
> > I guess the subject says it all :-)
> >
> > Is there an angularjs service already defined for autobahn? Is
> anybody
> > using angular with autobahn?
>
> Hi Greg,
>
> there is whole integration library for Sencha ExtJS
> (
https://github.com/tavendo/AutobahnExtJS
> <
https://github.com/tavendo/AutobahnExtJS>) which is MVC based, and
> we've
> been using AutobahnJS alot with KnockoutJS which is MVVM based.
>
> I am not aware of an AngularJS integration library though. I guess it
> could be done .. well, obviously;)
>
> /Tobias
>
> >
> > -g
> >
> > --
> > You received this message because you are subscribed to the Google
> > Groups "Autobahn" group.
> > To unsubscribe from this group and stop receiving emails from it,
> send
> > an email to
autobahnws+...@googlegroups.com <javascript:>.
> <
https://groups.google.com/groups/opt_out>.