This project consists of a Linux job worker and a client interface. The worker provides an RPC API to start, stop, and query the status of a job.
To build and run the application you need:
Clone repo & build project
git clone https://github.com/bernardjkim/linux-job-worker.git
cd linux-job-worker
mvn package
mvn test
Run Server
java -jar target/server.jar
Run Client
cmds include:
- start [linux cmd] - start new job
- stream [linux cmd] - start new job and stream output
- stop [job id] - stop job with matching id
- status [job id] - output status/log for job with matching id
- list - list all jobs
java -jar target/client.jar [cmd]
- Unable to stream output of RPC with a large amount of output. Attempting to stream the output of start yes will result in a failed RPC with a status code of RESOURCE_EXHAUSTED. A possible solution might be to split the message into chunks with a max chunk size.
- gRPC-Java - gRPC library for Java