Comments (5)
hi, why consumer need to be isolated from producers?
beanstalkd not support that scenario or other reasons?
from turbocharged.beanstalk.
Hi @chrcao!
Beanstalk does support that scenario, but you have to be careful with it.
It has been a while since I worked with Beanstalk, but as I recall, Beanstalk responds to commands in the order they were sent. Let's say a client tried to be a consumer and producer at the same time, and sent these commands:
reserve
put 1 0 10 foobar
If there are no jobs in the tube for the reserve
, then the put
will be ignored until the reserve
finally receives a job.
That's probably not a great outcome, and it would be easy to make that mistake. So, that's why I feel like a good client library should help the developer avoid accidentally causing that problem.
from turbocharged.beanstalk.
@jennings thanks for you answer, i got the point.
and another question when I review beanstalkd code. the data type of job id from beanstalkd is uint64.
in c#, the same capacity data type is ulong. Wil these cause problem when beanstalkd insert new job and return a job id more bigger than int(using in this client)?
from turbocharged.beanstalk.
Probably! 😄
Good catch. If you want to create a pull request for that, please do.
from turbocharged.beanstalk.
I no longer think this issue makes sense to do. The caller is perfectly capable of managing the number of connections they create.
But it does make sense to make BeanstalkConnection
handle reconnection logic. Right now, if you create a worker and the connection dies, the worker dies. That isn't good.
from turbocharged.beanstalk.
Related Issues (7)
- Built-in serialization of objects rather than byte arrays HOT 1
- Rethink ReserveAsync() and friends HOT 1
- Add missing commands HOT 1
- How to connect beanstalk server with a proxy? HOT 3
- Worker stops monitoring of tube after a period of time (~2 hours) HOT 3
- Reading Message Stream Fails To Read Expected Number Of Bytes HOT 2
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 turbocharged.beanstalk.