GithubHelp home page GithubHelp logo

Asynchronous queueing about lxhive HOT 4 CLOSED

g3i avatar g3i commented on June 15, 2024
Asynchronous queueing

from lxhive.

Comments (4)

leogaggl avatar leogaggl commented on June 15, 2024

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.

RoboSparrow avatar RoboSparrow commented on June 15, 2024

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.

sraka1 avatar sraka1 commented on June 15, 2024

@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.

RoboSparrow avatar RoboSparrow commented on June 15, 2024

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.

source

from lxhive.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.