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

isdp

v0.0.7

Published

ISDP multi-file download service

Downloads

9

Readme

ISDP HSI download service

Installation

sudo yum install nodejs npm git
git clone [email protected]:hayashis/isdp.git
cd isdp
npm install

Upgrade

First, update the latest ISDP service

git pull

Then update ISDP dependencies..

npm update

Configuring

Copy ./config/config_sample.js to ./config/config.js

Edit ./config/config.js

See comments within the config file for more info, but if you aren't sure, feel free to contact me at [email protected]

Running

All production node apps should run under pm2. If you agree, install pm2

sudo npm install pm2 -g

Finally, start the ISDP service

pm2 start isdp.js

To auto-start pm2 (and isdp app) during the next reboot,

pm2 save
sudo pm2 startup redhat 
  • Use "systemd" instead of redhat if you are installing on systemd enabled host.
  • If you don't want to run the app as root, specify the user ID you want to run pm2 under (like -u hayashis)

Monitoring

pm2 stores stdout/stderr from ISDP to ~/.pm2/logs . you can monitor it by

pm2 logs isdp

You can check the status of ISDP server via /health endpoint

curl http://localhost:12346/health

If this doesn't return, or return non-200, then something is wrong.

You can also check the runtime information from pm2

pm2 show isdp

TODOs

  1. Currently it receives request via web and immediately start processing request. This means all simultaneously requests will be executed in parallel... instead, I should do following.
  • When a request comes, post to AMQP
  • Write a separate handler that pulls request from AMQP one at a time and handle request
  1. Currently doesn't handle invalid file path gracefully. Maybe I should skip missing ones and output a text file stating that files couldn't be downloaded?

  2. Make sure an appropriate error message is generated (to who?) if incoming message is bogus.

  3. Add a sensu check to make sure web-receiver and request handlers are running.

  4. what happens if stage / publish directory can't be written? (doesn't exist, no access, not directory, disk is full)

  5. add timeout mechanism for each task? also, should I async.retry?

  6. what happens to error messages? stored in configured location (user can specify level)

  7. there isn't much in the mocha test.. I need to add more unit testsing

  • If caller send broken JSON, will it be logged in the error message?

DONE

  1. what happens if amqp is down? I am not sure if it's pooling messages to be published locally, but as soon as amqp server comes back online, it reconnects seemslessly

  2. what happens if 2 request comes in simultaneously? I am afraid "var job = this;" on async.series on sca-datamover will point to 2nd jobs while processing the 1st job? I've created a test script and it seems to work as expected. both job eventually finished successfully and correctly

What happens if unzip, tar, etc.. commands doesn't exists in path?