A MongoDB based jobs database
Services are provided as Code APIs, REST APIs (Coming Soon), and WebSocket APIs (Coming Soon).
Jobs are created with a queue id, allowing for segmentation and a set of attributes. IJobCreationService and MongoJobCreationService allows you to create a new Job by providing a QueueId and the JobAttributes, then returns the new Job.
New Jobs can be viewed without effecting the queue by peeking at the next set of jobs that matching a given attribute query. If one you chose to start a job you must first attempt an acknowledgment in order to ensure that it has not already been picked up. IJobPeekNextService and MongoJobPeekNextService allows you to peek at the queue using criteria provided in PeekNextOptions once you have peeked you can chose to apply a JobAcknowledgment a Job and then do the work.
An object that holds the query parameters.
- QueueId: QueueId
- HasAttributes: JobAttributes (Optional)
- Limit:
int?
(Optional)
If you want to take the next job matching a given attribute query, this action will acknowledge the next available job and return its data. IJobTakeNextService and MongoJobTakeNextService allows you to take the next item in the queue given the criteria provided in the TakeNextOptions.
An object that holds the options for the take feature.
- QueueId: QueueId
- Acknowledgment: JobAcknowledgment
- HasAttributes: JobAttributes (Optional)
Allows you to query the jobs of a queue by the criteria of a job query. IJobQueryService and MongoJobQueryService make up the code API for seeing what jobs exist. This query is made using the JobQuery
An object that holds the query parameters.
- QueueId: QueueId (Optional)
- HasAttributes: JobAttributes (Optional)
- Limit:
int?
(Optional) - HasBeenAcknowledged:
bool?
(Optional) - HasResult:
bool?
(Optional)
If you have seen a job that you want to start working, you can post an acknowledgment which will return true if still available, or false if the job is already acknowledged. IJobAcknowledgmentService and MongoJobAcknowledgmentService allows you to apply a JobAcknowledgment to a Job and returns an AcknowledgmentResult.
The result of trying to acknowledge a job.
- Success:
bool
You can update the job with reports about the progress. IJobReportService and MongoJobReportService allow you to add as many JobReport to a Job as makes sense for your use-case.
One you have completed a job you can call this to report a final result. IJobCompletionService and MongoJobCompletionService allows you to add JobResult to a Job.
Types are provided for static typing in C#, and serialize to BSON and JSON.
The record for the job as a whole, it consists of:
- Id: JobId
- QueueId: QueueId
- Attributes: JobAttributes
- Acknowledgment: JobAcknowledgment
- Reports: JobReport[]
- Result: JobResult
The unique id for a given job.
A dictionary of attributes for this job.
- BSON Representation - BsonDocument
- JSON Representation - object
A record of the acknowledgment.
- BSON Representation - BsonDocument
- JSON Representation - object
A message about the progress of a job.
- BSON Representation - BsonDocument
- JSON Representation - object
A record of the final result.
- BSON Representation - BsonDocument
- JSON Representation - object
An identity that provides the ability to segment the queue, this can be leveraged as an Authorization point.
- BSON Representation - BsonString
- JSON Representation - string
Obviously this is just high level information about where the project is heading.
Get all services exposed via code API's functional with use-case based integration tests.
Get all of the services exposed via HTTP resource/verb strategy using a master API key.
Get the rest API hosted in docker.
Getting queues to only be available to certain entity/pass combos.