HNHacker News
TopNewBestAskShowJobs

timmaxw

555 karma · joined July 25, 2011

submissionscomments
timmaxw··on EPA gives Flint $100M to help repair pipes
I suspect the primary cause was engineering incompetence rather than a desire to save money. The water quality problems were caused by a lack of corrosion inhibitors; corrosion inhibitors would have cost $140/day, which is cheap compared to the $4 million that Flint spent upgrading the water treatment plant. It seems most plausible to me that the Flint engineers simply weren't thinking about the need for corrosion inhibitors.
timmaxw··on Lockheed Martin completes new battle laser for U.S. military
I don't think that current laser systems are anywhere near powerful enough to destroy a landing craft. I think that reason why lasers are potentially effective against aircraft and missiles is that they are intrinsically fragile and rely on speed to avoid getting hit. But a landing craft can afford to have some armor, and I don't think it takes much armor to stop a laser.
timmaxw··on U.S. Incarceration and Crime Rates Continue to Fall in Tandem
Follow-up studies were unable to reproduce the Rat Park results.

https://www.ncbi.nlm.nih.gov/pubmed/9148292?dopt=Abstract

https://www.ncbi.nlm.nih.gov/pubmed/2616610?dopt=Abstract

timmaxw··on The Talk
https://en.wikipedia.org/wiki/Tests_of_special_relativity

https://en.wikipedia.org/wiki/Tests_of_general_relativity

timmaxw··on One More Sign World Is Shrinking – eBay Is for Suckers
Behind the specific problem of eBay prioritizing buyers over sellers, there's a more general problem of how marketplaces can determine who's right in a dispute. Other commenters have suggested taking a video while packing up the item and unpacking the return. However, that could be vulnerable to fraud as well; how can you prove that the package you film yourself opening is the package the other party actually sent?

Perhaps UPS/Fedex could act as a verification service. For a small fee, the UPS store employees could photograph the contents of the package before it gets mailed, check if the electronics turn on, write down the serial numbers, etc. and send a report to eBay.

timmaxw··on Ask HN: What simple tools or products are you most proud of making?
I made a printed circuit board to make it easy to connect things to a 1000 watt computer power supply I had lying around. Similar adapters are available commercially, but I couldn't find one that could manage 1000 watts.

http://timmaxwell.org/pages/atx-breakout/index.html

timmaxw··on Platform as a Service team takes even-handed approach to meetings
Most of their hand signals are similar to hand signals used by the Occupy movement [1]. However, the Occupy movement "agree" signal involves wiggling the fingers [2]. It seems to have come from the ASL sign for "applause" [3].

[1] https://en.wikipedia.org/wiki/Occupy_movement_hand_signals [2] https://www.youtube.com/watch?v=HaqpAlvDKsI&feature=youtu.be... [3] https://www.signingsavvy.com/sign/APPLAUSE/7950/1

timmaxw··on RethinkDB needs a new home
From reading your other comments in this thread, it seems like you have misunderstood what the AGPL does. If you modify RethinkDB and run the modified RethinkDB server as part of a public-facing web app, you must release the code for your modified RethinkDB server to the community. But you have no legal obligation to release the rest of your web app to the community. Writing a web app that connects to RethinkDB over the network doesn't count as "modifying" the RethinkDB source code, so most RethinkDB users would never have to release any source code.

You've probably heard that the difference between the GPL and the AGPL is whether they apply to access over a network or not; but you seem to have misinterpreted how that works. The GPL says that if you modify GPL-licensed software and distribute compiled binaries to users, you must also distribute the source code under the GPL. The AGPL says the same thing as the GPL, except that making the modified software available over the network is treated the same as distributing the modified software as a compiled binary.

timmaxw··on RethinkDB is shutting down
If you'd scrolled another 10cm down the page, you would have seen the testimonial from NASA:

> At NASA, RethinkDB is radically simplifying how we provide real-time services in support of Extra-Vehicular Activity. -- Collin Estes, Director of Software Engineering, Chief Architect - MRI Technologies Inc. - NASA / ESOC

My guess is that RethinkDB failed financially because they had a lot of users but not a lot of customers. Most users weren't buying support contracts.

timmaxw··on RethinkDB is shutting down
> My understanding would have been that AGPL means all code that interfaces with the database (i.e. all code that uses ReQL) must also be AGPL.

The client drivers are licensed separately under the Apache license. Only the database server itself is AGPL. Read the last question on the rethinkdb.com FAQ: https://rethinkdb.com/faq/

timmaxw··on This Is Your Life in Silicon Valley
The calculator you linked is measuring household income, not individual income. Rerunning your numbers with a calculator that uses individual income [1], I find that the top 1% of individual earners make at least $270k/year and an income of $150k/year would put you just barely in the top 5% of individual earners.

[1] https://dqydj.com/income-percentile-calculator/

timmaxw··on Roomba creator responds to reports of ‘poopocalypse’: ‘We see this a lot’
Idea: Make the Roomba treads light-colored. Point an LED and photodetector at the top of the tread, the part that's inside the robot. If the reflectivity of the surface ever changes suddenly, then either something is stuck in the wheel or the wheel is tracking something around the house, so the Roomba should stop and alert the user.
timmaxw··on Programmers Need to Learn Statistics or I Will Kill Them All (2015)
> If the average response is < 1 sec than a 60 second standard deviation means that many responses are being made before the query is sent.

Imagine if 99.99% of queries take 1 millisecond, and the remaining 0.01% of queries take 6000 seconds. Then the mean is 0.6010 seconds and the standard deviation is 59.997 seconds.

(Muphry's law strikes again...)

timmaxw··on RethinkDB 2.1.5 performance and scalability
> Minor failover is automatic, but major failover requires manual intervention to repair tables even when there's no data loss. That's a little confusing and not obvious.

Wasn't this fixed in RethinkDB 2.1? Or are you referring to something different?

timmaxw··on Zero size arrays in C
Did you mean the other way around? I think someArray[] is a flexible array member and someArray[0] is a constraint violation.
timmaxw··on Basic Income and Blockchain Courts
It's not trying to make a cohesive point; it's a collection of short, unrelated posts bundled together. Many of Matt Levine's posts [0] are in this style, including his most recent post [1].

[0] http://www.bloomberg.com/view/contributors/ARbTQlRLRjE/matth... [1] http://www.bloomberg.com/view/articles/2016-05-06/hedge-fund...

timmaxw··on Jepsen: RethinkDB 2.2.3 reconfiguration
During normal operation, RethinkDB uses the standard Raft protocol for managing configuration operations. The Raft protocol only uses the clock for heartbeats and election timeouts. So we're not using the clock as a trusted source of truth.

However, a Raft cluster will get stuck if half or more of the members are permanently lost. RethinkDB offers a manual recovery mechanism called "emergency repair" in this case. When the administrator executes an emergency repair, RethinkDB discards the old Raft cluster and starts a completely new Raft cluster, with an empty log and so on. However, some servers might not find out about the emergency repair operation immediately. So we would end up with some servers that were in the new Raft cluster and some that were still in the old Raft cluster. We want the ones in the old Raft cluster to discard their old Raft metadata and join the new Raft cluster.

The process of having those servers join the new Raft cluster is managed using the epoch_t struct. An epoch_t is a unique identifier for a Raft cluster. It contains a wall-clock timestamp and a random UUID. When the user runs an emergency repair, the wall-clock time is initialized to max(current_time(), prev_epoch.timestamp+1). When two servers detect that they are in different Raft clusters, the one that has the lower epoch timestamp discards its data and joins the other one's Raft cluster. The UUID is used for tiebreaking in the unlikely event that the timestamps are the same.

So the clock isn't being used as a trusted source of truth; it's being used as part of a quick-and-dirty emergency repair mechanism for the case where the Raft cluster is permanently broken. The emergency repair mechanism isn't guaranteed to preserve any consistency invariants (as the documentation clearly warns).

timmaxw··on RethinkDB 2.1 is out: high availability
tim@rethinkdb here. coffeemug's earlier comment is not quite right. There were two reasons why we went for this hybrid approach where Raft handles metadata but not documents: because of how Raft interacts with the storage system, and because of sharding.

In the Raft protocol, the leader sends AppendEntries; the follower writes the log entries to persistent storage, but doesn't apply them to the state machine yet; the leader sends another AppendEntries with a higher commit index; and then the follower applies the changes to the state machine. In RethinkDB's case, the "state machine" is the B-tree we store on disk. One of the guarantees we provide is that if the server acknowledges a write to the client, then all future reads should see that write; and we perform reads by querying the B-tree. So we can't acknowledge writes until they've been actually written to the B-tree, and we can't start writing to the B-tree until after the write has been committed via Raft. So that's where the latency would come from if we were using Raft to manage individual documents. We considered a couple of ways to work around this. One would be to make reads check both the B-tree and the Raft log; but that makes the read logic much more complicated. Another would be to start writing to the B-tree as soon as we put the write in the Raft log. The problem is that Raft expects to be able to roll back parts of its log at any time, and our storage engine's MVCC capabilities aren't good enough for that. The hybrid approach allows us to have good latency without major rewrites of the existing storage engine.

The other reason is that RethinkDB allows tables to be split into shards, and the number of shards can be changed while the databases is running and accepting queries. We considered having one Raft instance per shard, but we would have needed to modify the Raft algorithm to allow splitting and merging Raft instances while they are running and accepting queries. (This is approximately what CockroachDB is doing [1].) But the Raft algorithm is really tricky to get right even when you're not trying to modify it, and we wanted to stick as closely as possible to the official algorithm to minimize bugs. The approach we ended up going with allows us to have the performance and convenience of live resharding without having to modify the Raft algorithm.

In response to your question about consistency guarantees: RethinkDB gives users several options for trading off consistency and latency. The default is to acknowledge writes only once they're safely on disk on a majority of replicas, but to perform reads only on the primary replica (leader). This doesn't give perfect consistency; if the leader fails over, reads that hit the database around the time of the failover might see outdated data, or they might read writes that were rolled back as part of the failover. Unfortunately, the only way to get stronger consistency guarantees is to wait for a majority of replicas to acknowledge the read, which makes performance much worse. We offer a safe-but-slow mode for reads, but it's not the default because the performance is so bad. We also offer fast-but-unsafe modes for writes, for users that want better latency and are OK with losing the last few writes in the event of a failover. See the documentation [2] for more information.

[1] http://www.cockroachlabs.com/blog/scaling-raft/

[2] http://rethinkdb.com/docs/consistency/

timmaxw··on “The benchmark numbers are completely wrong for both databases”
In the benchmark script [1] that the author provided on his GitHub account, there's a call to ensure_index() for MongoDB. And he's reporting an average latency of 0.15ms for MongoDB read operations, so it's pretty clear that the MongoDB index is actually being used.

[1] https://github.com/martinrusev/rethinkvsmongo-benchmark/blob...

timmaxw··on “The benchmark numbers are completely wrong for both databases”
> the author has corrected the discrepancies since then

As of the time I posted this comment, the blog post still seems to be comparing indexed MongoDB operations against non-indexed RethinkDB operations. Under those conditions I'd expect RethinkDB to be at least 1000x slower than MongoDB. The fact that he's finding that RethinkDB is only 3x slower than MongoDB makes me think that there are still other major problems with this benchmark.

> No, but at least he tried...

It's true that the author tried; but that doesn't change the fact that people are going to read this blog post and assume that the numbers are at least approximately correct. As a RethinkDB employee, it really frustrates me to see RethinkDB being judged according to benchmarks that are conducted so carelessly that they are essentially random.

I think this is the fourth time in the past year that I've seen a third party try to benchmark RethinkDB and get something wrong. Maybe we need to start a "best practice" of checking in with the maintainers of a project before publishing benchmark results about the project.

timmaxw··on Is HTML a Programming Language?
I'd say that a CPU that needs a clock but does not have one is not Turing-complete. CSS plus an infinite stream of user input is Turing-complete, but CSS itself is not Turing-complete. I should make it clear that I'm not saying, "my definition is the one true definition of Turing-completeness"; just that I prefer this definition. One reason I prefer this definition is that the claim "CSS is Turing-complete" makes it sound like browsers could take unbounded time to render a webpage that only used HTML and CSS, which as far as I can tell is not true.
timmaxw··on Is HTML a Programming Language?
I wouldn't count that as Turing-completeness. It requires the user to repeatedly press the tab and space keys to advance the computation; the amount of computation that the CSS is doing for each press of the tab and space keys is trivial. Many systems that are not normally considered "Turing-complete" have the same property. For example, one can construct a finite state transducer that takes a Turing machine state as input and produces the next state of the Turing machine as output. Repeatedly applying this transducer to some input string will simulate a Turing machine, but finite state transducers are not considered Turing complete.
timmaxw··on Call Me Maybe: MongoDB Stale Reads
Actually, look at some of the things that @aphyr has tweeted about FoundationDB:

https://twitter.com/aphyr/status/542792308492484608

https://twitter.com/obfuscurity/status/405016890306985984

timmaxw··on Call Me Maybe: MongoDB Stale Reads
RethinkDB engineer here. RethinkDB currently doesn't support automatic failover, so this test couldn't be performed for RethinkDB yet. But when we implement automatic failover we're planning to test it against Jepsen. That will probably be sometime in the next few months.
timmaxw··on RethinkDB 2.0 is amazing
Note that the 9ms performance claim in this article is mistaken. The author has issued a correction: http://rob.conery.io/2015/04/17/rethinkdb-2-0-is-amazing/
timmaxw··on If We Dig Out All Our Fossil Fuels, Here’s How Hot We Can Expect It to Get
But that copper hasn't been destroyed; it's just tied up in the form of pipes, power lines, etc. If civilization collapsed, our successors could "mine" pure copper from the ruins of our cities. If anything, pure copper would be more easily accessible post-collapse than in the Copper Age, because industrial civilization has already done the hard work of converting it from 0.6% ores to pure copper.
timmaxw··on RethinkDB 1.16: cluster management API, realtime push
Auto-failover is hard because of some fairly deep-rooted aspects of how RethinkDB is implemented. When one of your servers dies, the RethinkDB cluster won't allow any reconfigurations until it reconnects. If the server is permanently dead, you can tell the RethinkDB cluster to go on without it; but you shouldn't do that unless the server is actually permanently dead, because the server won't be allowed to rejoin the cluster later. This makes it hard to write an automatic failover tool because you'd need to be able to tell the difference between a server that's permanently dead and a server that's just dropped its connection for a bit.

The solution is to re-architect RethinkDB so that it can reconfigure a table even if there's a disconnected server. This is a pretty big project, but we're working on it, and it will probably ship around April or May. We'll also include server-side auto failover at that time, because it's easy once this problem is solved.

timmaxw··on Facebook was down
http://www.offshoreenergytoday.com/cormorant-alpha-shutdown-... estimates that the Cormorant Alpha shutdown cost $10,000,000/day, or about $100/second. That figure comes from multiplying the oil production (90,000 barrels/day) by the oil price ($110/barrel). Where did you get the $70,000/second figure from?
timmaxw··on What's coming up for RethinkDB in 2015 [video]
This documentation is for RethinkDB 1.15, but the cool features in Slava's presentation are arriving in RethinkDB 1.16.
timmaxw··on What's coming up for RethinkDB in 2015 [video]
Right now you have to start over if your changefeed gets disconnected. But we're discussing better options; see <https://github.com/rethinkdb/rethinkdb/issues/3471>.

We don't have any plans to support direct access from web clients. The main problem is security. RethinkDB doesn't have any notion of users or access privileges, so any client can e.g. drop a table. We might add this eventually, but it's low on the priority list. See <https://github.com/rethinkdb/rethinkdb/issues/266> for more discussion.

← PreviousPage 4 of 5Next →