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.

Overview
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
Issues
  • Wider binary compatibility

    Wider binary compatibility

    Hello,

    I cannot run your pre-compiled Ubuntu binaries since I don't have SSE3 or AVX2 it seems. I just get the classic Illegal instruction (core dumped) when I run any of the binaries.

    You mind providing a binary more compatible? SSE2 or AVX(1) would run on my laptop and probably many more.

    bug enhancement 
    opened by ghost 13
  • Update benchmark results

    Update benchmark results

    Hello,

    Just going to point out that a major release of uWebSockets has been out for a few months now.

    It should give you a lot better results in your tests.

    Would be nice if you updated the readme accordingly.

    opened by ghost 4
  • Coverty 346042, 346043 Unchecked return value from library

    Coverty 346042, 346043 Unchecked return value from library

    The function returns a value that indicates an error condition. If this is not checked, the error condition may not be handled correctly.

    In LAppS::​ClientWebSocket::​wsConnect(): Value returned from a library function is not checked for errors before being used. This value may indicate an error condition. (CWE-252)

    At include/ClientWebSocket.h:479 At include/ClientWebSocket.h:519

    opened by pkpro 1
  • Crypto++7.0.0 is not available under ubuntu-bionic, causing CryptoPP::byte typedef to be invalid

    Crypto++7.0.0 is not available under ubuntu-bionic, causing CryptoPP::byte typedef to be invalid

    Crypto++7.0.0 is not available under ubuntu-bionic, causing CryptoPP::byte typedef to be invalid.

    Crypto++5.6.x does not checks for __GNUC_PREREQ(7,0)

    Support for Crypto++7.0.0 must be discarded as the library does not provide the version information.

    bug 
    opened by pkpro 1
  • Upstream, no disconnect after OpCode::CLOSE exchange, connection is kept by server

    Upstream, no disconnect after OpCode::CLOSE exchange, connection is kept by server

    Upstream, no disconnect after OpCode::CLOSE exchange, connection is kept by server.

    To Reproduce Run the autoban testsuite

    Expected behavior

    Immediate disconnect after sending OpCode::CLOSE.

    opened by pkpro 1
  • 0.9.6

    0.9.6

    New features:

    1. IPv6 support. (ACL filters for IPv6 are not implemented yet)
    2. URI parser. (fast and proper URI parsing, see the testcases)
    3. Code cleanup and sanitation
    opened by pkpro 0
  • console service implementation

    console service implementation

    An administrative console service is required for services network deployment and services management. In addition this console service must provide monitoring on resource usage and LAppS performance statistics.

    enhancement 
    opened by pkpro 0
Releases(0.9.4)
  • 0.9.4(Jan 1, 2021)

    Release 0.9.4

    • Dependency to ITCFramework is removed, and ITCFramework is discontinued (all usefull parts are moved to ITCLib)
    • Logging subsystem is changed, dependency to libfmt is added. Async logging is about 2-3.5 times faster then spdlog with thread count greater then 2. Formatting functionality same as in spdlog
    • ITCLib cleaned from obsolete files.
    • Lot of bug-fixes pointed by clang static code analyzer and the coverty code analyzer

    This release is requires even less RAM and storage space then before (0.9.3/0.9.4 packages are 10x smaller then 0.9.0, and 0.9.4 on some KBs smallers then 0.9.3)

    Source code(tar.gz)
    Source code(zip)
Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and 10K connections problem solution

CppServer Ultra fast and low latency asynchronous socket server & client C++ library with support TCP, SSL, UDP, HTTP, HTTPS, WebSocket protocols and

Ivan Shynkarenka 867 Aug 8, 2022
Enabling services on your device 70 Jul 31, 2022
Flexible low latency all-in-one arcade USB adaptor

Imperium Imperium aims to be a flexible low latency all-in-one arcade USB adaptor. The project started out as a replacement controller for the Micro C

Doug Stevens 4 May 24, 2022
mTCP: A Highly Scalable User-level TCP Stack for Multicore Systems

README mTCP is a highly scalable user-level TCP stack for multicore systems. mTCP source code is distributed under the Modified BSD License. For more

null 1.8k Aug 11, 2022
🌱Light and powerful C++ web framework for highly scalable and resource-efficient web application. It's zero-dependency and easy-portable.

Oat++ News Hey, meet the new oatpp version 1.2.5! See the changelog for details. Check out the new oatpp ORM - read more here. Oat++ is a modern Web F

Oat++ 5.6k Aug 10, 2022
The project consists in a client/server architecture voice over IP application, similar to Skype or TeamSpeak.

Babel The project consists in a client/server architecture voice over IP application, similar to Skype or TeamSpeak. Build and Run the Project First y

Benjamin Reigner 1 Jan 17, 2022
A Tcp/Ip stack implementation on top of Solarflare ef_vi, and a C++ headers only framework for tcp multiplexing client/server.

Efvitcp Efvitcp is a tcp library using Solarflare ef_vi interface on linux, and also a tcp multiplexing framework for both C++ client and server progr

Meng Rao 19 Jul 25, 2022
C library for easy WebSockets server.

libwebsock C library for easy WebSockets servers. This library allows a developer to quickly develop WebSocket servers by focusing on the actual logic

Payden Sutherland 205 Apr 23, 2022
Wangle is a framework providing a set of common client/server abstractions for building services in a consistent, modular, and composable way.

Wangle C++ networking library Wangle is a library that makes it easy to build protocols, application clients, and application servers. It's like Netty

Facebook 2.9k Aug 9, 2022
Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services.

Pushpin is a reverse proxy server written in C++ that makes it easy to implement WebSocket, HTTP streaming, and HTTP long-polling services. The project is unique among realtime push solutions in that it is designed to address the needs of API creators. Pushpin is transparent to clients and integrates easily into an API stack.

Fanout 3.1k Aug 4, 2022
Provide translation, currency conversion, and voting services. First using telnet you create a connection to a TCP socket, then the server connects to 3 UDP sockets hosted on other servers to do tasks.

to run micro servers g++ translator.cpp -o translator ./translator <port 1> g++ voting.cpp -o voting ./voting <port 2> g++ currency_converter.cpp -o c

Jacob Artuso 1 Oct 29, 2021
A local DNS server to obtain the fastest website IP for the best Internet experience

A local DNS server to obtain the fastest website IP for the best Internet experience

Nick Peng 5.1k Aug 9, 2022
This API uses both composition and inheritance to provide a generic way to set up a custom server with a custom communication protocol and custom middlewares

Ziapi Summary Introduction Installation Introduction This API uses both composition and inheritance to provide a generic way to set up a custom server

Aurélien Boch 8 Apr 22, 2022
WAFer is a C language-based software platform for scalable server-side and networking applications. Think node.js for C programmers.

WAFer WAFer is a C language-based ultra-light scalable server-side web applications framework. Think node.js for C programmers. Because it's written i

Riolet Corporation 693 Jul 3, 2022
Micro http server and client written in C++

httpp Micro http server and client written in C++ The motivation behind this little piece of code is to provide a really simple, yet efficient HTTP se

Thomas Sanchez 156 Aug 4, 2022
Simple, small, C++ embeddable webserver with WebSockets support

Seasocks - A tiny embeddable C++ HTTP and WebSocket server for Linux Features Simple C++ API Serves static content from disk API for building WebSocke

Matt Godbolt 591 Jul 30, 2022
Chocolate Doom WebAssembly port with WebSockets support

Wasm Doom This is a Chocolate Doom WebAssembly port with WebSockets support. Requirements You need to install Emscripten and a few other tools first:

Cloudflare 162 Jul 31, 2022
WebSockets in C for Embedded Applications

WebSockets in C WIC is a C99 implementation of rfc6455 websockets designed for embedded applications. WIC decouples the websocket protocol from the tr

Cameron Harper 54 Aug 7, 2022
Simple, secure & standards compliant web server for the most demanding of applications

Simple, secure[1] & standards compliant[2] web server for the most demanding[3] of applications. Read more... ?? Optimized security Being meticulously

uNetworking AB 14.1k Aug 8, 2022