Coder Social home page Coder Social logo

jobadder's Introduction

JobAdder

Source code of the JobAdder project

jobadder's People

Contributors

ammen99 avatar fellowplanter avatar johannesgaessler avatar jooe1 avatar nikolatzotchev avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

Forkers

ammen99

jobadder's Issues

ServerConfig

Configuration for the server.
Contains things like a list of special resources (different licenses and how many of them are available), and some options for the scheduling algorithm.

Email Notifier and Web API

I think I was assigned these two in our last meeting.

Two questions:

  1. Do we store a list of emails for each user, or do we store an email for each job?
  2. Do we need HTTPS for the server or plain HTTP?

Notifier

This class sends emails when a job is completed.

WorkerProxy

The real proxy the Server uses for communication with the Worker.

Dispatcher

Implementation of the dispatcher class.

WebAPI

Implementation of the Web server and all the associated requests.

User -> Server messages

Messages which the UserClient sends to the Server.
They operate on the ServerDatabase.

from ja.user.message:

  • add

  • cancel

  • query

IWorkerServerProxy

A mock implementation for the Proxy which the Worker uses to communicate with the Server. This class can then be used to test that for ex. the DockerEvents class correctly communicates with the Server that a job has finished/crashed, etc.

Mock database

This is a database which is used for unit tests - it doesn't need to connect to a real database, but should implement the ServerDatabase interface.

Response classes should be unified

As discussed in the meting, I think we should have only a single Response class instead of Response, ServerResponse, and WorkerResponse.
Since we currently have a lot of PRs open this change should wait until we have a lower amount of PRs open.

Worker -> Server messages

Messages which the worker sends to the server. They operate on the Database.

  • crashed

  • done

  • register

  • retire

User Server Proxy

The real proxy which is used by the user to communicate to the server.

Handle SSH connection timeout in WorkerProxy

If the connection to a work machine suddenly drops, we should eventually get a timeout on the SSH connection (or we may want to periodically send pings). Anyway, when this happens, it would make sense to mark the machine as offline and probably mark the jobs on it as CRASHED.

Would be nice to have.

IWorkerProxy

A mock implementation for the proxy that the Server uses to communicate to Workers.

Server -> Worker Messages

Messages which the Server sends to the server.

Basically all the classes in ja.common.message.worker_commands:

  • cancel_job

  • get_workload

  • pause_job

  • set_filters

  • start_job

Decide on coding style and add CI

We really should have a consistent style. My proposal is to use the official Python styleguide: PEP 8.There are also good tools which check this, for example flake8.

Another thing is checking the type hints consistency with MyPy.

Anything else we want to check?

Worker config

Worker configuration classes, it should be able to read for ex. the IP address of the server.

Server Main

The main class for the Server.
Should start all components and run the main loop.

common is importing from server

I added an argument of type ja.common.database.database.ServerDatabase to the execute method of ja.common.message.server.ServerCommand.
As a consequence common is now importing from server.
We had agreed that user, server, and worker should only import from common.
Should we allow that common also (rarely) imports from user, server, or worker?
Otherwise we would have to move the entire database into common.

IServerProxy

The proxy which the user client uses to communicate with the server.
This is just about a mock implementation, which doesn't really send the commands over the network, but is used only in unit tests.

Augment proxies to set type_name

I just noticed we never set the type_name which the command handlers use to differentiate between commands:

https://github.com/DistributedTaskScheduling/JobAdder/blob/master/src/ja/common/proxy/command_handler.py#L60

As a result, the server and the worker will never be able to parse commands (except if I am mistaken and this is set somewhere, but I could not find any reference to type_name aside from the command handlers). I think we can either

  1. Make the proxies pass it as an additional argument to the SSH connection

  2. Make the SSH connection infer the type by looking at the Python class name (object.__class__.__name__)

What do you think is the better approach? My personal preference is 2. since it is easier to implement and won't require changing the interfaces, plus removes the need to manually specify the type everywhere.

SQL Database

The real implementation of the database class which will be used in production.

Remote

Implementation of the Remote program. Not sure how to unit test this properly, but probably we can extract the Job owner verification and unit test that.

CLI Handler

The handling of command line arguments by the user client.

IProxyFactory

A mock implementation for the ProxyFactory, which returns mock WorkerProxies

WorkerMain

The main class for the worker, using a mock server proxy from #64

Should also listen on the local socket for new commands from the server (that part could probably be shared with the server, should be investigated)

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.