cppwamp icon indicating copy to clipboard operation
cppwamp copied to clipboard

Implement basic WAMP router classes

Open ecorm opened this issue 10 years ago • 8 comments

Implement a RouterSession class that derives from internal::Session and implements the broker/dealer roles according to the basic spec. The RouterSession instances would share information with a common RouterRealm class.

Reading configuration parameters and providing a meta-API should be provided in separate router application classes.

ecorm avatar Apr 06 '15 18:04 ecorm

I have invested a significant amount of time implementing a c++ wamp router. You might want to sync up with me and have a look at it before getting too far down this path.

davidchappelle avatar Apr 13 '15 16:04 davidchappelle

@davidchappelle , thanks for reaching out! Is your router implementation hosted somewhere? Does it have a heavy dependency on boost::future and boost::any?

We might want to take a cue from Crossbar.io + Autobahn|JS, and make the C++ router its own project, with cppwamp as a submodules dependency.

Also, please be advised that I've overhauled the CppWAMP API to make better use of fluent API techniques. I humbly think the API is much cleaner now as a result, not to mention more extensible. I just need to update the documentation and tutorials, and will soon make a commit to the GitHub repo.

ecorm avatar Apr 13 '15 18:04 ecorm

@ecorm I haven't yet posted the router implementation publicly. Shouldn't be more than a few weeks out from doing so. I haven't added any client code at all to the project so it is purely a router implementation. I do not use boost::future or boost::any anywhere. I actually just used msgpack-c as a basis for variant types since that is essentially what it is anyways. It has support for websockets (via websocketpp) as well as rawsockets. Pretty much all of the basic profile is implemented and slowly chipping away at the advanced profile pieces.

davidchappelle avatar Apr 13 '15 18:04 davidchappelle

I won't be starting on a router implementation anytime soon. Our embedded system is powerful enough to handle Crossbar.io, so we can get by using it. In the long term, though, it would be preferable if we could use a natively-compiled router that doesn't have huge library and runtime dependencies.

ecorm avatar Apr 13 '15 18:04 ecorm

Ok perfect. I will notify the wamp implementation list as soon as I have something ready. FWIW, the c++ router is pretty lightweight and is likely more suitable for embedded applications. Current footprint of the binary is:

1.3MB unstripped
0.9 MB stripped

Dependencies are minimal and include:

boost asio
boost regex
boost system
websocketpp (header only)
msgpack-c (header only)
rapidjson (header only)

davidchappelle avatar Apr 13 '15 18:04 davidchappelle

bump, are things moving @davidchappelle ? You mentioned on the list a while ago that it was very close. I'd love to try it out :)

estan avatar May 09 '15 14:05 estan

Given the availability and active development of the Bonefish router, I will not be persuing router functionality for CppWAMP. CppWAMP will remain a client-only library in the foreseeable future.

ecorm avatar Nov 12 '15 19:11 ecorm

I'm now committed to adding router functionality to CppWAMP. In the parent project using CppWAMP, we wish to migrate to Buildroot where it's not possible to deploy recent versions of Crossbar. The currently available C++ routers don't support the features we need.

ecorm avatar Aug 13 '22 23:08 ecorm