Priyank,
sorry for late reply ..
Am 25.09.2015 um 17:53 schrieb Priyank Kumar:
> Hi Alexander,
> Thanks.
>
> I am looking how to write a native worker worker?
You can't. Native workers (router and container workers are an
implementation detail of Crossbar.io).
> As in article its stated:
> 1) How to write this special process container in twisted python. Any
> example here which can run at crossbar, or its any WAMP python code
> (application runner) which connects to crossbar. As I believe internal
> workers communicate with internal IPC on Unix socket, but wamp
> application component is over a transport and connect over web/tcp socket
It works like this:
(1) A WAMP component that you have written in Python using
AutobahnPython/Twisted can be deployed in more variants than
(2) a WAMP component written in some other WAMP supported language.
(1) can be run in Crossbar.io
a) embedded in a router worker - it will then talk to the router over a
pseudo-transport which simply boils down to function calls
b) in a container worker - it then can talk over any transport support
by Crossbar.io (Unix domain sockets is just one)
c) in a regular guest worker - again it can talk over any transport
With a) and b), you can have multiple such components running in the
same process/worker. Not with c) - there is only one component (since
WAMP currently does not support multiplexed transports).
> 2) Here I am looking at the block diagram and trying to understand how
> should I write some native python code which can do some processing at
> crossbar router (not at the client), and it seems to me that
> architecture supports it, like u have templates and static webserver
No, you can't. A component like (1) above can be _deployed_ in more
variants (see above), but it can't _do_ anything more than any other
WAMP component.
In particular, you cannot modify or directly call into the router internals.
This is by design: router code and app code MUST NOT be mixed.
> 3) So I need help in writing such middleware at the crossbar running
> machine itself (say a server) using the native container worker
You can open a listening port in any WAMP component as you like.
Hope this helps,
/Tobias
>
>
> From the documentation:
>
> Crossbar.io can work as a component host or component container for WAMP
> application components - regardless in which language they are written
> or under which run-time they run. You can host mixed language or
> run-time application component sets.
>
> Crossbar.io Node
>
> Native Python application components are hosted in special worker
> processes called /Containers/.
> --
> You received this message because you are subscribed to the Google
> Groups "Crossbar" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to
crossbario+...@googlegroups.com
> <mailto:
crossbario+...@googlegroups.com>.
> To post to this group, send email to
cross...@googlegroups.com
> <mailto:
cross...@googlegroups.com>.
> To view this discussion on the web visit
>
https://groups.google.com/d/msgid/crossbario/35fe8161-d398-4c72-a30a-9a68c45f6e2d%40googlegroups.com
> <
https://groups.google.com/d/msgid/crossbario/35fe8161-d398-4c72-a30a-9a68c45f6e2d%40googlegroups.com?utm_medium=email&utm_source=footer>.
> For more options, visit
https://groups.google.com/d/optout.