Better HN
topnewbestaskshowjobs
Log inSign up

wireprotocol

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

Submissions

comment 14y ago · link · parent

Relational databases have a history of absorbing the advantages of other systems when they come along, particularly changes to the model (cf. object databases and XML databases). As the author shows, a similar thing will happen quite quickly for document models.

Architectural changes are slower, but you can also start to see this happening in postgres with features like unlogged tables (i.e. don't write to the recovery log for changes to this table) and transaction-controlled async commit (i.e. don't wait for this transaction to hit disk). More changes are in the works.

MongoDB will have a chance to have an impact, and will be successful if they are able to keep innovating. If they just stand still or incrementally improve, they will be marginalized. Now that Mongo has center stage in the NoSQL movement, it will be interesting to see what they do next.

comment 14y ago · link · parent

"Unless he's planning to build sharding on postgres too, I think he's missing the point."

NoSQL seems to have three general claims (I'm not saying whether these are correct or not): (1) ease of administration in some cases; (2) different data model; (3) better performance or availability in some situations.

The author is clearly addressing the second, and you are clearly talking about the third.

comment 14y ago · link · parent

"Similarly, in software, you can't be thinking about which programming language you are using ... MongoDB or MySQL... You will never hit the proverbial fastball if that is the sort of junk filling your head. Rather, creating and shipping products needs to be muscle memory."

That's a vague statement, but I interpret "muscle memory" to mean "have a good default toolset" in this context.

It makes a lot of sense to have a default toolset -- tools that work well in a lot of situations that you understand very well, which together cover most of the problem space you work in. That frees you from getting lost in the weeds trying to decide which tool to use each time. However, it still very much matters what tools are in that default toolset.

It takes a lot of effort and study to understand and choose the right set of default tools. If the options are MySQL and Postgres (or ruby/python, etc.), you need to pick only one as your default choice, otherwise you get distracted trying to make that decision for every project. It's not so much whether the technology overlaps or not, it's whether you perceive the applicability to overlap. For instance, if you perceive MongoDB to be useful as a primary datastore, it can't easily coexist in the default toolset with a SQL system; but it can if you perceive MongoDB to be more of a caching layer or for special-purpose processing.

Of course, you should recognize the signals when you're dealing with a different kind of problem that may require a non-default tool.

comment 14y ago · link · parent

Hacker news is somewhat more of a community though, because it's a group based on common interests.

Facebook is supposed to be for everyone, so it's not really a group at all.

comment 14y ago · link · parent

Facebook is not a community, it's a medium of communication. A sixth of all humanity is not a very useful group for social purposes.

Calling it a community with warrens doesn't seem like a useful description, to me.

comment 14y ago · link · parent

"Someone has to spend money for me to make money"

That's the part where I get stuck, because that's not true.

I can also invest my money and you could work for a company dependent on that investment.

I'd like to step away from money for a minute, and look at the way the goods themselves flow. If I grow extra grain, I could either:

(a) Make beer, and consume it. (b) Give it to you, so that you don't have to grow anything, and you can instead spend your time improving farm equipment.

If I choose (b), I may have less beer to enjoy today, but many benefits in the following years. Maybe the next year I will have so much extra grain I can start to make other improvements, and so on, until we are all very prosperous.

It seems like (b) is the choice we should encourage, and (a) is the choice we should discourage. (b) seems like the one that actually creates economic activity, and (a) is the one that dampens it.

comment 14y ago · link · parent

I should have looked for a name conflict first, I suppose, but my point is that "science" doesn't seem like the right word to describe most of CS.

I'm not saying it's incorrect, but it just doesn't seem to fit well.

comment 14y ago · link · parent

While we're at it, why is it called Computer Science? I think "Computational Mathematics" or something would make more sense.

comment 14y ago · link · parent

Hmm... I guess that's the difference between saving and investment, although it's a somewhat fine line.

I would think that foregoing consumption (i.e. saving) would make it easier for someone else to borrow that money and do something more productive with it. But perhaps that's not necessarily true.

Anyway, complex issue, and I don't expect to understand it by the end of this thread.

comment 14y ago · link · parent

This is an honest question, albeit vague:

The media keeps telling us that consumption is good for the economy, and that we need a lot of spending right now (whether in the US or Greece).

I understand that the economy is a dynamic system, initial conditions matter, and that occasionally you need to kickstart it or "prime the pump". But that seems to have been lost to the general notion that we should always consume and spend more.

Does spending and consumption really lead to prosperity? What's wrong with saving, investment, moderation, and conservation?

If nothing else, this constant pressure to spend more (to the point we need to ask the government to force us to spend) has to take a serious toll on the environment. And I can't see how that level of waste actually helps anyone prosper.

comment 14y ago · link · parent

I think arithmetic has a lot of merit in the teaching process, and shouldn't be dismissed. Maybe it's overemphasized, but it does have value.

Arithmetic can help show some deep mathematical concepts that might not be obvious if you study theory alone. For example, the advantages of arabic numerals over roman numerals. There are important mathematical distinctions between the two representations, but without actually using them both, it's hard to understand why arabic numerals are so much more useful for so many purposes.

I think it's best to switch between concepts and practical applications. I also don't think there is a problem with memorization. In any field, to exercise good judgement or gain deep insight, logic and reason are not enough. You need a collection of facts to guide you as well as other people's ideas to draw from.

comment 14y ago · link · parent

"The economic and psychological costs stemming from Facebook not getting the traditional opening day pop are impossible to measure."

Are shareholders now entitled to a reward for going public?

Opening day is over. FB is trading well below the IPO price, let alone the high. Nobody can blame that on opening day glitches.

That means that the market would have clearly been more wrong to give it an opening-day "pop".

comment 14y ago · link · parent

"I would love to see the Redis datatypes built into it and Postgres might then become the strongest choice when selecting tools for my next app."

Have you considered writing an extension to do that? It may be easier than you think; postgresql has a powerful extension mechanism (you can even do specialized indexing!).

As far as I can tell, JSON only made it into core because there are expected to be many users very quickly. But that doesn't scale -- it's better for users to look at pgxn.org and developers to use the extension mechanism. Once that becomes a matter of course, we'll see an explosion of specialized extensions.

comment 14y ago · link · parent

"a similar scandal"

It was not similar. In my opinion, it's so different that it's not even worth comparing.

An analogy is not an argument. It only illustrates your argument, if you have one.

comment 14y ago · link · parent

"One thing I would say about postgres is that it has a lot of features. As a new user, it's hard to know which ones to use in which ways, and what the downsides might be."

Do you have some suggestions how that can be improved? Are there features that you would classify as "bloat" or that seem confusing or poorly documented?

Postgres is a very general system and has a large variety of users as a result. That means that the features tend to be very well-thought out and don't carry a lot of surprises, but it also means that it's hard to guide users toward specific usage patterns. Even among web users, a feature like LISTEN/NOTIFY might be an instrumental part of the caching infrastructure for some users, but seem like bloat to others.

comment 14y ago · link · parent

"If you know that your new wonderfully effective pain medication increases the risk of heart attacks from 4% to 6% (or whatever the numbers were), are you going to disclose that to the FDA, knowing it essentially spells doom for the billion dollars plus you spent on development?"

Did Merck not disclose something? http://en.wikipedia.org/wiki/Vioxx seems to indicate they did disclose the increased risk over naproxen, but tried to explain it away without further investigation.

comment 14y ago · link · parent

There is a big difference between premeditated adulteration of a product people already use, like milk; and sweeping studies under the rug[1] about a new product.

If nothing else, a huge amount more people needed to know about the malamine scandal. How are we shipping so much milk with so few cows? Why am I dumping this unmarked 50lb bag of powder into the milk?

[1]: After looking at http://en.wikipedia.org/wiki/Vioxx, I don't see any allegation that Merck actually withheld raw data from the FDA, or provided it with false raw data. That's the great thing about a vague analogy like "sweeping under the rug": you can imply that something happened that didn't, without actually lying.

comment 14y ago · link · parent

"a Coca Cola contains a ton of salt as well as sugar"

It's about 0.045g sodium per 354mL can. That's about 1/50th of a healthy daily sodium intake. What effect that has on thirst I do not know, but calling that a "ton" is simply false.

Check up on the facts to avoid repeating propaganda.

comment 14y ago · link · parent

As I said above, I spoke with several Japanese people who said that some valid characters are not representable in Unicode.

Some details can be found here: http://en.wikipedia.org/wiki/Han_unification

comment 14y ago · link · parent

I spoke with several Japanese people who said that some valid characters are not representable in Unicode.

That means that it's not just a technical problem (expensive sort routines or inefficient encodings) -- it's a semantic problem.

comment 14y ago · link · parent

"I don't want to stand up in front of X number of people and tell them stuff they already know."

A topic that is always safe is "I used technologies X, Y, and Z to build this thing, and here's what I learned along the way". It's usually a little more entertaining because it's a story (often with a few funny anecdotes); and you're admitting that you didn't do everything perfectly from the start, so being wrong somewhere during the presentation isn't a deficit. Being wrong really only matters in a persuasive talk.

(Aside: it's pretty well established that teaching is one of the most effective ways to learn deeply.)

I'm sure you can find better speaking advice elsewhere, but one other thing I should mention: especially at user groups, a talk is just to start a conversation, which will often be held at a bar later. So don't worry about concluding anything in a profound way.

As for location, then yes, living within driving distance of the SF bay area helped me a lot. But I didn't begin speaking until I moved to Portland, Oregon, where I regularly attended a user group. I'd like to think that a lot of other areas have something to offer as well, but I'm sure it takes more searching.

comment 14y ago · link · parent

"This is assuming that they are using open source projects internally and that you A. Know what they are using and B. That they care about who maintains them rather than treating them as a black box that does stuff for free"

Then turn it around and look for companies based on the open source products that they use. There are plenty of companies that are heavy users of open source software, and don't hide that fact. You might have to move or something, but that's life.

"Also tech conferences seem to be a pretty expensive way"

There are many cheap conferences, or free exhibit hall passes for early-bird registration (usually allows BoF sessions, as well, and maybe parties); and user groups are ordinarily free (maybe you chip in for dinner or something). There are conferences or user groups in many areas about something, and maybe you can just drive. Often, you can share a room with another attendee (ask on some mailing list related to the conference) to save on lodging. If you have developed something or have some kind of speaking experience, the conference may pay for some or all of the travel expenses, and may waive conference pass. There are even some open source projects that have money waiting for anyone who wants to bootstrap a user group in their town.

And these things are not theory. I have done absolutely everything I have suggested to you here (except trying to bootstrap a local user group): get free conference exhibit pass, drive to conference, share room, get started contributing, get major patches accepted, and get jobs through community connections. And I still do it, and I see many people rising up through very similar means that had little in the way of marketable talents a while ago.

Disclaimer: Nothing about this happens overnight. It takes a long time. There are no magical steps where I can say "do these things and you will get this". You have to look out for the opportunities on your own. Start attacking your own reasons why something can't be done, knocking them down one by one.

comment 14y ago · link · parent

Go to (and preferably speak at) the same user groups and conferences that people from that company go to. Hack on the open source projects that the company uses internally. You will soon have friends in that company, and probably 10 others.

comment 14y ago · link · parent

That's a good point about the context, but not very concrete.

At some point you'll need to go into the details, but I don't think a comment is the right format. Maybe a blog post to show exactly what you mean.

comment 14y ago · link · parent

If you choose to update all of the old records.

As other posts have already mentioned, adding a new column to a table in postgres does so instantly unless you set a default (telling postgres that you want it to update all the old records too).

If you add the default separately from adding the column, you get the default but don't rewrite all the old rows (which remain NULL).

comment 14y ago · link · parent

> Hence the need to keep the schema synchronized across multiple applications

Views are designed to avoid that problem.

What is the specific way you handle versioning in an API that is superior to versioning in the schema?

comment 14y ago · link · parent

> Thus, "build an api" is the best solution.

I think there's an asymmetry in your argument.

You are describing all of the problems with data management as though they were specific to schemas in a traditional RDBMS; but glossing over how "building an API" solves those same problems, and whether that method is better or worse.

In other words, "build an API" is the problem at hand, not the solution. A traditional DBMS provides a data definition language (DDL) to help solve the problem (schema design), which isn't a solution either, but it does offer a lot of direction. Saying "build an API" really gives me no direction at all.

comment 14y ago · link · parent

> everyone is desperately seeking the "one database to store everything" -- rather than carefully evaluating trade-offs

Agreed.

> Think about what you're building, and pick the right data store for your data.

I partially disagree. Most businesses adapt considerably over time, and data projects almost always expand as far as the engineering team can take them. Even small businesses have a lot of different kinds of data, all held in different systems and spreadsheets, and there is a lot of value in bringing that data together (often driven by accounting).

So, at the beginning, you don't know what your data is, you just have a vague idea (unless you are an early-stage startup with very specific data management needs).

(Aside: your queries are at least as important when choosing a data management system as your data).

Traditional RDBMSs have been designed and have evolved over a long period of time to offer pretty clear answers for the business data needs of most "normal" businesses. It makes perfect sense to start with a general solution, and try to pick out the special cases (e.g. "I need faster response on these queries") as you go.

That doesn't mean that traditional RDBMSs are the only way to make a general-purpose data management system. Maybe another architecture or model will come along that will prove superior; or maybe it's already here and it's just not mature enough.

But I would give very similar advice in most situations: start with a traditional RDBMS, and then pick out the special cases as needed. Not all cases, of course; a key-value system might be great for caching, or you might need to do analysis that's just not working out with SQL.

comment 14y ago · link · parent

A schema is essentially an API over the data.

For instance, if you have an API with the functions:

  item# = add_item(description, price, color)
  record_sale(item#, quantity, customer#)
So let's see what happens when you need to make a change. For instance, you might decide that an item could be discounted (a new feature); so you need to record the price at the time of sale:

  record_sale(item#, quantity, customer#, price=NULL)
and if the price is NULL, you default to the current item price.

But you already have sales data without a price, so you need to migrate it by copying the current item prices over.

And if one of three applications doesn't support the new API, you need to offer the old API as well and it would just use the default all of the time.

That sounds pretty much like a schema to me. What's the difference?

comment 14y ago · link · parent

So, they made some mistakes, learned from them, and ended up in the right place.

Sounds like a great story for a blog post, that others might learn from as well.

Calling it a troll -- just because their mistakes involved mongo and their solution did not -- seems harsh.

1
808182
87