Comments (4)
I agree that employing some message queuing pattern would be a good idea. What MQ service have you got in mind for this ? Just in internal home-cooked MQ ?
In any case the use of an interface allowing the use of an internal MQ service that canpotentially be swapped for a separate MQ service like SQS or RabbitMQ would be good for larger scale deployments but probably out of scope for the moment.
from lxhive.
Quick shot: All you need to store inside the queue is the statementId (either part of the request body or created before) and then re-visit the statements via a scheduler and process them. This would allow us still to return a posted statement by ID instantly albeit it might not be included in some search queries yet.
"processing" I mean readonly, extracting some meta data and store them into some fast lookup collections and the document apis.
Not sure how this would work with attachments as we store only fileUrls by convention. Worst solution would be that we change statement records after storage (performance, spec compliance).
from lxhive.
@leogaggl there are several backend-agnostic queue libraries available for PHP. Using one of them would give us the flexibility to change the queue provider dynamically (obviously).
However, seeing as we already use MongoDB and as you can basically store any document in it, I'd say initially the best bet would probably be to simply use mongo to enqueue and dequeue jobs.
from lxhive.
agree with @sraka, the simplier the better
in regards to attachments. Store a fileURL in the statement with a naming convention /<storage>/<statementId>/<array_index_of_submitted_attachement>
Binary data are processing and moving are async, until then we return for this fileUrl:
202 Accepted
The request has been accepted for processing, but the processing has not been completed. The request might or might not eventually be acted upon, as it might be disallowed when processing actually takes place.
from lxhive.
Related Issues (20)
- Does it support CMI5 ? HOT 3
- make all header names case insensitive HOT 3
- add full support HEAD requests HOT 1
- Installation problem requires ext-mongo >=0.9.0 HOT 1
- composer warning: Package league/url is abandoned
- Resolve TODO in scr/Storage/Adapter/Mongo/OAuth.php HOT 2
- Config oauth unused properties HOT 2
- composer install - php 7.0 incompatibility (dev dependency) HOT 3
- alternate request (GET>POST) syntax support fore "more" url HOT 1
- Storage activities trim trailing slash from IRL
- temporary GET / request
- ping DB via a public endpoint HOT 1
- ExtendedQuery, pagination issue wit until_id
- Abandoned package league/url HOT 1
- Default expiry time is incorrect for temporary access tokens HOT 1
- Expose Custom headers not working HOT 1
- Change lxHive organisation and ownership HOT 1
- lxHive error launch in Moodle plugin (https://github.com/davidpesce/moodle-mod_tincanlaunch)
- /statements endpoint includes "voiding statements"
- PUT to /activities/state responds with "Cannot merge!"
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lxhive.