Use with Rust #988
Replies: 16 comments 13 replies
-
|
Beta Was this translation helpful? Give feedback.
-
BTW. Your use case is precisely one of the reasons I'm developing a |
Beta Was this translation helpful? Give feedback.
-
Well - I might not follow. But what I want to do is use a Rust http server. For each request I add a job to the queue. I simply want to add to the queue from the Rust server |
Beta Was this translation helpful? Give feedback.
-
Surely adding an item to the queue is just adding specific key/values to Redis? |
Beta Was this translation helpful? Give feedback.
-
You can certainly add jobs via direct access to https://github.com/taskforcesh/bullmq/blob/master/src/commands/addJob-9.lua Calling that should get you what you want. My question though is how are your workers implemented ? I'm unaware of any non-node projects using |
Beta Was this translation helpful? Give feedback.
-
So the http server is rust - and yeah the workers are nodejs. I want high performance for the http server |
Beta Was this translation helpful? Give feedback.
-
In what sense? @ccollie |
Beta Was this translation helpful? Give feedback.
-
Its brittle because you're sneaking around the back of the As far as the server being in If you really need speed, I'd implement the workers in |
Beta Was this translation helpful? Give feedback.
-
To be more specific, if all you're doing in the http server is pushing data to |
Beta Was this translation helpful? Give feedback.
-
I meant I want performance for the server in general. One route adds to the queue. i.e. there is some CPU bound stuff that the server does |
Beta Was this translation helpful? Give feedback.
-
How would I go about manually processing jobs from Rust? |
Beta Was this translation helpful? Give feedback.
-
I guess if you have other reasons for having a r.e. Manual Processing: I may have been overly optimistic, since this uses the |
Beta Was this translation helpful? Give feedback.
-
Cool. I'll start with the adding first. Long term I'll make this into a nice Rust lib for people to use |
Beta Was this translation helpful? Give feedback.
-
@joshbenaron curious what performance concerns you have with NodeJS? Typically performance issues are not due to the programming language you choose but more so how the processing is implemented. Also, if you're REALLY worried about performance have you considered another stack like ZeroMQ (https://github.com/erickt/rust-zmq) with Cap'n Proto (https://capnproto.org/). Although I'm not fully convinced that you'd likely see much in the line of performance gains to be honest. |
Beta Was this translation helpful? Give feedback.
-
Can you guide me to the documentation or code that would help me to post a |
Beta Was this translation helpful? Give feedback.
-
@vstepanyuk you will basically need to port this class to Rust: |
Beta Was this translation helpful? Give feedback.
-
Is there a way to implement this in Rust? Or is this already done? I just want to do basic operations like add to a queue etc. Is there a rough high level api for key structures etc and what I need to store in order to do this?
Beta Was this translation helpful? Give feedback.
All reactions