crossbario / crossbario/autobahn-python

Add the ability to multiplex multiple ApplicationSessions over a single transport

Open
#856 10 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature needs-discussion
Dominant language
Python
Stars
2.5k
Forks
768
PR merge metrics
No merged PRs in 30d

Description

First of all, thank you for creating autobahn-python (and Crossbar). Autobahn-python is a great library and has been very helpful to our company. As we've been using autobahn-python, we've been investigating how to set ourselves up to be able to scale with increased usage. We believe we have some good options with being able to increase servers that should take care of most problems. Additionally, we want to make sure that we are able to fully utilize any servers that we are running.

We currently have the following setup:

  • Devices open a connection to a python web server.
  • The web server then uses autobahn-python to create a connection to Crossbar for each device that connects to the web server (using autobahn.asyncio.wamp.ApplicationSession and autobahn.asyncio.websocket.WampWebSocketClientFactory).

Given this model, we expect the number of connections from each python web server to Crossbar to grow to the tens of thousands. Since these are all essentially connections that come from the same place and go to the same place, it feels excessive to need tens of thousands of open TCP connections to maintain the ApplicationSessions.

Thus, this issue is a request to consider adding support for a single transport to be able to support multiple ApplicationSessions.

Digging through the autobahn-python codebase, it looked like the ApplicationSession was pretty well isolated from the underlying transport. It also felt like it is possible to write a version of a transport that manages allowing multiple ApplicationSessions to join the transport.

Are there plans to add support for allowing multiple sessions over a single transport? Are there any issues or design decisions that would prohibit this request?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading autobahn.asyncio.wamp.ApplicationSession and autobahn.asyncio.websocket.WampWebSocketClientFactory to trace how sessions currently connect to and use a transport. Define the session multiplexing and lifecycle behavior before identifying changes; done means multiple ApplicationSessions can share one transport instead of opening separate TCP connections.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
distributed-systems
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.