Slashdot Mirror


Sun's Phipps Slams App Engine's Java Support

narramissic writes "Sun Microsystems' chief open source officer, Simon Phipps, said in an April 11 blog post that Google committed a major transgression by only including support for a subset of Java classes in its App Engine development platform. 'Whether you agree with Sun policing it or not, Java compatibility has served us all very well for over a decade,' Phipps wrote. 'That includes being sure as a developer that all core classes are present on all platforms. Creating subsets of the core classes in the Java platform was forbidden for a really good reason, and it's wanton and irresponsible to casually flaunt the rules.' Phipps characterized his remarks as non-official, saying: 'This isn't something I could comment on on Sun's behalf. My personal comments come purely from my long association with Java topics.'"

66 of 186 comments (clear)

  1. Re:do their own then... by knewter · · Score: 3, Funny

    bahahahaha. Sun? Money?

    You've not been here long, eh? :)

    --
    -knewter
  2. Re:do their own then... by tomhudson · · Score: 4, Interesting

    Seems to me they should put their money where their mouth is...

    Sun *DID* put their money where their mouth is. They developed java, then GPL'd it. They bought StarOffice, the GPL'd it.

    Google, on the other hand, is an advertising company that is trying to get lock-in, same as Microsoft did with their proprietary java extensions long long ago ...

  3. Pot. Kettle. Black. by TheRealMindChild · · Score: 4, Insightful

    'Whether you agree with Sun policing it or not, Java compatibility has served us all very well for over a decade,' Phipps wrote. 'That includes being sure as a developer that all core classes are present on all platforms. Creating subsets of the core classes in the Java platform was forbidden for a really good reason, and it's wanton and irresponsible to casually flaunt the rules.'

    You mean like Java ME?

    --

    "When life gives you lemons, don't make lemonade. Make life take the lemons back!" -- Cave Johnson
    1. Re:Pot. Kettle. Black. by DragonWriter · · Score: 4, Insightful

      The real problem is that Google created their own version of Java ME. Instead of sticking with the existing standard, they came up with their own.

      Since AppEngine, Google's cloud platform is (while, like mobile devices, a different environment from the standard desktop or server environment for which the Java Standard Library is designed) not a mobile platform, and doesn't have the same constraints that shape the development of Java ME, it's not surprising that they did something different.

      OTOH, the justification is the same for having Java ME when Java SE already exists: the environment in which AppEngine Java is being used is very different from that for which SE was conceived, putting unique constraints on it.

      I think that Phipps is upset because Sun is in the process of gearing up their own cloud services, and the last thing they want is Google's Java support drawing enterprise interest to AppEngine while they try to get Sun's cloud service off the ground.

    2. Re:Pot. Kettle. Black. by sohp · · Score: 3, Interesting

      What Google should have done was engage in the JCP to define a new profile for supported "device", along the lines of the CDC/CLDC and MIDP. At least that way it would have been within the framework of practice understood and used by Java developers. Instead, Google just said "here's what's available", without tying into any of the already available accepted ways of defining a subset of Java.

      This actually looks a lot like what Microsoft got in trouble for with their MS Java.

    3. Re:Pot. Kettle. Black. by MrEricSir · · Score: 2, Insightful

      Free or not, at some point you MUST have a standard, or you will not have interoperability. What Google is doing here is no different than what Microsoft has done for years.

      Now I'm not saying Java ME is good. In fact, it's awful. But an awful standard is still better than none.

      --
      There's no -1 for "I don't get it."
    4. Re:Pot. Kettle. Black. by DragonWriter · · Score: 4, Insightful

      What Google should have done was engage in the JCP to define a new profile for supported "device", along the lines of the CDC/CLDC and MIDP. At least that way it would have been within the framework of practice understood and used by Java developers.

      I really don't think that Java developers have much trouble understanding or using a clearly defined subset of existing functionality.

      This actually looks a lot like what Microsoft got in trouble for with their MS Java.

      What Microsoft did was create an incompatible implementation of core Java classes, supporting similar features but requiring different behavior with the same classes. This has much more serious negative impact than implementing a well-defined subset, since the former makes it hard to move code either way between implementations, and the latter (what Google is doing) makes it very easy to move code off the non-standard implementation (AppEngine) and onto a standard implementation, but somewhat challenging to move code using the unsupported features from the standard implementation onto the non-standard one.

      It's actually a really bad thing to do if you want to create lock-in to your non-standard implementation, since it does nothing to keep people from moving off your platform, but makes it harder than supporting the standard would for them to move on to your platform.

    5. Re:Pot. Kettle. Black. by Chyeld · · Score: 3, Informative

      No. Point blank, no.

      Go to the end of the line.

      Microsoft goes out and deliberately tries to subvert standards by creating implementations that are slightly off, thus preventing anything written for them from being easily portable to another implementation.

      Google has gone and created an implementation that works exactly according to spec, except leaving out items which don't make sense in the app model they use. It would be extremely trivial to port something written for Google's implementation to anything else standard compliant.

      This is about as similar to Microsoft as a blizzard in the Alps is to a sunny day in Cuba.

    6. Re:Pot. Kettle. Black. by jrumney · · Score: 2, Interesting

      Microsoft didn't actually leave anything out of the APIs for their version of Java, they just made sure that their implementation of AWT sucked even more than Sun's and provided their own proprietary UI API which they promoted heavily. When Sun introduced Swing, a UI framework that sucked a bit less, in Java 2, MS stuck with Java 1.1 and promoting their own framework. If Microsoft had played along, Windows users at least might have had a version of Swing that didn't suck back in Java 1.3 days instead of having to wait for Sun to improve things in Java 1.6.

    7. Re:Pot. Kettle. Black. by ChunderDownunder · · Score: 4, Informative

      Microsoft didn't actually leave anything out of the APIs for their version of Java

      Yes they did; Sun took them to court. Specifically, they left out JNI and RMI in favour of their own COM object APIs.

      Proof? Microsoft's own document reveals this.

    8. Re:Pot. Kettle. Black. by Thinboy00 · · Score: 2, Insightful

      The point is actually this: If I (or someone else) write a program in GoogleJava (or whatever you want to call it) and said program runs, I can take that same source and compile it under Java standard edition, with no refactoring, and it will run exactly the same (AFAIK). Try doing that with MS Java (no refactoring allowed!).

      --
      $ make available
    9. Re:Pot. Kettle. Black. by IntlHarvester · · Score: 2, Informative

      Well, that could have been inexpensively fixed.

      The bigger problem with J++ was that Microsoft extended the language to provide delegates (IIRC), and that feature emitted illegal JVM opcodes. This made J++ source+binary incompatible with Sun Java in a manner that couldn't be resolved without junking all the Windows extensions. Therefore they lost the lawsuit and it ultimately cost them hundreds of millions of dollars.

      --
      Business. Numbers. Money. People. Computer World.
  4. "Flout", not "flaunt" by beanyk · · Score: 3, Funny

    Grr.

  5. I think Sun is jealous by seifried · · Score: 5, Interesting

    I think Sun is jealous, they have been pushing grid computing for ages and it's been a flop for them. Google is most likely going succeed here, especially with a "good enough" solution which no doubt pisses of Sun/Sun employees (who have a tendency to go for the engineering "ideal" solution which often results in a very nice and extremely pricey product). Witness the container computing stuff, Sun is making a big deal about seismic tests, and Google is quietly deploying hundreds of these things in their data centers. Sun seismic test vs. Google data center tour. I bet for most of us Google's Java AppEngine implementation will be "good enough".

    1. Re:I think Sun is jealous by betterunixthanunix · · Score: 2, Interesting

      I hate it when people make snide comments about high quality engineering. Yes, it is possible to hack together a "good enough" system that is fine for consumers and some businesses, but for a lot of applications, a well engineered system is important. In the case of the containers, there are plenty of reasons why you might want to know the seismic test results: maybe you are deploying the container to replace some emergency services IT infrastructure in an earthquake zone, and need to be ready for aftershocks; maybe you just want to transport the datacenter on a railroad, and want to know how well it will hold up while it is jostled around on a flatbed car; maybe you need a datacenter to function onboard a ship, and want to know what effect choppy seas might have.

      Where were all these comments when Sun went after Microsoft for this sort of behavior? Back then, everyone seemed eager to watch Sun "stick it to" Microsoft; but when Google is the target of criticism, suddenly the fault lies with Sun. Windows is also "good enough" for most people (and Visual J++ was intended for Java development in Windows), so why treat it differently than AppEngine?

      --
      Palm trees and 8
  6. Mountain out of Molehill by AKAImBatman · · Score: 4, Interesting

    As someone who personally loves the Java platform, I honestly think he's making a mountain out of a molehill. As far as I've been able to tell so far, the Google App Engine supports the Java platform in its entirety, with a few caveats. Those caveats deal with the services Google offers (e.g. no JDBC accessible database) and the sandbox the apps run in (e.g. no network support, no filesystem).

    AFAICT, there's nothing stopping me from, say, writing a JDBC access layer for their Data Store. Which means that Google is keeping with the spirit of the platform, and that this is mostly just a misunderstanding.

    If you want real problems, try running Java apps on a shared hosting provider sometime. The limitations of those sites will have you shouting praise for what Google is offering.

    1. Re:Mountain out of Molehill by kaffiene · · Score: 4, Informative

      Um... no. They're not supporting Threads for a start - which is pretty major. I had a read of the exclusions a while back and there were some significant omisions. I'd list them if I could find the page again, but no luck I'm afraid.

      That said, I'm not sure if I see this as a major issue either.

    2. Re:Mountain out of Molehill by AKAImBatman · · Score: 2, Insightful

      They're not supporting Threads for a start

      That would be their locked-down sandbox. You can accomplish the same thing in vanilla Java with a security manager. (Which for all we know, they did. I haven't tried yet.) If the security manager doesn't allow it, you're not using it. Period, end of story.

      You may note that everything Google has locked down is either controlled by the security manager or is simply an API to access a service that they don't provide.

      which is pretty major

      Generally speaking, it's a good idea to avoid multithreading/networking/filesystem access in a servlet environment anyway. That's what the container is for. It manages all those little details so you don't have to.

      That's not to say that people don't come up with reasonable uses for such services (e.g. Quartz scheduler), so programmers will have to decide whether they prefer to use Google's locked-down environment with its alternative solutions (e.g. Cron) or if they would rather purchase dedicated hosting and handle all the details themselves.

      For me, the answer is straightforward. I have one site that would be nice to move over, but I'm not going to. It makes use of services that Google does not provide. Those services are important enough to me to continue paying for dedicated hosting. On the other hand, I'm working on a new site that has far lower requirements. That one is getting installed on Google AppEngine.

      So far I haven't found any limitations I can't live with for the new site (as I said, nothing that can't be restricted with a security manager), so I'm pretty happy. I may change my mind after using it more, but until I run into some hard and unexpected limitations, I'm not going to crucify Google for their AppEngine support.

    3. Re:Mountain out of Molehill by Raenex · · Score: 2, Informative

      The major problems with threads isn't the java.lang.Thread API, it's the shared-state model and the whole concept of threads in general. The new concurrent utilities are just that, utilities. You still have to be very careful about shared variables and locking. Once you have two threads running you have to be sure that every single line of code that they call is thread-safe. Good luck with that.

      Yeah, it's nice to have the utility classes to help avoid a few bugs, but they aren't the panacea you're making them out to be.

    4. Re:Mountain out of Molehill by khchung · · Score: 3, Insightful

      Following /. tradition, I have not looked at the details, but that won't stop me from commenting here... :)

      As someone who has been writing Java since '99, I have to say if even Threads is not supported, it is a big issue.

      There is a reason why the Core class are called "Core", every Java library expects the Core classes are there. If we now have a popular Java platform that only have a subset of the Core classes, it will cause a lot of headaches down the road, eventually fragmenting the "Java" platform.

      --
      Oliver.
    5. Re:Mountain out of Molehill by oreaq · · Score: 2, Insightful

      As someone who has been writing Java since '99, I have to say if even Threads is not supported, it is a big issue.

      Thread support is also "missing" in Sun's JEE Specification. Concurrency is done by the application server, not by the application. As a developer you just configure the relevant parameters you do not code the the actual threading. I do not know Google's AppEngine (and of course I haven't read TFA) but I guess it will be similar.

    6. Re:Mountain out of Molehill by Raenex · · Score: 2, Informative

      Just saying "you're wrong" wastes both our time.

      That's all you've done in your replies. I said it was a minor improvement to start with, and told you the reasons why it was minor. I pointed out how your initial post gave a very wrong impression about what Google did versus the concurrent utilities. You haven't show any evidence that backed up your initial post. You sound like an inexperienced noob confusing Javascript with Java with regards to threading.

      I've just realized that this whole argument is about a hypothetical. The Google white list does include Threads. Too bad.

      Too bad for you a highly modded comment explains your error: "A Java application cannot create a new java.lang.ThreadGroup nor a new java.lang.Thread. These restrictions also apply to JRE classes that make use of threads. For example, an application cannot create a new java.util.concurrent.ThreadPoolExecutor, or a java.util.Timer. An application can perform operations against the current thread, such as Thread.currentThread().dumpStack()."

      So really, what we're arguing about is whether Google App should support every single class in the Java SE core class list.

      No, that was the high-level argument that started this story. What we are arguing about is your comments with regards to Java threading, and the benefits of the concurrent package.

  7. What about changing Java's license? by bogaboga · · Score: 2, Interesting

    I realize it's now too late but if it were a few years ago, SUN should have considered changing Java's license to make sure that whoever supports Java, supports it in its entirety.

    1. Re:What about changing Java's license? by burris · · Score: 2, Interesting

      Google isn't calling their product Java. Google's product is called AppEngine. Google is free to say that AppEngine has "Java(TM) Language Support" without getting permission from Sun or anyone else.

      Trademark isn't an absolute monopoly on the mark.

  8. Like J2ME/CLDC? by Anonymous Coward · · Score: 4, Interesting

    CLDC, the bastardized, stripped version of Java the Sun blessed and which is still the standard on many phones broke the whole "run anywhere" paradigm.

    Still causes us major problems since Sun still supports and condones it despite the fact that almost all systems now could easily support a real Java version.

    1. Re:Like J2ME/CLDC? by CarpetShark · · Score: 2, Insightful

      Exactly. I can't help thinking that Java might have been a lot more pervasive and standardised by now (not to mention that the CLR probably wouldn't exist) if Sun had been more open with Java licensing years ago.

    2. Re:Like J2ME/CLDC? by israfil_kamana · · Score: 2, Interesting

      Heh. I had to write an IoC container that would run on CLDC 1.1. Fun fun fun. No Serializable meant I had to re-compile all my code. Love that fragile base-class problem.

      --
      i - This sig provided by /dev/random and an infinite number of monkeys at keyboards.
  9. Re:do their own then... by fuzzyfuzzyfungus · · Score: 5, Insightful

    While I agree that google is not Mr. Friendly, I'd be surprised if this particular move is about lock-in. Not because of any belief in google's virtue; but for basic technical reasons.

    If you want lock-in, you create a superset of the competitor's platform, or a variant of the platform that behaves differently, then push people to use your proprietary features. Implementing a subset of the competitor's platform just raises the cost of porting to your implementation, and creates no barrier to moving from your implementation to others' implementations.

    The java-subset thing seems like a bad idea; and I'd be curious to know why they did it; but I don't see how a platform subset is a good basis for a lock-in strategy.

  10. Re:do their own then... by Chyeld · · Score: 2, Insightful

    Subtle yet important difference to me, Microsoft released something that did include the 'full set' plus some but didn't work the same as the specs said it should.

    Google simply didn't release a full set.

    And where Microsoft pulled their stunt to kill Java, I imagine Google did it for technical reasons (i.e. trying to lock down the sandbox) since they have said they want to add more classes to the list of allowed ones.

  11. Flout not Flaunt by onkelonkel · · Score: 4, Funny

    The word is flout not flaunt. English is harder than it looks.

    --
    None of them can see the clouds; The polished wings don't care.
  12. Java compatibility has served us all very well for by Gutboy · · Score: 3, Funny

    COBOL compatibility has served us all very well for over a decade, and to develop new programming languages is wanton and irresponsible.

  13. Re:do their own then... by DragonWriter · · Score: 4, Insightful

    IrI'm fine with the GOOG not offering Java support, but what's the justification for only offering half-assed support?

    The justification is the same as Sun has when it creates a limited profile of Java for a special environment, like Java ME: the demands of a special environment.

  14. AP Java Subset? by firefoxman · · Score: 2, Insightful

    The CollegeBoard uses a subset of Java in their AP curriculum, and they don't get a complaint?

  15. why didn't they complain about GWT? by pohl · · Score: 2, Interesting

    Hmm...I wonder why they never complained about the limited subset of classes that GWT supports in client-side code.

    --

    The "cue the foo posts in 3, 2, 1..." posts will commence with no subsequent foo posts in 3, 2, 1...

    1. Re:why didn't they complain about GWT? by lfaraone · · Score: 2, Insightful

      Hmm...I wonder why they never complained about the limited subset of classes that GWT supports in client-side code.

      Because they never said that GWT supports "Java", they said it implements some JRE classes. And like everyone says, Sun is a sore loser for failing to release a usable cloud-computing project.

      --
      Maybe if this signature is witty enough, someone will finally love me.
  16. Re:do their own then... by Chyeld · · Score: 4, Informative

    http://code.google.com/appengine/docs/java/runtime.html#The_Sandbox

    The Sandbox
    To allow App Engine to distribute requests for applications across multiple web servers, and to prevent one application from interfering with another, the application runs in a restricted "sandbox" environment. In this environment, the application can execute code, store and query data in the App Engine datastore, use the App Engine mail, URL fetch and users services, and examine the user's web request and prepare the response.

    An App Engine application cannot:

    • write to the filesystem. Applications must use the App Engine datastore for storing persistent data. Reading from the filesystem is allowed, and all application files uploaded with the application are available.
    • open a socket or access another host directly. An application can use the App Engine URL fetch service to make HTTP and HTTPS requests to other hosts on ports 80 and 443, respectively.
    • spawn a sub-process or thread. A web request to an application must be handled in a single process within a few seconds. Processes that take a very long time to respond are terminated to avoid overloading the web server.
    • make other kinds of system calls.

    Threads
    A Java application cannot create a new java.lang.ThreadGroup nor a new java.lang.Thread. These restrictions also apply to JRE classes that make use of threads. For example, an application cannot create a new java.util.concurrent.ThreadPoolExecutor, or a java.util.Timer. An application can perform operations against the current thread, such as Thread.currentThread().dumpStack().

    The Filesystem
    A Java application cannot use any classes used to write to the filesystem, such as java.io.FileWriter. An application can read its own files from the filesystem using classes such as java.io.FileReader. An application can also access its own files as "resources", such as with Class.getResource() or ServletContext.getResource().

    Only files that are considered "resource files" are accessible to the application via the filesystem. By default, all files in the WAR are "resource files." You can exclude files from this set using the appengine-web.xml file.

    java.lang.System
    Features of the java.lang.System class that do not apply to App Engine are disabled.

    The following System methods do nothing in App Engine: exit(), gc(), runFinalization(), runFinalizersOnExit()

    The following System methods return null: inheritedChannel(), console()

    An app cannot provide or directly invoke any native JNI code. The following System methods raise a java.lang.SecurityException: load(), loadLibrary(), setSecurityManager()

    Reflection
    An application is allowed full, unrestricted, reflective access to its own classes. It may query any private members, use java.lang.reflect.AccessibleObject.setAccessible(), and read/set private members.

    An application can also also reflect on JRE and API classes, such as java.lang.String and javax.servlet.http.HttpServletRequest. However, it can only access public members of these classes, not protected or private.

    An application cannot reflect against any other classes not belonging to itself, and it can not use the setAccessible() method to circumvent these restrictions.

    Custom Class Loading
    Custom class loading is fully supported under App Engine. Please be aware, though, that App Engine overrides all ClassLoaders to assign the same permissions to all classes loaded by your application. If you perform custom class loading, be cautious when loading untrusted third-party code.

    So I would say the reasons behind their decision would boil down to "cutting out the stuff that isn't compatible with the model the App Engine uses to run things".

  17. Re:do their own then... by IamTheRealMike · · Score: 4, Interesting

    The java-subset thing seems like a bad idea; and I'd be curious to know why they did it; but I don't see how a platform subset is a good basis for a lock-in strategy.

    Yeah, this is garbage. Watch the "campfire" videos, a boringly large part of the presentations is given over to how you are not locked in, because AppEngine exposes the standard Java servlet container and database access APIs even though it's based on BigTable which is not a standard database. They show how the guestbook app can be taken right across to run on WebSphere with no code changes. The design of Java on AppEngine is pretty much the opposite of lockin - they've clearly put a lot of effort into ensuring a very, very different underlying system can export the standard Java APIs.

    As to why it's a subset, I guess the same logic as applied to the Python implementation which is also a subset - due to the way it works the classes need to be audited for security problems. Some of the Java APIs contain native code which probably has to be rewritten or at least very carefully audited to ensure you can't break out of the sandbox. And some I guess just aren't that useful. But I don't really know the reason.

  18. Re:do their own then... by wawannem · · Score: 2, Insightful

    You're right... I guess I didn't really think about where the money would come from. But, if anyone has any really expensive hardware sitting around that isn't flying off the shelf the way it used to, I would think it would be Sun. So, maybe they could put some of it to use building a cloud of their own. I've just always been of the school of thought that if you don't like how something is built, build your own.

  19. Not a full java environment anyway. by nietsch · · Score: 3, Informative

    As far as I have learnt from a few cursory glances at appengine, it does not offer a complete OS environment. It is severely sandboxed, probably as a measure of security. All classes that deal with those non-existing features can either be non-existing, or exception-generating stubs. Google choose for those classes to be non-existent. That is something different than creating this-environment-only classes and functions, like MS did with their corrupted java. But there are prominent links on the appengine homepage to submit your own featers and bugfixes, so maybe all these complainers can contribute patches instead of contributing whine?

    --
    This space is intentionally staring blankly at you
  20. Re:do their own then... by fm6 · · Score: 4, Insightful

    While I agree that google is not Mr. Friendly, I'd be surprised if this particular move is about lock-in.

    It never is. Whenever somebody modifies standard technology to suit themselves, they get accused of trying to create lockin. That's what happened when Phil Katz decided he could redo the ARC format faster and smaller. That's what happened when Anders Hejlsberg decided he couldn't live with Java's limitations. Netscape and HTML. Microsoft and HTML, CP/M, x86....

    Lockin does usually occur when people do things in a different way, and the different way ends up being the de facto standard. But that's not why they do them. They do them because developers just plain like to do things their own way.

    In the case of Google's "white list" this doesn't even come close to being lockin, because any application that will run on Google's classes will run on "standard Java". Sun's problem is that the reverse isn't true. And I'm not sure that really matters. Unless I've missed something, the missing classes are all legacy cruft that should have been deleted from Java long ago.

    So why haven't they been? Lack of will. One Java core engineer told me that Sun got in trouble when they even deprecated an API, never mind removing a whole class. People just don't want to fix up all their legacy code, and Sun was too anxious to monetize Java to stand up to them.

    Google has more flexibility, since they don't need for their version of the Java platform to make money anytime soon.

  21. Re:Sauce for the goose... by ultrabot · · Score: 2, Interesting

    We'd be worried about Microsoft attempting to create an MS-only ghetto that they lock people into

    Like .NET?

    For most parts, /. seems to be pretty much ignoring what msft is doing these days, as far as server technologies are concerned.

    --
    Save your wrists today - switch to Dvorak
  22. Uh, we did scream by betterunixthanunix · · Score: 2, Informative

    Visual J++ was what we screamed about, and Sun sued Microsoft, and Microsoft backed down and took J++ off the market.

    --
    Palm trees and 8
  23. Re:do their own then... by ultrabot · · Score: 2, Informative

    I used to hate Java (and JavaScript) because it took forever to load, turning a screaming fast Internet connection into a rush hour exercise in patience, but they improved that and I started singing the praises of Java and JavaScript. Then I found that even though JavaScript is still good, Java now drives me crazy

    You know this already, but Java and Javascript are technologies that are not related to each other in any way, apart from the unfortunate naming. Javascript is as close to C as it is to Java.

    --
    Save your wrists today - switch to Dvorak
  24. Android derives from DavlicVM & Harmony. (!Jav by bitsofbytes · · Score: 2, Informative

    Technically, Google's Android is a code derivative of DavlicVM and Apache Harmony. Apache Harmony and DavlicVM can be considered as similar to Java. However, Android is Not a subset of Java.

    Some links to articles discussing the topic:
    http://www.javaworld.com/community/node/2683

    Some information on DavlicVM and Apache Harmony:
    http://www.dalvikvm.com/
    http://harmony.apache.org/

    Each VM/platform has its strengths and purpose. There should be room in the IT industry for Java, Apache Harmony, Google App Engine, .NET, Mono, LLVM, Tamarin, Parrot, and many other VM's with their associated programming languages.
    Hope you find this information helpful.

  25. Re:Sauce for the goose... by ValuJet · · Score: 2, Insightful

    How does using a subset of java 'Lock you in' to google? You can take that implementation and go anywhere that has the full version of java available and install your app there. It will work with some configuration changes.

    My guess is Google doesn't allow you to play with threads for performance reasons. The file i.o. is because of the system architecture. You need to write to a filesystem, you have to write to memcache.

    As someone who is looking to write an app on the engine, some of their stuff bothers me, but I get why they're doing it. If I ever want to take my ball and go elsewhere, I will always have that ability.

  26. Re:do their own then... by DragonWriter · · Score: 2, Interesting

    Sun's problem is that the reverse isn't true.

    Sun's problem is that they are working up to the general launch of their cloud computing services, and Google AppEngine supporting more than just Python makes it that much harder for any new launch to get traction.

  27. Re:do their own then... by LizardKing · · Score: 2

    So your blaming Sun for Ciscos ineptitude. I have code written under the 1.0.2 Java SDK that still runs under Java 1.6. There again, unlike Cisco's engineers I understood what portability was, because I was targeting SunOS as well as Windows.

  28. Everything you need is there by owlstead · · Score: 2, Insightful

    OK, no Swing, no Corba etc. But I cannot see what part is missing for cloud computing (or any other algorithm. The collections classes (even the thread safe ones), all cryptographic stuff etc. The only thing that really seems to be missing is graphics (images). But for most cloud computing needs, this should be sufficient.

    Anything else you may be able to import using the classes from the open source JDK anyway. As long as you don't create files etc. of course, thanks to the sandbox. And we're not talking about a release of another JDK or anything like that, in that case it would be a problem not to include the default functionality.

    This seems to be a bit of a cheap shot. He should well know that you cannot display any personal opinions that are directly in his line of work, and then claim that they are not the opinions of his employer. Not in his position.

  29. "Wonton", not "wanton" by FrankDrebin · · Score: 2, Funny

    Mmm.

    --
    Anybody want a peanut?
  30. Re:do their own then... by Chyeld · · Score: 2, Interesting

    If you are developing for the App Engine, does it matter the flavor of the error? If you aren't developing for the App Engine and you are just looking to port something you've already written over, shouldn't you be reading the documentation concerning it first?

    Developer-wise, this should be a non-issue. Unless you were expecting things to just plug in directly, coding to match how the App Engine works was a given anyway.

    I agree with the others who opine that this is simply sour grapes from someone too late to the race to have a chance at first place.

  31. Re:do their own then... by shutdown+-p+now · · Score: 2, Interesting

    As far as I'm concerned, Sun (or anyone complicit in their activities re: Java) lost all right to bitch about this once every new version of Java consistently broke backwards compatibility with previous versions.

    In some aspects, it is the fundamental deficiency of Java the language. Because all methods are implicitly virtual and all overrides are also implicit, and because override resolution happens at class load time, not at compile time (i.e. if Derived.class derives from Base.class, and both have method void foo(), then Derived.foo will override Base.foo - even if, when Derived.class was compiled, Base.class didn't contain foo yet), you get a specific case of fragile base class problem in Java that's effectively unavoidable.

  32. Re:do their own then... by goofy183 · · Score: 4, Insightful

    Well sure, If you're re-using a standard library it may have handling for the security exception chain and either fail gracefully or work with limited functionality.

    If a JDK class is missing and the library class you want to use references it the code won't even run with an UnsatisfiedLinkError. That is a HUGE difference.

    Another case where the library class references a missing JDK class but the use of the library class you're using never touches the forbidden code. In that case you again get a UnsatisfiedLinkError. If the use of the JDK class was just restricted by a security policy you only get the security exception if you actually call the API, a much better alternative.

  33. HOWTO: Using a SUBSET to create LOCK-IN!!! by onitzuka · · Score: 4, Insightful
    1. Remove APIs for Threads, File Access, ThreadGroups, or whatever you feel you want removed (eg. java.io.*, java.lang.*, java.util.*, etc...)
    2. Replace those features with APIs that offer features only available on the Google's application server. (eg. google.io.*, google.threads.*, google.db.*, google.util.*, etc...)
    3. Have developers write their code for your Google application server.
    4. Snicker knowingly because you know that Java Servlet/JSP developers can and do use Threads and file systems and network access in their applications. In fact PHP developers use file systems all the time along with network access. Why do you snicker? Because you know they cannot simply copy their applications to Google App Engine without reimplementing it and creating a version JUST for Google App Engine. As the implementations are different and we know that developers time costs money($$$), managers will eventually have to decided whether to continue to support the open Servlets/JSP implementation (which could be ported to Tomcat, Resin, JBoss, or any others) or if they will just go with the Google App Engine version.
    5. Laugh when they cannot port their applications out WITHOUT reimplementing all of the private APIs.
    6. Profit
    1. Re:HOWTO: Using a SUBSET to create LOCK-IN!!! by ValuJet · · Score: 2, Interesting

      Your theory falls flat when you hit point #2

      The following packages do not exist.
      google.io.*
      google.threads.*
      google.db.*
      google.util.*

      If, in the future, google does add those libraries, I would fully expect them to be opensourced.

    2. Re:HOWTO: Using a SUBSET to create LOCK-IN!!! by onitzuka · · Score: 3, Insightful

      Your theory falls flat when you hit point #2

      The following packages do not exist. google.io.*
      google.threads.*
      google.db.*
      google.util.*

      If, in the future, google does add those libraries, I would fully expect them to be opensourced.

      I can see how you misunderstood the posting. Please, let me help you.

      I will do this in two parts:

      [PART-1]
      I am sure that you only missed the that I used "e.g." (what is an e.g.?) in the above, otherwise you would not have made the mistake of thinking that it could have been referring to anything else other than an example being posited for the discussion.

      Those names were examples... hypothetical, if you will.

      Now that that is all cleared up, give the post a re-read... but only after reading PART-2 which comes next...

      [PART-2]
      Also consider another good point: Why block the ALREADY open source standardized community developed and supported implementations only to provide your own replacements? Even if as you suggest that you "would fully expect them to be opensourced", WHY NOT support the existing open source community? WHY NOT support the existing open source solutions?

  34. Re:do their own then... by sohp · · Score: 2, Informative

    I did go to Google review the App Engine Java documentation, what there is of it. It's not clear if a class like java.lang.System (which is whitelisted, btw) locked through security policy or simply re-implemented in some crippling way. A bit of a failure to provide clear guidelines on Google's part, but becomes a real development problem because they've already stated their Java doesn't conform. Programmers are left guessing or having to find out through failure what the actual behavior is.

  35. Re:do their own then... by lamber45 · · Score: 4, Insightful
    Those restrictions are very siliar to the ones imposed upon Enterprise Java Beans. Quoting from the Sun documentation:

    Specifically, enterprise beans should not:

    • use the java.lang.reflect Java Reflection API to access information unavailable by way of the security rules of the Java runtime environment
    • read or write nonfinal static fields
    • use this to refer to the instance in a method parameter or result
    • access packages (and classes) that are otherwise made unavailable by the rules of Java programming language
    • define a class in a package
    • use the java.awt package to create a user interface
    • create or modify class loaders and security managers
    • redirect input, output, and error streams
    • obtain security policy information for a code source
    • access or modify the security configuration objects
    • create or manage threads
    • use thread synchronization primitives to synchronize access with other enterprise bean instances
    • stop the Java virtual machine
    • load a native library
    • listen on, accept connections on, or multicast from a network socket
    • change socket factories in java.net.Socket or java.net.ServerSocket, or change the stream handler factory of java.net.URL.
    • directly read or write a file descriptor
    • create, modify, or delete files in the filesystem
    • use the subclass and object substitution features of the Java serialization protocol
  36. Sun folks often have no clue about Java by IQGQNAU · · Score: 2, Insightful

    Whatever Phipps' experience (of which I have no knowledge), he clearly doesn't comprehend Java security. The whole key to safe code in networked environments is the use of security policies. That includes, in addition to "fine grained" access control over OS operations, the ability to restrict access to classes in the classloader mechanism. This is the same stuff that happens whether you're doing applets in a web browser or a servlet in a web application container (including Sun's Glassfish).

  37. Re:do their own then... by deraj123 · · Score: 2, Insightful

    I'm not sure what you mean. The complaints seem to indicate that you'll get things such as "NoClassDefFoundError" and the like, rather than the more appropriate "SecurityException". As to which one actually happens, I don't know. The point is that a developer, developing an application for Java, should not have to concern himself whatsoever with NoClassDefFoundErrors when interacting with standard jvm classes. He SHOULD however, be concerned with potentially encountering SecurityExceptions.

    My point was that (from a cursory glance) for all of Google's restrictions, the Java spec already defines the proper way to indicate that those features are not available. Given that there is a "right" way to do this, there's very little reason for Google not to do it the right way.

  38. Re:do their own then... by gnud · · Score: 2, Insightful

    Well, if the error is about code that you will use...

    Imagine that you use some 3rd party library that includes code for caching to disk. Since you know you can't write to disk on the AppEngine, you disable caching in the configuration. But the UnsatisfiedLinkError is still there.

  39. Re:do their own then... by Thinboy00 · · Score: 4, Informative

    The Right Way:

    1. Developer tries to port code
    2. javac (compiler) throws security exceptions
    3. Dev:"I'd better read the docs on this."
    4. Program will now DTRT WRT using the right classes

    Google's way:

    1. Developer tries to port code
    2. javac throws classNotFound exceptions
    3. Dev:"WTF! java.lang.System is integral!"
    4. Dev is VERY confused since java.lang.System is essential for a basic hello world.
    --
    $ make available
  40. Re:do their own then... by Thinboy00 · · Score: 4, Interesting

    It's not the restrictions, it's the implementation. Normally, existing Java code could just be compiled on the embedded system, and compiler errors would specifically identify security reasons for specific classes/methods/etc being disabled. Google removed the classes entirely, so the developer will just get IDontKnowWTFThatClassIs exceptions instead, which are less informative.

    It also contravenes existing standards, sort of like making "dangerous" files invisible to unprivileged users in *NIX (via some sort of arcane black magic, perhaps a modified (munged) shell or something...) instead of just setting appropriate file permissions.

    --
    $ make available
  41. Re:do their own then... by Fastolfe · · Score: 5, Informative

    Google's way:

    1. Developer tries to port code
    2. javac throws classNotFound exceptions
    3. Dev:"WTF! java.lang.System is integral!"
    4. Dev is VERY confused since java.lang.System is essential for a basic hello world.

    Citation needed, please. Here's what Google's documentation about java.lang.System says:

    Features of the java.lang.System class that do not apply to App Engine are disabled.

    The following System methods do nothing in App Engine: exit(), gc(), runFinalization(), runFinalizersOnExit()

    The following System methods return null: inheritedChannel(), console()

    An app cannot provide or directly invoke any native JNI code. The following System methods raise a java.lang.SecurityException: load(), loadLibrary(), setSecurityManager()

    What about this is unreasonable? Where does it say that apps will get ClassNotFoundExceptions? Please stop spreading unsubstantiated FUD.

  42. Re:do their own then... by fractoid · · Score: 3, Insightful
    It sounds like Google actually did it The Right Way, rather than just excising whole classes.

    I like that better than The Sun Way:
    1. Implement a nice interface
    2. Re-implement it with slightly different naming conventions
    3. Deprecate the original, perfectly functional interface
    4. Deprecate the re-implementation as well for good measure, and add a totally new package that does the same job
    5. Repeat as unnecessary until apps aren't portable between different point releases of the JVM let alone different goddamn operating systems.
    --
    Rampant carbon sequestration destroyed the Dinosaurs' tropical paradise. I'm here to help repair the damage.
  43. Re:do their own then... by goofy183 · · Score: 4, Informative

    Except you're not going to get compile time errors from the third party library you're using since it is already compiled, you're still stuck with the ugly runtime UnsatisfiedLinkErrors. The JDK has features to support what Google wants to do built in specifically for this case and they really aren't very complicated to use.

  44. Re:do their own then... by darkvad0r · · Score: 2, Interesting

    Do you know how long does it take to define a profile through the standard specification process ? Joda-time (the replacement for those ugly Calendar and Date apis) has been meant to get included in Java since the beginning of 1.5 but here we are some years later at 1.6.something and still no sign of it. Maybe google will go through the standard process for defining the "Java Cloud Edition" (I don't doubt it) but the thing must be out for developers to play with so clearly there's nothing monopolist here (the thing is in experimental state after all)