Java Gets New Garbage Collector, But Only If You Buy Support
An anonymous reader writes "The monetization of Java has begun. Sun released the Java 1.6.0_14 JDK and JRE today which include a cool new garbage collector called G1. There is just one catch. Even though it is included in the distribution, the release notes state 'Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased.' So the Oracle touch is already taking effect. Will OpenJDK be doomed to a feature-castrated backwater while all the good stuff goes into the new Java SE for Business commercial version?"
You used to be cool.
Hold up, wait a minute, let me put some pimpin in it
With the JavaOne starting this week, it might be a nice opening question on day one... "What the hell are you thinking, mister Schwartz??"
... that the old Garbage collector was rubbish - we've been saying it for years, Java uses too much memory, is too slow, is just all about vendor lock-in....
And now, its proven - they've brought out a new GC that's so much better, it might actually fix all the problems with Java! Proof that the old one was pants.
Surely.
Of course.
The old one was unusable, wasn't it?
We were unable to make anything work properly using Java in the past, yes?
maybe? ... :)
Someone can add this to OpenJDK or a fork of OpenJDK?
As a non-programmer, can someone give a brief explanation of what a garbage collector is as it pertains to programming.
We will bankrupt ourselves in the vain search for absolute security. -- Dwight D. Eisenhower
Shouldn't we have "recycling collection" instead of "garbage collection"?
C'mon guys all those big 1MB and 4MB malloc()s are being shipped over to third world countries to be disassembled into bits and bytes. We should be recycling things HERE.... not throwing them away for Java to come and pick up.
Karma: Excellent. 15 moderator points expire sometime.
We buy garbage, instead of the real product these days? :)
If you post a troll comment to an article tagged troll, do you get insightful mods?
In Soviet Russia, article trolls you!
No comprende? Let me type that a little slower for you...
JRockit has all kinds of monitoring features, memory profilers, and other useful metrics built into the JRE, but you need a license key to unlock them. Core Java was always free. You pay for the value-added stuff.
"Will OpenJDK be doomed to a feature-castrated backwater while all the good stuff goes into the new Java SE for Business commercial version?""
Perhaps. But now that its GPL, maybe IBM, RH and the rest of Java's stakeholders will get onto making openjdk better than oracle's. Ill sure contribute: this is a strategic need for the foss movement.
NO SIG
I don't see anything obvious preventing you from using it (no license/support keys?), it's just not recommended since it's experimental. If you're crazy enough to use it on a production server, you better have a support contract so Sun/Oracle can fix any problems that come along. That seems reasonable.
Although it'd be better if they just said "don't use it for production, period."
I just know you're going to make a lengthy complaint thread of this.
If you would simply put down your Silver Surfer comics, comb the crumbs and insects out of your beards, cut your straggly hair, have a bath and a good scrub, and eagerly learn all the new technologies as our Marketing department invents them (and disposes of the old technologies), we could see the dawn of a New Age of incredibly rich CEOs and VPs who live in mansions, collect cars, race boats and planes, and in general protect the freedoms that your betters fought so hard to establish.
The meek shall inherit my EULA.
Rich And Stupid is not so bad as Working For Rich And Stupid.
The G1 collector is still a "work in progress" so they are suggesting that you use it *in production* only if you have a support contract with Sun (Oracle?). This is not a big deal. You can still use it, just enable it with "-XX:+UnlockExperimentalVMOptions -XX:+UseG1GC" on the command line...
Java doesn't have malloc( ). That's why it needs an integrated garbage collector. It keeps track of the references to objects that have been instantiated. When the counter reaches zero, the object is automagically removed from memory without explicit programming required. No malloc( ) or free( ) necessary.
Put a fork() in her she's done!
Meet Vinny and Guido, my business associates in the waste management business.
You see, it's like this. I gotta eat. My kids gotta eat. Vinny and Guido's families have to eat.
We know where you live. It's a nice place, big houses, fancy cars. You can afford to eat, very well.
You wouldn't your neighboorhood to fall victim to all sorts of garbage dumpers, would you? How about a recycling plant, right next to where you work?
No? Well, I'm sure you'll understand when I say that it is in your best interest to respect our business model. Or else, Vinny and Guido might have to go hungry for a bit. And I assure you, they get very unfriendly when they get hungry.
Capiche?
Methinks they just want to make damn sure nobody uses this feature in a production environment. This is more of a sneak peek for paying customers who are contractually bound against using this in a production environment.
If this was included in the standard distribution, then people would use it no matter what the documentation said. And then Sun would be saddled with bug reports and whining.
There's no -1 for "I don't get it."
The ongoing problem with FOSS is that hard, un-cool, gritty, vital work ultimately takes money to do right. Cool gets projects only so far; money is needed for viable completion.
Can we get a "-1 Wrong" moderation option?
...if you for example take a look at the proprietary-only MySQL workbench or their OpenSolaris distribution which is hyped as a developer OS but requires you to buy a support contract if you want to get basic security updates e.g. for Firefox or OpenSSL.
This is your notice that Oracle will control the future Java trajectory for the benefit of Oracle. It's only going to get worse. There will be poison candy like this GC, strategic API and ABI changes, and just a world of hurt. I survived IBM, DEC, and MS hegemonies, and I've been paying attention. It's gonna happen.
However, as a nakedly proprietary platform, it's possible the academic world will back off from its embrace of Java in favor of unowned platforms. One can hope.
--
olderphart
You can still construct a program with a memory leak in Java.
1. From your Main object, create an object A.
2. Have object A create an object B. Have it pass itself as an argument to the ctor.
3. Have object B keep the reference to object A.
At this point you have 2 references to object A (one from the Main object and one from object B) and 1 reference to object B (from object A).
Now just set object A to null to destroy the reference from Main to A. The reference counter to A drops from 2 to 1 (and object B still has 1). Both objects continue to exist in memory but they cannot be referenced by your program.
Voila! Memory leak in Java.
This wouldn't bug me as much if the new garbage collector were only included as part of a paid-for distribution, but the fact that they're charging for the way it's used rather than for the right to obtain a copy of it makes me worry about additional restrictions on use being added in the future. I hope there's enough people making backups of all of Sun's open source software.
"In prison you just have to shut your eyes and take it. Here you have to shut your eyes and give it."
I know I am profoundly ignorant and as thus should be modded into oblivion, but I don't do any programming where the memory allocation is variable. Is there a good reason are people really relying on hidden mechanisms to manage it? I would think it would be a lot more robust to keep track of allocation and deallocation explicitly, add when you need, and delete when you don't need, and not count on some generic mechanism. I know it happens, I see the memory leaks, but it would seem eminently avoidable.
Brett
It had no good debugger, no usable UI interface
I think the UI interface of the ATM machine where you enter your PIN number runs Java.
If Oracle monetizes Java too harshly, small businesses may not use it and will opt for other open source languages. Java open source projects and Linux could take a dive over time due to lack of new project interest. The one company that likes this the most is likely Microsoft. As businesses are likely going to have to pay for a language, they may as well go for a highly integrated one. C# may become more palatable.
JohnE
jobbank.com - Search jobs, post resume,
Sun started monetizing on Java few months prior to even buyouts were discussed - I support/maintain a bunch of Java based applications and Sun notified us that Java versions will no longer be supported for free and we would need to buy a JavaSE for Business (JFB) contract if we needed support. This applies not only to older versions but also to newest ones - no version is going to be supported on Windows and Linux for free and without support the Solaris bundled versions will be supported for lesser period than before.
They have also begun to make JES only work/supported on Solaris - so if you want JES you need to buy Solaris and Sun Server by definition.
did anyone really think Oracle was going to continue to release fully featured JDKs for free?????.....this is why the day Oracle bought Sun, i started learning C#....
lol, yes because C# is owned by a much more FOSS-friendly company. Microsoft would never charge to support experimental features in production-code.
G1 is in the latest OpenJDK builds. Since it is GPL you are free to use it without any license restrictions.
The note in the release notes is only saying that Sun won't officially support it in their releases without a support contract.
If you are concerned, use OpenJDK.
No, no, no! Creating a cycle of object references does not cause a memory leak in Java!
You are assuming that a garbage collector uses reference counting. However, reference counting doesn't work for the very reason you state, and therefore GCs don't do it that way. They actually check whether an object is usable by the program, and not just whether it has any old reference to it.
Nope, not even close..embedded systems generally run C/C++, there is no room for java bloat.
Maybe Mono isn't that "bad" for Open Source after all. A little competition will put a damper on stupid shakedown attempts like this one.
Anyone who thinks the singularity will (make this moot && come before 10 years are up), don't reply to this! Now that's cool.
Java is doomed! Everyone switch to .NET!
oh wait...
I am not really here right now.
So the Oracle touch is already taking effect.
Fork you, Oracle!
[b.belong('us') for b in bases if b.owner() == 'you']
Developers may search for JRE on Android...which is also called G1.
Do you really want mixed results on Google search for "G1 Java"?
Oracle does not yet own Sun and can't (yet) set business direction for it. It's just a new, experimental feature, folks.
Hot Java on the yacht!
It had no good debugger, no usable UI interface
I think the UI interface of the ATM machine where you enter your PIN number runs Java.
GOLD, Jerry! GOLD!
The slashdot summary seems to me to have a heavy dose of sensationalism.
Oracle's implementation of java is GPL'd. What more do we want from them?
I doubt that there's been any recent research that's uncovered some fantastic new mechanism for garbage collection that was never known before. Garbage collection used to suck, and that was one of the problems, historically, with LISP. Over the decades, garbage collection has gradually gotten better. All the improvements in garbage collection are in the public domain. Gc is not generally a performance bottleneck for modern garbage-collected languages.
It would be slightly more worrisome if this new gc algorithm was patented -- but I haven't seen any evidence that it is. If it's not, then nothing is preventing anyone from making a fully GPL'd version of java with the new algorithm. If it was patented, then this would be a problem for all garbage-collected languages with open-source implemtations, not just java.
Does java's performance really depend much on the efficiency of its gc? My main complaint about java's performance is that the VM and libraries take too long to load.
Find free books.
Here [http://developers.sun.com/learning/javaoneonline/j1sessn.jsp?sessn=TS-5419&yr=2008&track=javase] what sun says about it : The Garbage-First garbage collector (G1 for short) is the next-generation low-pause garbage collector that will be included in the Java HotSpot virtual machine. G1 will be the long-term replacement for the Concurrent Mark-Sweep (or CMS) garbage collector, Sun's current low-pause garbage collector. G1 targets medium to large multiprocessor machines and large heaps, relying heavily on the concurrency and parallelism such machines offer. Like CMS, G1 is generational, which benefits throughput. Unlike CMS, G1 compacts to battle fragmentation and to achieve more-consistent long-term operation. As its name suggests, G1 concentrates its collection and compaction activity first on the areas of the heap that are likely to be full of reclaimable objects, thus improving its efficiency. G1 uses a pause prediction model to meet user-defined pause time targets. It achieves smoother pause times than CMS, with fewer or no outliers at comparable or better throughput, as this presentation shows. The initial target pause times are in the low tens of milliseconds. === So this is more for entreprise multiprocessors, multiservers java. And those entreprise normally will buy a support contract. So it's almost a no news.
Someone actually asked for MONEY for the product of their work? What a communist bastard! I plan to install the latest Ubuntu and flagellate myself bloody in protest. FIGHT THE POWER!
http://slashdot.org/comments.pl?sid=1249837&no_d2=1&cid=28142407
But that's the kind of stupid shit that's been spewing from here for the last 10 years.
PS - the look and feel of slashdot sucks
GOBACK.
I thought to force garbage collection you do FRE(0) ?
Seriously, your headline is exactly backwards. Read what the pay for support is for. The G1 is beta so you pay for support... the older versions of Java that are out of date are also pay for support.
Is Microsoft actually better in handling this kind of situation?
...you have explicit allocation/deallocation, you get holes in memory. There's no way to avoid it, for the same reason that fragmentation occurs on disks. Unless the chunk you allocate is exactly the same size as the chunk last deallocated, there will be a region of memory that cannot be used.
This means that your heap will end up looking like swiss-cheese, unless you have some means of shuffling things around. Unless the programmer can absolutely guarantee that mallocs and frees only occur in such a way that no space unusable to the program's next malloc is ever left, the program will always have the potential of exhausting resources even without leaking memory.
This is why there are all kinds of malloc() substitutes for C, including several with garbage collection. If the program runs for long enough, the vanilla malloc() in most C libraries is simply not good enough.
It's a small world and it smells funny; I'd buy another if it wasn't for the money; Take back what I paid (SoM)
What's that smell? Its like something died.
So, not only is it slow to start up, requires a lifetime of XML Hell, and bowing down to the architecture astronauts (remember kids -- it is not a good java program unless you can spot three design patterns for every 15 lines of code!), now they are going to make you pay for the remaining bits to work?
I am glad I stuck with C++.
I said this would happen: http://slashdot.org/comments.pl?sid=1240121&cid=28039069
Oracle gives away stuff, and then charges for the good features or forbids usage 'till paid. Else, the Oracle Police will come around...
Good thing they are not part of the BSA, are they? I dont remember, my memory slips... Darn garbage collector, if I only were allowed to use the new one I wouldnt have memory problems!
Thanks for nothing, Oracle!
I already get garbage collection as a paid service. I just set the bags out there, and they pick them right up.
The truly cool and hip embedded systems run Forth, the one OS that fits an IDE where other systems would not cramp even a bootloader. :-)
Ezekiel 23:20
G1 is in OpenJDK and JDK7 as well as the new JDK6. So it's open source. So fear not. I think that as people have mentioned below they are simply trying to protect themselves from people turning on this feature in a production environment and then bitching to them about it.
Hardly. Embedded systems can run J2ME fairly well. Remember the DiVX system from Circuit City? That was implemented in Java (write once, run anywhere!) running on a small JVM ported to the processor of the host DVD player. It was easier to port the JVM to the CPU than the app.
Tiller's Rule: Never use a word in written form that you've only heard and never read. You will end up looking foolish.
It had no good debugger, no usable UI interface
I think the UI interface of the ATM machine where you enter your PIN number runs Java.
Hmm.. how much RAM memory would the Java JVM use when I enter my PIN number? And does it support NIC cards?
Just click on the "change" button after the summary and the comment subjects display correctly. Whatever the problem is with the cached story pages, comments.pl is fine.
Use of the words "good", "bad" or "evil" is almost invariably the result of oversimplification.
eom.
I have a question unrelated to this fuss. How exactly does G1 work, and why is it expected to be "better" (no credit for answers that just say the current java GC is crap).
Garbage collection in Java does NOT use reference counting. Although there are various GC implementations, they are all tracing collectors.
Would it violate the Java spec to use reference counting most of the time and then use tracing only once reference counting starts to miss cyclically linked garbage? Python does something similar.
Java hides the details of memory allocation from the programmer. Objects, strings, etc use memory. When they are first used, Java makes sure that the appropriate amounts of memory are allocated for the item in question. When these items are no longer in use, the garbage collector finds them and frees the memory so that it can be used for other parts of the application.
So how does it manage resources other than memory? C++ has RAII (not to be confused with RIAA), a pattern of associating resources other than memory to objects. For example, once an open file object in C++ is destroyed[1], the object's destructor automatically closes the corresponding file handle. Is there a way to get a JVM to call finalizers somewhat predictably, or are Java programmers supposed to manage open files, sockets, etc. as carefully as C programmers manage memory?
[1] This can happen when delete is called on an object held by pointer or when an object held by value falls out of scope.
Sure, that sounded funny.... the problem is, I've worked with C#, former Sun's Java, and Oracle's Java (ie OAS 10g instead of Tomcat, JDeveloper instead of Eclipse). Sun's Java was the coolest, let's guess which, of C# and ASP .Net or Java under OAS 10g, is cooler... and which is costier.
I'm switching back to C#, on the meanwhile, I, for one, wellcome our new eat-and-resell-everything corporate overlords !
Who else didn't expect this to start happening, with all of SUN's OSS work?
Im not a fan of Java, but even I think this is a bad direction to head. But hey, its oracle, what else would they do?
---- Booth was a patriot ----
I see it in the same way it's worth our time to use compilers to write assembly code. Yes people can do it better but some really skilled people can make a computer do it well enough.
Unless you're targeting an 8-bit CPU, such as a microcontroller or one of those TV game systems based on an NES-style chipset. I don't know of any good optimizing compilers that target such CPUs. Do they exist?
If ~95% of C programmers moved to [Java and C#], we'd get less buggy faster running software.
Then why are a lot of major label video games still written in C, other than Java games using the MIDP API for phones and C# games using the XNA API for Xbox Live Community Games? Would, say, Quake III run faster if it were rewritten in C#?
You guys are talking about this as if Java was doomed.
Instead, it's just the free version lacking an extra feature that's not even proven yet. What does G1 do better than the old garbage collector?
It's like saying that your car sucks now because somebody is selling big spoilers and you don't want to buy them.
The Garbage Collector is the software the Developers blame after the Systems Administrators blame the developers for writing software which causes servers with 32Gb of RAM to run out of memory and crash.
HTH
Deleted
Garbage collection is usually faster than manual allocation -- see Urban Performance Legends, Revisited
But in a game or a media player, can the JVM guarantee to me that the garbage collector will finish before I have to draw a new frame or decode the next chunk of audio? And how well can a JVM, an app, and its resources fit into the 4 MB RAM of a handheld device?
One could argue that once Sun/Oracle Java have sufficiently abandoned their free/OSS Java licensing and made themselves indistinguishable from MS .NET in this regard, the licensing issue no longer works in favor of the Java camp, and thus you might just as well choose your dev environment based on technical merits only, which may lead to different decisions than before.
Sun used to charge for stuff until the capital cost of it was paid off, then make it either free or just charge for maintenance. And, of course, only in the case of commercial use.
This looks similar, except that the new thing is part of an old thing...
--dave (biased, you understand) c-b
davecb@spamcop.net
What is the issue here? Why shouldn't they get some value in return for providing value?
I don't work for free, and chances are you don't either. It is amusing, in a dark way, to see the level of entitlement that is expected around here. Just because something is downloadable - be it Java or music or movies - doesn't mean that you can appropriate it for free. And for you bearded, unbathed, GNU-tard zealots out there, by free I mean free as in "free deodorant." Might want to check that one out.
If a java class locks some resource (FileInputStream locks the actual file referred to by a java.io.File object) then it will contain a close() or disconnect() etc function that releases the lock.
Then how is forgetting to close() an object in Java any better than forgetting to delete an object in C++? That's one advantage of the reference counting GC in Python compared to the pure tracing GC in most JVMs: you get more predictable calls to the equivalent of finalize(). Python 2.5 and later also has a neat with keyword, which automatically writes the equivalent of a Java finally clause for you.
...and this is why i use .net for my development. yes, the OS is not free, and the GOOD .net dev tools are not free. But the entire engine and framework are a giveaway beyond that and consistent... no weird licensing stuff with using the framework.
This signals the beginning of the end of Java. I will no longer use or support Java that has now become essentially closed source or will be soon. Gates hates Java and this is the start of the death spiral from being one of the most popular languages to being marginalized. Soon that wretched Visual Whatever will be more prominent and that will be that for Java. I'm still sticking to Perl and JavaScript for now for web apps. But as I said... goodbye to Java (Topcat, Websphere and Weblogic too) and Sun can just go fade into the sunset.
Too lazy to create a sig...
Especially considering I'm a Senior .NET developer...
Most software isn't actually games. Shocking, I know.
And who really cares if a game crashes anyway?
The open source community will be annoyed by not having a cool garbage collector for their open source Java. This probably means that some talented slashdotter will see the challenge of building an open, coole and better garbage collector.
And who really cares if a game crashes anyway?
The arcade operator cares, as a staff member has to walk over to the machine and power-cycle it. I've seen this happen on the In the Groove machine at Putt-Putt in Fort Wayne, Indiana. And the player cares about staying connected to an online game.
Well, at least users won't have to download a ZIP and extract several JARs into the JVM path in order to have it work. Not that I'm bitter about JCE or anything.
Or a better example, remember Bluray? or the PS3? Java runs there too.
Mod me down, my New Earth Global Warmingist friends!
You have convinced me!!! Please send me a link for OpenBSD on UltraSparc as I can't seem to find it on Google...
*cough*Windows ME*cough*
Here is one based on an old hot-rodding maxim: Java, Oracle, Good. Pick 2.
"Be grateful for what you have. You may never know when you may lose it."
Javascript is much closer to Ruby than it is Java (but the built in objects aren't generally as rich, and people scream and whine about the prototype based object system).
I'm going to have to call you on this, because last time I checked, I recall JavaScript being closer to some other languages (of the functional paradigm, IIRC).
From the Wikishidia article on JavaScript:
(Emphasis mine, added for clarity/ease of reading)
And for the record, I dislike wikipedia as much as the next guy, but the core fact remains:
The real roots of JavaScript are from the Self and Scheme programming languages!
Censorship is obscene. Patriotism is bigotry. Faith is a vice. Slashdot 2.0 sucks.
Anyone here old enough to remember the video game Beezer? That game had a programming bug where, if you were a fairly good player, you could cause the game to hang every time. I used to get free games every day until the arcade employees got together and figured out what was happening.
In Java, the only kind of memory you can allocate is "objects"... so he was accurate about that part.
Also, "used" means something else and is generally undecidable. "referenced" is a weaker condition and is in fact what garbage collectors use to decide if an object is "dead" or not (i.e. can safely be collected).
http://code.google.com/p/bsd-sharp/
The entire Java Stack has long since been opened up. The community essentially owns it now. What Oracle does with "Java" I could care less.
Anything that is worth while to build design and construct/maintain Java applications and VM's is all open source.
If they want to fork and become irrelevant that is there choice.
-Hack
Got Geometrodynamics? Awe, too hard to figure out? Too bad.
Most commercial games seem to be written primarily in C/LUA.
The engine is mostly C/C++, but every part of it has tight bindings to LUA for the regular non-programmer game-designers.
I mean, there's literally thousands of games using LUA, which I agree is more than Java, and probably more than C#.
Regarding your Quake 3 statement - no, it'd be slower in C#; but it might not be slower in Java.
Quake2 ported to java ran very fast even on last generation hardware and JVMs. I'm curious how well it would run with a newer JVM. I remember someone testing it on a weak machine(I think it was a 300mhz P2 laptop?); he found that although memory usage was higher, it actually had a higher framerate, indicating that its CPU usage was probably lower.
Oracle is very much a for-profit company. The CXO, the boss, everyone wants money. Lots n lots of money! More money! Gimmee more! More! Lots more! There is a reason why MySQL has already forked. If Oracle can do this to Java, what do you think about a software application (a database!) that competes with their main product? You don't have to think hard, nor for a long time. Java has started down the slippery slope. Give it away? No! It shall be replaced with Perl/Python/Ruby, although the first two are the most generic and application agnostic (IMHO). Java as a language is now becoming smaller. Its best days were before Microsoft abandoned it. It suffered, but continued on. Sun saw Java as one of those really great, run-anywhere languages that didn't need to be recompiled. It was always slow (byte code yadda yadda too). Now that Oracle has it, the bell is tolling for Java. First you have to buy. Next you will have to spend a lot. Then patches will cause version splits between those who paid for new versions versus those who paid for old. The community of users becomes fragmented, and much smaller. The writing on the wall becomes much more clear to more people. Finally the user base shrinks enough that Oracle decides death is better than maintenance. Timeline? 6-10 years. If they get stupid and fast, 6 years. The slow death will take 10 years.
.
Sounds like any other typical OSS business model from Ubuntu, Novell, RedHat, IBM, and even Microsoft.
Does this mean no more 400K apps that eat 120MB of memory while running?
I don't suffer from insanity, I enjoy every minute of it! --Longbottle
I've always disliked Java. And ruby. Javascript/Actionscript are based on ECMAscript, not Java. Maybe Java is based on ECMAScript, but knowing that would mean I spent enough time with the language beyond realizing it was a pile of crap.
The downside of being killed is the upside of being dead.
OK...G1 is an experimental feature, but the release notes states CLEARLY that 'Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased.'
Since obviously Oracle should monetize Java, it's getting clear, day by day, that Java's future will be the same MySQL had when Sun bought it. They will be releasing to the community experimental, not up-to-date versions, and let pass a lot of months until we get a good version. In other words: THEY WILL KILL JAVA! But, obviously, like MySQL, a lot of forks will appear, and round and round we go. This is really sad, considering the importance of Java on business and opensource world.
I'm not being sensationalist like many people maybe thinking reading this post, but unfortunately, companies like Oracle, will never understand the true opensource world facilities and how to make money at the same time supporting them correctly.
Shame on you, Oracle!
Have a look at whatever you find here:
http://www.google.com/search?q=naples+garbage+site%3Abbc.co.uk
Reality more bizarre than fiction and all that.
If At all this is true then, screwing-up-of-java has just begun. We ditched our plans to use berkeleydb precisely for similar reasons after Oracle took over.
Live Life Raw
Here's an analogy for what a garbage collector does:
Vocabulary:
People: program
Food: data object
Refridgerator: memory
Let's say you live together with some friends and you share a refrigerator with them. No-garbage-collector programming languages are like this: Everyone has to keep track of what belongs to him and throw out his rotten food. If someone accidentally forgets one of his food items it will rot in there forever. If this happens more often the refridgerator will be filled with garbage and you can't use it for real food any more. That's called a memory leak.
Garbage collection works like this:
1. Ask everyone to mark the food they know belongs to them.
2. Throw out every unmarked food.
(3. remove the markings, so they won't cause troubles the next time you do a garbage collection)
If you are a Java developer and you are concerned that open Java will die, you can do something about it by joining one of the open source java platform projects. For example JNode: http://jnode.org/ is building a Java based operating system that runs on a bare metal PC (x86 or x86_64).
I'm sure you folks are all having a fine time with the Garbage Collector discussion which, while interesting, has nothing to do with the substance of the original post.
When one large publicly-held company (the "purchaser", like Oracle Corporation in this case) announces the purchase of another large publicly-held company (like Sun Microsystems in this case), a long period of time elapses before the purchaser takes operational control of the of the other company. During this time, regulatory approvals are obtained and lots of other technicalities are addressed. And during this period, both companies are forbidden by law to explicitly cooperate with the other. Now, I'm not so naive that I think this would prevent all cooperation in cases where it is really significant. But the idea that somebody at either Oracle or Sun would engage in illegal shenanigans over a triviality like this GC feature is just absurdly silly. These companies both routinely do deals involving millions of dollars. How much money is at stake over this GC issue? $9.98? You think somebody in a high-paying management position at either one of these companies would break the law by colluding over this $9.98, or whatever the real number is? Get real. These are big boys, not the babies who debate this stuff on /. and make all the ".net rocks" comments. When Oracle takes control of Sun, you can start flaming Oracle for the way it manages Java. In the meantime you have an opportunity to grow up and get a clue.
Other than cost, I'm curious as to what you are measuring.
It's not performance. Solaris 10 on a PC outperforms Linux when stressed, sometimes by huge margins. It's not a complete blow-out with modern kernels, like it was in the 2.4 days, but it's still significant -- and there are corners where it really still is a complete blow-out (like: What does fsync() do?).
It's not stability. Again, Solaris 10 is much less likely to crash or go all wonky when stressed, and AIX is similarly robust. And again there are corners here that can have large impact on reliability of applications (e.g. I recall some annoyances with direct io, although the specifics are escaping me at 3am).
It's not core features, by and large Linux lags the commercial UNIXen in that arena (e.g. Dtrace), which isn't really surprising since Linux is effectively a clone.
Having said that, there are certainly UNIXen that do not stand up so well to Linux (*cough* HP/UX *cough*), but there certainly exist UNIXen that are generally superior.
Of course, a lot depends on what you're doing with the system. If I need to push the system as hard as possible then I want Solaris if it is an option. If I am looking for general usability I find Linux preferable. The differences in the latter case are often minor (like the -c argument to "script") but taken en-masse they make for a more pleasant experience.
That's the way I see things today. I am not at all sure we won't see Linux pull into the lead over time -- it is getting better and better with age, and most UNIX systems appear to be seeing improvement stagnation. (And that may well be universal soon: What are the odds that Solaris doesn't see its R&D budget chopped under Oracle?) In summary I would generally prefer to do development on Linux, but want production on Solaris. Best of both worlds, at least today. It may be telling, though, that on my personal server systems I run Linux even when I am concerned about performance -- the ongoing administration is significantly easier it you pick the right Linux distribution, and it isn't picky about hardware like Solaris is, and the tool suite is free as in beer without any extra effort.
Except on the desktop. There MacOS is supreme IMO. All the goodness of UNIX, plus stellar UI and commercial applications. I dunno how it does in stress situations (almost nobody buys Apple servers) but it's a great desktop system.
jim frost
jimf@frostbytes.com
Java sucks mightily. So any move towards killing Java off is good news. :)
The Christian religion has been and still is the principal enemy of moral progress in the world. -- Bertrand Russell
I note that I can't personally compare git to Perforce, although from quick Google checks it looks like the two are roughly comparable with Perforce winning out in some key areas (to me, at least) like native Windows support and GUI, to say nothing of documentation. In any case git is not clearly superior even technically according to numerous comparisons I found.
jim frost
jimf@frostbytes.com
Gcc was never intended to be a particularly good compiler in this respect, although it did beat out the AT&T cc quite handily when it was introduced ... much to the surprise of Stallman, as I recall. Of course, that was a particularly stupid compiler and virtually all of the commercial UNIX providers replaced it with better stuff.
Having said that, I think it's the rare case these days where the difference matters (on the platforms where gcc is pretty good anyway, it's terrible on some of them) and gcc still sees active development whereas there doesn't seem to be a whole lot of effort going into commercial compiler development nowadays (with the notable exception of Microsoft).
jim frost
jimf@frostbytes.com
IIS does have some things going for it, in particular it's a lot easier to set up and you gotta love the integration with the development tools, but Apache is certainly faster and more robust and isn't limited by the lousy performance of Windows and has a whole lot more extension options. There is a good reason why there really aren't any viable competitors on UNIX.
So ... kudos, you identified a case where open source truly does beat the competition.
jim frost
jimf@frostbytes.com
I think first post would be a sprint event, and the anti-microsoft rant would be long distance.
As for "Goatse hurdling", I'll leave that open for discussion.
In Java, finalizers run in random order, and therefore cause a great problem for resource management. C++'s deterministic destruction is much better for resource management.
Java is faster then C++ for any non trivial use case. This is because of 2 reasons:
- It compiles more natively then C++: C++ is compiled for just "Windows", while Java is hotspot compiled at runtime (where necessary, after a startup delay) to "Windows XP SP3 Intel processor".
- A garbage collector is faster for non-trivial use cases then malloc because it can free entire chunks of memory at once. When someone walks into your living room with muddy shoes, it's more efficient to mop the entire room then it is to clean only the footprints with a toothbrush.
As a planning solving programmer, I 've seen this in practice.
Planning problems are problems that run for hours and do virtually no IO, they simple take up all the CPU power and evaluate an exponential of billions solutions.
Real-world use case performance competitions prove that Java implementations are faster then C++ implementations:
- Terrabyte sort benchmark: http://sortbenchmark.org/
- International timetabling competition: http://www.cs.qub.ac.uk/itc2007/
Java does have downsides over C++: it has a terrible warmup time and it loves to grab and hold lots of RAM, because garbage collectors work faster with more RAM. So in use cases like gedit/kate/jedit where startup time is more important than performance, I'd stick with C++.
Solaris is a specific case of original, commercial unix which went open source a few years ago.
Back in the '90s, when Linux distributions started to get really popular, the Linux kernel and the distributions overtook many of the old commercial unices (e.g. SCO Unix, AIX, IRIX...) and effectively killed them.
Linux was cheaper (free), the user-land was more user-friendly (GNU tools, GNOME, KDE...), and truly cross-platform.
Linux's and GNU's openness and freedom was and is the key to its success. There are now millions of people around the world proficient in Linux/Unix who wouldn't have been for this very reason. There are people like me who made it all the way to being a Software Engineer simply by having a Linux system in the home to learn on.
Solaris is still ahead by a long way on high-end technical features like ZFS and is quite possibly the only commercial unix that has a future now.
I have 3 Solaris 11 UltraSPARC boxes in my house just now: a SunBlade 100 and two Ultra 80s (4 CPU).
Stick Men
Hah, we always harped on Sun for that statement. We said it was "write once, debug everywhere." Not so much for server software, with a few notable exceptions where OS differences easily showed through the Java APIs, but UI development was certainly not "run anywhere." (Not that C++ was better by a long shot, but at least when you did it in C++ there was no expectation from your boss that it might actually work.)
As for "always backward compatible" ... you must be joking, or inexperienced. I don't think there was a single significant JDK release from 1995 to 2004, when I was focused almost exclusively on Java, where I didn't have to fix a bunch of stuff. Swing in particular tended to find new and irritating ways to not work with existing code. Again server code wasn't nearly as bad, but I think that's because it tended to touch a lot fewer core libraries. I don't recall anything that was difficult to fix, usually just tweaks here and there, but I assure you I got familiar with System.getProperty("java.version").
I see that one of the follow-on comments claims that this is due to poor coding, but I didn't find that to be the case. I saw behavioral differences in libraries that were sometimes inexplicable, although more often it was that they fixed bugs in the libraries. There were a lot of bugs outside of the core classes, especially in stuff like Swing and JavaMail. I never had to write a lot of version-specific code, but it certainly happened often enough that you couldn't haphazardly take an upgrade of the runtime system. You could pretty much count on finding a couple of issues.
Anyway this shouldn't be taken as a damnation of Java, which is worlds better than everything else I've used in both respects (although I have limited experience; for instance, I have never tried Smalltalk), just a note that it's not all sweetness and good in these respects.
jim frost
jimf@frostbytes.com
we cannot afford to.
4 MB? Check the date on your calendar. ;)
Fourth quarter 2004: Nintendo DS first released worldwide. RAM: 4 MB; VRAM: 656 KB.
First quarter 2009: DS still sells over 5 million systems per quarter, let alone games.
I was going to argue that Linux' low cost was the key to its early success, but the more I thought about it the more I believed that it wasn't low cost alone that did it -- or even that it was the most free. It wasn't the most free, and still isn't; that crown goes to BSD no matter how you slice it, whose license is the next best thing to public domain.
I know Stallman likes to tout the "freedom" aspect of the code, but really the GPL works more like a traditional patent cross-licensing agreement, where parties share each others' technology because otherwise they wouldn't be able to ship a product at all, rather than being truly unlimited.
The GPL takes this to the extreme, forcing unlimited cross-licensing of any derivative work ... not only to a select few who can buy into the club, but anyone who has any desire at all to be involved.
This avoids the software version of the Tragedy of the Commons, which BSD has always seen: Lots of products use(d) BSD, but because everyone's changes were proprietary they were almost always kept in-house. BSD development therefore got little advantage from commercial development and the pace of its improvement has been slow to say the least. (It was further hampered, very significantly IMO, by a bad case of NIH in the core maintainers.)
The fact that commercial entities, who had the motivations and money to do major work, had to share their Linux improvements certainly led to major advances that have created a feedback cycle whose power is obvious at this point. This cycle continues not because the software is free as in freedom, but because it is not -- it comes at the cost of technology cross-licensing.
jim frost
jimf@frostbytes.com
The fact that commercial entities, who had the motivations and money to do major work, had to share their Linux improvements certainly led to major advances that have created a feedback cycle whose power is obvious at this point. This cycle continues not because the software is free as in freedom, but because it is not -- it comes at the cost of technology cross-licensing.
Absolutely. You hit the nail on the head. The real freedom is for the end-user in GNU software, as opposed to BSD where it is freedom for the developer.
It's been wildly successful. Linux's success (the kernel and distributions) is testament to that. The thing is, there are still people out there who don't get it :-)
Stick Men
That free-as-in-beer and forced code contribution work hand in hand to benefit the end user is unquestionable, but I don't know many who make that an overriding (positive) concern for picking one product versus another.
jim frost
jimf@frostbytes.com
JavaScript is an abomination on the order of GW BASIC.
Say goodbye to Java. This is sounding its death-knell. Time to move the Eclipse project to some other software platform I think (if only that were feasible). :-(
Sometimes, real fast is almost as good as real-time.
G1 must be usefull...
JMule user : http://www.jmule.org
I found that the note is not right!
The release notes does not state: "Although G1 is available for use in this release, note that production use of G1 is only permitted where a Java support contract has been purchased."
Indeed, it states "G1 is available as early access in this release, please try it and give us feedback. Usage in production settings without a Java SE for Business support contract is not recommended"
So, it is not recommended for production, because it is an early release. Nothing to do with contract permission.
False catch :)