Code Monkey home page Code Monkey logo

swish's Introduction

Build Status

Swish Concurrency Engine

The Swish Concurrency Engine is a framework used to write fault-tolerant programs with message-passing concurrency. It uses the Chez Scheme programming language and embeds concepts from the Erlang programming language. Swish also provides a web server.

Design

Swish uses libuv for cross-platform asynchronous I/O.

Although Swish can be run in threaded Chez Scheme for convenience, it is not thread safe and should be used from the main thread only.

Notes

  1. install the prerequisites (see Build System Requirements)
  2. ./configure (see ./configure --help for options)
  3. make
  4. make test
  • After ./configure; you can also cd src; ./go to build and run the engine.

  • We disable the expression editor with --eedisable because Chez Scheme's expression editor does not use asynchronous console I/O. We would have to modify the places where s/expeditor.ss calls $ee-read-char in blocking mode to use libuv's asynchronous read function instead of the one in c/expeditor.c.

  • If you get a "symbol(s) not found" error, you may need to use CPPFLAGS and LDFLAGS to supply the header and library path. If the C compiler refuses unused arguments, you may need CFLAGS="-Qunused-arguments". e.g.,

    ./configure CPPFLAGS="-I/usr/local/opt/libiconv/include" \
      CFLAGS="-Qunused-arguments" LDFLAGS="-L/usr/local/opt/libiconv/lib"
    

Build System Requirements

Linux

  • Chez Scheme 9.5.2 or later
  • GCC, the GNU Compiler Collection
  • GNU C++ compiler for libuv
  • GNU make
  • Python 2.7 for libuv
  • libsystemd-dev and uuid-dev packages

Mac

  • Chez Scheme 9.5.2 or later
  • dot (can be installed through homebrew using brew install graphviz)
  • pdflatex (can be installed through homebrew using brew cask install mactex)
  • ginstall and realpath (can be installed through homebrew using brew install coreutils)
  • XCode and the command-line tools must be set (Xcode->Preferences->Locations->command line tools)
  • Latin Modern fonts from LaTeX (can be installed with Font Book from a location like /usr/local/texlive/2019/texmf-dist/fonts/opentype/public/lm)

Windows

  • Chez Scheme 9.5.2 or later
  • Cygwin or MinGW/MSYS with bash, git, graphviz, grep, perl, texlive, GNU make, etc.
  • Microsoft Visual Studio 2017 with Visual C++
  • Python 2.7 for Windows in C:\Python27 (see below for other options)
  • Put scheme in PATH.

Building on Windows with Miniconda Python

  • Install Python 2.7

  • Provide the path to the python2.7 executable as an argument to the configure script:

    ./configure --python=~/Miniconda2/python.exe
    

Building on Windows with Anaconda Python

  • Make an environment containing Python 2.7

    conda create -n py27 python=2.7 anaconda

  • Provide the path to the python2.7 executable as an argument to the configure script:

    ./configure --python=~/Anaconda3/envs/py27/python.exe
    

Stand-alone Swish Applications

Swish can be used to build, test, and deploy stand-alone applications. A given application might load foreign code for image processing or USB access. Code that may block should use the API described in the "Operating System Interface" chapter of the documentation to integrate with Swish's I/O loop.

Build

For details about building a Swish application, see: swish-build --help

Test

For details about testing a Swish application, see: swish-test --help

Deploying a Stand-alone Application

On Linux and macOS, you can deploy your application's executable and boot file.

On Windows, your install should include the application's executable and boot file, osi.dll, libuv.dll, sqlite3.dll, Chez Scheme's csv952.dll, and Microsoft's C Runtime Library vcruntime140.dll.

Developers writing stand-alone applications should clone the Swish repository and run configure. Swish's source repository provides swish.h to define callable exports for osi.dll. Mf-config can be used in makefiles to define variables for system-specific paths.

swish's People

Contributors

burgerrg avatar crfrolik avatar infinitetape avatar kleinpa avatar owaddell-beckman avatar payneca avatar qzivli avatar yanshuf0 avatar

Watchers

 avatar

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.