Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

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

Submissions

comment 13y ago · link · parent

It's partially deterrent and partially corrections.

If it were only for corrections, then it would cause all kinds of problems. The most obvious one is that you get one "free crime" to commit.

There's also a fairness (and rule-of-law) argument: if two people steal $100 each, why would one person be let out earlier?

comment 13y ago · link · parent

"How does Postgres even index an hstore?"

It allows normal btree indexing of, for example, the values for some given key by using functional and/or partial indexes.

It also allows indexing of "contains", "contains key", "contains all of these keys" and "contains some of these keys" by using GiST and GIN indexes.

comment 13y ago · link · parent

"Why would you want this over a NoSQL store?"

If you can use a more general-purpose system like Postgres and get everything you need, then that's better than relying on special-purpose NoSQL systesm. The better question to ask is: why use a NoSQL system when Postgres works just fine and is useful in more situations?

The history of databases is a history of absorbing special-purpose systems into general-purpose SQL systems. XML databases were once a major topic (albeit misguided); now it's just a feature. Same with Columnar storage, or OO databases, or geospatial (postgres is a leader in geospatial, as well).

Because data integration is so incredibly valuable, it pushes strongly toward general-purpose systems and people dislike one-off special-purpose databases unless they deliver a huge amount of additional value.

comment 13y ago · link · parent

Looks very interesting. What distributions package it?

comment 13y ago · link · parent

I have thought for a while that the FSF made a miscalculation with the GPL. The focus of the GPL is very much on the source code itself, as though having it was everything. I think that was a reasonable assumption to make at the time, but I don't think it reflects the current reality.

In reality, the code itself is somewhat of a liability -- a source of bugs and a time sink when you try to make modifications. What you really want is the end product and the flexibility to modify and improve it. To have the end product you don't need the source at all, and to modify and improve it the source is (nearly) necessary but not sufficient.

That has a few implications. One is that companies don't want to be burdened with source code. They would prefer to share the burden with other users, as long as they aren't giving away any competitive advantage they have. Win-win: they keep the ability to improve and modify it as they need, but unload much of the maintenance cost.

The GPL avoids a problem where people take an open source project and try to drive it away with a closed-source product that is a little better. But that doesn't really happen as far as I can see -- usually, releasing a closed-source product based on an open source project is good for both.

comment 13y ago · link · parent

Check out the Postgres-XC project (http://postgres-xc.org), which does do parallel execution of a single query.

comment 13y ago · link · parent

Why?

Developers are relying more and more on database systems to solve their scalability needs.

If you didn't have a database, you'd need to make sure to get the locking right even when doing completely different queries. A SQL database solves that problem by doing the concurrency control for you (possibly with locks, possibly not). That's what allows a developer to quickly and easily make a reasonably complex application that scales to many concurrent queries.

(Sure, it sounds easy to add in a couple locks, or use STM. But then you need to make all of that work efficiently and also enforce unique constraints or something, and it starts to get a little more complex. Pretty soon you'll want secondary indexes, and a buffer pool, and checkpoints, etc.)

Postgres even added in an efficient version of True Serializability[1], which eliminates SQL race conditions.

So, can this all be extended to help with parallel execution of a single query? Yes. Some systems have had parallel query for a while, and cluster systems are also a different form of parallelism.

[1] http://www.postgresql.org/docs/9.2/static/transaction-iso.ht...

comment 13y ago · link · parent

For the record, 9.3 is the next version to be released, and 9.5 is not even on the radar.

Also, there are no specific plans for doing parallel query execution (that is, parallelizing a single query) in a major way any time soon. And parallel query execution can mean many things and take many forms.

Postgres is already good at parallel execution of many different queries.

comment 13y ago · link · parent

A database query planner is an optimizing compiler. It's also a major field of research, and in many ways, much more sophisticated than other kinds of optimizing compilers.

In particular, it doesn't just optimize your algorithm, it chooses better algorithms for you.

It does this by collecting statistics about the data (and keeping them up to date), and using those statistics to estimate the inputs to each operator in a candidate plan (a combination of algorithms that answers the query), and then estimate costs, and choose the candidate plan with the lowest cost.

(The above explanation is simplified and not entirely accurate. It discards most candidate plans before they even really become a plan. And "candidate plan" is not really the right terminology, but I thought it was more descriptive at a high level.)

comment 13y ago · link · parent

Can you provide a reference?

comment 13y ago · link · parent

"Also - who on earth thought austerity was ever a good idea?"

First of all, spending a lot of money only helps solve an aggregate demand problem. It's not clear that it is (or at least not entirely an aggregate demand problem). Economies can have many problems, some deep, some subtle, some ephemeral. Some problems are plausibly solved through spending, and some are not. Sometimes, people talk about economics as though they could apply Keynesian principles in Somalia and it would be a thriving economy in 5 years. It's not that simple.

Second of all, 1-2% interest sounds great, and like a good opportunity to do some infrastructure projects. However, we have to consider that the debt is not stable now. Given a trillion dollar deficit, that 1-2% money is going to be borrowed anyway. We don't necessarily want to borrow it now, because it could make it more expensive to borrow the money in the future that we already know we need to borrow.

Third, people don't necessarily trust economists. Economies are complex, and a bunch of smart people saying they have the answers is not convincing to many people. On its face, a statement like "borrowing and spending and consuming are good for the economy" sounds like something for nothing, and triggers skepticism more so than "saving and investing is good for the economy". Even if the principles are sound, people don't trust the implementation, which is sure to be twisted for political gain. A trillion dollars being spent brings people out of the woodwork to manipulate it to their advantage, perhaps sacrificing the country in the process.

Last, many people see that a lot of borrowing, spending, and consuming have been happening over the last decade or so; and we still have problems. It's only natural that people are considering a change of direction that involves less borrowing and spending and consuming.

comment 13y ago · link · parent

What do they do to prevent fraudulent charities?

E.g. a "save the seals" campaign that spends all its money on lavish salaries and helps one seal a year?

People paying only one dollar are unlikely to do much research.

comment 13y ago · link · parent

PostgreSQL has a somewhat similar philosophy of extensibility and moving things out of core. Consider something like PostGIS: it's an entire first-class geospatial system done entirely as an extension (I don't think any other database can claim that).

It's still basically a batteries-included distribution, but it is very extensible and getting more so. I expect to see many more domain-specific extensions (you can already see a lot at http://pgxn.org ).

However, I will say that it should be a simple core but not too simplistic. Especially for something like a database, some things are better done in the core (perhaps not inherently, but it's in research-project territory). That's really the challenge: it's not "pro-modularity" versus "anti-modularity"; it's about what constitutes a good base from which to build.

comment 13y ago · link · parent

It seems that you are cherry-picking. Lots of "inefficient" languages that were never taught in schools have gained incredible ground -- consider python, ruby, perl, and PHP.

comment 13y ago · link · parent

What is the definition of a "powerful" language?

It sounds to me like arbitrarily taking a word with good connotations to mean something that is convenient for promoting what you're interested in; regardless of the literal meaning.

comment 13y ago · link · parent

"an even more expensive per-connection model than mysql"

Did you actually run into a practical problem here, or is this theoretical? Most people get along fine for a while, and when they have a problem, they use pgbouncer, which seems to solve it.

"extremely painful replication, largely offloaded to third party tools"

Do you have some more specific/constructive criticism here? A lot of work has gone into postgres replication over the past few years, and it's improved dramatically for some use cases. But there are many use cases for replication, so it's possible that you didn't see improvements for your use cases.

FWIW, I started out with MySQL, and then tried out Postgres because of the license (MySQL was not yet GPL). After MySQL was GPLed, I used both for a while, but found the postgres community more welcoming/informative, and found postgres much more pleasant to use. At one point around 2003 I basically threw mysql away completely because I was fed up trying to do simple date manipulation to make simple reports. Postgres made it so easy and it seemed so natural -- it's really hard to use mysql afterward without getting frustrated. I'm sure there are things like that in reverse as well; e.g. mysql has the ON DUPLICATE KEY clause, but to me it still didn't add up to a pleasant/productive experience.

comment 13y ago · link · parent

Oh, interesting. What protects them from libel suits and the like, then?

comment 13y ago · link · parent

"It takes a special sort to see all the gains in wealth go to the investor and manager class and argue that this is the proper order of things."

I don't think anyone sees it as the proper order of things. For one thing, only central planners even think in those terms. For another, there is no obvious policy that will have a better overall result in a large country like the US -- remember, every policy has unintended consequences and doesn't always turn out like you plan.

comment 13y ago · link · parent

Maybe they should lose their "common carrier" status if they mess with the content? Then they would be responsible for whatever is said on the internet, which would probably dissuade them from doing it.

comment 13y ago · link · parent

The author clearly injected the political meaning into the discussion:

"In politics, the spectrum of belief is right on the surface: conservative/liberal, right/left. In tech, that same spectrum exists, but it’s rarely discussed."

He may have the OED definition in mind more than the political one, but that's irrelevant. As soon as you invoke it as a label, it twists the discussion into an ideological one.

And there's no real reason to do so. He could have just said something like: "Don't be too conservative or set in your ways when it comes to technology. When something new comes along and makes to uncomfortable, rather than try to revert, see if there's a new perspective that shows a better way of doing things." The difference is that is simply a suggestion about how everyone can improve personally, rather than an ideological battle.

comment 13y ago · link · parent

Conservatism means a lot of things. It's a loaded word, and I don't think applying it here adds any value.

comment 13y ago · link · parent

Using words like "they" is one reason I don't like to apply labels for no real reason. Rather than seeing a lack of vision as room for improvement (which could apply to almost anyone); now you see it as a group of other people that are somehow inferior.

comment 13y ago · link · parent

The author seems to basically be describing a lack of vision as "technological conservatism". What's ideological about that? Why inject political language into that phenomenon?

There are ideological battles in technology, of course. But it doesn't have much to do with a lack of vision. If someone lacks vision, and then you make something amazing, they will generally acknowledge it (though perhaps slowly) and everyone moves on. Sure, there are a few people still using DOS, but not very many.

comment 13y ago · link · parent

There are places you can buy a $100 hamburger. Is it worth it? I doubt it. But it's not my money, so I don't lose sleep if someone else buys one.

If you own stock in such a company, consider selling.

comment 13y ago · link · parent

Are the facts wrong or the conclusion?

comment 13y ago · link · parent

I like this idea in the sense of an experiment. I'm not sure where it will end up, but it could be interesting.

As others have pointed out, some kind of conventions must be established around the semantics, and something must be done to avoid redundancy (which leads to inconsistency) and ambiguity.

I agree with those criticisms, but if the community also helps develop the schema, it will be interesting to see. What collisions will happen? What will be the result of queries that reach far across disciplines?

comment 13y ago · link · parent

Good question, and one that could use some discussion (e.g. in blog posts). Perhaps I'll write one.

I think some redundancy is a practical necessity, regardless of your approach (using database constraints or only application code). Consider registering a unique username: even if you check for availability beforehand, you still need to handle the race condition. That's guaranteed to be a somewhat awkward user interaction because they thought it was available but you found out that it was taken by a concurrent user.

So, your application always needs to have a nice way to avoid errors when they can be caught early (e.g. javascript check while filling out the form), and a less-nice way of handling errors when they can't (e.g. "sorry, that name has already been registered" after submitting the form).

There are SQL-standard codes for many constraint errors, so those can be turned into exceptions.

For things like CHECK constraints, think of those more like an assert: intentionally redundant.

comment 13y ago · link · parent

The article seems to imply that, in an ideal world, all of these student would stay throughout the course. But I don't think it's clear that the churn is bad.

There is some lower bound to the amount of time that it takes to learn something (absent some educational revolution). Many people aren't even willing to pay that lower bound simply because they have other priorities in life. But they do like to sample (which is good), and potentially finish out a course if nothing else gets in the way.

Online courses are great because they lower the cost of sampling, so we shouldn't be surprised that there are more samplers, and fewer people finishing out the courses. If 1000 people complete an online course, then that's great, even if 99000 people signed up and disappeared a week later.

That being said, I'm pleased to see the specific criticisms offered in the article, and I hope they lead to a better balance for more people.

comment 13y ago · link · parent

Well, that kind of makes sense in a "we're incredibly lazy" way. But why not license ZFS as GPL, and see if that project makes better headway?

No real cost there, except some possible confusion. Move the developers to whichever project seems to be winning.

comment 13y ago · link · parent

Why is Oracle investing in Btrfs (GPL), rather than dual-licensing zfs as cddl/GPL?
1
717273
87