AutobahnCpp in Qt application

#1

Hi. I have a crossbar router, python app that should emit messages/events/whatever and I have a Qt app in C++ (or even QML). Is there any guide/example on how to make Autobahn possible in Qt app? Thanks

0 Likes

#2

Hi. I have a crossbar router, python app that should emit messages/events/whatever and I have a Qt app in C++ (or even QML). Is there any guide/example on how to make Autobahn possible in Qt app? Thanks

Hi Oleg,

I believe at one time I did a small test using AutobahnCpp + Qt 5. If I remember correctly I used https://github.com/peper0/qtasio to integrate the two event loops. It was quite some time ago though, almost two years, and things may have changed.

I’m afraid I didn’t keep the code of my experiment :confused:

Elvis

···

Den 22 feb. 2017 12:57 fm skrev “Oleg Korsak” kamikaze.is...@gmail.com:

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.

To post to this group, send email to autob...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/28f4fb17-0dca-4328-a506-9ab2818c6fc8%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes

#3

Hi Elvis,

just quickly .. did your efforts with

https://09227886897126677660.googlegroups.com/attach/19b8ca36ff4097/specification.pdf?part=0.1&vt=ANaJVrGDQuaVPO94GwGkEFQeISyqUABdMhAi5PHP-OQyjhhaQNcrILoYjn-M0gtnceSKCCjSRFnnzei3bjsvqbSePMw8Qv30nw-lRqmmbcdFWrrhwFKhDhw

take you somewhere?

Quick googling also turns up:

https://github.com/qflow/wamp
https://bugreports.qt.io/browse/QTBUG-38742

Cheers,
/Tobias

···

Am 23.02.2017 um 08:38 schrieb Elvis Stansvik:

Den 22 feb. 2017 12:57 fm skrev "Oleg Korsak" <
kamikaze.is...@gmail.com>:

Hi. I have a crossbar router, python app that should emit

messages/events/whatever and I have a Qt app in C++ (or even QML). Is there
any guide/example on how to make Autobahn possible in Qt app? Thanks

Hi Oleg,

I believe at one time I did a small test using AutobahnCpp + Qt 5. If I
remember correctly I used https://github.com/peper0/qtasio to integrate the
two event loops. It was quite some time ago though, almost two years, and
things may have changed.

I'm afraid I didn't keep the code of my experiment :confused:

Elvis

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

To post to this group, send email to autob...@googlegroups.com.
To view this discussion on the web visit

https://groups.google.com/d/msgid/autobahnws/28f4fb17-0dca-4328-a506-9ab2818c6fc8%40googlegroups.com
.

For more options, visit https://groups.google.com/d/optout.

0 Likes

#4

Hi Elvis,

just quickly … did your efforts with

https://09227886897126677660.googlegroups.com/attach/19b8ca36ff4097/specification.pdf?part=0.1&vt=ANaJVrGDQuaVPO94GwGkEFQeISyqUABdMhAi5PHP-OQyjhhaQNcrILoYjn-M0gtnceSKCCjSRFnnzei3bjsvqbSePMw8Qv30nw-lRqmmbcdFWrrhwFKhDhw

take you somewhere?

Ah yes, I think that thread was how I found qtasio back then. As far as I can remember, I got a small test with AutobahnCpp working using that.

Quick googling also turns up:

https://github.com/qflow/wamp

https://bugreports.qt.io/browse/QTBUG-38742

I hadn’t heard about qflow, or… unless that is the very same Qt based WAMP implementation someone wrote when I didn’t follow through with my planned project to do so.

One problem was precisely the lack of subprotocol support in QtWebSockets (the bug you linked), but I bet that’s why qflow seems to have vendored/forked it.

I realize now my last comment on that Qt bug was a little harsh and I regret writing it like that…

Elvis

···

Den 23 feb. 2017 10:50 fm skrev “Tobias Oberstein” tobias.o...@gmail.com:

Cheers,

/Tobias

Am 23.02.2017 um 08:38 schrieb Elvis Stansvik:

Den 22 feb. 2017 12:57 fm skrev “Oleg Korsak” <

kamikaze.is...@gmail.com>:

Hi. I have a crossbar router, python app that should emit

messages/events/whatever and I have a Qt app in C++ (or even QML). Is there

any guide/example on how to make Autobahn possible in Qt app? Thanks

Hi Oleg,

I believe at one time I did a small test using AutobahnCpp + Qt 5. If I

remember correctly I used https://github.com/peper0/qtasio to integrate the

two event loops. It was quite some time ago though, almost two years, and

things may have changed.

I’m afraid I didn’t keep the code of my experiment :confused:

Elvis

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.

To post to this group, send email to autob...@googlegroups.com.

To view this discussion on the web visit

https://groups.google.com/d/msgid/autobahnws/28f4fb17-0dca-4328-a506-9ab2818c6fc8%40googlegroups.com

.

For more options, visit https://groups.google.com/d/optout.

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.

To post to this group, send email to autob...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/a6709b8c-6f58-38ac-4c5e-f2774d8e7514%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes

#5

FWIW, I don’t feel your comment in above Qt issue to be harsh … maybe a little bit upset;)

Anyway, I agree about this in particular: “The description of this bug should also be changed because it suggests these are somehow a non-standard features.”

As it stands, Qt has broken WebSocket support … and this isn’t the only issue: https://bugreports.qt.io/browse/QTBUG-51633?jql=text%20~%20"websocket"

···

Am Freitag, 24. Februar 2017 08:49:20 UTC+1 schrieb Elvis Stansvik:

Den 23 feb. 2017 10:50 fm skrev “Tobias Oberstein” tobias.o...@gmail.com:

Hi Elvis,

just quickly … did your efforts with

https://09227886897126677660.googlegroups.com/attach/19b8ca36ff4097/specification.pdf?part=0.1&vt=ANaJVrGDQuaVPO94GwGkEFQeISyqUABdMhAi5PHP-OQyjhhaQNcrILoYjn-M0gtnceSKCCjSRFnnzei3bjsvqbSePMw8Qv30nw-lRqmmbcdFWrrhwFKhDhw

take you somewhere?

Ah yes, I think that thread was how I found qtasio back then. As far as I can remember, I got a small test with AutobahnCpp working using that.

Quick googling also turns up:

https://github.com/qflow/wamp

https://bugreports.qt.io/browse/QTBUG-38742

I hadn’t heard about qflow, or… unless that is the very same Qt based WAMP implementation someone wrote when I didn’t follow through with my planned project to do so.

One problem was precisely the lack of subprotocol support in QtWebSockets (the bug you linked), but I bet that’s why qflow seems to have vendored/forked it.

I realize now my last comment on that Qt bug was a little harsh and I regret writing it like that…

Elvis

Cheers,

/Tobias

Am 23.02.2017 um 08:38 schrieb Elvis Stansvik:

Den 22 feb. 2017 12:57 fm skrev “Oleg Korsak” <

kamikaze.is.waiting.you@gmail.com>:

Hi. I have a crossbar router, python app that should emit

messages/events/whatever and I have a Qt app in C++ (or even QML). Is there

any guide/example on how to make Autobahn possible in Qt app? Thanks

Hi Oleg,

I believe at one time I did a small test using AutobahnCpp + Qt 5. If I

remember correctly I used https://github.com/peper0/qtasio to integrate the

two event loops. It was quite some time ago though, almost two years, and

things may have changed.

I’m afraid I didn’t keep the code of my experiment :confused:

Elvis

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+unsubscribe@googlegroups.com.

To post to this group, send email to autob...@googlegroups.com.

To view this discussion on the web visit

https://groups.google.com/d/msgid/autobahnws/28f4fb17-0dca-4328-a506-9ab2818c6fc8%40googlegroups.com

.

For more options, visit https://groups.google.com/d/optout.

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+unsubscribe@googlegroups.com.

To post to this group, send email to autob...@googlegroups.com.

To view this discussion on the web visit https://groups.google.com/d/msgid/autobahnws/a6709b8c-6f58-38ac-4c5e-f2774d8e7514%40gmail.com.

For more options, visit https://groups.google.com/d/optout.

0 Likes

#6

Hi Tobias and Elvis,

This is somewhat OT but related: I am developing a PyQt app
that uses Autobahn Python on the backend and opted to avoid the
Qt network modules entirely in favor of using the qt5reactor
with twisted to interact with a custom subclass of
wamp._ApplicationSession inside a wamp.Application.

I don't know if this approach would work in the context of Qt
(I'm clueless in C++ world).

It would be cool to have some "recommended practices" for
doing Autobahn apps with PyQt -- the qt5reactor makes the
twisted and PyQt event loops play nice (so far ;), but
there are some tricky parts -- e.g. you have to let the twisted
reactor be the "driver".

In particular, I wanted my app to be able to login/logout, which
the Autobahn examples don't do -- they all assume the client will
login when it starts up and never logout -- so that's why I had
to create the custom _ApplicationSession. Seems to work well
so far.

BTW, Elvis, I learned a lot from your PyQt implementation of the
crossbar "gauges" example -- thanks very much for that!

Also very useful was the "pyqt twisted socket client" example
by Eli Bendersky.

Cheers,
Steve

···

On 02/24/2017 04:52 AM, Tobias Oberstein wrote:

FWIW, I don't feel your comment in above Qt issue to be harsh .. maybe a
little bit upset;)

Anyway, I agree about this in particular: "The description of this bug
should also be changed because it suggests these are somehow a
non-standard features."

As it stands, Qt has broken WebSocket support .. and this isn't the only
issue:
https://bugreports.qt.io/browse/QTBUG-51633?jql=text%20~%20"websocket"

Am Freitag, 24. Februar 2017 08:49:20 UTC+1 schrieb Elvis Stansvik:

    Den 23 feb. 2017 10:50 fm skrev "Tobias Oberstein"
    <tobias.o...@gmail.com <mailto:tobias.o...@gmail.com>>:
    >
    > Hi Elvis,
    >
    > just quickly .. did your efforts with
    >
    https://09227886897126677660.googlegroups.com/attach/19b8ca36ff4097/specification.pdf?part=0.1&vt=ANaJVrGDQuaVPO94GwGkEFQeISyqUABdMhAi5PHP-OQyjhhaQNcrILoYjn-M0gtnceSKCCjSRFnnzei3bjsvqbSePMw8Qv30nw-lRqmmbcdFWrrhwFKhDhw
    <https://09227886897126677660.googlegroups.com/attach/19b8ca36ff4097/specification.pdf?part=0.1&vt=ANaJVrGDQuaVPO94GwGkEFQeISyqUABdMhAi5PHP-OQyjhhaQNcrILoYjn-M0gtnceSKCCjSRFnnzei3bjsvqbSePMw8Qv30nw-lRqmmbcdFWrrhwFKhDhw>
    >
    > take you somewhere?

    Ah yes, I think that thread was how I found qtasio back then. As far
    as I can remember, I got a small test with AutobahnCpp working using
    that.

    >
    > Quick googling also turns up:
    >
    > https://github.com/qflow/wamp
    > https://bugreports.qt.io/browse/QTBUG-38742
    <https://bugreports.qt.io/browse/QTBUG-38742>

    I hadn't heard about qflow, or.. unless that is the very same Qt
    based WAMP implementation someone wrote when I didn't follow through
    with my planned project to do so.

    One problem was precisely the lack of subprotocol support in
    QtWebSockets (the bug you linked), but I bet that's why qflow seems
    to have vendored/forked it.

    I realize now my last comment on that Qt bug was a little harsh and
    I regret writing it like that..

    Elvis

    >
    > Cheers,
    > /Tobias
    >
    > Am 23.02.2017 um 08:38 schrieb Elvis Stansvik:
    >>
    >> Den 22 feb. 2017 12:57 fm skrev "Oleg Korsak" <
    >> kamikaze.is...@gmail.com
    <mailto:kamikaze.is...@gmail.com>>:
    >>>
    >>> Hi. I have a crossbar router, python app that should emit
    >>
    >> messages/events/whatever and I have a Qt app in C++ (or even
    QML). Is there
    >> any guide/example on how to make Autobahn possible in Qt app? Thanks
    >>
    >> Hi Oleg,
    >>
    >> I believe at one time I did a small test using AutobahnCpp + Qt
    5. If I
    >> remember correctly I used https://github.com/peper0/qtasio
    <https://github.com/peper0/qtasio> to integrate the
    >> two event loops. It was quite some time ago though, almost two
    years, and
    >> things may have changed.
    >>
    >> I'm afraid I didn't keep the code of my experiment :confused:
    >>
    >> Elvis
    >>
    >>>
    >>> --
    >>> 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
    <mailto:autobahnws%2...@googlegroups.com>.
    >>>
    >>> To post to this group, send email to autob...@googlegroups.com
    <mailto:autob...@googlegroups.com>.
    >>> To view this discussion on the web visit
    >>
    https://groups.google.com/d/msgid/autobahnws/28f4fb17-0dca-4328-a506-9ab2818c6fc8%40googlegroups.com
    <https://groups.google.com/d/msgid/autobahnws/28f4fb17-0dca-4328-a506-9ab2818c6fc8%40googlegroups.com>
    >> .
    >>>
    >>> For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.
    >>
    >
    > --
    > 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
    <mailto:autobahnws%2...@googlegroups.com>.
    > To post to this group, send email to autob...@googlegroups.com
    <mailto:autob...@googlegroups.com>.
    > To view this discussion on the web visit
    https://groups.google.com/d/msgid/autobahnws/a6709b8c-6f58-38ac-4c5e-f2774d8e7514%40gmail.com
    <https://groups.google.com/d/msgid/autobahnws/a6709b8c-6f58-38ac-4c5e-f2774d8e7514%40gmail.com>.
    >
    > For more options, visit https://groups.google.com/d/optout
    <https://groups.google.com/d/optout>.

--
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
<mailto:autobahnws+...@googlegroups.com>.
To post to this group, send email to autob...@googlegroups.com
<mailto:autob...@googlegroups.com>.
To view this discussion on the web visit
https://groups.google.com/d/msgid/autobahnws/8eeebf4c-f1fa-4374-a9e5-0dc72b498c5b%40googlegroups.com
<https://groups.google.com/d/msgid/autobahnws/8eeebf4c-f1fa-4374-a9e5-0dc72b498c5b%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

0 Likes