jobserv/README.md

61 lines
2.4 KiB
Markdown
Raw Permalink Normal View History

2019-05-15 12:26:56 -07:00
# JobServ
Remote Procedure Calls over the protobuf API
2019-05-19 13:03:53 -07:00
# Requirements
- openssl
2019-05-19 14:39:41 -07:00
- tar
2019-05-31 14:41:22 -07:00
- OpenJDK 8
2019-05-19 13:03:53 -07:00
2019-05-15 12:26:56 -07:00
# Building
Gradle will manage dependencies, generate code, compile the java, and package the code.
Simply run the folllowing command:
```shell
2019-05-19 14:39:41 -07:00
$ ./buildwrapper.sh
```
2019-05-23 19:40:46 -07:00
Buildwrapper will ask you for details about the client and server. If you are testing this software both CNs can be set to localhost.
Buildwrapper will then generate CAs for and signed certs for the Client and Server. In addition a seperate, third CA and cert will be generated for testing purposes.
Gradle will then generate protobuf source and compile it with the java source for the client and server.
After gradle is finished compiling and running the junit tests, buildwrapper will organize the sources with their respective certs in the staging folder.
In addition to a server folder and a client folder, there will be a test folder which has a copy of all certs and both server and client functionality.
The test CA is not trusted by the server or the client by default. As such, the test cert can be used to induce a mutual tls authentication failure.
2019-05-19 14:39:41 -07:00
# Running
After build, the programs can be found in the staging folder.
After changing directory to the 'staging/client' folder or the 'staging/server' folder, either program can be run as follows:
```
$ ./server (port)
$ ./client (hostname) (port) (command) (arguments)
2019-05-19 14:39:41 -07:00
```
2019-05-25 21:53:43 -07:00
For example:
```
$ ./buildwrapper.sh
.....
$ cd staging/server
$ ./server 8448 &
$ cd ../client
$ client localhost 8448 new ping archive.org
```
2019-05-19 14:39:41 -07:00
alternatively, for guidance:
```
$ ./server
$ ./client help
```
2019-05-15 12:26:56 -07:00
# Distribution
At this point you can copy the staging/client or staging/server folders to any environment in which their Certificate CN's are valid.
2019-05-15 12:26:56 -07:00
# Testing
2019-05-21 15:05:45 -07:00
Running the gradle test task, or the buildwrapper will run all junit tests.
Currently that includes a test of certificate based authentication (Mutual TLS), tests for the thread safe process control module, and tests ensuring that only one connection can access a processes information at a time.
2019-06-01 12:28:00 -07:00
# Contributing
Many issues are marked great-first-issue for the sake of first time contributors.
If you are a more experienced contributor I encourage you to start on a different issue.
### Code Standards
Java contributions will be held to the following standard
https://www.oracle.com/technetwork/java/codeconvtoc-136057.html
Scala contributions are welcome as well, it is on the roadmap to refactor all this code to Scala.