
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
archimedes-jobs
Advanced tools
Archimedes is an abstract distributed job engine on AWS.
const Archimedes = require("archimedes-jobs")("<NAME_OF_LAMBDA_FUNCTION>");
import archimedes from "archimedes-jobs";
const Archimedes = archimedes("<NAME_OF_LAMBDA_FUNCTION>");
Archimedes.create({
jobType: "<JOB_TYPE>",
inputData: {
//<all json-like input data the job needs to know>
},
inputFiles: {
//<all file-like input data like urls to s3 the job needs to know>
},
estimations: {
//<all job meta metrics the system needs to know in order to triage job execution>
}
}).then(job => {
console.log(job);
}).catch(err => {
console.log(err);
});
Archimedes.signal({
jobId: job.id,
state: "DISPATCH"
}).then().catch();
Payload for job execution will be:
{
"id": "<JOB_ID>"
}
Then use Archimedes to get all job data including inputData
and inputFiles
:
let job = await Archimedes.get({
jobId: "<JOB_ID>"
});
Then signal that we are executing this:
job = Archimedes.signal({
jobId: job.id,
state: "EXECUTE"
})
This will in particular now add a currentExecution
object to the job object:
let jobExecution = job.currentExecution; /* {
executionId: 'XXX',
createdAt: 'YYY',
updatedAt: 'ZZZ',
metrics: {},
progress: 0,
state: 'EXECUTE',
failureReason: '',
finishedAt: null
} */
While you're executing you might want to periodically upgrade metrics (e.g. max cpu load, max memory usage etc.) as well as progress. This can be of use two-fold:
To update progress and/or metrics:
Archimedes.updateExecution({
jobId: "XXX",
executionId: jobExecution.executionId,
progress: 0.5,
metrics: {
cpu: 1234,
memory: 5678
}
})
Once you're done with the job, you can store your outputData
and outputFiles
like so:
Archimedes.update({
jobId: "XXX",
outputData: {
...
},
outputFiles: {
...
}
})
And you transition the job to success or failure like so:
Archimedes.signalExecution({
jobId: "XXX",
executionId: jobExecution.executionId,
state: "SUCCESS" // "FAILURE"
// failureReason: "XXXX"
})
FAQs
Archimedes is an abstract distributed job engine on AWS.
The npm package archimedes-jobs receives a total of 1 weekly downloads. As such, archimedes-jobs popularity was classified as not popular.
We found that archimedes-jobs demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.