npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@big-data-processor/task-adapter-base

v0.11.2

Published

--- This is a base class for developers to extend and implment for different computing resources.

Downloads

28

Readme

A base class of Task Adapter for BD-Processor.


This is a base class for developers to extend and implment for different computing resources.

(Click to view the jsDoc on Github Pages).

Task Adapter

The Task Adapter is a core component in the BD-Processor. Task Adpater processes are spawned when a Task is executed on BD-Processor. As shown in the following figure, adapter processes mange to deploy and monitor jobs on local or remote computing resources.

What does a Task Adapter do?

An adapter process does the following things.

  1. Organizing task arguments and form job commands

    Different runtime environments have different command patterns. For example, if you use task-adapter-docker which execute the job with the docker run ... pattern. If you use a pbs scheduling system, the job submission pattern may be looked like qsub ....

  2. Scheduling jobs

    The adapter has a queue to schedule multiple jobs. There is a concurrency option to specify the concurrent job numbers and the adapter will try to maintiain the concurrency.

  3. Monitoring job states

    There are two modes for an adapter to monitor job status and it depends on the runtime environments. It specifies the ways to monitor job status and recording stdout/stderr. For the pipe stdoeMode, the job process is spawned locally and the message is directly pipe to the adpater process. The job status is directly known by the adapter process. For the watch stdoeMode, the job is executed remotely and the job status needs to be fetched. The adapter process retrieves the job status periodically. The interval is set by the updateInterval option.

  4. Recording job messages such as the stdout and stderr

    In order to allow viewing job messages in real-time, the adapter reports the latest job messages to BD-Processor.An adapter process captures job messages (stdout/stderr) based on the above mentioned modes. All jobs are organized well by the adapter. Developers can customize different ways to captures the job messages or logs for different runtime environments.

  5. Resuming job executions

    An adapter process logs the progres of each job. If one of the jobs failed, the adapter process fails in the end. If developers fixes their scripts or fixes task settings, it is very easy to rerun the adapter process on BD-Processor. The adapter process will try to resume unfinished jobs.

Overall, the workflow procedure of an adapter is shown in the following figure.

Instructions to extend this base class and implement for various computing resources

(comming soon!)

Examples

(comming soon!)

License

Licensed under the MIT license (see the license)