Skip to main content

Epic Server

EpicMan Server is a SANS-IO Async application server that runs your code over multiple 'Nodes'. This has the added effect of not being limited to a single core for running your code and mitigating some of the effects of the GIL in the cpython (and others) implementation

While this is an Async Server this is NOT AsyncIO compatible and brings its own abstractions for File, Network and locking in order to meet the latency requirements imposed by its primary use case (Game engine that runs atop this framework)

*** NOTE: this is a Technology preview/Alpha release ***

Only a single instance is likley to work at this time or 2 node clusters with caveats

Internal and External APIs are in heavy flux

Features

  • Pluggable IO engines
  • Automatic Persistence of game features
  • Transparent Inter-process messaging abstraction
  • python3 codebase
  • Uses async/await (but is not AsyncIO compatible)
  • pypy3 compatible for versions supporting the python3.8 spec

Getting Started

The Full documentation is available here. The examples below should give you a quick feel for management of a cluster and what programming for epic server looks like.

Requirements

  • Python 3.6 or newer
  • Linux 5.x or newer (io_uring)
    • liburing-dev (debian)
    • liburing1 (debian)
  • 64bit CPU if using lmdb backend
  • Kernel headers may be required to compile the python io_uring module

Examples

Starting a single or multiple node cluster is relatively simple as shown below. All that is required is a simple script to bootstrap the Initial Entities. In this example we use a simple test script called 'cluster.py' that is looked up on PYTHONPATH. if using a script in your current directory then prepending PYTHONPATH=. to the epic-server commands will ensure that this script can be found correctly.

$ python3 -m venv venv
$ venv/bin/pip install epicman-server
$ venv/bin/epic-server -vvv -l '[::1]:3030'
$ venv/bin/epic-server-start -vvv -b '[::1]:3030' cluster:start

Programming for epicman.server

The following is taken from 'cluster:start' from the above example and simply sends a value, has it incremented then passes the incremented value on to the next entity to confirm that the RPC like interface works

from epicman.objects import EntityProxy, Entity, remote_spawn, remote_call
from epicman.syscalls import THREAD_SLEEP
from epicman.logging import log
import sys

TOTAL_COUNT = 1000

class _Test(Entity):
    @remote_call
    async def test(self, val):
        return val + 1
# this is a temporary work around pickle limitations and
# issues pickle has with things that are renamed
Test = EntityProxy(_Test)

async def start():
    count = 0
    for i in range(TOTAL_COUNT):
        count = await Test[i].test(count)

    log.info('Value: {count}', count=count)
    sys.exit()

Stay up to date

Metadata

Release files for epicserver 0.2.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for epicserver 0.2.8
File Size Uploaded Provenance
epicserver-0.2.8.tar.gz 190.1 kB Without provenance Details

Built distribution (wheel)

Table of built distributions (wheels) for epicserver 0.2.8
File Interpreter ABI Platform
epicserver-0.2.8-py3-none-any.whl Python 3 none any Details

Total release size: 268.8 kB

Release files / epicserver-0.2.8.tar.gz

Download URL epicserver-0.2.8.tar.gz
Size 190.1 kB
Tags Source
SHA-256 checksum
How to use checksums
697063eb269aae01ee9240f546651aed5ebc67ea16efcffbd2e539e951bdd745
BLAKE2b-256 checksum
How to use checksums
5aaa7d3ebe2031eb106cdc55220504c3193710cb59fcec768ec0c35fde663c0d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Release files / epicserver-0.2.8-py3-none-any.whl

Download URL epicserver-0.2.8-py3-none-any.whl
Size 78.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6bd021a28319456615249e6841320be57fa40faced735df00e3a6f319bdc83bd
BLAKE2b-256 checksum
How to use checksums
cd58c481b5bf24e9a37f6eff84b999c534ff8c54247c6dba318a1f70853919b6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.5

Security for epicserver 0.2.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page