7,244 karma · joined Sep 25, 2010 (16y ago) · 2,593 submissions
comment 12y ago · link · parent
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
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
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
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
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".
2018.
ARIN migrated from Oracle to PostgreSQL(lists.arin.net ↗)
116 points · by wireprotocol · 12y ago · 31 comments
comment 12y ago · link · parent
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
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
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
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
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
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
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
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
Can you repartition the data online to keep the cleanup work bounded?
comment 13y ago · link · parent
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
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.