Coder Social home page Coder Social logo

wwarrior1 / distributedsystemslab4middleware Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 66 KB

[Java / Python | gRPC] University project

License: MIT License

Protocol Buffer 2.51% Java 75.21% Shell 2.08% Python 20.20%
java python grpc university-project middleware distributed-systems systemy-rozproszone rozprochy lab4 lab-4

distributedsystemslab4middleware's Introduction

Distributed Systems - Lab 4 (Middleware)

[Java / Python | gRPC] University project

How to build the project:

For Java:

  1. Download core from here.

  2. Put project files into extracted grpc-java-*/examples/src/main:

    • in /proto paste Hospital.proto file,
    • in /java/someJavaPackage paste Java files.
  3. cd ../../.. - go upper to examples directory.

  4. Add dependencies to build.gradle (in grpc-java-*/examples):

    ...
    task mainServer(type: CreateStartScripts) {
        mainClassName = 'someJavaPackage.MainServer'
        applicationName = 'main-server'
        outputDir = new File(project.buildDir, 'tmp')
        classpath = jar.outputs.files + project.configurations.runtime
    }
    applicationDistribution.into('bin') {
      ...
      from(mainServer)
    }
    
  5. Generate grpc classes from Hospital.proto:

    ./gradlew installDist and ./gradlew dependencies (still in grpc-java-*/examples).

  6. Run our app via bash (in grpc-java-*/examples.):

    ./build/install/examples/bin/main-server.

  7. Upper commands can be further re-run via gen_java.sh.

For Python:

  1. Ensure Hospital.proto is located in home project directory (or uncomment lines in gen_python.sh if Hospital.proto is moved to grpc-java-*/examples/src/main/proto).

  2. Run ./gen_python.sh.

  3. Ensure generated grpc python files (Hospital_pb2.py and Hospital_pb2_grpc.py) are located in /python directory.

Extras

Directories: /gen, /java and /python should be marked as a source directories.

distributedsystemslab4middleware's People

Contributors

wwarrior1 avatar

Stargazers

 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.