tony824 / accumulation Goto Github PK
View Code? Open in Web Editor NEWLicense: Eclipse Public License 1.0
License: Eclipse Public License 1.0
Context:
As a developer, I need put some cheap Clojure code in HTTP req and ask the server to run this piece of code for me.
Acceptance Criteria:
Create the job
POST req /v1/jobs
with params {:job-name "Sum 100 and 2" :user-id 4 :job-content "(+ 100 2)"}
a) authenticate the user and return 401 when the user is not logged on
b) authenticate the user and return 403 when the user does't have permission to create jobs
c) return 404 when there is an error in url
d) return 400 when missing params or the submitted code has syntax errors . Params could be users, job name , job content (Clojure code)
e) return 200 and job-id if everything is good. e.g.{:job-id 123}
Check the job status by job-id and get results when the job is done
GET /v1/job/:job-id
a) authenticate the user and return 401 when the user is not logged on
b) authenticate the user and return 403 when the user does't have permission to query the job
Note: super admins have permissions to query any jobs
c) return 200 and {:status "In progress"}
job status could also be not found
, in queue
d) return 200 and result when the job is finished. e.g. {:status "Finished" :result "102"}
Control this feature by env var ENABLE_JOB
, when no var or set ENABLE_JOB=false
return 400 with message not enabled feature
Release Note for users:
Deploy Note for system team:
set env var. ENABLE_JOB
Impact on confidentiality:
No, this feature doesn't affect existing confidentiality
Impact on availability
No, this feature doesn't affect existing availability
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.