Giter Site home page Giter Site logo

single-server-architecture's Introduction

Simple Single Server Architecture

Architecture

  • Graphs.java is the remote interface containing description of following methods :
    • add_graph(graph_identifier, num_nodes) - Adds a graph with given graph_identifier and number of nodes.
    • add_edge(graph_identifier, u, v, w - Adds an edge in graph with graph_identifier between vertices u and v with weight w.
    • get_mst(graph_identifier) - Returns total weight of Minimum Spanning Tree of from the graph of given graph_identifier.
    • print_graph(graph_identifier) - Prints the graph denoted by graph_identifier, used only for debugging purposes.
  • GraphsImpl.java implements the abstract methods of remote interface.
  • Graph.java contains class Graph with information about the graph. It contains a method to add an edge to the graph.
  • Edge.java contains class Edge with information about an edge.
  • Server.java is the main Server program.
  • Client.java is the main Client program.

Algorithm Implementation

  • There is a map used for mapping between graph_identifier and Graph.
  • Kruskal's algorithm is used to get minimum spanning tree of graph.
    • Edges are sorted according to weight.
    • One by one edges are traversed starting from minimum weight and added into the minimum spanning tree.
    • If there is an edge that is creating cycle in MST, that edge is not added.
    • Cycle Detection is done using DSU.

single-server-architecture's People

Watchers

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