Giter Club home page Giter Club logo

simphony-network's Introduction

simphony-network

Client-server functionality for the SimPhoNy framework.

This packages provides a proxy engine which can be used to launch a wrapper on a remote host. This proxy wrapper follows the interface of ABCModelingEngine abstract class.

image

image

Repository

Simphony-network is hosted on github: https://github.com/simphony/simphony-network

Requirements

Note

pyzmq package will try to find a local libzmq library or otherwise will try to compile it as an extension. In this case proper build tools should be available on local machine, including a C compiler.

Installation

Note

msgpack-python should have been compiled with C extensions, otherwise the client-server communication will not work. After installation one should be able to import the following module:

from msgpack import _packer, _unpacker

if the following import fails, the msgpack-python should be reinstalled after installing `cython`: https://pypi.python.org/pypi/Cython/.

The package requires python 2.7.x, and aforementioned dependencies. These dependencies are listed inside requirements.txt file which should be installed first:

# Clone the repository
git clone https://github.com/simphony/simphony-network.git

# Install required dependencies
pip install -r requirements.txt

The next step is straight forward and is based on setuptools:

# build and install
python setup.py install

or:

# build for in-place development
python setup.py develop

How to Use

After installation a new module called proxy will be added to the simphony.engine entry point. This module contains a proxy wrapper which accepts an instance of ABCModelingEngine and a host name as input parameters and proxies the wrappers methods to point to a wrapper which is running remotely on the provided host.

# Import the proxy wrapper from simphony.engine.proxy import ProxyEngine

# Create a proxy around an existing wrapper proxy = ProxyEngine(wrapper, host='pc-115')

# Access proxy methods proxy.run()

Note

ProxyEngine only supports ABCModelingEngine API and a few custom ones which will be explained. Any changes which are applied to wrapper parameter after initializing the proxy will not be respected.

Testing

To run the full test-suite run:

python -m unittest discover

Directory structure

  • simphony_network -- holds the package's implementation

simphony-network's People

Watchers

James Cloos avatar  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.