Coder Social home page Coder Social logo

kuhnuri-worker's Introduction

Kuhnuri Worker

DITA-OT Worker that communicates with a Queue over REST.

Process

The Worker has a single loop where

  1. Worker polls Queue for work
  2. Queue returns a job
  3. Worker downloads the source
  4. Worker processes job
  5. Worker uploads the results
  6. Worker submits the results to Queue

If Queue has no work available, the process is

  1. Worker polls Queue for work
  2. Queue returns a no work
  3. Worker takes a nap

Source and results support

The following URI schemes are supported for source content:

  • file
  • jar

The following URI schemes are supported for result content:

  • file
  • jar

Building

Compile the code:

  1. sbt compile

Develoment

Running a development version:

  1. sbt run

Running in Docker

The following volumes are used:

  • /var/log/app: Logs directory
  • /tmp/app: Temporary file directory
  • /var/lib/app: State file directory

Deploying

Build a distribution package:

  1. sbt dist

kuhnuri-worker's People

Contributors

jelovirt avatar

Watchers

 avatar  avatar  avatar

kuhnuri-worker's Issues

Retry submitting work

If submitting results fails, retry e.g. 3 times with 5 second intervals, and only then give up.

Restart conversion after crash

When Worker process crashes and is restarted, restart the conversion based on persisted conversion state.

Depends on:

  • #1 Persist Worker job to disk

Use

  • -XX:+ExitOnOutOfMemoryError
  • -XX:ExitOnOutOfMemoryErrorExitCode=51

To make JVM signal out of memory error.

Worker that forks JVM for DITA-OT

Add a Worker implementation that forks JVM to run DITA-OT. This allows ad hoc DITA-OT use without needing to launch separate Worker for each DITA-OT.

Worker push mode

Processing mode where queue pushes worker jobs and worker either accepts the work or rejects it.

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.