HNHacker News
TopNewBestAskShowJobs

asomiv

139 karma · joined May 15, 2011

submissionscomments
asomiv··on Urban Airship: Postgres to NoSQL and back
Sharding is not as easy as just spreading the data over shards. That's the easiest part. I also have to be able to add shards without breaking things and be able to move a shard or a part of a shard elsewhere.
asomiv··on Urban Airship: Postgres to NoSQL and back
If only there are tools for sharding PostgreSQL. Easy sharding is still a major weakness in relational databases.
asomiv··on Firefox Now Scores 100% on Acid3 Test
I upvoted you. Not because I think what you said is insightful, but because your post serves as a textbook example of a person who not only doesn't see how stupid and trollish his own post is, but also dismisses all forms of legit criticism as fanboyism.
asomiv··on Anonymous Pledges to Take Down Facebook
I thought Anonymous is an unstructured "organization" and that anybody can do anything under their flag without authorization from a central body. How is it that there is apparently a central Twitter account?
asomiv··on Firefox 5 is now officially released
How times have changed. Not too long ago people loathed automatic updates and some said they're boycotting Firefox for having an autoupdate feature.
asomiv··on Google discontinues support for IE7 in Google Apps
Most people would gladly make it harder for a single person to write a search engine if, in return, it makes it easier for them to make good web pages and web apps.
asomiv··on Google discontinues support for IE7 in Google Apps
They can't, many businesses rely on Microsoft's browser lockdown support. For example strict IE from browsing through the local disk or restricting settings from being modified. Firefox and Chrome have virtually no lockdown support.
asomiv··on EU: "Making hacking tools should be illegal"
This is already the case in the Netherlands. Hacking tools are only allowed for private use or research, e.g. for checking the security of your own network. Possession of hacking tools with the intention to harm other peoples' systems is not allowed.
asomiv··on Hello World, by Oracle
Unfortunately the license is necessary. Without a license the code is covered by copyright by default, making any redistribution or usage of the code a copyright violation. Although a one-liner "do whatever the fuck you want" "license" is sufficient for redistribution or usage, it gives other people the opportunity to sue Oracle if the code somehow causes any kind of damage. Granted, it's just a Hello World, but in the US anybody can sue anyone for anything so I'm sure some jerk can come up with a stupid reason to sue someone over a Hello World. All this has made lawyers extremely careful.
asomiv··on GNOME Discusses Becoming a Linux-only Project
The first sentence is not a snark, it is a clarification. The question why systemd was invented instead of just using launchd had been raised in the past. Distributions avoided launchd because of licensing.
asomiv··on GNOME Discusses Becoming a Linux-only Project
Ad hominem is not a good counter argument. I haven't had as bad of an experience with PulseAudio as apparently many other people do but surely he has learned from whatever mistakes he made. Surely you weren't a rock star programmer the day you were born?
asomiv··on GNOME Discusses Becoming a Linux-only Project
What the hell, why is my post downvoted? I wrote a very informative post. If someone disagrees with me then come clean and give me a rational reason, not just clicking on the downvote button!

But to answer your question: no, it's not inetd. Inetd is very inefficient in terms of CPU and memory usage and has scalability issues thanks to the fact that it spawns a new process for every client. Systemd does not do that: it waits until someone connects to the socket, then starts the service and have the service handle all clients on the socket. Systemd then waits until the service has exited. The service can use I/O events or threads or whatever efficient mechanism to handle multiple clients on the server socket, all within a single process.

This in itself does not require Linux-specific features. However the GNOME discussion is about depending on systemd which happens to be Linux-specific at the time for other reasons, not about GNOME wanting to be Linux-only (which is sensationalist headline). One of the reasons systemd is Linux-only is because it uses cgroups, which I explained here: http://news.ycombinator.com/item?id=2565801

asomiv··on GNOME Discusses Becoming a Linux-only Project
Writing portable code slows you down. With every change you have to think "hey is this available on all the other OSes too, and if not, how do I fallback?". This distracts you from your main goal, especially if that main goal can be better implemented with platform-specific APIs. I can very much understand not trying to bother and instead relying on contributors to port things to other OSes.

Is there anything wrong with lazy? Remember that people have limited time and man power.

There's a very good reason for using cgroups: to completely clean up a service's process tree even in the face of abusive behavior. A service can spawn a child process that calls setsid(). By using cgroups systemd can kill that child process too. Traditional POSIX APIs like killpg() do not allow that and give processes the ability to escape supervision.

You say FreeBSD's kernel APIs are superior. It makes me wonder why you think that. There are only two things that I think are better on FreeBSD than on Linux: kqueue is better than epoll, and the OpenBSD firewall is easier to learn than iptables. As for everything else I've yet to see hard evidence that FreeBSD beats Linux.

asomiv··on GNOME Discusses Becoming a Linux-only Project
Systemd is inspired by Apple's launchd (which has an unfortunate license) and has a few really nice features:

- Many traditional init systems are based on a bunch of shell scripts with some metadata. Each service is started through a shell script that supports the start/stop/restart argument. While this makes the implementation very simple, it also makes it inefficient. To start a service the init system must create a new process (the shell script) which in turn invokes a bunch more processes (because almost anything you do in a shell script requires external commands) before finally invoking the service itself. This is expensive in terms of both CPU usage and disk I/O, and the latter really matters for boot time. Systemd accepts a bunch of service description files and handles the starting and stopping for you.

- Traditional init systems are about starting and stopping services. Systemd is also about keeping services running. For example if a daemon crashes, with most init systems you have to restart it manually or hook it to some external monitoring system. External monitoring systems usually rely on polling to check whether services are still alive. Systemd on the other hand just forks() the service, waitpids() on it, and gets notified by the kernel when the services crashes. No polling involved. Polling wastes CPU and reduces battery life. Polling also makes leaves a small time gap during which the service is temporarily dead but hasn't been restarted yet. This latter can be mitigated with a smaller polling interval but the smaller this interval the more CPU you use.

- Systemd supports on-demand starting of services. It starts a service as soon as a program needs it. This works by having systemd allocating server sockets and listening on them. When a client connects to a server socket, systemd will not accept() the client; instead systemd will figure out which service it belongs to, then starts that service, passing it the server socket. The service then accept()s the client. This is great for saving CPU, memory and disk I/O until it's really necessary. It saves battery life and reduces boot time. EDIT: It's not (x)inetd, see my reply.

Unfortunately most people slam GNOME and systemd for being NIH or crazy without understanding the reasons. I hope this post makes some people understand the rationale behind systemd.

asomiv··on Why not mmap?
If database throughput is that important to you then you will put it on an idle machine that has no other services running, or assign a dedicated CPU core to it.
asomiv··on Why not mmap?
What does not being in C have anything to do with that? Whatever tricks Twisted and Node.js and friends use can be done in C, just with a different syntax, but at the end of the day it's the same machine code. I don't know how Twistd handles file I/O but Node.js uses libeio which performs all file I/O in a thread pool. It's no better than what you can do in C.
asomiv··on The Dark Side of C++ (2007)
Doh, you're right. I had '#define FALSE 0' in my mind. '#define FALSE 1' actually is insane.
asomiv··on The Dark Side of C++ (2007)
So then what are they supposed to do, require a library X which has already invented them, while your app is using library Y which already does the same thing as X?
asomiv··on The Dark Side of C++ (2007)
#define FALSE 1 is not that uncommon in C because C in its infinite wisdom doesn't have true/false literals so people have to invent those by themselves.

Glib goes into great lengths to avoid namespace conflicts so it defines the GBoolean type and G_TRUE/G_FALSE. Whether that really is better than #define TRUE/FALSE, I don't know.

asomiv··on Rails 3 Performance - Not Good Enough
Compromises from whose point of view? One man's good compromise is another man's bad compromise.
asomiv··on Mozilla: Browser Benchmarks Suck
Fairly obvious that it's slower than IE? Says who?

You treat "repaint" as if it's a single thing that's either faster in all cases or slower in all cases. Browser rendering is a very complex thing and some pages render faster in one browser while other pages render faster in another.

asomiv··on A conversation about open source licenses
It looks like Zed is pissed about Ryan trying to hide his intentions to profit from Zed's work through Node.js (Node.js has commercial activities attached to it). Zed is not pissed about whether or not Ryan actually profits from it, only the way he appears to be doing it in a sneaky way.
← PreviousPage 2 of 2