Giter Site home page Giter Site logo

crossbario / crossbar Goto Github PK

View Code? Open in Web Editor NEW
2.0K 83.0 273.0 40.46 MB

Crossbar.io - WAMP application router

Home Page: https://crossbar.io/

License: Other

Makefile 0.33% Python 65.14% HTML 0.76% Shell 1.02% CSS 0.04% Gherkin 0.01% Dockerfile 0.01% JavaScript 30.41% Mustache 0.03% Jupyter Notebook 2.24% COBOL 0.01% Solidity 0.01%
websocket wamp messaging mqtt rest server broker networking-stack networking

crossbar's Introduction

Crossbar.io

Decentralized Middleware

Crossbar.io is an open source networking platform for distributed and microservice applications. It implements the open Web Application Messaging Protocol (WAMP), is feature rich, scalable, robust and secure. Let Crossbar.io take care of the hard parts of messaging so you can focus on your app's features.

Version Test Deploy (wheels) Deploy (docs) Docs

Resources

Docker images

JSON Schema for Crossbar.io Configuration File Format

We now have a JSON Schema file available for config.json, if you're using VSCode you can make use of this by adding the following to your VSCode settings; (File -> Preferences -> Settings)

"json.schemas": [
    {
        "fileMatch": [
            "/config.json",
            "/.config.json"
        ],
        "url": "https://raw.githubusercontent.com/crossbario/crossbar/master/crossbar.json"
    }
],

Alternatively, the generic approach is to insert a "$schema" line at the top of your file;

{
    "$schema": "https://raw.githubusercontent.com/crossbario/crossbar/master/crossbar.json",
    "version": 2,

This file is currently experimental, but it should give you contextual auto-completion on all Crossbar config.json syntax, use CTRL+Space in VSCode to activate IntelliSense.


Copyright (C) 2013-2021 Crossbar.io Technologies GmbH. All rights reserved. WAMP, Crossbar.io and XBR are trademarks of Crossbar.io Technologies GmbH.

crossbar's People

Contributors

agronholm avatar antonymott avatar bastian-krause avatar cannuhlar avatar chrisbarber avatar codelectron avatar davidwdan avatar dodobibi avatar fijal avatar firefighterblu3 avatar goeddea avatar hawkowl avatar markope avatar marvin-bitterlich avatar mbonneau avatar meejah avatar mickvanduijn avatar oberstet avatar oddjobz avatar om26er avatar pawankaushal avatar sehoffmann avatar siscia avatar skully17 avatar taueres avatar touilleman avatar w1z2g3 avatar wilbertom avatar yankos avatar yoch avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

crossbar's Issues

Instrumentation

  • host monitoring (CPU/mem/net load)
  • transports status and statistics
  • compression ratios
  • router and realm statistics
  • RPC timings and call statistics
  • per-topic event statistics

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

Cannot start Crossbar 0.8.3 - import errors

Hello,

I've been having trouble installing and starting the crossbar server. The installation from source seems to go ok. However in both cases I cannot start the server due to import errors (see bottom).

Platform

[oraweb@svr-ora-01 ~]$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)
[oraweb@svr-ora-01 ~]$ cat /etc/oracle-release
Oracle Linux Server release 6.4
[oraweb@svr-ora-01 ~]$

Easy Install (cannot find init.py)

[root@svr-ora-01 crossbar-0.8.3]# easy_install crossbar
Processing crossbar
Running setup.py -q bdist_egg --dist-dir /root/crossbar-0.8.3/crossbar/egg-dist-tmp-xPVEXc
package init file 'twisted/plugins/init.py' not found (or not a regular file)
Adding crossbar 0.8.3 to easy-install.pth file
Installing crossbar script to /usr/bin

Installed /usr/lib/python2.6/site-packages/crossbar-0.8.3-py2.6.egg
Processing dependencies for crossbar==0.8.3
Finished processing dependencies for crossbar==0.8.3

Errors: Cannot start crossbar server - import errors

[root@svr-ora-01 crossbar]# crossbar start --server ws://127.0.0.1:9000 -password secret
Traceback (most recent call last):
File "/usr/bin/crossbar", line 9, in
load_entry_point('crossbar==0.8.3', 'console_scripts', 'crossbar')()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 299, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 2229, in load_entry_point
return ep.load()
File "/usr/lib/python2.6/site-packages/pkg_resources.py", line 1948, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.6/site-packages/crossbar-0.8.3-py2.6.egg/crossbar/init.py", line 22, in
import logger
File "/usr/lib/python2.6/site-packages/crossbar-0.8.3-py2.6.egg/crossbar/logger.py", line 26, in
from crossbar.adminwebmodule.uris import URI_EVENT
File "/usr/lib/python2.6/site-packages/crossbar-0.8.3-py2.6.egg/crossbar/adminwebmodule/init.py", line 21, in
import appcreds
File "/usr/lib/python2.6/site-packages/crossbar-0.8.3-py2.6.egg/crossbar/adminwebmodule/appcreds.py", line 20, in
from autobahn.wamp import exportRpc
ImportError: cannot import name exportRpc

Thanks in advance fro any assistance.

Jan S.

Support HTTP -> HTTPS Redirect

Currently, the built-in Web and WebSocket servers can be configured for either non-secure or secure operation.

A mode would be nice, where Web/WebSocket still listens on insecure ports, but immediately forward to secure ports.

Linux Install Guide - proposed Wiki update for Redhat, Oracle, CentOS

Hello,

I was trying to install crossbar on Linux (Oracle 6.4, Redhat 6.4, CentOS 6.4) and ran into a few issues.

I propose the following updates to the wiki documentation

For the build to succeed using the simple command pip install crossbar, you require the following python(if not already up to date) and linux packages.

> yum install libffi-devel -y

pip upgrade twisted
pip install ez_setup
pip install six
pip install pyopenssl
pip install pycrypto
pip install wsaccel
pip install ujson
pip upgrade distribute

> pip install crossbar

JS

Out-of-memory issue

Tonight, a Clandeck worker process was killed by Linux out-of-memory manager.

Crossbar log:

2014-05-15 03:23:35+0000 [Controller  17782] Worker 17791: Process connection gone (A process has ended with a probable error condition: process ended by signal 9.)

Linux kernel log:

grep -Hi kill /var/log/*.log

/var/log/kern.log:May 15 03:23:34 ip-10-74-141-149 kernel: [138938.850931] Crossbar.io Wor invoked oom-killer: gfp_mask=0x201da, order=0, oom_score_adj=0
/var/log/kern.log:May 15 03:23:34 ip-10-74-141-149 kernel: [138938.850963]  [<ffffffff81142449>] oom_kill_process+0x1a9/0x310
/var/log/kern.log:May 15 03:23:34 ip-10-74-141-149 kernel: [138938.856958] Out of memory: Kill process 17791 (Crossbar.io Wor) score 595 or sacrifice child
/var/log/kern.log:May 15 03:23:34 ip-10-74-141-149 kernel: [138938.856967] Killed process 17791 (Crossbar.io Wor) total-vm:2901316kB, anon-rss:2281184kB, file-rss:0kB

It's unclear what was causing the run away of memory consumption ... needs investigation.

Background:

Default includes OP_DONT_INSERT_EMPTY_FRAGMENTS

tlsctx uses OP_DONT_INSERT_EMPTY_FRAGMENTS. Is that intentional? It seems that would disable mitigations. The only reason you'd do so is communicating with broken SSL stacks that don't understand empty fragments; is that necessary for crossbar?

Crossbar.io Roadmap

We should have a published roadmap, so users can see whats coming up .. and to collect early feedback.

WebSocket options in transport

CB1 allows to set a whole bunch of WebSocket parameters and options.

CB2 should provide this on a per-transport basis.

BUG: commands init & start fail with error

Hello,
I was trying the first steps and the init and start commands fail.
The init command throws an error but the .crossbar folder is still created. However the start command fails completely.

Crossbar Info

Crossbar.io software versions:

Crossbar.io : 0.9.2
Autobahn : 0.8.8
Twisted : 13.2.0-EPollReactor
Python : 2.6.6
UTF8 Validator : autobahn
XOR Masker : autobahn

Platforms

Arch: x86_64
OS: Redhat Linux 6.4, CentOS 6.4 & Oracle Linux 6.4

BUG Output : crossbar init

> mkdir -p ~/crossbar/test1

> cd ~/crossbar/test1

> crossbar init

Traceback (most recent call last):
File "/usr/bin/crossbar", line 9, in
load_entry_point('crossbar==0.9.2', 'console_scripts', 'crossbar')()
File "/usr/lib/python2.6/site-packages/crossbar/cli.py", line 283, in run
options.func(options)
File "/usr/lib/python2.6/site-packages/crossbar/cli.py", line 132, in run_command_init
print("Crossbar.io node initialized at {}".format(os.path.abspath(options.cbdir)))
ValueError: zero length field name in format

> ls -la

[root@svr-dev-01test1]# ls -la
total 12
drwxr-xr-x. 3 root root 4096 Apr 16 15:01 .
drwxr-xr-x. 3 root root 4096 Apr 16 14:43 ..
drwxr-xr-x. 2 root root 4096 Apr 16 15:01 .crossbar

SAME EROR WITH

> cd ~/crossbar

> crossbar init --cbdir ./test1

BUG Output : crossbar start

[root@svr-dev-01 crossbar]# crossbar start
Traceback (most recent call last):
File "/usr/bin/crossbar", line 9, in
load_entry_point('crossbar==0.9.2', 'console_scripts', 'crossbar')()
File "/usr/lib/python2.6/site-packages/crossbar/cli.py", line 283, in run
options.func(options)
File "/usr/lib/python2.6/site-packages/crossbar/cli.py", line 151, in run_command_start
flo = DefaultSystemFileLogObserver(logfd, system = "Controller {}".format(os.getpid()))
ValueError: zero length field name in format

Same Error

crossbar start --cbdir test1/.crossbar

I'm avaialble to test any solutions provided.

JS

Automatic restart of workers

Currently, the controller won't automatically restart workers.

There should be a configurable policy: like try to restart workers automatically, with max. retries, max. retries per hour etc

Config option for Worker Environment Vars

E.g. to control the GC of PyPy, we want to set environment variables of Workers via the configuration.

We also want to control whether the parent environment is replicated to the Worker.

Static Web + WebSocket

CB1 provides a builtin Web server, which allows to host static content, and serve WebSocket from a path - all from the same port.

Set Worker Process Name from Config

We want to be able to set the Process name of a Worker (as seen in ps or top) via the configuration. This lets admins more easily inspect live systems.

program subpaths

{
   "type": "web",
   "endpoint": "tcp:8080",
   "paths": {
      "/": {
         "type": "static",
         "directory": ".."
      },
      "calc": {
         "type": "websocket2stdio",
         "url": "ws://localhost:8080/ws",
         "program": "myprogram --awesome"
      }
   }
}

Authentication timeouts

So there are 2 related things here:

  1. we have timeouts for clients connecting via WebSocket for finishing the WebSocket opening handshake - but we do not have timeouts for finishing the initial WAMP authentication handshake (everything before the session is actually joined to a realm). this opens a DoS surface a rogue client might exploit
  2. dynamic authenticators can take time to return, and since the call into a user provided dynamic authenticator happens during the initial WAMP authentication handshake, that would be already covered by 1. - but we might also want to provide a knob (node configuration) to limit the time CB waits for an authenticator call to return (and cancel the call, and deny the client when the timeout hits)

fix windows

$ crossbar start
2014-03-01 18:01:36+0100 [-] Log opened.
2014-03-01 18:01:38+0100 [-] Unhandled error in Deferred:
2014-03-01 18:01:38+0100 [-] Unhandled Error
Traceback (most recent call last):
File "c:\Python27\Scripts\crossbar-script.py", line 9, in
load_entry_point('crossbar==0.9.0', 'console_scripts', 'crossbar')()
File "c:\Python27\lib\site-packages\crossbar-0.9.0-py2.7.egg\crossbar\cli.py", line 330, in run
options.func(options)
File "c:\Python27\lib\site-packages\crossbar-0.9.0-py2.7.egg\crossbar\cli.py", line 203, in run_command_start
d = ep.connect(transport_factory)
--- ---
File "c:\Python27\lib\site-packages\twisted\internet\endpoints.py", line 421, in connect
self._gid, self._usePTY, self._childFDs)
File "c:\Python27\lib\site-packages\twisted\internet\iocpreactor\reactor.py", line 254, in spawnProcess
"Custom child file descriptor mappings are unsupported on "
exceptions.ValueError: Custom child file descriptor mappings are unsupported on this platform.

Subpath hierachies

Currently, Web transport path configuration cannot nest paths.

We could have a new subpath type path, which can serve as parent to other services:

{
   "type": "web",
   "endpoint": "tcp:8080",
   "paths": {
      "/": {
         "type": "static",
         "directory": ".."
      },
      "wamp": {
         "type": "path",
         "paths": {
            "ws": {
               "type": "websocket",
               "url": "ws://localhost:8080/ws"
            },
            "lp": {
               "type": "longpoll",
               "url": "ws://localhost:8080/ws"
            }
         }
      }
   }
}

cbdir bug

crossbar start --cbdir community/.crossbar

with class components does not work.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.