Coder Social home page Coder Social logo

itpc / lapps Goto Github PK

View Code? Open in Web Editor NEW
51.0 5.0 3.0 1.72 MB

LAppS - Lua Application Server for micro-services with default communication over WebSockets. The fastest and most vertically scalable WebSockets server implementation ever. Low latency C++ <-> Lua stack roundtrip.

License: GNU General Public License v3.0

Makefile 3.49% C++ 49.64% Shell 12.83% C 16.40% HTML 17.35% Lua 0.24% NASL 0.01% Python 0.05%
lua application-server micro-services micro-service-architecture websocket-server json-rpc2 cbor cpp17 c

lapps's Introduction

Coverity Scan Build Status

LAppS - Lua Application Server

This is an attempt to provide very easy to use Lua Application Server working over WebSockets protocol (RFC 6455). LAppS is an application server for micro-services architecture. It is build to be highly scalable vertically. The docker cloud infrastructure (kubernetes or swarm) shall be used for horizontal scaling. LAppS has most scallable WebSockets server out there.

LAppS is the same thing to WebSockets as the Apache or Nginx are to HTTP. LAppS does not supports HTTP (though it supports HTTP Upgrade GET request as per RFC 6455). The only supported scripting language so far is the Lua.

RFC 6455 is fully implemented. See the Conformance section.

RFC 7692 (compression extensions) is not implemented due to concerns about BREACH attacks. It is possible to have per-message compression on the LAppS protocol level without being affected by BREACH attacks.

LAppS is an easy way to develop low-latency web applications. Please see LAppS wiki and the examples on how to build your own applications.

Please see LAppS wiki on how to build and run LAppS from sources.

Latest stable release

0.9.5 04.01.2021 (with wolfssl-4.6.0) 0.9.4 01.01.2021 (with wolfssl-4.5.0)

Binaries

  • Ubuntu bionic or focal packages are available here.

Features

  • Fastest WebSocket stream parser in industry
  • Easy API for rapid development of backend services in lua, C or C++
  • High vertical scalability for requests parallelization
  • Several million client connections on one system
  • Higly tunable through simple JSON configuration files
  • Requests multiplexing on application level protocol
  • Copy-less high performance communications between services using MQR (an embedded shared queues) within one LAppS process
  • Two level Network ACL: Server-wide and service-specific

Services

Services are the Lua Applications. Each service may run parallel copies of itself (instances) to achieve maximum performance. The application have a choice of two protocols for clinet-server communications: RAW and LAppS.

RAW protocol behaviour is not specified and is not affected by LAppS (excluding control frames, those are never sent to the Lua Applications). It is for application to define how to handle inbound requests and how to react on them.

An optional LAppS protocol defines a framework similar to JSON-RPC, with following key differences:

  • Transport is the WebSockets
  • Exchange between server and client is encoded with CBOR
  • There are Out of Order Notifications (OON) available to serve as a server originated events. This makes it very easy to implement any kind of PUB/SUB services or the broadcasts.
  • LAppS defines channels as a means to distinguish type of the event streams for purposes of multiplexing data streams within WebSocket stream. For example channel 0 (CCH) is reserved for request-response stream. All other channels are defined by application and may or may not be synchron/asynchron, ordered or unordered (see the examples for OON primer with broadcast)

Conformance (and regression test results)

Autobahn TestSuite Results. No extensions are implemented yet

Further development

Roadmap will be ready soon. Next releases will include:

  • improved statistics on LAppS I/O
  • Support for services written in Python, PHP and JavaScript

Dependencies

  • ITCLib - LAppS suplimentary library (boost licensed)
  • lar - LAppS/Lazy archiver (boost licensed)
  • wolfSSL-4.6.0-stable (or later version)
  • luajit-2.0.5 or later version
  • libfmt-7.1.3 or later version for log-formatting
  • mimalloc library 1.6

Prerequisites

  • GCC or Clang with C++17 support

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.