Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
benmanns
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
27 ms
·
271.
▲
by
benmanns
13y ago
It's the percentage of time that the government was functioning for the last year. So, if they are "down" for 36.5 days, their service level for last year would be 90%.
272.
▲
by
benmanns
13y ago
If there is a better method for prediction, and a prediction market exists, you can arbitrage the difference to make money and bring accuracy to the market.
273.
▲
by
benmanns
13y ago
You raise a good point. I did some research to see the general percentage of public education costs are dedicated to payroll. According to [0], payroll + capital + debt service accounts for 84.2% of education costs in Texas, which are costs
274.
▲
by
benmanns
13y ago
And you might like: if _, err := somethingThatFails(arg); err != nil { return fmt.Errorf("failed with arg=%v, %v", arg, err) }
275.
▲
by
benmanns
13y ago
Ack, sorry for the confusion. I mean that if your users are waiting on jobs, they get the result when `encode time` + `enqueue time` + `wait time` + `dequeue time` + `decode time` + `execute time` is completed. Even though you might not nee
276.
▲
by
benmanns
13y ago
Okay, cool. I do the same thing on the polling side, but don't use reliable queueing yet. I think that is probably the best way to handle the failures.
277.
▲
by
benmanns
13y ago
That's a great question that I haven't thought about before. You could possibly write a Go wrapper that executes your workers, getting the job from a command line argument rather than Redis. https://gist.github.com/
278.
▲
by
benmanns
13y ago
True, but I thought that that would look disingenuous, because it would look like the worker times scale logarithmically when they are about as linear as you can get.
279.
▲
by
benmanns
13y ago
Hmm. I took a look at this and it could be a possibility, but RQ's message format is much different from Resque and Sidekiq's. See https://gist.github.com/benmanns/6583712 for a comparison.
280.
▲
by
benmanns
13y ago
Yes! I think you capture my intent with goworker. I like to think of it as a halfway point between pure C or C extensions and pure Ruby.
281.
▲
by
benmanns
13y ago
Even though most of the time is spent on I/O, goworker can get wins from its super cheap concurrency. I was able to run 100,000 workers on my single 4GB RAM laptop.
282.
▲
by
benmanns
13y ago
Hello! Thanks for your comment and tweet. I've been watching both Resque and Resque 2 while writing goworker. I would definitely like to stay in contact with you.
283.
▲
by
benmanns
13y ago
Awesome! Contact me (info in HN profile), and I'll help you get started.
284.
▲
by
benmanns
13y ago
You're right that this is less significant if you are hitting an empty queue (triggering a timeout) between each request. However, even when not comparing (seconds to computer 10000 jobs) benchmarks, you still get benefits from goworke
285.
▲
by
benmanns
13y ago
Yes, this is exactly what I was thinking. You can replace one single Resque worker to see how the performance improves without changing the front-end queuing or having to run an additional queuing server
286.
▲
by
benmanns
13y ago
They are typically 10x faster in "raw" speed and 100x faster for concurrency. However, since Go's goroutines take almost no memory, you can run over 1,000 workers in the same amount of memory as one Ruby worker. On the queuin
287.
▲
by
benmanns
13y ago
How do you handle when Heroku sends a SIGTERM to kill your process? I couldn't find a way to preempt running workers, so everything running on Heroku has to finish within 10 seconds or you can lose it.
288.
▲
by
benmanns
13y ago
That was my thought. However, with goworker you can keep 9/10 workers in Ruby and only your most used or most resource-intensive in Go.
289.
▲
by
benmanns
13y ago
That's really cool. Where are you using it in production? Full Sidekiq compatibility (scheduling, retries) was my next goal.
290.
▲
by
benmanns
13y ago
Yes, workers are written in Go, but can be queued from Ruby. I'll put together an example in the goworker-examples [0] to test web crawling. [0] https://github.com/benmanns/goworker-examples
291.
▲
by
benmanns
13y ago
Awesome! Can you send me your contact info? Mine is in my HN profile.
292.
▲
by
benmanns
13y ago
Cool! I'll check Jesque out and add it to the benchmarks.
293.
▲
by
benmanns
13y ago
Ah, yes. I'm using Flot and was having trouble getting good looking labels. I'll work on that right away, but in the meantime: X-axis is jobs, Y-axis is seconds to execute.
294.
▲
by
benmanns
13y ago
This is a weekend project I started on as a way to learn Go that I quickly realized would be something worth sharing. It lets you queue jobs from Rails that are processed in Go, which can speed things up considerably. I would appreciate all
295.
▲
Show HN: goworker – a faster, Resque-compatible background worker
(goworker.org)
179 points
by
benmanns
13y ago
|
58 comments
296.
▲
by
benmanns
13y ago
Is DHH interested in Rails opportunities? https://gist.github.com/dhh/1285068
297.
▲
by
benmanns
13y ago
The Constitution and its amendments are designed to protect citizens from the government, not from private corporations. There may be other laws preventing this sort of credit reporting, but the Constitution does not.
298.
▲
by
benmanns
13y ago
Or even worse, curl http://example.com/install.sh | sh
299.
▲
by
benmanns
13y ago
For those who don't know how reCAPTCHA works, they present two words to the user. One "known" word and one "unknown" word. When you enter both, Google compares your entry to the known word for CAPTCHA validation and
300.
▲
by
benmanns
13y ago
Are you in the market for $40,000 websites? Additionally, this is not about playing games -- it's about finding what is valuable to a client and delivering it.
More ›