Live data from Hacker News

Show HN: KQ – Simple Job Queue for Python Using Kafka

github.com

21–30 of 31 posts

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#21
post #13

Why should I use this over the simplier RQ?

RQ is certainly useful (with finer control over messages), but we've been having a lot of problems with it lately in production due to it being memory bound (Redis). Improper code deploys or insufficient/stuck workers would quickly explode the queues and make the broker go oom in matter of hours. Memory is also very expensive. With KQ/Kafka I was hoping it would provide us with a lot more to buffer for human errors and scale better.

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#22
post #18

Earlier quoted context omitted.

Or the proven Celery

This Celery? https://news.ycombinator.com/item?id=12844206

I mean, Celery is a pretty amazing library. It has flaws, but I doubt this new project has no flaws. They are just unknown still.

For that specific bug in question, does KQ have logic around DST switch? I was not able to find any. So it looks like you would have the same bug in KQ, right?

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#23

Earlier quoted context omitted.

I am not associated with the Kafka dev team or Confluent in any way but have been using Kafka since their 0.7.x days. Speaking of their open source commitment so far, I haven't seen any kind of problems in the way they deal with the community. They have been open to bug fixes, feature enhancements and other contributions. Many of the Confluent employees you see currently, started off by contributing to the open sourc…

Yes, I think that's the one but my biggest takeaway from what I remember was "Apache is okay but..." I remember reading about half a dozen Confluent employees towing the party line and parroting the exact same argument, about how being under Apache was stifling their innovation. And yet Kafka is thriving under Apache, so their arguments smelled fishy as hell. It sounds like they are setting up the foundation to pull…

There are plenty of outside helpers, but the heavyweights doing the overwhelming majority of the work are either Jay, Jun, or Neha and/or work for one of those 3... All at Confluent. I've met both Jay and Jun in person, and watched Neha present @ MesosCon last year. If they're doing something with tech, it is going to be good.

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#24
post #19

What kind of jobs do people put into such queues? Because I've only seen job queues used as a poor man's RPC brokers and (poor?) replacement for crontab. I think I may miss some use cases where this is a valid choice.

If you don't like it don't use it. I read through your profile's comments, all you do is complain and bash other peoples ideas.

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#25
post #19

What kind of jobs do people put into such queues? Because I've only seen job queues used as a poor man's RPC brokers and (poor?) replacement for crontab. I think I may miss some use cases where this is a valid choice.

If you don't like it don't use it. I read through your profile's comments, all you do is complain and bash other peoples ideas.

> If you don't like it don't use it.

For our web application, we're already in the middle of transition from Celery to a proper RPC system, so your comment (aimed to, I don't know, make me ashamed? make me shut up and go doing some real work?) somewhat missed.

Though I really want to know if there are any sensible uses for task queue, specifically with web applications in mind, as most people seem to use task queues for that.

> [...] all you do is complain and bash other peoples ideas.

Only the stupid or incomplete ones, like somebody boasting about their system without describing what does it do or how to install and use it.

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#27

Anyone have any opinions on the long-term viability of Kafka? I've been lurking on the kafka dev mailing lists and I'm fairly turned off by the attitude from Confluent's employees that I've read from. There was a recent thread about their open source status and how they backhand Apache's open source philosophies, I'm wondering if they are thinking of moving away from open source in the future.

I'm one of the original Kafka creators and am an evil corporate shill at Confluent :-)

That was a super silly discussion and I'd be annoyed reading it too. It does not, however, represent any kind of "move away from open source" by Confluent.

The discussion was not actually about open source vs non-open source but rather around how to curate the Kafka ecosystem. Currently there are several hundred independent open source projects that act as connectors, clients, monitoring tools, processing libraries and frameworks, etc. Some of these are fantastic and active communities, some are built by companies that use Kafka, some by vendors that use Kafka in a product in some way. This has always been the structure of this ecosystem, since even before we moved Kafka into Apache. These projects are mostly Apache licensed and on github, but mostly not part of the ASF. You can see a subsample of them here: https://cwiki.apache.org/confluence/display/KAFKA/Ecosystem

The proposal from a group at Hortonworks was to duplicate one of the modules Confluent built, a REST layer, and build a new one in the main project. I don't think this is inherently a bad thing to do, but there wasn't really any concrete rationale...there was no complaint with the code in that module, nor any kind of complaint with the governance, nor any complaint with the community, etc. As a result a lot of us at Confluent kind of felt it was an odd exercise that had more to do with Hortonworks' policy of only shipping Apache projects, which in turn comes out of the weird fractious politics of the Hadoop ecosystem. The reality is that policy just doesn't fit with the Kafka ecosystem as it stands today.

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#28
post #5
post #4

One of the biggest problems with treating Kafka as a job queue is that you suffer from head-of-line blocking. Kafka doesn't expose per-message visibility/acknowledgement semantics like RabbitMQ/Redis PUSH+POP/SQS does. Each consumer group tracks offsets into the partitions of a log (aka a topic). This offset is just a number that points to a specific message in the Kafka partition. If you get stuck on message 123, yo…

Very true. I indeed found the lack of visibility into per-message information very painful when I was building this. One way I tried to alleviate the issue was providing a consumer "callback" to make it easier for users to plug their own code in to handle job failures (like your example of using SQS). I've also thought about reserving a topic + consumer group specifically for failed jobs and bake the retry logic into…

We have some consumers which treat log entries as tasks, and often it's handy to debounce some of the work into larger chunks that can be executed in parallel. The chunks can be linear or they could be grouped by some property of the message (e.g. account id). In that case, we have batches of messages with multiple non-consecutive offsets, e.x. [123, 145, 155], [122, 124, 144]. In practice, that means inserting each message offset into a per-partition sorted set of pending work. When a batch completes, all the offsets in that batch are marked as "complete" and we commit the lowest safe offset. Using the example above, if the batch [122, 124, 144] completed, we'd still have [123, 145, 155] outstanding which means the lowest safe offset is 122* even though 124 and 144 also completed in batch 1. Until that second batch completes, 123 is still outstanding making it the barrier to commiting a higher offset.

Our batching consumers provide pluggable behavior for handling a failing batch, but usually it's pushed onto SQS since those can cycle around a few times until we notice and fix whatever condition is preventing progress on that work.

* - 123 actually, as if you commit offset 123 the consumer will fetch offset 123 again on start, but that's implementation esoterica

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#29
post #18

Earlier quoted context omitted.

Or the proven Celery

This Celery? https://news.ycombinator.com/item?id=12844206

Dunno why people would blame the Celery devs for that bug - if you're setting the clock on production servers to a non-monotonic TZ you are going to have a bad time.

Re: Show HN: KQ – Simple Job Queue for Python Using Kafka

#30
post #29
post #18

Earlier quoted context omitted.

This Celery? https://news.ycombinator.com/item?id=12844206

Dunno why people would blame the Celery devs for that bug - if you're setting the clock on production servers to a non-monotonic TZ you are going to have a bad time.

So you basically blame people for living in countries that use daylight saving time? O_O

Also, I would understand if it were tasks between 2AM and 3AM that run twice in transition from summer time to winter time (there are two 2:30 that day, after all), but the bug affected tasks scheduled for the middle of the day.

Post reply on HN