Giter Site home page Giter Site logo

mws's Introduction

MWS Server Build Status

Open source version of Qt Cloud Services: Managed WebSocket.

Note: this server will only support one websocket gateway (no multi-tenancy).

Deploying to Qt Cloud Services

  • create a new MAR application
  • add MAR git remote
    • git remote add qtc <git remote from console>
  • create a new MDB Redis database
  • set following environment variables to MAR application:
    • REDIS_HOST=<mdb redis host>
    • REDIS_PORT=<mdb redis port>
    • REDIS_PASSWORD=<mdb redis password>
    • APP_DOMAIN=<mar app domain>
    • SECURITY_TOKEN=<admin token, generate with your favorite tool>
    • ACCESS_CONTROL=<none/eds/custom>
      • none public websocket
      • eds valid EDS OAuth2 token is required and checked against EDS_PERMISSIONS rules
      • custom server side code can deliver websockets to clients using SECURITY_TOKEN
    • set following only when ACCESS_MODE=eds
      • EDS_BACKEND_ID=<EDS backend id>
      • EDS_PERMISSIONS=<EDS permissions json, for example: {"read": ["*"], "write": ["usergroups.123123123"]}>
  • deploy to MAR
    • git push qtc master

Development

To run server:

bundle install
puma start

To run tests:

rspec spec/

License

MIT

mws's People

Contributors

miskun avatar kreios4004 avatar

Stargazers

Marthala vishnu vardhan reddy avatar SwhGo_oN avatar  avatar Stanislav (Stas) Katkov avatar Jukka Kinnunen avatar Herald avatar Eugene avatar Glum Psyche avatar Samuel Isuani avatar Luis Gustavo S. Barreto avatar Cyrus avatar Penk Chen avatar  avatar Adnan RIHAN avatar  avatar Timur Ibatullin avatar  avatar

Watchers

Luis Gustavo S. Barreto avatar Cyrus avatar James Cloos avatar Jari Kolehmainen avatar Harri Eronen avatar Jukka Kinnunen avatar  avatar Jussi Nummelin avatar  avatar  avatar  avatar

mws's Issues

Calling GET /v1/sockets returns invalid JSON

Calling get with the proper authentication settings results in an invalid JSON object. Below is the output I get from the server:

{
"results": [
"<Websocket_client id: 20860, socket_id: "de24921c44f374b04418558875f3e906def4e2eee64dfc77d8c84c094d8157d4", created_at: 2015-06-10T12:15:58-05:00, tags: ["users.admin"]>",
"<Websocket_client id: 20910, socket_id: "aa0eeb78506bc24440ade1d83aa1e901b7996a00db2a40823e2b8950e46b1190", created_at: 2015-06-10T15:20:18-05:00, tags: ["2", "users.admin"]>",
"<Websocket_client id: 20922, socket_id: "ccaa1bb7f9f5d89079774d1a19d833c68545b1192b7fff76a2df4b44402a31da", created_at: 2015-06-10T16:26:12-05:00, tags: ["2", "users.admin"]>",
"<Websocket_client id: 21071, socket_id: "72de2177bd9e19c828c0c53d36ddd3b5d70878cc5e807d4170628f8f0e9be3b8", created_at: 2015-06-11T11:33:35-05:00, tags: ["123456", "users.admin"]>"
]
}

Documentation Bug with ACCESS_MODE

The environment variable "ACCESS_MODE" is not used in the code but it is mentioned in the README.md. It looks like "ACCESS_MODE" should be replaced with "ACCESS_CONTROL".

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.