Coder Social home page Coder Social logo

salvacorts / gocey Goto Github PK

View Code? Open in Web Editor NEW
4.0 3.0 0.0 22.31 MB

馃崁 P2P Distributed Evolutionary Algorithms on Ephemeral Infrastructure for Neural Network Optimization.

License: GNU General Public License v3.0

Go 70.66% JavaScript 23.45% HTML 2.30% Python 2.54% CSS 1.05%
go grpc evolutionary-algorithms artificial-intelligence neural-network protocol-buffers wasm webassembly golang library machine-learning scalable peer-to-peer p2p pool collaborative-research thesis

gocey's Introduction

Build Status

Bachelor Thesis: Gocey. Distributed Evolutionary Algorithms on Ephemeral Infrastructure

Author: Salvador Corts S谩nchez

Supervisor: Juan Juli谩n Merelo Guerv贸s

Thesis Document: https://github.com/salvacorts/TFG-Thesis


Requirements

Go dependecies

go get github.com/salvacorts/TFG-Parasitic-Metaheuristics
cd $GOPATH/src/github.com/salvacorts/TFG-Parasitic-Metaheuristics/mlp-ea-decentralized/native
go get ./...

Run

All the following paths are relative to $GOPATH/src/github.com/salvacorts/TFG-Parasitic-Metaheuristics/mlp-ea-decentralized directory.

Island

cd native/server
go run -grpcPort <port> -clusterPort <port> -metricsPort <port> -clusterBoostrap <boostrap node addr:port> -datasetPath <path to dataset> -webPath <path to web> -webPort <port>
# e.g. go run server.go -grpcPort 2006 -clusterPort 4003 -metricsPort 5003 -clusterBoostrap 127.0.0.1:4001 -datasetPath ../../../datasets/glass.csv -webpath ../../web/src/ -webPort 8080

Evaluator

Native
cd native/client
go run client.go -server <island addr:port>
# e.g. go run client.go -server 127.0.0.1:2006
Browser (WebAssembly)

Open a new tab in yout browser and enter an island IP and its webPort port. E.g. if an island is running at 127.0.0.1, and its webPort parameter is 8080, go to 127.0.0.1:8080.

Modifying Go Browser Client Source: You will need to rebuild the webassembly file

cd web/src/go
GOOS=js GOARCH=wasm go build -o wasm/main.wasm

gocey's People

Contributors

salvacorts avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

gocey's Issues

Distributed EA

Design and implement the communication schema between the private network (nodes in the cloud) and the rest of users (using their browsers)

As an Administrator, I want to run a demo problem so that I can test the platform.

User Story
I need a problem that can potentially perform well in the platform.
I will use this problem to test the platform while I develop it.

Acceptance criteria

  • Fitness function
  • Mutation function
  • Crossover function
  • Selection function

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

Representaci贸n de soluciones

Dado que de problema a problema la representaci贸n de una soluci贸n puede ser muy diferente, 驴c贸mo podr铆amos transmitir soluciones independientemente de su representaci贸n entre un nodo y el servidor?

Metaheur铆sticas a implementar

Aunque idealmente el sistema deber铆a abstraerse del problema a resolver, ser铆a conveniente discutir que algortimos vamos a implementar a fin de planificarnos y saber que restricciones tendr谩 el sistema.

As a tech-savvy user, I want to contribute to the problem by running code natively so that I can achieve better performance.

User Story
I want to run code on a machine installing whatever is necessary but achieving better performance than from the browser.

I want to be able to communicate all my machines running code with other machines running code natively in a decentralized way so there is no single point of failure.

I also want my execution to be coordinated with the rest of the collaborators on the platform by letting them ask my machines for information related to the execution of the problem.

Acceptance criteria
Provide a middleware that provides:

  • Epidemic protocol to share state across machines on the platform about nodes available to share information
  • Share information about solutions with other nodes when requested
  • Communicate in a way as decentralized as possible while still being able to work with browser-based contributors

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

As a researcher, I want to upload problems so that users can collaborate to it.

User Story
As a researcher I want to be able to upload my problem to the platform so contributors can select it from the website.

Contributors need information about the problem they are contributing to; as a researcher, I want to provide information related to the problem to convince users to contribute to my problem as well as informing them about what is going on on their browsers.

Acceptance criteria

  • Upload code that I want to run in the browser
  • Fill a form about the problem that contains :
    • Title of the problem
    • Description of the problem
    • Links to documentation (E.g. papers, websites, etc...)
    • Link to source code of the executable

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

As an Administrator, I want to get metrics from the execution of problems so that I can assess how the system is performing.

User Story
I need to extract metrics from both browser-based and native collaborators so I can provide insights about the execution of the problem to both researchers and collaborators as well as assess the performance of the system.

Acceptance criteria

  • Get metrics from browser-based nodes
  • Get metrics from native nodes
  • Provide metrics to users

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

Cloud based system

Define how the system will work on an environment where you can control nodes. Like in a cloud environment where you can deal with network partitions.

Use P2P to communicate the nodes so there is no single point of failure.

As a non-tech-savvy user, I want to be able to select which project I want to contribute to so that I can collaborate in something I am interested in.

User Story
As a user of the platform that wants to contribute, I want to be able to pick a project I care about. This will encourage me to invest more time collaborating in the platform as well as sharing it with other people.

Acceptance criteria

  • Show a catalogue of available problems
  • By choosing one the user will be redirected to the website where they will start collaborating
  • Open the problem website in a new tab
  • Show Problem Title
  • Show problem description
  • Optionally show related documentation (e.g. Papers, Websites, etc...)
  • Link to source code that will be executed on the user's browser

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

As a researcher, I want an interface for browser-based nodes comunications so that using the distributed system is easier.

User Story
Both browser-based nodes and nodes running code natively needs to be able to share information between them in order to be synchronized. Browser-based nodes won't be able to communicate with each other due to non-existent port-forwarding on their networks that do not allow them to open ports to receive incoming connections.

Acceptance criteria

  • Exchange of solutions with other peers
  • Population size control
  • Peers discovery
  • Include inside EA library

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

As a researcher, I want to communicate browser-based nodes and native nodes so that both can work together towards a solution..

User Story
Both browser-based nodes and nodes running code natively needs to be able to share information between them in order to be synchronized.

The main challenge here is to address the problem of browser-based nodes not being able to communicate with each other due to non-existent port-forwarding on their networks that do not allow them to open ports to receive incoming connections.

Acceptance criteria

  • Infrastructure to share solutions originated in browser-based nodes.
  • Share state of available nodes for incoming requests to browser-based nodes

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

Browser based UI

Discuss whereas to develop a system where you contribute to solving the problem by accessing an URL or using a browser extension.

Which technologies will we use to address this problem?

As a non-tech-savvy user, I want to start contributing to a problem from my browser so that I do not need to install anything on my computer.

User Story
As a user who does not know much about computers, I want to be able to contribute in a way that I do not need to install or modify anything on my machine. A web-browser enables me to run programs without installation by accessing a website.

Acceptance criteria

  • A user starts collaborating to a project by accessing an URL in their browser
  • The user does not need to modify anything on his machine, web-browser or network to collaborate
  • Feedback is provided to the user in the browser tab that is collaborating
  • Show social networks links to share the problem

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

Cada cuanto el cliente y el servidor se comunicar谩n

Siempre que el cliente mejore la 煤ltima mejor soluci贸n obtenida del servidor, le comunicar谩 a este la nueva soluci贸n. El problema es, cada cuanto y como el servidor actualiza al cliente sobre la mejor soluci贸n obtenida concurrentemente?

As a researcher, I want an interface for native nodes comunications so that using the distributed system is easier.

User Story
As a researcher that wants to use the platform, I want to use it as easy as possible. I do not want to implement the underlying communication between nodes. Having an interface as if I wanted to use an already existing library for evolutionary algorithms would help me to achieve my goals faster and easier.

Acceptance criteria
The library should provide:

  • Exchange of solutions between native peers
  • Population size control
  • Peers discovery
  • Include inside EA library

Definition of Done

  • Code Builds without error warning
  • Code is Unit Tested
  • Code is Deployed to system test environment and passed system tests
  • Build pushed to a demo server
  • Documentation

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.