Welcome!

Java IoT Authors: Liz McMillan, Elizabeth White, Pat Romanski, Yeshim Deniz, Frank Lupo

Related Topics: Linux Containers, Java IoT

Linux Containers: Article

Java, Meet Python. Python, Meet Java

Java, Meet Python. Python, Meet Java

  • Read Sean Gallagher's technology blog

    As Sun and IBM haggle over the terms of open-sourcing Java, I think it's important to note: if they're trying to jumpstart more widespread development of Java applications on the server, they are barking up the wrong tree.

    The reason is simple - Python. The scripting language is already in widespread use, is object-oriented, is proven to scale moderately well (Marc Andreessen's Opsware wrote the entirety of the first version of their product in it), and is more friendly to the realities of most Linux deployments than Java - that is, it can run fine on cheap hardware with a finite amount of RAM.

    Over breakfast this morning, Andreessen pretty much summed up what I'd been thinking over the past few days. He talked about how Linux had usurped Unix workstations as the developer desktop, and how developers started prototyping in Python and Perl. "And they get it done in a week, and it works...and they say, 'Why do we need to move this over to something else, exactly?'"

    Java (specifically J2EE) is good at things like dealing with large number of transactions, dealing with application state, and stuff like that. But, a significant majority of applications on the Web don't necessarily generate enough of a transaction load to justify the penalties you have to pay with Java - a big memory footprint, more complicated software configuration issues, and (let's face it) somewhat more complicated than a scripting language. Java carries a lot of baggage with it to make the bytecode compiler happy that "agile" languages like Python and Perl (especially Perl) don't worry about. If they *really* need performance, they'll write it in what Linux developers invariably resort to for such a task: C.

    That doesn't mean that there isn't a place for Java in the world of Linux developers. It just means that place is a little tighter than the Java-ites might be accustomed to. Without a real niche in rapid prototyping, and without a real performance advantage, Java is sort of a happy medium - or an unhappy one, depending on how you look at it. Scripters will turn to Java reluctantly when they hit the top end of performance for things like database calls, because Java is at least less crufty than C. Faint praise, for sure.

    This is one of the reasons that people are excited about Groovy. Groovy's proponents claim that it , like Python, is an "agile" language. It seems suited to rapid prototyping, and since it's built specifically for the Java Virtual Machine, there's no need to rebuild applications in Java to make them scale better later.

    But for people to prototype on top of the JVM, the JVM has to be on their machine. Thus the desire to get Java open-sourced so it ends up on Linux distributions.

    There's just one problem: why would anybody pick an untested language on a relatively memory-heavy virtual machine to prototype on when they can just pop out Python bits that run without one? Especially when they can get by pretty much without the JVM in the first place?

    Well, there are those things that you get from Java - application state, database connection pooling, lots of messaging and transactional support - that you don't get from Python. But the thing is, you don't have to saddle yourself with developing the whole application in Java just to get those things. And, no matter how good Groovy is, I doubt anybody is going to convince Python, Perl and Ruby developers that life is all goodness and light over on the JVM, and they should just take the red pill and get it over with.

    The answer for Java is not just to take it open source. The answer is also to show open-source developers that Java plays nice with their favorite tools.

    One place where Java can get immediate traction is on the desktop. Right now, desktop development on Linux is in the Land of C: while Gnome's got some scripting support, it's still not exactly what desktop developers on other platforms are used to. And Java 2 Standard Edition fully implemented on Linux would mean that tools written elsewhere would be all set to rock and roll on Linux. But Java could also act as a front-end builder for scripted components.

    But for server applications, the best thing that the Java community can do to win the hearts and minds of open source developers is to expose Java to their existing tools.

    And guess what? That means contributing to Python.

    That's because the most obvious routes to integration between Python and Java--like SOAP, for example--aren't fully cooked yet in Python. ( SOAP::Lite for Perl is most of the way there, so Perl is less of a concern.) The Java/Python Interface (JPI) was another potential way of wiring these two worlds up, but the project seems to have gone dark.

    Regardless of what's out there in bits and pieces now, if there was some good, open-source, standardized reference implementation of a means for Python to invoke the Goodness of Java components without actually having to recode in Java, there might be a whole lot more reason for the open source community to embrace Java.

    So, Groovy is a great first step. But for Java to really get past the awkward pause in its relationship with open source developers, those keeping the Java flame have to get over themselves and the whole "not invented here" mindset that has locked them in thus far. Architectural purity is great. But pragmatism is better.
  • More Stories By Sean M. Gallagher

    Sean Gallagher is technology editor, Baseline Magazine, and blogs as the dotcommunist at http://weblog.dendro.com.

    Comments (11) View Comments

    Share your thoughts on this story.

    Add your comment
    You must be signed in to add a comment. Sign-in | Register

    In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.


    Most Recent Comments
    Monte Lin 03/25/04 11:23:06 AM EST

    But I hate Python's debugger.

    We need a better debug interface so that we can fire the pdb to intercept any running Python process just like the way gdb does on C/C++ process.

    gabriele 03/25/04 04:47:35 AM EST

    To me *this* article/discussion is short-sighted.

    Jython (and JRuby, that at least has a non-alpha release in this last two years) are still ruby and python.
    They have they'r own platform, libraries and so on.
    Groovy integrates tightly with java, and groovy's library is Java's one.

    Plus, if you ever took a look at the language it has some interesting features (notably, creative use of SmallTalkish/Rubyish blocks, the ability to have both ruby's function call without parenthesis and python's first class citizen functions, real lexical closures like lisp).

    I believe many people, even in this discussion are reacting to groovy jsr in a bad way for some reasons:

    1: this is a chance to grow *even* for jython, JCL, ObjectScript and so on. Dont' fall in the "they're stealing us momentum!" mood. If the platform wqich groovy is based upon (BSF) grows, and if agile languages are accpeted in the mainstream world (see the JSR) we all take advantage.

    2: choice is good. If ruby never existed prolly python won't have iterators (even if the BDFL quotes CLU).
    If python never existed probably perl won't have Objects. If AWK..

    3: It's not SUN that is pushing groovy. The authors are indipendent devs, thus if the JSR is accepted, that will' a good demonstration that the JCP is really an open process, confirming successes like the GenericJava/Pizza integration.

    Please, consider this a chance, not a problem. Try not to be insular. Look at the groovy wiki.

    Mike 03/25/04 02:00:41 AM EST

    I agree with this article 100%. I'm a somewhat recovering Java junkie from CS who got interested in Python 2 years ago, but only started realizing how cool it can be recently. I've been toying with some ideas on how to work on Python to make it more competive like adding better support for streams.

    Some ideas: http://www.blindmindseye.com/bmeblog/archives/000089.html

    Phillip J. Eby 03/23/04 08:20:57 AM EST

    I'm curious why nobody's mentioned JPE:

    http://jpe.sourceforge.net/

    90823890 03/23/04 07:40:08 AM EST

    I too am a bit comfused why Jython wasn't mentioned in the article, although I would like an easier "CPython" integration route as well for certain applications. We successfully use Jython (and other languages that are translated into JVM bytecode) in our production work.

    Michael McLay 03/23/04 12:03:47 AM EST

    """So, Groovy is a great first step. But for Java to really get past the awkward pause in its relationship with open source developers, those keeping the Java flame have to get over themselves and the whole "not invented here" mindset that has locked them in thus far. Architectural purity is great. But pragmatism is better."""

    Rule 9 from the Zen of Python:

    "Although practicality beats purity."

    Sun should remember DoD's failure with Ada. The DoD was too heavy handed in trying to control the language and they ultimately failed in the market place as a consequence. Why should the open source community buy into Java when they have a language like Python That give them more than Java? Python has its own byte code interpreter, why should it envy the JVM? Python integrates functional programming and proecedural programming with a strongly, but dynamically typed OO language. It doesn't force the developer to live in an OO straight jacket. Python also has a very easy to use C API for integrating legacy software into Python modules. Java is hostile to other languages by comparison.

    cupdike 03/21/04 05:33:42 PM EST

    As someone who uses jython in a production application, I took a brief look at groovy to assess it. I find it ironic that it's similarity to java syntax is considered a strength. IMHO, it makes the groovy code look ugly compared to jython code. The ability to paste java code into a groovy code seems of little value since it is usually done the other way around--you tinker at a scripting console and get the algorithm working and then port the code into java if needed. I doubt if groovy would port much easier than anything else since the functionality is different (that's the whole point of a using an alternative language). I have helped several developers learn python sytax so they could start scripting in jython and they always pick it up in a day or two--and then they know python too (and can access it's vast libraries that come along with it) for when they aren't restricted to using a JVM. Functionality-wise, groovy looks like it has a decent blend of features and I didn't see anything I would miss except for python's terse syntax (and triple quote syntax for literals, useful for templating without escaping embedded single and double quotes). But that's based on just browsing the docs. Pedigree-wise, groovy is very immature compared to jython (and even more so compared to python). Hence the consternation on selecting groovy as the subject of a JSR. For me, the choice to stay with jython is obvious--even ignoring groovy's immaturity. I don't just want an "agile" language for the jvm. I want an another language for the jvm that can also bridge me into the python world loaded with tools, apps, libraries and books with a vibrant community. But if you work with developers who won't be comfortable working outside of java's syntax and you only want to run on a jvm and you don't mind the relative immaturity, then groovy is probably a good alternative.

    Sean Gallagher 03/20/04 02:23:03 PM EST

    A clarification: Yes, Jython is the fastest route to achieving most of this compatibility. Which is why I'm puzzled by the Groovy project being forwarded as a JSR first; why a whole new language just for the JRE when people are already coding in Python? What I'm saying above is that the JCP should formalize Jython support (and other support for Python executing outside the Java framework) as part of the Java plaftorm if they want to reach a wider audience of Linux developers.

    Sorry I wasn't that explicit in the weblog entry; I'll add clarification on my website.

    Sean Gallagher 03/19/04 02:13:33 PM EST

    I briefly mentioned Jython in a previous post on the weblog this article was screen-scraped from. It's definitely something in the mix, but it seems, based on what the Java Community Process people are saying, that Jython is not "pure" enough for them, so Groovy is what they're pushing.

    I think that's short-sighted.

    Mike Hostetler 03/19/04 02:05:51 PM EST

    I agree with the Jython comment above. Why even bother talking about a SOAP marriage when Jython has it all -- and even better, since Jython can use and sub-class any Java class.

    Servlets in Python? Yep. SWING apps in Python? Yep. JDBC? Yep. Jython is the best thing Java has going for it.

    Check out http://www.jython.org

    Steve Toledo-Brown 03/19/04 11:28:58 AM EST

    Rather bizarre not to mention Jython in such an article.

    @ThingsExpo Stories
    As businesses evolve, they need technology that is simple to help them succeed today and flexible enough to help them build for tomorrow. Chrome is fit for the workplace of the future — providing a secure, consistent user experience across a range of devices that can be used anywhere. In her session at 21st Cloud Expo, Vidya Nagarajan, a Senior Product Manager at Google, will take a look at various options as to how ChromeOS can be leveraged to interact with people on the devices, and formats th...
    SYS-CON Events announced today that Yuasa System will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Yuasa System is introducing a multi-purpose endurance testing system for flexible displays, OLED devices, flexible substrates, flat cables, and films in smartphones, wearables, automobiles, and healthcare.
    SYS-CON Events announced today that Taica will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Taica manufacturers Alpha-GEL brand silicone components and materials, which maintain outstanding performance over a wide temperature range -40C to +200C. For more information, visit http://www.taica.co.jp/english/.
    SYS-CON Events announced today that SourceForge has been named “Media Sponsor” of SYS-CON's 21st International Cloud Expo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. SourceForge is the largest, most trusted destination for Open Source Software development, collaboration, discovery and download on the web serving over 32 million viewers, 150 million downloads and over 460,000 active development projects each and every month.
    SYS-CON Events announced today that Nihon Micron will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Nihon Micron Co., Ltd. strives for technological innovation to establish high-density, high-precision processing technology for providing printed circuit board and metal mount RFID tags used for communication devices. For more inf...
    Enterprises have taken advantage of IoT to achieve important revenue and cost advantages. What is less apparent is how incumbent enterprises operating at scale have, following success with IoT, built analytic, operations management and software development capabilities – ranging from autonomous vehicles to manageable robotics installations. They have embraced these capabilities as if they were Silicon Valley startups. As a result, many firms employ new business models that place enormous impor...
    SYS-CON Events announced today that MIRAI Inc. will exhibit at the Japan External Trade Organization (JETRO) Pavilion at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. MIRAI Inc. are IT consultants from the public sector whose mission is to solve social issues by technology and innovation and to create a meaningful future for people.
    Widespread fragmentation is stalling the growth of the IIoT and making it difficult for partners to work together. The number of software platforms, apps, hardware and connectivity standards is creating paralysis among businesses that are afraid of being locked into a solution. EdgeX Foundry is unifying the community around a common IoT edge framework and an ecosystem of interoperable components.
    SYS-CON Events announced today that Dasher Technologies will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Dasher Technologies, Inc. ® is a premier IT solution provider that delivers expert technical resources along with trusted account executives to architect and deliver complete IT solutions and services to help our clients execute their goals, plans and objectives. Since 1999, we'v...
    SYS-CON Events announced today that TidalScale, a leading provider of systems and services, will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale has been involved in shaping the computing landscape. They've designed, developed and deployed some of the most important and successful systems and services in the history of the computing industry - internet, Ethernet, operating s...
    SYS-CON Events announced today that Massive Networks, that helps your business operate seamlessly with fast, reliable, and secure internet and network solutions, has been named "Exhibitor" of SYS-CON's 21st International Cloud Expo ®, which will take place on Oct 31 - Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. As a premier telecommunications provider, Massive Networks is headquartered out of Louisville, Colorado. With years of experience under their belt, their team of...
    SYS-CON Events announced today that IBM has been named “Diamond Sponsor” of SYS-CON's 21st Cloud Expo, which will take place on October 31 through November 2nd 2017 at the Santa Clara Convention Center in Santa Clara, California.
    Infoblox delivers Actionable Network Intelligence to enterprise, government, and service provider customers around the world. They are the industry leader in DNS, DHCP, and IP address management, the category known as DDI. We empower thousands of organizations to control and secure their networks from the core-enabling them to increase efficiency and visibility, improve customer service, and meet compliance requirements.
    SYS-CON Events announced today that TidalScale will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. TidalScale is the leading provider of Software-Defined Servers that bring flexibility to modern data centers by right-sizing servers on the fly to fit any data set or workload. TidalScale’s award-winning inverse hypervisor technology combines multiple commodity servers (including their ass...
    As hybrid cloud becomes the de-facto standard mode of operation for most enterprises, new challenges arise on how to efficiently and economically share data across environments. In his session at 21st Cloud Expo, Dr. Allon Cohen, VP of Product at Elastifile, will explore new techniques and best practices that help enterprise IT benefit from the advantages of hybrid cloud environments by enabling data availability for both legacy enterprise and cloud-native mission critical applications. By rev...
    As popularity of the smart home is growing and continues to go mainstream, technological factors play a greater role. The IoT protocol houses the interoperability battery consumption, security, and configuration of a smart home device, and it can be difficult for companies to choose the right kind for their product. For both DIY and professionally installed smart homes, developers need to consider each of these elements for their product to be successful in the market and current smart homes.
    Join IBM November 1 at 21st Cloud Expo at the Santa Clara Convention Center in Santa Clara, CA, and learn how IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Cognitive analysis impacts today’s systems with unparalleled ability that were previously available only to manned, back-end operations. Thanks to cloud processing, IBM Watson can bring cognitive services and AI to intelligent, unmanned systems. Imagine a robot vacuum that becomes your personal assistant tha...
    In his Opening Keynote at 21st Cloud Expo, John Considine, General Manager of IBM Cloud Infrastructure, will lead you through the exciting evolution of the cloud. He'll look at this major disruption from the perspective of technology, business models, and what this means for enterprises of all sizes. John Considine is General Manager of Cloud Infrastructure Services at IBM. In that role he is responsible for leading IBM’s public cloud infrastructure including strategy, development, and offering ...
    SYS-CON Events announced today that N3N will exhibit at SYS-CON's @ThingsExpo, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. N3N’s solutions increase the effectiveness of operations and control centers, increase the value of IoT investments, and facilitate real-time operational decision making. N3N enables operations teams with a four dimensional digital “big board” that consolidates real-time live video feeds alongside IoT sensor data a...
    In a recent survey, Sumo Logic surveyed 1,500 customers who employ cloud services such as Amazon Web Services (AWS), Microsoft Azure, and Google Cloud Platform (GCP). According to the survey, a quarter of the respondents have already deployed Docker containers and nearly as many (23 percent) are employing the AWS Lambda serverless computing framework. It’s clear: serverless is here to stay. The adoption does come with some needed changes, within both application development and operations. Tha...