Uploaded image for project: 'FreeSWITCH'
  1. FreeSWITCH
  2. FS-10690

Integrate robust and convenient REST webservice


    • Type: New Feature
    • Status: New
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: libblade, libks
    • Labels:
    • CPU Architecture:
    • Kernel:
      Linux, Microsoft Windows
    • Userland:
      GNU/Linux, Microsoft Windows
    • Distribution:
      Debian, Microsoft Windows
    • Distribution Version:
      Debian 8 jessie, Microsoft Windows 10
    • lsb_release:
      No LSB modules are available.
      Distributor ID: Debian
      Description: Debian GNU/Linux 8.7 (jessie)
      Release: 8.7
      Codename: jessie
      No LSB modules are available. Distributor ID: Debian Description: Debian GNU/Linux 8.7 (jessie) Release: 8.7 Codename: jessie
    • Compiler:
      gcc, Microsoft Visual Studio
    • FreeSWITCH GIT Revision:
    • GIT Master Revision hash::


      Integrate support for a robust REST based webservice into Blade, with the intent to bridge between REST requests and Blade operations such as for translation from a REST GET request into a Blade RPC execute.

      Should support callback registration for specific REST endpoint mapping.
      Should support some method of easily mapping arbitrary session ids to blade identities to ease the last mile of message routing.

      - Embeddable C Library, with a very simple runtime API
      - MIT Licensed
      - Uses OpenSSL
      - Supports Windows natively via VisualStudio (not cygwin)
      - Supports chunked transfers
      - Single source file
      - Simple operation through config options and registering callbacks
      - Multiple built-in ways to react to requests beyond C API's, including database driven, Lua scripted, Javascript, and external CGI engines
      - Supports client side X509 certificate authentication
      - Contains a WebSocket client that could replace KWS with a more robust functionality to allow inline upgrading from stateless REST to WSS on the Blade transport
      - Additional useful features for REST service support, including blacklist, ACL, and hookable authentication and authorization

      - Does not appear to support dynamic runtime matching for service endpoints using inline parameters such as "/entity/{id}"
        Contacted author, they are reviewing the use of Lua pattern matching to provide more robust solution which addresses this.
      - Does not support HTTP/2, but very few libraries do currently

      - Hook civetweb callbacks internally for init_connection and close_connection to wrap in lifecycle managed ID-based lookup hash, use this for async operations where the REST connection may disconnect during the operation
      - Hook civetweb callback begin_request and provide new REST-friendly registration and request callbacks that respect action verbs and can be updated easier for additional header or config based endpoint matching
      - Provide mechanism for allowing REST-based protocols to be registered within the Blade ecosystem, extend protocol directory entries to include registration of non-blade protocols and arbitrary information to be included when the protocol is located, this can extend beyond REST registered protocols which are located through Blade but transported directly outside of Blade




            • Assignee:
              anthm Anthony Minessale II
              SBryldt Shane Bryldt
            • Votes:
              0 Vote for this issue
              4 Start watching this issue


              • Created: