Giter VIP home page Giter VIP logo

madt's Introduction

MADT - a distributed application modeling system

Main features of MADT:

  • Realistic simulation of large scale IP networks,
  • Deployment of a distributed application in the simulated network,
  • Dynamic control over network conditions in individual sections of the simulated network,
  • Real-time visualization of the application state.

Сore entities

The basic entity in MADT is a laboratory, a model of simulated network. To start a model MADT uses a minimal amount of information about virtual network structure and launch procedure of distributed application. This set of information also can be referred to as a model. MADT stores this information in the JSON-serialized file, lab.json.

The simulated network is represented by graph. Nodes of this graph can be server, client, or router. You can combine part of the network (a set of nodes) into a subnet and define rules for such subnet as well as configure the whole network.

How to define the model

We use madt_lib Python API to configure a model. It provides four classes for defining a network model:

  • madt_lib.Node represents network nodes. There are two types of nodes: routers and computers (PC). Routers provide dynamic routing of packets on the network and PCs host components of the tested application.
  • madt_lib.Subnet represents IP subnetwork that connects a set of nodes.
  • madt_lib.Overlay used to configure dynamic routing in the network. This is necessary for transferring data between computers from different subnets.
  • madt_lib.Network represents a wide or local area network. Each node, subnet or overlay of a network should be created only using its methods. A laboratory can have only one global network that can be used to create multiple local ones.

Basic example with simple server-client interaction is defined in tutorial/basic folder.

How to check the model

MADT provides a monitoring system that allows you to send messages from the model nodes and display them in real-time in the web interface. To get the monitoring page, go to container page and then push "open graph" button.

You can check the state of nodes which is shown via color schema and logs in lower logger window.

Cubic nodes of the graph represent routers and round ones - all the other nodes of the model. Color of node corresponds to its status and it can be one of the following:

  • 0 - green
  • 1 - yellow
  • 2 - red
  • 3 - purple

User have to define the meaning of status codes himself and set the new value of this code with send() function.

Gray nodes are inactive. Blue nodes are that ones which were active earlier.

How to test your application

Caution! Work in progress!

Docs

English docs: http://madt.io/docs/

Russian docs: http://madt.io/rudocs/

Docker runtime

Build sequence:

Server:

docker build -t madt .

Start sequence:

    docker run -d --privileged -p 8980:80 -p 8922:22 \
        -e SSH_PWD=demo \
        -e MADT_RUNTIME=docker madt

Cluster runtime

Caution! Work in progress!

Build sequence:

Server:

For now, same as before.

Host:

To build host image you'll need only Dockerfile_image, madt_host, madt_client and images

  1. docker build -t madt/host -f Dockerfile_host .

Start sequence:

Server

Since tinc daemons on hosts must connect to the server somehow, we're publishing wide range of ports for server's tinc daemon to use. Port publication must map the to the same ports on host. However, it's possible to change port range used by changling PORT_RANGE variable in cluster runtime.

   docker run -it -m 10GB --privileged --runtime kata-runtime --name madt \  
        -v ~/madt/labs:/home/demo/labs \
        -p 9080:80 -p 9022:22 -p 9077:7000 \ 
        -p 9100-9200:9100-9200 \
        -e SSH_PWD=demo \
        -e MADT_SERVER_ADDRESS=40.112.66.112 madt:test

Host

Note that before starting host you must make sure that both docker and ssh port are vacant on server. MADT_UI_PORT and MADT_FRPC_PORT correspond to published 80 and 7000 port of the server.

    docker run --privileged -it --name madt  \
        -e MADT_SERVER=40.112.66.112 \
        -e MADT_UI_PORT=9080 \
        -e MADT_FRPS_PORT=9077 \
        -e SSH_PORT=9201 \   
        -e DOCKER_PORT=9202 madt/host:test

madt's People

Contributors

annafatkina avatar rukmarr avatar xentaabsenta avatar

Watchers

 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.