Giter Site home page Giter Site logo

cambio-project / misim Goto Github PK

View Code? Open in Web Editor NEW
5.0 4.0 2.0 14.21 MB

A simulator that shows the resilience of distributed software systems.

License: Apache License 2.0

Java 91.39% Python 1.49% Batchfile 0.04% Shell 0.08% CSS 0.74% HTML 0.98% JavaScript 5.11% Dockerfile 0.17%
architecture-modeling desmo-j discrete-event discrete-event-simulation java microservices service-oriented-architecture simulation simulation-model simulation-modeling soa

misim's Introduction

Build and Test Documentation
DOI

MiSim - Microservice Resilience Simulator

MiSim allows the simulation of microservice architectures regarding resilience and is based on the DesmoJ framework for discrete event modelling and simulation.

See the Wiki for further reference and usage information.

Artifact Download

Download the newest stable release or a nightly build (see artifacts of newest workflow run).

Build from source

Clone via git and run mvn -B package --file pom.xml "-DskipTests=true" "-Dmaven.javadoc.skip=true" "-Dcheckstyle.skipExec=true". You should see a misim.jar file in the resulting target/ directory.

Execute

Note that MiSim should be executed using Java 18 (or previous). Newer Java versions are likely to result in failing or corrupted simulation runs!

misim's People

Contributors

arefmt avatar duelle avatar franksn90 avatar github-actions[bot] avatar imvis10 avatar litschiw avatar martinstraesser avatar marvintaube avatar samuelbeck avatar seb-ssabes avatar styinx avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

Forkers

ittaq imvis10

misim's Issues

Feature: Allow Simple maths on ArrivalrateModels

Should allow

  • Max (comparing on time per entry)
  • Min (comparing on time per entry)
  • Add
  • Subtract
  • Mult
  • Divide (rounding down)
  • leftsided join
  • rightsided join

This can e.g. be useful when parsing Scenarios to add environment noise onto a load model.

Setup Maven Release Plugin

... to ease the release process.

This is not simple, due to the protected master/main branch.
Current solution most likely will be an automated pull request.

Update readme

The readme need to be updated to better represent versions 3.+
Some things that need updates:

  • Program Arguments
  • How to run "HelloWorld" example
  • Explanation of execution Results
  • Architecture model description
  • Experiment model description

Enable multiple columns in csv reports

currently a csv fiel only contains 2 columns ("simulation time" & "Value")
The Value column should be renamable and further columns should be possible to add.
E.g see the Circuitbreaker output, which currently does not look nice.

Move Networklatency description to Architecture model

Currently, the network latency is defined inside the NetworkRequestSendEvent event. However, this requires source code access and recompiling to change it. That is very cumbersome and unpractical.

Rather, there should be a short way of describing the current network latency inside the architecture description/model file.

Integrate proper logging framework

Replace all System.out.println with a proper logger such as log4j2.

e.g. by adding log4j-slf4j-impl

<dependency>
    <groupId>org.apache.logging.log4j</groupId>
    <artifactId>log4j-slf4j-impl</artifactId>
    <version>2.20.0</version>
</dependency>

to the pom and adding a logger.

Also setup Lombok for convenience.

Report Framework: Create Continuos Output Option

The current Framework stores all collected data in-memory. For larger Simulations, this data can get quite large and also might impact performance as the simulator has to keep track of it within multiple HashMaps.

Therefore, I'd propose a "continous" mode for the reporting framework that constantly streams out data.
This might negatively impact the performance of the simulator but keeps it memory profile a lot lower.

Architecture Parsing: Create Gson Adapter for Microservices

Microservices are the main part of the architecture.
They own Operations which span a dependencies net that requires some sort of graph parsing algorithm.

The parser system should have no dependencies on any methods (except for getters and setters) of the parsed classes to ensure decoupling.

Fix Naming Conventions During Simulation

DesmoJ creates a HashMap entry for each new event or entity name (see class NamingCatalog).

Since a dependency request and CPU execution event names in MiSim are unique, it creates multiple entries for each (!) simulated request. This creates a HUGE memory impact that can be easily prevented by improving the naming scheme.
However, this might make the DesmoJ event execution traces less readable.

ModelLoaderTest tests are flaky on GitHub Actions

Some of the test within ModelLoaderTest are flaky and sometimes fail during the test workflow without any obvious reason.
Specifically, those are parsesTestModels and parsesTestModelsWithScenario.
Locally, I've never had any issues with these tests as far as I can remember, and I don't see why those are sometimes failing...

Report Framework: Create Selectable Metrics

Currently, the report framework collects all metrics automatically. However, a user should be able to select which metrics he would like to have exported to ensure a minimized memory impact and (potentially) slight performance improvements.

Replace GsonHelper with static class

Currently GsonHelper is not static. This is due to be in line with the old style of Gson (where Gson/GsonBuilder were not static).

By now, Gson has also enabled static usage of its library so GsonHelper should switch aswell.

'reportLocation' of ExperimentMetaData is not used

Currently, the report location is only determined by the name of the experiment.
This is evaluated inside the MainModel class. The parameter/property of the experiment meta model is not considered.

Fix Graph/Dependency View

Description

The simulator output originally supported the output of an html-based (d3.js) site that illustrated the dependencies between services and instance counts. For this, it monitored the origins and targerts of all requests
This graph broke with version 3 and is not properly fixed by now.

The graph originally showed the effective dependencies (so only dependendencies that were actually used).

Alternative/Additional features that could be implemented in this context

OpenTracing Adapter implementation

Instead of storing or creating the graph, the simulator should actually create a trace that is compatible with OpenTelemetry (Jäger/Zipkin/Kieker). See here for instructions.
So the dependency/performance analysis of the results can be done using external tools.

Static Dependency graph

The dependency graph can actually be created during parse-time, before the actual simulation.
This is way less complicated
However, this will not result in an effective dependencies graph.

Report Framework: Move d3 Graph of the system into the given report folder

Currently, a d3 graph of the system should be generated inside the ./Report folder.
This graph should be moved over into the Report folder of the experiment run.

This also requires the ./Report directory (or better: the d3 scripts in it) to be part of the resources of the final jar to allow singe jar usage.

Allow load generators to target services

Currently, load generators can only target single endpoints.
They should be able to target a whole service and then distribute the load (roundrobin/random) over all endpoints.

Add support for Worker/Queue-based Coupling of services

Queue-based communication is an alternative load balancing strategy.
Requests are stored in a queue and may be pulled from the queue by workers.
Load balancing may monitor the queue length as an additional scaling parameter.

Fix Singleton Problem of the Model classes

Both the ArchitectureModel and the ExperimentModel are designed as Singletons in MiSim 3.0.
This is an Anti-Pattern and breaks the consecutive execution of tests.

Therefore, the creation should be handled via the parsing framework (preferred since convenient) or a Factory class need to be introduced.

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.