Kore is an easy to use web platform for writing scalable, concurrent APIs in C or Python.
Its primary goals are security, scalability and allowing rapid development and deployment of such APIs.

Because of this Kore is an ideal candidate for building robust, scalable and secure web things.

Feature rich

Kore comes packed with tons of amazing features that make it awesome to use.
All features are designed so that the secure by default mantra comes first.

  •  TLS with PFS in all major browsers.
  •  Private keys are isolated.
  •  Websocket support.
  •  Built-in parameter validation.
  •  Asynchronous PostgreSQL queries.
  •  Fully privilege separated.
  •  Per CPU worker processes.
  •  Easy to use background tasks.
  •  Async/await support for Python.
  •  Applications can be reloaded on the fly, even while serving content.

Easy to write code for

Kore makes it easy to get started without having to fiddle with build automation tools such as make/cmake thanks to the kodev tool bundled with Kore.

Using the tool you can create, compile and run Kore applications when developing your next big thing. However if you are a Unix wizard who prefers building Makefiles and linking the libraries together yourself or integrating the build of your Kore application into your build system, you can of course do that.

$ kodev create myapp
$ cd myapp
$ kodev run
compiling myapp.c
myapp built succesfully!
[parent]: running on https://127.0.0.1:8888
[parent]: kore is starting up
[wrk 0]: worker 0 started (cpu#0)

Non-complex APIs

A lot of C web frameworks or libraries overcomplicate the APIs applications use in order to create responses, read headers, add headers or deal with request parameters.

Kore takes a no-bullshit approach to this and presents the developer with a clean and easy to use API which makes writing code a breeze and makes the code more readable and understandable.

[C] [Python]
#include <kore/kore.h>
#include <kore/http.h>

int	page(struct http_request *);

int
page(struct http_request *req)
{
	uint16_t	id;
	const char	*hdr;

	if (http_request_header(req, "x-request", &hdr))
		http_response_header(req, "x-response", hdr);

	http_populate_qs(req);

	if (!http_argument_get_uint16(req, "id", &id)) {
		http_response(req, 400, NULL, 0);
		return (KORE_RESULT_OK);
	}

	kore_log(LOG_INFO, "id parameter: %u", id);
	http_response(req, 200, NULL, 0);

	return (KORE_RESULT_OK);
}

Fast

Kore is able to process millions of requests per second on server hardware.
Read more about performance.

The numbers on the right were produced with the following setup:

Hardware
Intel Xeon CPU E5-2699 v3 @ 2.30GHz
running Linux 3.19.0-generic (ubuntu 14.04.3 LTS)

Kore
compiled with NOTLS=1
8 worker processes
no worker affinity

Running 1m test @ http://127.0.0.1:8888
  8 threads and 400 connections
  Thread Stats   Avg      Stdev     Max   +/- Stdev
    Latency   390.46us    2.68ms 218.26ms   99.92%
    Req/Sec   154.10k    20.12k  189.43k    75.23%
  Latency Distribution
     50%  282.00us
     75%  426.00us
     90%  586.00us
     99%    1.10ms
  73330117 requests in 1.00m, 12.02GB read
Requests/sec: 1220133.80
Transfer/sec:    204.80MB

Open source

Kore is open software licensed under the ISC license and is developed in my spare time. If you like Kore please consider donating to the project to support future development.

If you are using Kore commercially please consider becoming a sponsor.

A sponsorship includes:

  • - Ability to sponsor new features.
  • - Priority support for any issues related to Kore.
  • - Your company listed under our sponsors page (optional).

 Sponsors