Permalink
Browse files

fixes merge conflict

  • Loading branch information...
2 parents fb26c74 + c1eca47 commit d5180689a733ddc51611e3ce7e73447e1669baf3 @goeddea goeddea committed May 14, 2016
Showing with 195 additions and 1,366 deletions.
  1. +4 −2 README.md
  2. +0 −6 doc/.gitignore
  3. +0 −76 doc/Makefile
  4. +182 −11 doc/README.md
  5. +0 −110 doc/SConstruct
  6. +0 −101 doc/_templates/layout.html
  7. +0 −33 doc/_templates/side-primary.html
  8. +0 −425 doc/conf.py
  9. +0 −17 doc/contents.rst
  10. +3 −0 doc/examples.md
  11. +0 −96 doc/examples.rst
  12. +3 −0 doc/gettingstarted.md
  13. +0 −4 doc/gettingstarted.rst
  14. +0 −171 doc/index.rst
  15. +0 −242 doc/make.bat
  16. +3 −0 doc/reference.md
  17. +0 −4 doc/reference.rst
  18. +0 −68 doc/serve.py
View
@@ -1,6 +1,8 @@
# **Autobahn**|Cpp
-**Autobahn**|Cpp is a subproject of [Autobahn](http://autobahn.ws/) which implements the [Web Application Messaging Protocol (WAMP)](http://wamp.ws/) in C++ supporting the following application roles
+> This documentation is quite outdated (and also woefully incomplete). When in doubt ask on the [mailing list](https://groups.google.com/forum/#!forum/autobahnws) or read the code!
+
+**Autobahn**|Cpp is a subproject of [Autobahn](http://autobahn.ws/) which provides a C++ [WAMP](http://wamp.ws/) implementation that is able to talk WAMP over `stdio` pipes.
* **Caller**
* **Callee**
@@ -124,7 +126,7 @@ Then make Clang available:
```console
oberstet@corei7ub1310:~$ sudo update-alternatives --config c++
-[sudo] password for oberstet:
+[sudo] password for oberstet:
Es gibt 3 Auswahlmöglichkeiten für die Alternative c++ (welche /usr/bin/c++ bereitstellen).
Auswahl Pfad Priorität Status
View
@@ -1,6 +0,0 @@
-_build
-_upload
-_test
-_spelling
-_static/img/gen
-.sconsign.dblite
View
@@ -1,76 +0,0 @@
-all:
- @echo "Targets:"
- @echo ""
- @echo " clean : cleanup build artifacts"
- @echo " test : build everything and run locally"
- @echo " test_no_network : build everything for no network access and run locally"
- @echo " publish : build everything and publish to S3"
- @echo " copy : copy over shared files to other AutobahnXXX repos"
- @echo " install_deps : install build dependencies"
- @echo " spelling : run spell checking"
- @echo " doctest : run doctests"
- @echo ""
-
-build:
- scons
-
-build_no_network:
- scons --no_network
-
-test: build
- python serve.py --root ./_build --silence
-
-test_no_network: build_no_network
- python serve.py --root ./_build --silence
-
-clean:
- rm -rf _build
- rm -rf _build_uploaded
- rm -rf _static/img/gen
- rm -rf _test
- rm -rf _spelling
-
-publish: clean build
- scons publish
-
-doctest:
- PYTHONPATH=../autobahn sphinx-build -b doctest -v . _test
-
-copy_makefile:
- cp Makefile ../../AutobahnJS/doc/
- cp Makefile ../../AutobahnAndroid/doc/
- cp Makefile ../../AutobahnCpp/doc/
- cp Makefile ../../AutobahnTestsuite/doc/
-
-copy_gitignore:
- cp .gitignore ../../AutobahnJS/doc/
- cp .gitignore ../../AutobahnAndroid/doc/
- cp .gitignore ../../AutobahnCpp/doc/
- cp .gitignore ../../AutobahnTestsuite/doc/
-
-copy_serve:
- cp serve.py ../../AutobahnJS/doc/
- cp serve.py ../../AutobahnAndroid/doc/
- cp serve.py ../../AutobahnCpp/doc/
- cp serve.py ../../AutobahnTestsuite/doc/
-
-# copy_readme:
-# cp README.md ../../AutobahnJS/doc/
-# cp README.md ../../AutobahnAndroid/doc/
-# cp README.md ../../AutobahnCpp/doc/
-# cp README.md ../../AutobahnTestsuite/doc/
-
-copy: copy_makefile copy_gitignore copy_serve
-
-install_deps:
- pip install -U scour
- pip install -U taschenmesser
- #pip install -U scons
- pip install -U sphinx
- pip install -U sphinx-bootstrap-theme
- pip install -U pyenchant
- pip install -U sphinxcontrib-spelling
- pip install -U repoze.sphinx.autointerface
-
-spelling:
- PYTHONPATH=../autobahn sphinx-build -b spelling . _spelling
View
@@ -1,17 +1,188 @@
-# Documentation
+<<<<<<< HEAD:doc/index.rst
+|ab|
+====
-The documentation is generated using [Sphinx](http://sphinx.pocoo.org/) and the generated documentation is hosted [here](http://autobahn.ws/cpp).
+|ab| is a networking library for C++ created by the `Autobahn project <http://autobahn.ws/>`_ that implements the `Web Application Messaging Protocol (WAMP) <http://wamp.ws/>`_ for creating C++ components communicating with a WAMP router via Unix pipes.
-## Prerequisites
+|ab| is open-source software licensed under the `Boost Software License 1.0 <http://opensource.org/licenses/BSL-1.0>`__.
+=======
+Autobahn|CPP Documentation
+==================
-You will need to have Python and [SCons](http://www.scons.org/) installed. To install the rest of the build dependencies
+> This documentation is quite outdated (and also woefully incomplete). When in doubt ask on the [mailing list](https://groups.google.com/forum/#!forum/autobahnws) or read the code!
-```sh
-make install_deps
-```
+> Contributions to this documentation are highly welcome!
-Then, to get help on available build targets, just type
-```sh
-make
-```
+Autobahn|CPP is an open-source networking library for C++ created by the [Autobahn project ](http://autobahn.ws/) that implements the [Web Application Messaging Protocol (WAMP)]( http://wamp.ws/) for creating C++ components communicating with a WAMP router via Unix pipes.
+
+>>>>>>> c1eca4746fbee616d6d76eea4c98381ad8e6dccd:doc/README.md
+
+Web Application Messaging Protocol (WAMP)
+-----------------------------------------
+
+WAMP is ideal for distributed, multi-client and server applications, such as multi-user database-drive business applications, sensor networks (IoT), instant messaging or MMOGs (massively multi-player online games) .
+
+WAMP enables application architectures with application code distributed freely across processes and devices according to functional aspects. Since WAMP implementations exist for multiple languages, WAMP applications can be polyglot. Application components can be implemented in a language and run on a device which best fit the particular use case.
+
+To enable this, WAMP implements both the Remote Procedure Call (RPC) and and the Publish and Subscribe (PubSub) messaging pattern.
+
+|ab| supports the following application roles:
+
+* **Caller**
+* **Callee**
+* **Publisher**
+* **Subscriber**
+
+
+Show me some code!
+------------------
+
+Here is what programming with C++ and |ab| looks like.
+
+**Calling a remote Procedure**
+
+.. code-block:: cpp
+
+ auto c1 = session.call("com.mathservice.add2", {23, 777})
+ .then(
+ [&](future<any> f) {
+ cout << "Got call result " << any_cast<uint64_t> (f.get()) << endl;
+ });
+
+
+
+**Registering a remoted Procedure**
+
+.. code-block:: cpp
+
+ auto r1 = session.provide("com.myapp.cpp.square",
+ [](const anyvec& args, const anymap& kwargs) {
+ cout << "Procedure is invoked .." << endl;
+ uint64_t x = any_cast<uint64_t> (args[0]);
+ return x * x;
+ })
+ .then(
+ [](future<registration> reg) {
+ cout << "Registered with ID " << reg.get().id << endl;
+ });
+
+
+**Publishing an Event**
+
+.. code-block:: cpp
+
+ session.publish("com.myapp.topic2", {23, true, string("hello")});
+
+
+**Publishing an Event (acknowledged)**
+
+.. code-block:: cpp
+
+ auto opts = PublishOptions();
+ opts.acknowledge = True;
+
+ auto p1 = session.publish("com.myapp.topic2", {23, true, string("hello")}, opts)
+ .then(
+ [](future<publication> pub) {
+ cout << "Published with ID " << pub.get().id << endl;
+ });
+
+
+**Subscribing to a Topic**
+
+.. code-block:: cpp
+
+ auto s1 = session.subscribe("com.myapp.topic1",
+ [](const anyvec& args, const anymap& kwargs) {
+ cout << "Got event: " << any_cast<uint64_t>(args[0]) << endl;
+ })
+ .then(
+ [](future<subscription> sub) {
+ cout << "Subscribed with ID " << sub.get().id << endl;
+ });
+
+
+
+Here is JavaScript running in Chrome call into C++ running on command line. Both are connected via a WAMP router, in this case `Autobahn|Python <http://autobahn.ws/python>`_ based.
+
+.. image:: /_static/img/cpp_from_js.png
+
+* `Example C++ code <https://github.com/crossbario/autobahn-cpp/blob/master/examples/register2.cpp>`_
+* `Example JavaScript code <https://github.com/crossbario/autobahn-cpp/blob/master/examples/index.html>`_
+
+
+Download
+--------
+
+To get |ab| library and examples, clone the repo
+
+.. code-block:: console
+
+ shell
+ cd $HOME
+ git clone git@github.com:crossbario/autobahn-cpp.git
+ cd AutobahnCpp
+
+
+The library is "header-only", means there isn't anything to compile or build. Just include the relevant headers.
+
+
+Technology
+----------
+
+The API and implementation make use of modern C++ 11 and new asynchronous idioms using (upcoming) features of the standard C++ library, in particular **Futures**, `Continuations <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2013/n3634.pdf>`_ and **Lambdas**.
+
+.. note:: `Continuations <http://en.wikipedia.org/wiki/Continuation>`_ are *one* way of managing control flow in an asynchronous program. Other styles include: asynchronous `Callbacks <http://en.wikipedia.org/wiki/Callback_%28computer_programming%29>`_, `Coroutines <http://en.wikipedia.org/wiki/Coroutine>`_ (`yield` or `await`), Actors (`Erlang/OTP <http://www.erlang.org/>`_, `Scala <http://www.scala-lang.org/>`_/`Akka <http://akka.io/>`_ or `Rust <http://www.scala-lang.org/>`_) and `Transactional memory <http://en.wikipedia.org/wiki/Transactional_Synchronization_Extensions>`_.
+
+|ab| supports running WAMP (``rawsocket-msgpack``) over **TCP(-TLS)**, **Unix domain sockets** or **pipes** (``stdio``). The library is "header-only", light-weight (< 2k code lines) and **depends on** the following:
+
+* C++ 11 compiler
+* `boost::future <http://www.boost.org/doc/libs/1_55_0/doc/html/thread/synchronization.html#thread.synchronization.futures>`_
+* `boost::any <http://www.boost.org/doc/libs/1_55_0/doc/html/any.html>`_
+* `boost::asio <http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio.html>`_
+
+
+
+Get in touch
+------------
+
+Get in touch on IRC `#autobahn` on `chat.freenode.net`, follow us on `Twitter <https://twitter.com/autobahnws>`_ or join the `mailing list <http://groups.google.com/group/autobahnws>`_.
+
+
+Resources
+---------
+
+* `ASIO C++11 Examples <http://www.boost.org/doc/libs/1_55_0/doc/html/boost_asio/examples/cpp11_examples.html>`_
+* `Using Asio with C++11 <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2012/n3388.pdf>`_
+* `C++17: I See a Monad in Your Future! <http://bartoszmilewski.com/2014/02/26/c17-i-see-a-monad-in-your-future/>`_
+* `Boost Thread <http://www.boost.org/doc/libs/1_55_0/doc/html/thread.html>`_
+* `Boost Issue: when_all <https://svn.boost.org/trac/boost/ticket/7447>`_
+* `Boost Issue. when_any <https://svn.boost.org/trac/boost/ticket/7446>`_
+* `Boost Issue: future fires twice <https://svn.boost.org/trac/boost/ticket/9711>`_
+* `Boost C++ 1y <http://www.boost.org/doc/libs/1_55_0/doc/html/thread/compliance.html#thread.compliance.cxx1y.async>`_
+* `Asynchronous API in C++ and the Continuation Monad <https://www.fpcomplete.com/blog/2012/06/asynchronous-api-in-c-and-the-continuation-monad>`_
+
+
+<<<<<<< HEAD:doc/index.rst
+
+.. toctree::
+ :maxdepth: 2
+ :hidden:
+
+ Home <self>
+ gettingstarted
+ building
+ examples
+ reference
+
+
+Indices and tables
+==================
+
+* :ref:`genindex`
+* :ref:`search`
+
+=======
+To enable this, WAMP implements both the Remote Procedure Call (RPC) and and the Publish and Subscribe (PubSub) messaging pattern. WAMP is open source, as is Autobahn|CPP (Apache 2.0 license).
+>>>>>>> c1eca4746fbee616d6d76eea4c98381ad8e6dccd:doc/README.md
Oops, something went wrong.

0 comments on commit d518068

Please sign in to comment.