Security News
PyPI Now Supports iOS and Android Wheels for Mobile Python Development
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
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 3 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
PyPI now supports iOS and Android wheels, making it easier for Python developers to distribute mobile packages.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.