Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

7,244 karma · joined Sep 25, 2010 (16y ago) · 2,593 submissions

Submissions

comment 12y ago · link · parent

I think a lot of it has to do with the amount of experience the readership has to this kind of "journalism". Sensationalist and highly opinionated journalism loses its impact on individuals over a few years of exposure. After a while, people start to realize that such things are almost never the full story, and you need to wait for more information and analysis to come forward before forming an opinion of your own.

The reason this kind of journalism works is simple: because there is a steady supply of new people who aren't resistant to it yet.

comment 12y ago · link · parent

What is "the usual load"?

Interesting; I'll check out the Azul one. I'm a little skeptical, but it might be an improvement. Did you see better throughput or just reduced latency?

comment 12y ago · link · parent

To me, it's interesting that after all this time and with the prevalence of languages that rely heavily on garbage collection, garbage collectors still don't seem to scale to large heaps.

Large heaps mean long pauses when doing the "mark" phase of the generation holding most of the objects. That seems like a big problem that will increase as memory sizes increase.

Maybe the way I'm looking at it is too simplistic and there are better methods now. But even in Java, which has had plenty of time to work these issues out, I have seen issues with long GC pauses.

My impression right now is that GCs just don't scale to large heaps. To use more memory, you need to either manage memory yourself (which not a lot of modern languages allow), or increase the number of independent heaps (by using more tasks/processes).

Please enlighten me if I'm wrong here.

comment 12y ago · link · parent

It's not so much that everything will look exactly like postgres. It's that the biggest difference right now between the designs is complexity (the kind that comes with maturity).

Every mature general-purpose database system makes use of both CoW/immutable design principles as well as locking and update-in-place in various contexts. It remains to be seen how "temporal databases" (as you call them) will adapt to real-world demands, but it might not look as radically different as you think.

Also, for anyone who thinks that CoW is the be-all-end-all design principle, I have my doubts. The main reason is that it doesn't compose very cleanly -- a design that involves CoW over CoW over CoW starts to look wasteful after a while.

That being said, I would not be surprised if some of these new databases found some new trade-offs that worked very nicely and got adopted by more traditional systems. Storage is not nearly as much of a concern for many kinds of problems, and it seems natural that such a shift would lead to some design changes.

comment 12y ago · link · parent

But he also does not have infinite engineering resources at his disposal. I expect that a lot of the designs are probably somewhat simplistic compared to the battle-hardened implementations in common use today.

It doesn't mean Rich Hickey was wrong; merely that we are seeing only the ultra-clean design now. After Datomic takes off and has a lot of production users in demanding environments for 5-10 years, I doubt the design will be quite so clean.

comment 12y ago · link · parent

I think you are making a mistake by reading it as a critique of immutability in general. Rather, I think the author is criticizing an overly-simplisitic approach to using immutability.

When he describes traditional databases:

"What’s happening in such a database is a combination of short-term immutability, read and write optimizations to save and/or coalesce redundant work, and continuous “compaction” and reuse of disk space to stabilize disk usage and avoid infinite growth."

He's saying that's what people arrive at after working out the issues with immutability. When you say: "Increasingly these implementation constraints will disappear as people attack them." the author would probably respond: "Yes, and people will attack them with a lot of the same strategies that SQL databases are already using today".

comment 12y ago · link · parent

It should also be noted that Afilias, which manages .org, .info, .mobi (and more), uses PostgreSQL.

So PostgreSQL is pretty heavily involved in internet infrastructure right now.

2018.

ARIN migrated from Oracle to PostgreSQL(lists.arin.net ↗)

116 points · by wireprotocol · 12y ago · 31 comments

comment 12y ago · link · parent

I don't see how Congress can be responsible for most of the reported problems. If the law was just too complicated, then I could see how portions would be inaccessible.

But what we see here are major UI failures, availability problems, losing applications partway through the process and forcing people to start over, and inexplicably inconsistent results and behaviors. These are failures of execution.

comment 12y ago · link · parent

As a counterpoint, software development arguably suffers most from the combinatorial explosion of behaviors. In other words, testing software is easier but less effective (or at least less complete).

comment 12y ago · link · parent

Why group rust and go? Rust allows control over memory and go does not, which seems like a huge difference.

comment 12y ago · link · parent

You seem down on both C and C++, but there will always be demand for languages that allow you to control memory.

Rust looks promising, but it's way too early to tell if it can really replace C/C++.

comment 12y ago · link · parent

With so many problem's, I doubt it's just an issue of testing. They probably have serious design issues and other engineering problems.

comment 12y ago · link · parent

This seems more like playing with the definition of words more than anything else. I never understood goal to mean "work tirelessly on one approach to reaching your goal until you achieve it or die trying".

Part of the reason to set a goal is to see if your path is working. Want to get 1000 sign ups by the end of the month? If it's the 15th and you have 50 sign ups, you can see that the campaign might need reworking.

comment 12y ago · link · parent

I think it makes more sense to think of erlang like a cluster machine and fault-tolerant operating system that comes with one programming language (two, if you count elixir).

If "cluster OS" or "this thing needs to keep running for 10 years straight, even through software upgrades" sounds like it addresses problems you face, then look into erlang.

If not, then you'll probably find it cool, but not particularly useful.

comment 12y ago · link · parent

From the link:

"We will contribute changes we make as part of our project to the community through the FreeBSD committers on our team."

comment 12y ago · link · parent

"What is the converse to "luck" in your argument? Is it effort, or work, or something like that?"

There are more inputs than hard work and luck. An obvious example would be the decisions one makes in life.

For instance, having a child at 20 years old, outside of a stable relationship has long been known to have different results than having a child at 25 in a stable relationship.

Decisions themselves have lots of inputs, so it's a complex issue. For instance, family and culture have a big impact on decisions, so those with different backgrounds would be expected to make different decisions, and therefore have different results.

It would be quite a surprise if different families and cultures produced the same results, after all.

Note that I'm certainly not saying that cultures are better or worse than other cultures. They may have different measures of success, for one thing; and even on one measure (like financial success) the rankings of various cultures might change radically if the environment changes.

I guess you could say that it's "luck" to be born into a family and culture that encourage the kind of decisions that are best for the environment you're in, or something like that. But that just doesn't seem to usefully inform any policy proposal.

If bad decisions are a major factor in bad outcomes, it might be more effective to encourage better decisions than to try to deal with the consequences after bad decisions are already made.

comment 12y ago · link · parent

Unfortunately the explanations aren't left as code comments, so they may be lost.

One ting nice about code review is that the code must stand on its own to pass. That means that it's likely to be understandable a year from now.

comment 12y ago · link · parent

It makes me curious what an apples-to-apples comparison would look like. What it you put the same subset in a separate innodb table and tune the memory settings so it's likely to stay resident?

comment 12y ago · link · parent

I'm a little confused... the InnoDB table and memory table had the same data, but the InnoDB table was larger (at least twice as large, I presume)?

comment 12y ago · link · parent

"manual malloc/free are increasingly futile unless you're targeting embedded devices"

Or have any algorithm that uses a lot of memory, or if you want control over how much memory the algorithm uses at a time.

In the article (which is great, by the way), you can see that mark-and-sweep means scanning all of the active objects. This does not have great scalability properties. CPU gets faster, but memory gets larger, so matters won't improve over time.

GCs are great for processes that are tiny. As soon as you have a memory-hungry algorithm, it starts looking worse.

Also, as others have pointed out, manual memory management is not synonymous with malloc/free. There are many other choices available, and region-oriented allocators are often nice for algorithms that use a lot of memory. PostgreSQL internally uses "memory contexts" where you allocate objects with the same lifetime (e.g. transaction-local state) in the same context, and wipe it all at once.

comment 13y ago · link · parent

There is a huge difference in the sophistication between what you describe and what a traditional SQL system like Postgres does.

The problem with just mmapping files is that, to sync, you have to do a bunch of random writes. To commit two transactions, you have to jump two places in the disk and do two writes. You can defer them, but then your transaction commit latency goes up dramatically. So the user is between a rock and a hard place: uncertain durability for extended periods of time, or long commit latency.

Compare that to a system based on a Write-Ahead Log (WAL). The log is 100% sequential (and often preallocated in large chunks), and a transaction is durable if the log is flushed up to some certain point. All transactions go into the same log, so under high concurrency, one flush to disk might commit several transactions. And even if you flush for each transaction, at least you don't have to jump around on disk (and, if using a controller with battery-backed cache to reduce latency, you can make do with a fairly small cache).

The writes to the main data area can be deferred for a long time (30 minutes might be normal), and syncing those is called a checkpoint. You can spread the checkpoint out over time (it's a continuous process, really) so that they don't cause transaction latency spikes. Deferring the writes for so long allows the writes to be scheduled more efficiently without sacrificing durability at all.

On top of that, if you are OK with small windows of time before the commits are durable, postgres allows you to choose on a per-transaction basis not to wait for the WAL flush before returning to the client. If you crash, you are guaranteed to be consistent still, and if a normal transaction comes along, it will of course force a WAL flush. You can control the window of time before postgres will force a WAL flush, where 200 milliseconds might be normal. It can be a small number and still gain you a lot because it's just writing a sequential log, so there's no need to defer it for multiple seconds.

In other words: Mmapping files gives you a choice between very short commit latency and long periods of uncertain durability; or long commit latency. WAL gives you a choice between very short commit latency and short periods of uncertain durability; or short commit latency.

I understand ArangoDB is new. The description sounds interesting, and I like some things about the goals. But I think it's way off the mark to tout the durability as offering a nice trade-off, when a much better method (at least for OLTP) has been known for two decades[1].

[1] Basic idea introduced by ARIES paper in 1992. Couldn't find a link to a PDF, but it is a well-known paper.

comment 13y ago · link · parent

"Being able to write the procedural parts in a language that's less-terrible than typical SQL extensions would be really nice."

Postgres allows writing functions in many languages, including C, python, and javascript.

comment 13y ago · link · parent

It's interesting to me because it appears to offer fairly low-level control over memory, but is still memory-safe. That is unique among languages targeting the mainstream.

It also seems to have a good mix of other features that I like, which others have already listed.

Basically, rust has the potential be an actual C++ replacement; a real one that actually gives you control over memory.

comment 13y ago · link · parent

Agreed. The first rule of computing is that anything can do everything -- it's just a matter of how challenging it is to implement.

The notion of transactions were invented not for performance, but because they are easier to reason about. So much easier that it often means the difference between a project that never finishes and a project that finishes so early that you have time to spend on optimization and caching.

comment 13y ago · link · parent

Good point, but that would make me a little nervous. What happens if the compaction takes a while and the replica gets far behind? And wouldn't the compaction time just keep getting longer and longer as data grows?

Can you repartition the data online to keep the cleanup work bounded?

comment 13y ago · link · parent

"Its volume on disk is growing 3-4 times faster than the real volume of data it store[sic]"

Are they saying that it has a high constant overhead to the data, or are they saying the storage grows in a super-linear fashion?

comment 13y ago · link · parent

https://github.com/umitanuki/mongres

comment 13y ago · link · parent

> They should be doing compactions and are not.

https://jira.mongodb.org/browse/SERVER-11763

It looks like compaction is an offline process. That really puts the user between a rock and a hard place.

comment 13y ago · link · parent

I don't think that's quite the right interpretation. Let's say that the human population increased by a factor of 1000. Does that mean you have 10 more bits of uniqueness? You didn't change at all.

In actuality, you already had those 10 more bits of uniqueness, and people just need to ask more questions to find out which one of the many unique people you are.

This is about identification, not uniqueness.

1
676869
87