All Projects â†’ piradoiv â†’ Prack

piradoiv / Prack

Licence: MIT license
Simple and Scalable Web Server 🚀

Programming Languages

pascal
1382 projects
Makefile
30231 projects

Projects that are alternatives of or similar to Prack

khttpd
An experimental HTTP server implemented as Linux kernel module
Stars: ✭ 41 (+192.86%)
Mutual labels:  web-server
diecast
A standalone web server and template framework.
Stars: ✭ 13 (-7.14%)
Mutual labels:  web-server
PospoliteView
Pospolite View aims to be a simple HTML viewer engine fully made in Free Pascal.
Stars: ✭ 29 (+107.14%)
Mutual labels:  freepascal
Mad-Pascal
Mad Pascal Compiler for 6502 (Atari XE/XL, C64, C4Plus)
Stars: ✭ 46 (+228.57%)
Mutual labels:  freepascal
Axes-Armour-Ale
A fantasy, ASCII dungeon crawler for Windows, Linux & OSX
Stars: ✭ 22 (+57.14%)
Mutual labels:  freepascal
lazarus
Notepas sources and other derived lazarus projects using the editor module.
Stars: ✭ 26 (+85.71%)
Mutual labels:  freepascal
sheret
A tiny, simple static file web server.
Stars: ✭ 45 (+221.43%)
Mutual labels:  web-server
sizectrl
TSizeCtrl v8.2
Stars: ✭ 16 (+14.29%)
Mutual labels:  freepascal
dokan-delphi
Dokan Delphi Wrapper
Stars: ✭ 48 (+242.86%)
Mutual labels:  freepascal
Ascension
A metaheuristic optimization framework
Stars: ✭ 24 (+71.43%)
Mutual labels:  freepascal
VALIS
Vote ALlocating Immune System, an immune-inspired classification algorithm
Stars: ✭ 21 (+50%)
Mutual labels:  freepascal
go-baseapp
A lightweight starting point for Go web servers
Stars: ✭ 61 (+335.71%)
Mutual labels:  web-server
xavier
Xavier is a small object-oriented XML library for Lazarus and Delphi
Stars: ✭ 38 (+171.43%)
Mutual labels:  freepascal
satori
An HTTP server library in C++
Stars: ✭ 14 (+0%)
Mutual labels:  web-server
muse-as-service
REST API for sentence tokenization and embedding using Multilingual Universal Sentence Encoder.
Stars: ✭ 45 (+221.43%)
Mutual labels:  web-server
libpassqlite
libPasSQLite is delphi and object pascal bindings and wrapper around SQLite library. SQLite is library that implements a small, fast, self-contained, high-reliability, full-featured, SQL database engine.
Stars: ✭ 18 (+28.57%)
Mutual labels:  freepascal
DfmExtractor
Small command line utility which allows you to extract DFM, LFM and FRM forms from executable files compiled by Delphi, Lazarus and CodeTyphon.
Stars: ✭ 22 (+57.14%)
Mutual labels:  freepascal
DirectoryWatcher
Watch changes in directories
Stars: ✭ 70 (+400%)
Mutual labels:  freepascal
fp-telegram
Wrapper classes library for telegram bots API (FreePascal)
Stars: ✭ 59 (+321.43%)
Mutual labels:  freepascal
JPLib
A small library of Pascal units needed to compile my projects published on GitHub.
Stars: ✭ 41 (+192.86%)
Mutual labels:  freepascal

Prack

The scalable Web Server for humans.

Project goals

  • Small memory footprint, blazing fast multi-threaded Web Server
  • Rack-like interface, so developers can focus on writing Web Frameworks, API, or Web pages without dealing with HTTP internals
  • A design that eliminates or reduces Service Discovery or Orchestration systems needings, but still being capable to scale
  • Zero-downtime deployments, without sorcery

Background

Until now, Web Servers were used to receive HTTP requests and pass them directly to Web Apps, using Load Balancers. This requires a lot of effort to planify your infrastructure, as the Web Server needs to know what backends can receive these requests, or the host where they are listening.

There is an overwhelming amount of puzzle pieces to deal with these individual issues, like Consul, HAProxy, Nomad or Fabio. And thats just fine, they're amazing tools. You can even use Kubernetes on bigger applications if you don't want to handle these puzzle pieces one by one.

The problem is, on small to medium sized Websites, these tools feels like trying to catch flies using the whole Death Star.

Prack's design is completely different. Instead, these Servers must contact with Prack, fetch the pending Requests, and send back the HTTP Response, using the REST API. This design just eliminates the needing of Health Checks, Load Balancing or Service Discovery.

How Prack works

With Prack, you can just start the server, and it will start listening for HTTP Requests, storing them into a Requests Queue. These Requests can be handled using a REST API, exposed on a different port.

Basically you have:
GET /api/v1/request
POST /api/v1/response

Getting a Request will give you a JSON populated with the Environment variables you are used on any Rack-like Application, like the REQUEST_METHOD or the PATH_INFO.

Sending back Responses is being done by POSTing a JSON with Rack compatible contents:

  • The HTTP Response Code
  • A bunch of Response Headers
  • The response body

Prack Design

How to use Prack with your App Server

Prack is programming language agnostic, you can build Websites or APIs in your favorite one.

Usage examples:

Is it fast and lightweight?

It is! but just in theory. I didn't have a chance to proper benchmarks yet.

Prack barely consumes a few megabytes while waiting for connections, and the threads are always sleeping until needed. While the server is multi-thread, it doesn't means it actually uses one thread per connection, so the memory per request consuption is really low (again, in theory).

What's the status of the project?

Proof of concept, not production ready. It's still under heavy development.

v1.0.0 Roadmap

  • Proof of concept
    • Standalone HTTP Web Server (In progress)
    • HTTP Requests queue (In progress)
    • HTTP Responses queue (In progress)
    • Private API in a different port for external processes (In progress)
  • Website and extensive documentation, with a good amount of examples
  • Security

How to build and run:

make

This will produce an executable inside dist folder.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].