|
|
Subscribe / Log in / New account

Android, forking, and control

Did you know...?

LWN.net is a subscriber-supported publication; we rely on subscribers to keep the entire operation going. Please help out by buying a subscription and keeping LWN on the net.

By Jonathan Corbet
June 6, 2011
Many words have been said about the relationship between the Android project and the mainline kernel development community. At LinuxCon Japan, James Bottomley took the stage to say a few more. There are, he said, some interesting lessons to be learned from that disconnect. If the development community pays attention to what has been going on, we may be better placed to deal well with such situations in the future.

James started with the statement that Android is, hands down, the most successful Linux distribution ever produced. Its adoption dwarfs that of Linux on the desktop - and on the server too. Android's success is spectacular, but it was achieved by:

  • Forking the kernel,
  • Rewriting the toolchain and C library,
  • Developing a custom Java-based application framework, and
  • Working from an extreme dislike of the GPL

In other words, James said, Android is a poster child for how one should not work in the open source community. They did everything we told them not to, and won big. While we would like the Android developers to change and do some things differently, their success suggests that, perhaps, Android is not the only group in need of change. Maybe the community needs to reevaluate how it weighs code quality against market success; do we, he asked, need a more commercially-oriented metric?

One of the big assumptions brought into this debate is that forking is a bad thing. Android started by forking the kernel and writing its own user space mostly from scratch, and the community has duly condemned these moves. But it is worth understanding what the Android developers were trying to do; Android started by finding adopters first; only then did they get around to actually implementing their system. At that point, the time pressures were severe; they had to have something ready as soon as possible. There is a lot to be said for the development community's patch review and acceptance processes, but they do tend to be somewhat open-ended. Google couldn't wait for that process to run its course before it shipped Android, so there was little choice other than forking the kernel.

Was forking the kernel wrong? In a sense, James said, it cannot be wrong: the GPL guarantees that right, after all. The right is guaranteed because forking is sometimes necessary, and rights are meaningless if they are not exercised. In this specific case, without a fork, the Android project would have had a hard time achieving its goals (with regard to power management and more) in a commercially useful time. The result would have been a delayed Android release which would have led to less success in the market or, perhaps, missing the market window entirely and failing to take off. Forks, in other words, can be good things - they can enable groups to get things done more quickly than going through the community process.

Is forking equal to fragmentation, he asked? It is an important question; fragmentation killed the Unix market back in the 1990's. James claimed that forks which fail do not fragment the community; they simply disappear. Forks which are merged back into their parent project also do not represent fragmentation; they bring their code and their developers back to the original project. The forks which are harmful are those which achieve some success, carrying part of the community with them, and which do not return to the parent project. From that, James said, it follows that it is important for the community to help forks merge back.

The Android developers, beyond forking the kernel, also took the position that the GPL is bad for business. The project's original goal was to avoid GPL-licensed code altogether; the plan was to write a new kernel as well. In the end, a certain amount of reason prevailed, and the (GPL-licensed) Linux kernel was adopted; there are a few other GPL-licensed components as well. So, James said, we can thank Andy Rubin - from whom the dislike of the GPL originates - for conclusively demonstrating that a handset containing GPL-licensed code can be successful in the market. It turns out that downstream vendors really don't care about the licensing of the code in their devices; they only care that it's clear and compliant.

What about Android's special application framework? James said that the Java-based framework is one of the most innovative things about Android; it abstracts away platform details and moves the application layer as far away from the kernel as possible. The framework restricts the API available to applications, giving more control over what those applications do. Given the structure of the system, it seems that rewriting the C library was entirely unnecessary; nobody above the framework makes any sort of direct use of it anyway.

So maybe Android didn't do everything wrong. But there were some mistakes made; the biggest, from James's point of view, was the lack of a calendar which can handle SyncML. That made Android handsets relatively useless for business users. One of the keys to the Blackberry's success was its nice calendaring. Motorola had seen this problem and implemented its own proprietary SyncML calendaring application for the Droid; that actually made things worse, as business users would get an Android handset with the idea that it would work with their calendars. If they ended up with something other than the Droid, they would be disappointed and, eventually, just buy an iPhone instead. Android had no SyncML support until 2.1, when a new, written-from-scratch implementation was added. The cost of this mistake was one year of poor corporate uptake.

The other problem with Android, of course, is its "walled garden" approach to development. Android may be an open-source project, but Google maintains total control over the base release; nobody else even sees the code until Google throws it over the wall. No changes from partners get in, so there is no community around the code, no shared innovation. As an example, Android could have solved its calendar problem much sooner had it been willing to accept help from outside. Google's total control over Android was needed to give the project its market focus. It was a necessary precondition for market dominance, but it is bad for community and has forced Google to reinvent a lot of wheels.

Another big mistake was being sued by Oracle. That suit is based on Android's rewrite of Java which, in turn, was entirely motivated by fear of the GPL. Had Android been built on Oracle's GPL-licensed Java code base, there would have been no suit; Google would have been protected by the GPL's implied patent license. If Oracle wins, rewriting Java will turn out to be a hugely expensive exercise in license avoidance. And the sad fact is that the license is entirely irrelevant: the Java runtime's API constitutes a "bright line" isolating applications from the GPL.

Lessons learned

So what can be learned from all of this? James reiterated that forking can be a good thing, but only if the results are merged back. The Android fork has not been merged back despite a great deal of effort; it's also not clear that the Android developers have bought into the solutions that the kernel community has come up with. Maybe, he said, we need to come up with a way to make merging easier. The community should have a better way of handling this process, which currently tends to get bogged down in review, especially if the fork is large.

Projects which create forks also need to think about their processes. Forks tend to create not-invented-here mentalities which, in turn, lead to a reluctance to show the resulting code. It's no fun to post code that you know is going to be panned by the community. The longer a fork goes, the worse the situation gets; fixing of fundamental design mistakes (which is what wakelocks are in the community's view) gets harder. Preventing this problem requires forks to be more inclusive, post their code more often, and ask the community's advice - even if they do not plan to take that advice. It's important to open the wall and let ideas pass through in both directions.

James talked a bit about "licensing fears," stating that the GPL is our particular version of FUD. The discussions we have in the community about licensing tend to look like scary problems to people in industry; less heat from the community on this subject would do a lot of good. The fear of the GPL is driven by outside interests, but we tend to make it easy for them. The community should be more proactive on this front to allay fears; pointing to Android as an example of how GPL-licensed code can work is one possibility. The Linux Foundation does some of this work, but James thinks that the community needs to help. The GPL, he said, is far easier to comply with than most commercial licensing arrangements; that's a point we need to be making much more clearly.

We should also design more "bright line" systems which make the question of GPL compliance clear. The kernel's user-space ABI is one such system; developers know that user-space code is not considered to be derived from the kernel. Making the boundary easy to understand helps to make the GPL less scary.

The community should do better at fostering and embracing diversity, encouraging forks (which can create significant progress) and helping them to merge back. Currently, James said, the kernel gets a "C - must do better" grade at best here. We only take code from people who look like us; as a result, the Android merge attempt was more painful than it needed to be.

Companies, in turn, should aim for "control by acclamation" rather than control by total ownership. Linus Torvalds was given as an example; he has a lot of control, but only because the community trusts him to do the right thing. In general, if the community trusts you, it will happily hand over a lot of control; that's why the benevolent dictator model is as common as it is. On the other hand, companies which try to assert control through walled garden development or by demanding copyright assignment from contributors have a much harder time with the community.

In summary, James said, Android was a fiasco for everybody involved; we all need to figure out how to do better. We need to find better ways of encouraging and managing forks and allaying licensing fears. Projects which create forks should be thinking about merging back from the outset. Then projects which (like Android) are a commercial success can also be a community success.

[Your editor would like to thank the Linux Foundation for funding his travel to Japan to attend this event.]

Index entries for this article
KernelDevelopment model
ConferenceLinuxCon Japan/2011


to post comments

GPLv2's implicit patent license and Dalvik

Posted Jun 6, 2011 21:38 UTC (Mon) by FlorianMueller (guest, #32048) [Link] (9 responses)

I believe the following claim oversimplifies and probably overstates the scope of the GPLv2's implicit patent license:

Had Android been built on Oracle's GPL-licensed Java code base, there would have been no suit; Google would have been protected by the GPL's implied patent license.

I don't doubt that the Android team wants to avoid the GPL wherever it can. I also don't doubt that the GPLv2 does have an implicit patent license, and that it has significant scope. But I don't think one can just assume -- given that there's no case law on the scope of the GPLv2's implicit patent license in any major jurisdiction that I'm aware of -- that Google could have built Dalvik safely on a GPLv2 basis, given that Dalvik is architecturally quite different from Java (executing DEX files, register vs. state machine, etc.).

An implicit patent license undeniably covers those who use code that was published by the patent holder and never modified. In connection with the GPLv2, one can certainly argue (more or less successfully -- unfortunately no case law yet) that some modifications to that codebase are covered. But there must be a limit somewhere. If someone changes a codebase beyond recognition, there will be a point where it's at least risky to rely on the implicit patent license. And if completely new code segments are added, it becomes very difficult to argue that the implicit patent license still applies to any use of the implicitly-licensed patents by such additional code (the European Commission's DG Competition is pretty sure such use of patents is not covered).

Given the aforementioned architectural differences between Dalvik and Java, it's hard to see how Google could have built Dalvik without pretty fundamental modifications to any Oracle/Sun GPL-licensed code as well as major additions.

Even GPLv3's explicit patent license has limitations. If the FSF had believed that the GPLv2's implicit patent license goes beyond the scope of the GPLv3's explicit patent license, GPLv3 would have been counterproductive in connection with the most important issue for which it was created -- patents.

GPLv2's implicit patent license and Dalvik

Posted Jun 6, 2011 22:36 UTC (Mon) by dodji (guest, #49817) [Link] (3 responses)

What I understood from what James said is basically that they could have used Java as is. There would have been no Dalvik.

GPLv2's implicit patent license and Dalvik

Posted Jun 6, 2011 22:39 UTC (Mon) by FlorianMueller (guest, #32048) [Link] (1 responses)

Since there are major architectural differences, I assume that Google made an engineering and not only licensing choice.

GPLv2's implicit patent license and Dalvik

Posted Jun 7, 2011 2:54 UTC (Tue) by rahulsundaram (subscriber, #21946) [Link]

There are good reasons to believe that it was fundamentally a licensing choice as Google and Sun/Oracle were prepared to sign a agreement as per

http://www.groklaw.net/articlebasic.php?story=20110511030...

If it was primarily a technical decision, it would have been possible to make tweaks to OpenJDK without having to rewrite it from scratch c.f. IcedTea.

GPLv2's implicit patent license and Dalvik

Posted Jun 10, 2011 5:32 UTC (Fri) by ldo (guest, #40946) [Link]

I think you’re confusing two things: Java code and Dalvik.

Dalvik is a complete byte-code interpreter, which as I understand it has nothing in common with any code from Sunacle; it’s not even compatible with the Sunacle Java VM. It was introduced for reasons to do with performance and power consumption, not because of an licensing issues with Sunacle Java. Google could choose to use Sunacle Java in future, but Dalvik will still be there, and the Sunacle Java VM will not.

GPLv2's implicit patent license and Dalvik

Posted Jun 7, 2011 0:24 UTC (Tue) by aryonoco (guest, #55563) [Link] (4 responses)

I think James is making a huge mistake in thinking that Google could have just used the GPL Java. First of all, let's remember that when Android was started in 2004, there was no GPLed Java. Secondly, Sun was clearly making money off Java ME, and did not want to push Java SE into the mobile space as that would have cannibalised its revenue.

The speaker is also glossing over technical reasons for creating Dalvik and Bionic library. Both are much leaner and have a much smaller footprint than Java VM or glibc. These were/are major considerations when Android was created, considering the limited resources available in mobile phones.

GPLv2's implicit patent license and Dalvik

Posted Jun 7, 2011 10:40 UTC (Tue) by eru (subscriber, #2753) [Link] (3 responses)

...Dalvik and Bionic library. Both are much leaner and have a much smaller footprint than Java VM or glibc...

In the case of glibc, there would have been several existing light-weight alternatives already in 2004, some with other than GPL licenses.

GPLv2's implicit patent license and Dalvik

Posted Jun 7, 2011 21:04 UTC (Tue) by danieldk (guest, #27876) [Link]

Aren't portions of Bionic based on BSD libc?

http://codingrelic.geekhold.com/2008/11/six-million-dolla...

Also, it seems the rationale for making Bionic are license, size, and speed:

http://www.zdnet.com/blog/burnette/patrick-brady-dissects...

Libc licenses

Posted Jun 9, 2011 8:52 UTC (Thu) by justincormack (subscriber, #70439) [Link] (1 responses)

I think all the other light weight libcs are in fact LGPL/GPL, eg uclibc, dietlibc. Newlib is partly LGPL too.

Libc licenses

Posted Jun 29, 2011 16:13 UTC (Wed) by JoelSherrill (guest, #43881) [Link]

newlib contains very little code under [L]GPL. No [L]GPL code is supposed to be in any configuration unless it is in the OS specific code. For GNU/Linux, this source is under the libc/sys/linux subdirectory.

If Google had chosen newlib, there would have been less work to get it clean for Android than putting together a new library.

FWIW newlib is used by Cygwin and RTEMS along with bare metal users of GNU tools. It supports a variety of architectures. Newlib is an old project with a community around it.

libc and java

Posted Jun 6, 2011 21:43 UTC (Mon) by rfunk (subscriber, #4054) [Link] (20 responses)

My understanding was that the rewrite of libc and the Java (->Dalvik) runtime was partly for GPL reasons, but also partly for technical reasons of performance on systems that are beefier than what the embedded community normally aims for, but not quite up to modern desktop or server systems. (The first Android flagship phone was 528MHz/192MB.)

In addition, I seem to recall legal issues relating to Java Mobile Edition (which was more likely than Standard Edition to perform well on the hardware originally being targeted). And for all the talk of Android fragmentation, one of the things Android has freed us from was the crazy fragmentation in the JME world.

Now, of course, we're getting phones whose hardware is approaching my laptop that's only a couple years old, so many of those technical concerns are moot now.

libc and java

Posted Jun 6, 2011 22:35 UTC (Mon) by jonabbey (guest, #2736) [Link] (17 responses)

Yes, my understanding was that Java Standard Edition was available via GPL only via an attached 'field of use' rider which prohibited the GPL from applying to mobile phone usage.

Sun was attempting to derive a lot of cash money from Java Mobile Edition, and their standard edition licensing was apparently designed to help drive that.

libc and java

Posted Jun 6, 2011 22:37 UTC (Mon) by jonabbey (guest, #2736) [Link] (7 responses)

Actually, if I remember correctly, in order to use 'Java' under GPL, you had to agree not to subset the API set. You could tweak and distribute, you could add and distribute, but you could not remove any portions of the Java platform that comprised the standard edition.

If you wanted to subset, you had to pay for Java Mobile Edition, and agree to carry all APIs that Sun wanted carried.

By going the Dalvik route, Google was going for the ability to control their API destiny, in the same way Microsoft attempted with their release of 'Java' in the 90's. It wasn't about copyleft concerns.

libc and java

Posted Jun 6, 2011 23:41 UTC (Mon) by mjw (subscriber, #16740) [Link] (6 responses)

Neither is true for either the Java SE reference implementation (OpenJDK) or the Java ME reference implementation (PhoneME). Both are available under the GPL, without any sub-or-super-setting restrictions. Such restrictions wouldn't be GPL-compatible in the first place.

See also http://en.swpat.org/wiki/Talk:Java_and_patents

libc and java

Posted Jun 6, 2011 23:56 UTC (Mon) by jonabbey (guest, #2736) [Link] (5 responses)

Ah, okay. The issue was not one of the GPL applying "except for.." but rather that Sun was using the power to interpret what code would be considered "derived" and thus being under copyleft. If you wanted to use certain of the mobile edition classes, you had to have some other license if you weren't willing to make your code GPL.

The language in Oracle's license declaration is:

--

"CLASSPATH" EXCEPTION TO THE GPL

Certain source files distributed by Oracle America and/or its affiliates are subject to the following clarification and special exception to the GPL, but only where Oracle has expressly included in the particular source file's header the words "Oracle designates this particular file as subject to the "Classpath" exception as provided by Oracle in the LICENSE file that accompanied this code."

Linking this library statically or dynamically with other modules is making a combined work based on this library. Thus, the terms and conditions of the GNU General Public License cover the whole combination.

As a special exception, the copyright holders of this library give you permission to link this library with independent modules to produce an executable, regardless of the license terms of these independent modules, and to copy and distribute the resulting executable under terms of your choice, provided that you also meet, for each linked independent module,
the terms and conditions of the license of that module. An independent module is a module which is not derived from or based on this library. If you modify this library, you may extend this exception to your version of
the library, but you are not obligated to do so. If you do not wish to do
so, delete this exception statement from your version.

--

Which would, indeed, make it a copyleft issue for the non-covered classes.

With Google using a differently licensed reimplementation of the class libraries, they are able to avoid having any mandatory copyleft requirement apply to Android developers, but patents are separate.

Thanks for the clarification and pointer.

libc and java

Posted Jun 7, 2011 4:09 UTC (Tue) by smurf (subscriber, #17840) [Link] (3 responses)

Cute.
The FSF's stance on this is that dynamic linking does not create derived works, period.

libc and java

Posted Jun 7, 2011 4:22 UTC (Tue) by dlang (guest, #313) [Link]

I wish it was that clear.

if it was, then what is the difference between the GPL and the LGPL, the only difference between them is about linking.

libc and java

Posted Jun 7, 2011 6:54 UTC (Tue) by paulj (subscriber, #341) [Link] (1 responses)

[citation needed] for that extra-ordinary claim. Everything points to the opposite (e.g. the existence of the LGPL as per other commentator).

libc and java

Posted Jun 7, 2011 7:02 UTC (Tue) by smurf (subscriber, #17840) [Link]

You're right. My bad.

libc and java

Posted Jun 7, 2011 10:58 UTC (Tue) by mjw (subscriber, #16740) [Link]

> The language in Oracle's license declaration is:
> [...] the GNU Classpath class library exception text [...]
> Which would, indeed, make it a copyleft issue for the non-covered classes.

Indeed. But in practice for SE all classes are covered. In OpenJDK all sources for the core library classes carry this exception text. This was just like how GNU Classpath used to handle this case, by having that exact same exception to cover the whole core class library.

libc and java

Posted Jun 7, 2011 22:56 UTC (Tue) by paulj (subscriber, #341) [Link] (8 responses)

If Sun had attached a "field of use" rider to the GPLed Java there would have been unroar. It wouldn't have been GPL compatible either. It would not have been free software. However, OpenJDK was not released with any such rider. The only thing it had was an additional permission, granting proprietary Java apps explicit permission to link to the OpenJDK libraries.

Much of the JavaME specific libraries were similarly licenced as GPL, but *without* the explicit linking permission. Thus, any JavaME distributors who wished to ship proprietary apps and be *sure* to avoid the GPL, had to still get a proprietary licence from Sun. Similarly if they wished to make proprietary modifications.

So your understanding is slightly off I think. Further, the JavaME thing wouldn't have affected Google had they chosen to use OpenJDK cause I don't believe Google had or have any interest in supporting the JavaME specific APIs.

There's a good blog post here on it:

http://www.betaversion.org/~stefano/linotype/news/110/

libc and java

Posted Jun 7, 2011 23:03 UTC (Tue) by jonabbey (guest, #2736) [Link]

Ah, yes. That post is where I got the notion of a 'field of use' restriction in the first place.

libc and java

Posted Jun 7, 2011 23:08 UTC (Tue) by dlang (guest, #313) [Link] (5 responses)

I suspect that part of the issue was that they didn't want to be required to support _everything_ java an Android.

if they had used Java directly, they would have been required to support everything (with a court case to back them up, see the microsoft shenanigans), but by using a subset of the Java syntax, but a non-Java back-end they gained the ability to only implement the part of Java that they wanted.

Also, Sun had shown that it was reluctant to allow any other implementation of Java to be tested to get the Java name.

add to this the fact that they wanted to be able to tweak the implementation as needed (which, if "Java" would require re-certification), and you have pretty good case for not trying to use a true "Java" back-end.

libc and java

Posted Jun 7, 2011 23:11 UTC (Tue) by jonabbey (guest, #2736) [Link] (4 responses)

Only so long as the adopter cared about the 'Java' name, though? Otherwise, trademark wouldn't be an issue.

libc and java

Posted Jun 7, 2011 23:28 UTC (Tue) by dlang (guest, #313) [Link] (1 responses)

the thing is that Google _does_ want to use the name "Java" when talking about the programming syntax (as it implies that all the Java programmers out there will come up to speed quickly, and can probably use the tools that they are currently using)

it would get even more dicy to use the term Java for the syntax while you are using a subset of Java on the back end than what they did where they clearly state that the java syntax is converted to something else before being executed.

libc and java

Posted Jun 7, 2011 23:30 UTC (Tue) by jonabbey (guest, #2736) [Link]

True enough, but I haven't heard that Oracle is going after Google on trademark violation grounds. Trademark violations are pretty to easy to remedy, unlike patent or copyright issues.

libc and java

Posted Jun 8, 2011 12:38 UTC (Wed) by cate (subscriber, #1359) [Link] (1 responses)

Microsoft was suited for trademark violation with J++, so not including the "Java" keyword is not enough as long you tell user that it is like java.

libc and java

Posted Jun 8, 2011 17:46 UTC (Wed) by paulj (subscriber, #341) [Link]

Sun v Microsoft came about because Microsoft licenced Java from Sun and had a contractual obligation to implement Java faithfully, as well as trademark infringement because Microsoft *were* calling their broken version Java.

libc and java

Posted Jun 9, 2011 4:39 UTC (Thu) by tzafrir (subscriber, #11501) [Link]

So, Google did not want to re-implement parts of JavaME, so it went ahead and re-implemented the whole VM.

libc and java

Posted Jun 9, 2011 7:49 UTC (Thu) by nim-nim (subscriber, #34454) [Link] (1 responses)

Please stop beating this dead horse. The Dalvik+Harmony environment is an almost complete JAVA SE-like environment, not a JME one, so the "JME was not available" argument is contradicted by reality (and in fact, before Oracle started suing, many entities acknowledged this and praised Android for not being bound by JME limitations)

JME was out of the scope from the beginning, it is too limited to create a successful Android-like smartphone platform.

libc and java

Posted Jun 9, 2011 12:32 UTC (Thu) by rfunk (subscriber, #4054) [Link]

You seem to be responding only to my "in addition" paragraph, and ignoring what preceded. I tried to say (but apparently only implied) that JME was too small. But I was also saying that JSE was too big and slow on the target hardware, compared to what they were able to do with Dalvik.

Android, forking, and control

Posted Jun 6, 2011 21:53 UTC (Mon) by Banis (guest, #59011) [Link] (19 responses)

What a deeply bias article.

Bias

Posted Jun 6, 2011 21:58 UTC (Mon) by corbet (editor, #1) [Link] (18 responses)

The article is a fairly straightforward report of a talk given in Japan; do you believe that I was biased in that reporting? If so, could you please expand on that?

Actually, you could expand on it regardless? What is the bias that you see? What do you think should have been different? Your half-line comment does not shed a whole lot of light.

Bias

Posted Jun 6, 2011 23:05 UTC (Mon) by tonyblackwell (subscriber, #43641) [Link] (13 responses)

I found the article interesting, informative, and apparently giving a very even-handed account of the original presentation. The LWN report rather clearly avoided superimposing any bias or particular point of view, as we have all (almost all) come to appreciate. We are all here because we value this highly.

Bias

Posted Jun 6, 2011 23:52 UTC (Mon) by boog (subscriber, #30882) [Link] (12 responses)

Our editor needn't worry (or be grumpy) about this. I'm sure about 99.99% of LWN readers will approve of the report, as usual.

Bias

Posted Jun 7, 2011 0:02 UTC (Tue) by xxiao (guest, #9631) [Link] (11 responses)

Android is not FOSS anymore and it cheated. it's giving code to only a selected few, worse than closed code where any players can pay/license to get access to.

I heard a few tablet players eager to get Win8-for-ARM now as they can not access the new android anymore after they jumped on the boat.

Bias

Posted Jun 7, 2011 2:20 UTC (Tue) by leoc (guest, #39773) [Link] (5 responses)

Do you have a source for that accusation?

Bias

Posted Jun 7, 2011 2:30 UTC (Tue) by xxiao (guest, #9631) [Link] (4 responses)

those are all public info, from what google stated recently, to the fact that a few players(motorola,samsung,..) are selling 3.0(soon 3.1) and the core code is nowhere to find for the rest,what else do you need?

Bias

Posted Jun 7, 2011 14:01 UTC (Tue) by KSteffensen (guest, #68295) [Link] (3 responses)

As I understand it, the GPL states that if you buy some piece of software you must receive the source code, that you are free to modify and redistribute this source code and that any modifications must also be GPL'ed.

If Google chooses to sell Android to just a few players and not to others, that is not a violation of the GPL. If these select few players choose not to distribute the code to people or corporations they have no obligation to (and have sold nothing to), then that is not a violation of the GPL.

FOSS is not about all source code being available to everyone at no cost, FOSS is about the right to modify stuff you have bought and paid for.

Bias

Posted Jun 7, 2011 14:08 UTC (Tue) by mjg59 (subscriber, #23239) [Link]

That depends on the choice of distribution mechanism for the code. If 3(b) is used, then anyone must be able to request the source - whether they received the binaries or not. But that's not relevant here, since Google have published all their GPLed code for 3.0. What's missing is the material under the Apache license, which nobody is obliged to give to anyone.

Bias

Posted Jun 7, 2011 15:56 UTC (Tue) by rsidd (subscriber, #2582) [Link] (1 responses)

No, the companies that distribute binaries of GPL software must do so under the GPL. Nothing else gives them the right to do so. The point is only the kernel of Honeycomb is GPL and Google has released the source for that. The rest is under the Apache license or is Google-owned.

Bias

Posted Jun 10, 2011 23:11 UTC (Fri) by giraffedata (guest, #1954) [Link]

FOSS is not about all source code being available to everyone at no cost, FOSS is about the right to modify stuff you have bought and paid for.
No, the companies that distribute binaries of GPL software must do so under the GPL.

KSteffensen's point is that a company doesn't have to distribute binaries of GPL software (and consequently doesn't have to distribute source code).

KSteffensen makes a very astute observation: getting people to distribute source code is a means, not an end, in the FOSS philosophy.

Bias

Posted Jun 7, 2011 7:04 UTC (Tue) by rsidd (subscriber, #2582) [Link] (4 responses)

I guess you're talking about Honeycomb. The kernel source continues to be out there, as it should, and though the rest of it has not been released, Google has declared that Ice Cream Sandwich will be open source. Honeycomb seems to have been a rushed job to compete with the iPad, and too buggy for wider use; it seems that Google fears Android's reputation will suffer if they release it to non-approved manufacturers.

But I thought this is what the Apache license is meant to guard against. It does not permit use of trademarked names (without explicit permission). Android is trademarked by Google. So third-party distributors, if not approved by Google, are not allowed to call it Android. So why not let them have Honeycomb, but make them call it something else?

Bias

Posted Jun 7, 2011 14:47 UTC (Tue) by martinfick (subscriber, #4455) [Link]

I suspect that they fear the junkier tablets made in places where copyright and trademarks are ignored. If they released the Honeycomb code, it would end up on those tablets despite any trademark threats.

Bias

Posted Jun 9, 2011 4:49 UTC (Thu) by tzafrir (subscriber, #11501) [Link] (2 responses)

So, in short, Android is "Open Source Only When Google Likes It To Be So" and not real Open Source, right? Here's something to add to Android's reputation.

Bias

Posted Jun 9, 2011 5:13 UTC (Thu) by rsidd (subscriber, #2582) [Link] (1 responses)

Gingerbread is open source, by any definition. Honeycomb is not. Where do "real" and "fake" enter into this?

Bias

Posted Jun 9, 2011 14:37 UTC (Thu) by tzafrir (subscriber, #11501) [Link]

Where do they enter? When you wrote them.

Gingerbread is open source, by any definition. Honeycomb is not. Android is maybe.

Bias

Posted Jun 7, 2011 16:41 UTC (Tue) by tdwebste (guest, #18154) [Link] (2 responses)

Yes, I do see a bias as this was written from the Linux community's point of view.

Honestly what is Google's point of view. Mark Shuttleworth has been quite forthright with his point of view. We may not agree with it, but we know what it is.

I would welcome an contributed article from Google's business point of view.

Bias

Posted Jun 7, 2011 18:38 UTC (Tue) by dlang (guest, #313) [Link] (1 responses)

when you are pointing at Bias, are you saying that the presentation that is being reported on is biased? or that LWN wrote a biased report on the presentation?

If you are complaining about the presentation that's being reported on, that presentation was being made by a Linux community person, and was being presented from that point of view, so it will be biased by that.

Bias

Posted Jun 7, 2011 21:48 UTC (Tue) by nevets (subscriber, #11875) [Link]

The article itself is not bias, it just presented what another presenter stated. As for the presenter, well of course he's bias, and why not? He's part of the kernel community. What I actually found amusing, was how much credit he gave to Google. He basically said "they won".

Actually, this was one of James's least bias presentations (I was not there, I only read the article). Now maybe LWN was bias and made James's presentation seem less bias than it was. But I can't say, because I wasn't there ;)

Bias

Posted Jun 8, 2011 5:50 UTC (Wed) by branden (guest, #7029) [Link]

"The article is a fairly straightforward report of a talk given in Japan; do you believe that I was biased in that reporting? If so, could you please expand on that?"

Well, I wasn't the guy who made the claim, but...

I've been a somewhat grumpy LWN subscriber in recent months, but if it's any consolation to you (might have to do a delta-epsilon proof to measure it), I don't see any particular bias.

Informative article. Thanks!

Android, forking, and control

Posted Jun 7, 2011 0:02 UTC (Tue) by ikm (guest, #493) [Link]

> Given the structure of the system, it seems that rewriting the C library was entirely unnecessary; nobody above the framework makes any sort of direct use of it anyway.

The last part isn't true - the NDK allows direct use of the C library, and any application which does any sort of serious data processing needs it.

Android, forking, and control

Posted Jun 7, 2011 3:06 UTC (Tue) by swetland (guest, #63414) [Link] (10 responses)

We considered using a BSD kernel very early on (in the early days of the startup), but pretty quickly decided that the very strong industry support (particularly from ARM SoC vendors) around the Linux kernel made it a more logical choice. License was not a major factor in this decision.

The GPL does create a compliance burden for OEMs (compared to Apache2, BSD, or MIT licenses) and OEMs certainly seem to have a lot of difficulty with this burden, based on complaints I've seen about their handling of license compliance for both Android and non-Android systems. That's a simple fact.

The kernel's "bright line" exception of userspace code making syscalls from being part of it for license compliance purposes is quite helpful in justifying the use of a GPL'd kernel to OEMs and silicon vendors that have severe concerns about GPL "tainting" (be they real or imagined).

Android, forking, and control

Posted Jun 7, 2011 6:05 UTC (Tue) by idupree (guest, #71169) [Link] (4 responses)

Can you compare the GPL's burden on OEMs to a typical commercial licensing agreement? (That's the comparison our article/speaker makes: "The GPL, he said, is far easier to comply with than most commercial licensing arrangements".) Or if not, is my question wrong, or else who might know the answer?

It's both easier and simpler

Posted Jun 7, 2011 8:15 UTC (Tue) by khim (subscriber, #9252) [Link] (2 responses)

Can you compare the GPL's burden on OEMs to a typical commercial licensing agreement?

It's different. And it's much, much, MUCH easier for the OEM to comply with typical commercial license. Not because it's intrinsically harder but because it's totally different.

Commercial licensing agreement is typically imposes lots of burdens (you must count number of licenses sold, you sometimes need to certify your changes or are not allowed to do them at all, etc), but this is the exact some burden hardware suppliers will ask for! Any OEM has well-oiled machinery to talk with suppliers - or it'll not be OEM for long.

GPL does not place any such obligations on OEM - but instead it tasks them with simpler but very unfamiliar task: now they must track their own changes and make them available to customer. This is not something they were ever prepared to do. The most they expected from customers is returns of broken or unsold goods - and even then they can just throw them away and replace with newer models if they so decide. Often they don't even have anyone who's responsibilities are even remotely similar (the sales people they have talk with retailers, not with customers).

So in short: it is easier to comply with GPL, but it's requirements put OEMs in the very unfamiliar position.

It's both easier and simpler

Posted Jun 7, 2011 8:40 UTC (Tue) by mjthayer (guest, #39183) [Link]

> So in short: it is easier to comply with GPL, but it's requirements put OEMs in the very unfamiliar position.

I think part of the problem for OEMs is that with a "typical commercial licensing agreement" they have a single, usually friendly, person to talk to (this is a slight simplification in some cases, but still). With a GPL product they may potentially have to deal with any of the people who contributed to it, without even being sure how many people that may be, and they certainly can't be sure that some of those won't be actively looking for ways to hurt them. Which usually won't be the case of course, but I think the risk is still worrying for them.

It's both easier and simpler

Posted Jun 7, 2011 13:49 UTC (Tue) by lutchann (subscriber, #8872) [Link]

Exactly. Commercial licensing places the compliance burden on the legal and accounting departments. Copyleft licensing places most of the burden on the engineers. And since engineering is always, always, always the bottleneck when getting a consumer electronics product out the door, it greatly amplifies the cost of compliance.

Also, GPL violations are ubiquitous in the CE world and almost everyone gets away with it. It's just not something most small and mid-sized OEMs are concerned with in the least.

Android, forking, and control

Posted Jun 7, 2011 11:46 UTC (Tue) by Cyberax (✭ supporter ✭, #52523) [Link]

Well, commercial licenses are actually quite simple. All they boil down to is: "You pay us money and redistribute our components". There might be other conditions: a percentage of gross from hardware sales, fees for each developer working on a product, etc. But in general they are fairly simple to comply.

Besides, commercial licenses are something business is accustomed to deal with, paying for stuff to produce other stuff is the core of our economy.

Android, forking, and control

Posted Jun 7, 2011 13:53 UTC (Tue) by karim (subscriber, #114) [Link] (1 responses)

Thanks for this nugget. Very insightful.

Totally agree on the "be they real or imagined"part. The downside of that, though, is that a lot of "standard" packages and modus operandi were thrown out the window (Busybox, uClibc, ...) I mean no offense, but Toolbox is nowhere near Busybox in terms of capabilities. In fact, the first thing I do when starting work on an AOSP tree is get Busybox in there ... Nothing major really, but an annoyance still.

Android, forking, and control

Posted Jun 7, 2011 15:49 UTC (Tue) by swetland (guest, #63414) [Link]

No offense taken. Toolbox was never intended to be a full-featured environment, simply some minimal tools for debugging. The reason /data/local is writeable by the "shell" user is that the expectation was that you'd throw whatever commandline goodies you want in /data/local/{bin,lib,etc}.

Android, forking, and control

Posted Jun 7, 2011 22:15 UTC (Tue) by linusw (subscriber, #40300) [Link] (2 responses)

Thanks Brian, love your posts here. Now this quote about "very strong industry support" look a bit odd since when the Nexus came out it seem to me like the MSM kernel was written to a large extent by the Android startup and Google rather than the chipset vendor, actually. I understand that it is different now, but was the support really that great in the beginning?

Android, forking, and control

Posted Jun 8, 2011 0:06 UTC (Wed) by swetland (guest, #63414) [Link] (1 responses)

Qualcomm was very supportive of us and provided documentation, technical support, etc, while we did the coreLinux port for MSM7X0X and MSM8X50. Since then they've become much more involved and are not working directly with the community, submitting patches on lkml, etc. Which is great!

Obviously some vendors already had code in mainline or patchsets available and others were not as far along, but overall Linux had a lot of momentum and there was plenty of interest in enabling it, even back in 2005. Since then it's only picked up even more steam, between Android, WebOS, MeeGo, etc.

Android, forking, and control

Posted Jun 8, 2011 0:10 UTC (Wed) by swetland (guest, #63414) [Link]

Blargh... s/coreLinux/core Linux/ s/are not working/are now working/ ... pardon the typos...

SyncML

Posted Jun 7, 2011 6:43 UTC (Tue) by Cato (guest, #7643) [Link]

SyncML isn't a panacea - it has odd rules ("client always wins" for example) that can mean you lose the latest updates, and there are many quite buggy implementations. https://lwn.net/Articles/327498/ has some background. I use http://Memotoo.com which is quite a good hosted contacts service using SyncML, but keeping all the various connectors working is not easy.

For reliable syncing of PIM data, many companies end up licensing Microsoft's ActiveSync, and Google Sync uses this for most mobile platforms: http://www.google.com/mobile/sync/

forking vendors

Posted Jun 7, 2011 8:46 UTC (Tue) by Seegras (guest, #20463) [Link] (2 responses)

The really bad problem with android is IMHO not one google produces directly (maybe indirectly by not working with the mainstream-kernel; but certainly not willingly): It's phone-vendors patching drivers (and the rest of the system with it) and not merging them upstream.

Now you get hundreds of phones which have no recent android-distribution on them. Right now, the only hope for those affected are things like Cyanogen-mod (A big "thank you" to them, by the way), which in effect provides a community-distribution for certain android-phones.

Forking the kernel (and making their own distribution) actually puts google into the place of responsibility. Things the kernel-community would have done have to be done by google now. And I think google should step up, get all those driver-patches from all the device-manufacturers involved and make an android-distribution which runs on _all_ phones.

The minimum I would expect is for google to provide a kernel (and its sources, in a form which can be compiled with minimum fuss -- with "make menuconfig; make", just as the mainline kernel) which would run on all the devices.

forking vendors

Posted Jun 7, 2011 13:13 UTC (Tue) by Aissen (subscriber, #59976) [Link] (1 responses)

I'm afraid Android isn't going to in have generic "distribution" kernels anytime soon. It's so much easier to just do one-shot kernel for every device :-(
https://twitter.com/#!/jbqueru/status/67223151683174400
https://twitter.com/#!/jbqueru/status/67223447264169985

This relates to this weeks "Forking ARM" article by Thomas Gleixner, but is actually yet another different problem plaguing the ARM platform. No hardware discoverability, and no standard BIOS+ACPI thingy(thank god) to bring uniformity. The kernel developers have been working on a solution and came up with device trees, although those might one day be part of the problem (just like BIOSes, ACPI and EFI).

forking vendors

Posted Jun 7, 2011 16:52 UTC (Tue) by swetland (guest, #63414) [Link]

Well, all credit due to JBQ who works his butt off, but from the system/kernel team's perspective, we'd *love* to get closer to mainline and have things more standardized. It's certainly not easy.

Android, forking, and control

Posted Jun 7, 2011 10:05 UTC (Tue) by lmb (subscriber, #39048) [Link] (5 responses)

The point that struck me as the most insightful was the disconnect between the need of a company to ship a product on schedule, and the need/want to get code accepted upstream.

Some of this is unavoidable; development and research are essentially unpredictable, and the risks can be only reduced but not eliminated. But once shipped, the effort required to converge with upstream - a group that, as in the Android wakelock case, might insist on a completely different architecture - can become prohibitive, and only increases over time.

I have no solution, but I think its an important problem for the community to ponder.

Perhaps certain kinds of forks - "additive" forks that just keep adding code, but rebase periodically and are actively maintained locally - aren't as bad as others that truly and massively divide the community.

There was also the point of "toxic" individuals during code review phase, which can be off-putting. And, at least in discussion after the keynote, the observation that there is some nepotism at work, which reduces the efficacy of the meritocracy. Your humble commenter wonders if, similar to auditioning for many jobs or academic peer review, anonymizing the code submission and review phase would be worth considering.

Android, forking, and control

Posted Jun 7, 2011 14:22 UTC (Tue) by Frej (guest, #4165) [Link]

+1 insightful,interesting ;)

Android, forking, and control

Posted Jun 7, 2011 15:59 UTC (Tue) by swetland (guest, #63414) [Link] (3 responses)

One of the most frustrating parts of interacting with the upstream kernel community is the seemingly-infinite number of people who can say "no" or can at least cause enough noise to derail forward progress.

To take the wakelock situation as an example, every time things were explained, patches were rewritten (10+ times with massive discussion and often extensive arguments about naming, etc, which we weren't terribly picky about), some other group of people jumped in and suddenly there were *different* objections or requirements.

Finally, a "solution" that doesn't actually address our concerns is pushed through, which *nobody* uses because it doesn't meet our needs (so we use our existing one) and nobody else appears to be interested, and now we're simply told "oh the problem has been solved, go rewrite your userspace to use this new interface".

At a certain point, it's easy to get the impression that your time is intentionally being wasted by people who have no interest in ever accepting your work.

On the upside, though the userspace interface for the code that eventually hit mainline doesn't meet our needs, a kernel API now exists that we can make use of to communicate with our own userspace interface without needing #ifdefs or a non-mainline API in drivers. So, that's progress at least.

Android, forking, and control

Posted Jun 7, 2011 17:53 UTC (Tue) by dunlapg (guest, #57764) [Link]

> At a certain point, it's easy to get the impression that your time is intentionally being wasted by people who have no interest in ever accepting your work.

This. There's certainly a lot of good engineering work done in the kernel community, and it's good that there are people who care about code quality and can say 'no' to stuff which is no good. But after working with the community for a while, you can't help but get the feeling that many of the people saying 'no' *also* enjoy just exercising their ability to say 'no'.

Android, forking, and control

Posted Jun 9, 2011 10:09 UTC (Thu) by modernjazz (guest, #4185) [Link] (1 responses)

> At a certain point, it's easy to get the impression that your time is intentionally being wasted by
> people who have no interest in ever accepting your work.

For what it's worth, this isn't unique to kernel patch review: I suspect that almost anyone who has been in academia long enough has a story about how one of their papers has been "held hostage" by a reviewer who appears to be motivated by delaying its publication. And while I'm sure there are cases where that's really true, I think more commonly the true source of "obnoxious" reviews are people not understanding or appreciating what you're trying to do. Perhaps the main culprit is lack of time: if you aggregate all the different forms of review together (student exams and presentations, papers, grants, and administrative proposals), a typical academic may spend more time evaluating other people's work than doing his/her own research. That adds a lot of time pressure to get reviews done quickly, and contributes to occasional sloppiness. It's the dark underbelly of a system that, despite its warts, is basically necessary for any large undertaking to make progress.

I'm not saying this is what happened in the case of Android (I don't know enough about the details to know), but just a bit of outside perspective on the weaknesses of review processes in general. I suspect there's no way to avoid problems altogether, but one positive step might be more recognition for people who do a good, conscientious job of reviewing.

Android, forking, and control

Posted Jun 9, 2011 15:47 UTC (Thu) by PaulMcKenney (✭ supporter ✭, #9624) [Link]

Heh! It did take me about ten years from first submission to high-end-academic conference acceptance of an RCU-related article. The first article in a high-end academic journal giving a detailed description of RCU will likely appear within a year or so, about 15 years after first submission.

About five years of that time was due to me learning how to describe RCU coherently to an academic audience. For the rest of the time spent, the issues described in the parent article apply, particularly the part about lack of time. All too often academics are doing their review in the wee hours of the morning, which makes it hard for them to wrap their heads around something truly new and foreign. So a successful academic paper needs to be sailing some place new, but it had better be sailing really close to shore.

So again, this comes down to communication: papers where the reviewer can quickly and easily understand what is new and interesting about the submission are more readily accepted than papers that cover less-familiar material. So in that sense, yes, this problem is inherent in review in general, not just review of kernel patches.

Android, forking, and control: Communication

Posted Jun 7, 2011 15:43 UTC (Tue) by PaulMcKenney (✭ supporter ✭, #9624) [Link] (17 responses)

One of the big problems between Android and the Linux kernel community has been an inability to communicate effectively. James noted that Android "did everything we told them not to, and won big." One might also argue that Nokia did everything the community told them to, and lost big. So perhaps part of the problem was that the Linux community did not understand the mobile arena all that well (this certainly applies to me, given my server background).

For its part, the Android community has not always explained its requirements clearly. From what I can see, the Android community was in fact doing its level best, but their (clearly superior) knowledge of the mobile arena includes subconscious as well as conscious components. When people ask them what they need, the Android guys dutifully list out their conscious knowledge. When a Linux hacker cranks out a patch, the result will be unsatisfactory: unless the hacker is luckier than anyone deserves, the patch will fail to meet the requirements in the subconscious list. The Android developer then says "We told you exactly what to do, how could you mess it up so badly???" while the hapless Linux community member says "I did exactly what you told me, but you changed the requirements!!!" This sequence of events clearly will not do much to build trust between the Android and the Linux communities.

By the way, this problem is not specific to the Android folks: Those of us at Sequent had exactly the same problem explaining parallel programming. And some might argue that we still do have this problem!

How can this problem be addressed?

Training at Sequent surrounded new engineers with experienced parallel programmers. Over the course of a few months, the implicit knowledge buried on our subconscious minds would flow to the new engineer. Unfortunately, this apprenticeship model relies on there being lots of experienced engineers and only a few trainees, so it might quite some time for the few Android developers to train the huge number of Linux kernel hackers.

Another approach is to accept the fact that getting Android functionality into the Linux kernel will be an iterative process. A big part of the purpose of the first N patches is not so much to implement the functionality, but rather to learn what the requirements actually are. This approach can work very well, but it clearly requires considerable patience on the part of both the Android developer and the Linux kernel hacker.

Both these approaches take a lot of time. But given that the Android folks have optimized their patchset for forward porting, perhaps we can afford to take the time needed to get it right.

Android, forking, and control: Communication

Posted Jun 7, 2011 15:47 UTC (Tue) by martinfick (subscriber, #4455) [Link] (13 responses)

> One might also argue that Nokia did everything the community told them to, and lost big.

I doubt anyone would argue that. Nokia never lost, they simply gave up right after they started.

Android, forking, and control: Communication

Posted Jun 7, 2011 16:39 UTC (Tue) by halla (subscriber, #14185) [Link]

If you define "right after they started" as a period of over five or six years, yeah, then they gave up right after they started. They gave the GTK/Gnome world a long enough chance to produce something decent that a whole ecosystem of small Gnome/GTK-based companies sprouted. The same happened after they had to decide that Gnome/GTK was never going to work across Maemo and Symbian and they had to look for something better, which is Qt.

From my own experience with Nokia, with their involvement with first KOffice and then Calligra, a project that started in 2009, they really did everything right, and did do everything the way the community said it wanted -- if you budget for the fact that there was a learning curve for both the community and the company, which is only fair.

All the work on the KOffice/Calligra engine was done in the open, they took two dozen students as interns in an attempt to grow the community, joined sprints and conferences, used the project bugzilla and the project reviewboard. There's nothing for which they can be blamed and a lot for which they can be praised.

At the MWC in Barcelona, many people felt that Nokia had given working the open source way a fair try twice, and failed hard twice, while Apple with their "grab and don't give anything" mentality are a success and Google with their "grab and dump" mentality are a success, so open source is guaranteed failure.

In the end, though I am convinced that MeeGo didn't work for Nokia not because they worked with open source communities the wrong way or the right way: they failed because of internal problems and because of problems in their partnership with Intel. But nobody in the industry will see it that way.

Android, forking, and control: Communication

Posted Jun 7, 2011 16:43 UTC (Tue) by bronson (subscriber, #4806) [Link] (1 responses)

I'm not sure Nokia ever really started! Who wants a 770 or N800 without phone capability? Nobody, that's who. Unless it's a Gnome freebie.

By the time the N900 finally came around, a device that Joe Q. Public might buy, the race was already over.

Android, forking, and control: Communication

Posted Jun 7, 2011 16:57 UTC (Tue) by karim (subscriber, #114) [Link]

Actually, it seemed to me very early on that Nokia's Maemo work was considered experimental lab stuff that was worth pursuing but never truly expected to become Nokia's bread and butter. Once the touch-based revolution started with iPhone and Android, it looks like they scrambled to find something and Maemo was the only "viable" route. Unfortunately, Maemo wasn't rooted in a "we're going to conquer the world" philosophy and $$$ backing. And to add insult to injury, once they discovered that Maemo was about their only card, they decided to merge it with Intel's Moblin without ever engaging the Maemo community about it.

I don't think this is a development philosophy issue as much as it's a lack of market understanding, a failed go-to-market strategy and a breach of trust with an established community. Then again, I might be completely beside the track.

Android, forking, and control: Communication

Posted Jun 9, 2011 4:09 UTC (Thu) by tytso (subscriber, #9993) [Link] (9 responses)

If you look at the Businessweek article, according to Nokia they gave up on Meego because it took too long. Symbian phones were dying on the vine, and they had been dropping prices, and thus losing profit margins, in order to keep their declines from getting worse. I think it is reasonable to posit that perhaps Meego's strict adherence to open source development principles, with the "it will be done when it is done", attitude, may have cause the schedule to slip out too far for Nokia's needs, and that they couldn't have stayed in business waiting another year or two for Meego to become sufficient mature for their needs.

Sometimes, you need to know when it's a better path to take on a little technical debt. Too much will of course sink you, but playing things too conservatively can also be a path to losing.

MeeGo

Posted Jun 9, 2011 14:27 UTC (Thu) by corbet (editor, #1) [Link] (8 responses)

Interesting thought, Ted, but do you have an example of actual delays caused by "strict adherence to open source development principles"? In the Android case, it's obvious that waiting until wakelocks were upstream would have been fatal. I'm not sure I can find a similar situation on the MeeGo side. I suspect that process delays, in this case, are minimal compared to those caused by merging two projects, changing graphical toolkits, etc.

What am I missing?

MeeGo

Posted Jun 9, 2011 14:52 UTC (Thu) by spaetz (guest, #32870) [Link]

I would also be interested in examples of this. In my book, changing underlying fundamentals when nearly finished and restart from basically scratch, is really a more likely explanation. Or lack of top-management commitment.

Actually, interviewing the head of Maemo, I learned that they tried to internally fork first, and that didn't play out so well. So I doubt that more "technical debt" would have helped here.

MeeGo

Posted Jun 9, 2011 15:34 UTC (Thu) by PaulMcKenney (✭ supporter ✭, #9624) [Link] (6 responses)

Is it possible that Nokia took the approach of reworking lots of user-mode code in order to avoid depending on something like wakelocks? If so, mightn't this have reworking have greatly increased the costs and calendar time required?

MeeGo

Posted Jun 9, 2011 16:06 UTC (Thu) by mjg59 (subscriber, #23239) [Link] (5 responses)

There's definitely a cost associated with making sure that your userspace behaves itself in a wakelock-free environment, although there are associated benefits. Assuming a well-behaved userland and kernel, taking a wakelock should be approximately a zero-cost operation as far as power budget goes. But Android's userland and kernel don't seem well behaved. Running powertop on my Nexus One (screen off) shows over 100 wakeups per second. Some of that's because I've got USB connected and some of that's because it's monitoring the battery charging, but there's also bits of userspace doing stuff and active filesystem threads and it's all a bit of a mess. The result of this is that any Android app taking a wakelock pretty much instantly halves your battery life, even if that app doesn't do anything.

So while there's engineering cost involved in reworking some portions of userspace, there's also a measurable engineering benefit in doing so even if you have wakelocks. The market hasn't really been given an opportunity to decide whether or not that's important yet.

(There's technical mechanisms to force userspace to behave without wakelocks, as long as you can assume a userspace that isn't actually pathological. The engineering involved is probably still fairly minimal. They're also undemonstrated, which is more of a problem. I should really get round to trying to prototype that)

Looking forward to seeing your prototype!

Posted Jun 10, 2011 0:00 UTC (Fri) by PaulMcKenney (✭ supporter ✭, #9624) [Link] (4 responses)

Your prototype does sound interesting! Your point is that Nokia was trying to create something similar? Or is your point instead that it should be possible to improve on wakelocks?

Also, when you say that an Android app taking a wakelock pretty much halves your battery life, you are thinking of an Android app that holds a wakelock indefinitely, as opposed to (for example) acquiring it an then immediately releasing it, correct? If the battery lifetime is halved by an Android app holding the wakelock indefinitely, then the Android folks might reasonably argue that this is evidence that wakelocks doubles battery lifetime.

Looking forward to seeing your prototype!

Posted Jun 10, 2011 0:28 UTC (Fri) by mjg59 (subscriber, #23239) [Link] (3 responses)

Wakelocks double your battery life if your userspace is badly behaved, right. But a badly behaved userspace also reduces your battery life when the phone is in active use, so there's still an incentive to fix it - it's just less significant overall.

I honestly haven't investigated Meego's full power management implementation, but the easiest way to implement management of this would be to use the new cgroup timer slack mechanism. You'd still require some sort of userspace-level wakelock implementation, but when no userspace locks are held you extend the timer slack for all untrusted applications out to infinity (or as close as possible). Events will still be implemented in a timely manner, but once a task's finished handling it and hits a select or timer it won't be scheduled again until another event hits.

This ought to handle the case that wakelocks are designed to handle, which is that an aggressive suspend implementation leaves you open to races between your suspend policy and event delivery. It also avoids the problem of using a freezer cgroup, where not all events are delivered through a framework so you still have races.

The main difference between wakelocks and this is that truly pathological applications still hurt you (if something's in a tight loop it'll still be scheduled), but also you have to trust your underlying layers to be correct (ie, never to wake up unless event delivery occurs). Running the current Android implementation in such an environment would result in a measurable decrease in battery life. But if your framework's been designed with this in mind, it means you get the benefits of aggressive suspend without the overhead of maintaining semi-fragile kernel modifications (some of which certainly stand no chance of going upstream).

There's no fundamental reason to think that the Android approach involved less engineering effort than Nokia's, and the long-term outcome should have been pretty similar in terms of ideal-case battery life. My experience is that it's not difficult to ensure that your core code is event driven provided that that's a design goal from the outset. So I don't think this distinction is what led to Nokia ending up so far behind schedule. There's probably more straightforward reasons for that.

Nokia, Android, and Approach to Open Source

Posted Jun 13, 2011 15:23 UTC (Mon) by PaulMcKenney (✭ supporter ✭, #9624) [Link] (2 responses)

You make some good points, but you have not convinced me that Nokia's downfall was totally unrelated to their open-source strategy. Of course, I would not be surprised that there were also other factors at work, but from what I can see, their approach to open source was a contributing factor.

Then again, there is a good chance that Nokia's current experience will become a prominent business-school case study. In which case, few will pay attention to what either you or I think about the matter. ;-)

Nokia, Android, and Approach to Open Source

Posted Jun 13, 2011 15:40 UTC (Mon) by mjg59 (subscriber, #23239) [Link] (1 responses)

The engineering time lost rebasing everything on top of Qt because Nokia wanted a migration strategy from Symbian would seem to be massively larger than the time spent on reducing userspace wakeups (something that could probably be done in a few months by a single competent engineer). It's possible that their approach killed them, but when we're talking about dysfunctional management and massive political infighting between the Symbian and Meego teams it's a lot easier to just ascribe it to corporate ineptitude. We're talking about a company that refused to consider the iphone a threat because its camera had fewer megapixels than their latest Symbian device, even if said Symbian device was approximately unusable as a phone.

It's interesting to compare to Palm. Their kernel was pretty much stock (there's some additional drivers), and while they didn't take the effort to attempt to upstream stuff they'd probably have had little trouble in doing so. They ended up shipping a sufficiently attractive mobile OS that it achieved their goal of turning a failed company into an acquisition target. Which model were they closer to?

Nokia, Android, and Approach to Open Source

Posted Jun 17, 2011 21:21 UTC (Fri) by oak (guest, #2786) [Link]

> engineering time lost rebasing everything on top of Qt

I might be confusing what's in public MeeGo and "Nokia MeeGo", but if you look at the stuff in the public gitorious repos, you notice that it wasn't just "rebasing everything on top of Qt", but first writing a completely new widget toolkit[1] on top of the Qt GraphicsView (which toolkit seems have appeared first under different name[2], so maybe even that was partially rewritten). One assumes that apps were started before this new toolkit was at the maturity level of e.g. (over decade old) Qt or Gtk which "can" affect how much time went to writing the apps.

And at some point QML came into picture and now there seems to be yet-another widget toolkit[3], this time done on top of QML...

[1] http://meego.gitorious.org/meegotouch/libmeegotouch
[2] http://qt.gitorious.org/maemo-6-ui-framework
[3] http://qt.gitorious.org/qt-components/qt-components

Android, forking, and control: Communication

Posted Jun 7, 2011 16:35 UTC (Tue) by dgm (subscriber, #49227) [Link] (2 responses)

> When people ask them what they need, the [users] dutifully list out their conscious knowledge. When a [developer] cranks out a patch, the result will be unsatisfactory: unless the [developer] is luckier than anyone deserves, the patch will fail to meet the requirements in the subconscious list. The [client] then says "We told you exactly what to do, how could you mess it up so badly???"

This story is universal. It's one of the few reasons why software projects are always late, over-budget and do not deliver the expected features.

What is really needed is someone who has a foot on each side, and is respected by both. If this someone comes from the developer side, he needs to take the time to learn how the client side does it's thing, and to feel the "pain" they feel. If it comes from the other side, he has to be someone capable of (and willing to) solving problems with logic, not political pressure.

Android, forking, and control: Communication

Posted Jun 7, 2011 17:55 UTC (Tue) by PaulMcKenney (✭ supporter ✭, #9624) [Link] (1 responses)

And isn't this the problem that "extreme programming" and "agile methods" were supposed to solve? ;-)

Android, forking, and control: Communication

Posted Jun 7, 2011 18:35 UTC (Tue) by dlang (guest, #313) [Link]

kernel development is probably the best example of 'agile methods' that you can find.

there is no planned feature set for each release, instead each development team works on their set of features and when the merge window starts, anything that's ready gets pushed upstream.

but this only works if the development teams work on smallish features (or does their development in a way that gradually changes the result rather than big bang changes)

Android, forking, and control

Posted Jun 7, 2011 20:55 UTC (Tue) by jengelh (subscriber, #33263) [Link]

>They did everything we told them not to, and won big. While we would like the Android developers to change and do some things differently, their success suggests that, perhaps, Android is not the only group in need of change. [IOW, it is 'we' who need to change.]

No, I do not we need to change. If I wanted software that goes by desire for marketshare rather than desire to DTRT, I could be using Windows or Ubuntu.


Copyright © 2011, Eklektix, Inc.
This article may be redistributed under the terms of the Creative Commons CC BY-SA 4.0 license
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds