Welcome!

Java IoT Authors: Elizabeth White, Yeshim Deniz, Pat Romanski, Tim Hinds, Douglas Lyon

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
    A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
    Imagine if you will, a retail floor so densely packed with sensors that they can pick up the movements of insects scurrying across a store aisle. Or a component of a piece of factory equipment so well-instrumented that its digital twin provides resolution down to the micrometer.
    In his keynote at 18th Cloud Expo, Andrew Keys, Co-Founder of ConsenSys Enterprise, provided an overview of the evolution of the Internet and the Database and the future of their combination – the Blockchain. Andrew Keys is Co-Founder of ConsenSys Enterprise. He comes to ConsenSys Enterprise with capital markets, technology and entrepreneurial experience. Previously, he worked for UBS investment bank in equities analysis. Later, he was responsible for the creation and distribution of life settle...
    Product connectivity goes hand and hand these days with increased use of personal data. New IoT devices are becoming more personalized than ever before. In his session at 22nd Cloud Expo | DXWorld Expo, Nicolas Fierro, CEO of MIMIR Blockchain Solutions, will discuss how in order to protect your data and privacy, IoT applications need to embrace Blockchain technology for a new level of product security never before seen - or needed.
    BnkToTheFuture.com is the largest online investment platform for investing in FinTech, Bitcoin and Blockchain companies. We believe the future of finance looks very different from the past and we aim to invest and provide trading opportunities for qualifying investors that want to build a portfolio in the sector in compliance with international financial regulations.
    Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
    Nordstrom is transforming the way that they do business and the cloud is the key to enabling speed and hyper personalized customer experiences. In his session at 21st Cloud Expo, Ken Schow, VP of Engineering at Nordstrom, discussed some of the key learnings and common pitfalls of large enterprises moving to the cloud. This includes strategies around choosing a cloud provider(s), architecture, and lessons learned. In addition, he covered some of the best practices for structured team migration an...
    No hype cycles or predictions of a gazillion things here. IoT is here. You get it. You know your business and have great ideas for a business transformation strategy. What comes next? Time to make it happen. In his session at @ThingsExpo, Jay Mason, an Associate Partner of Analytics, IoT & Cybersecurity at M&S Consulting, presented a step-by-step plan to develop your technology implementation strategy. He also discussed the evaluation of communication standards and IoT messaging protocols, data...
    Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
    In his session at 21st Cloud Expo, Raju Shreewastava, founder of Big Data Trunk, provided a fun and simple way to introduce Machine Leaning to anyone and everyone. He solved a machine learning problem and demonstrated an easy way to be able to do machine learning without even coding. Raju Shreewastava is the founder of Big Data Trunk (www.BigDataTrunk.com), a Big Data Training and consulting firm with offices in the United States. He previously led the data warehouse/business intelligence and B...
    "IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
    When shopping for a new data processing platform for IoT solutions, many development teams want to be able to test-drive options before making a choice. Yet when evaluating an IoT solution, it’s simply not feasible to do so at scale with physical devices. Building a sensor simulator is the next best choice; however, generating a realistic simulation at very high TPS with ease of configurability is a formidable challenge. When dealing with multiple application or transport protocols, you would be...
    Smart cities have the potential to change our lives at so many levels for citizens: less pollution, reduced parking obstacles, better health, education and more energy savings. Real-time data streaming and the Internet of Things (IoT) possess the power to turn this vision into a reality. However, most organizations today are building their data infrastructure to focus solely on addressing immediate business needs vs. a platform capable of quickly adapting emerging technologies to address future ...
    We are given a desktop platform with Java 8 or Java 9 installed and seek to find a way to deploy high-performance Java applications that use Java 3D and/or Jogl without having to run an installer. We are subject to the constraint that the applications be signed and deployed so that they can be run in a trusted environment (i.e., outside of the sandbox). Further, we seek to do this in a way that does not depend on bundling a JRE with our applications, as this makes downloads and installations rat...
    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.
    DX World EXPO, LLC, a Lighthouse Point, Florida-based startup trade show producer and the creator of "DXWorldEXPO® - Digital Transformation Conference & Expo" has announced its executive management team. The team is headed by Levent Selamoglu, who has been named CEO. "Now is the time for a truly global DX event, to bring together the leading minds from the technology world in a conversation about Digital Transformation," he said in making the announcement.
    In this strange new world where more and more power is drawn from business technology, companies are effectively straddling two paths on the road to innovation and transformation into digital enterprises. The first path is the heritage trail – with “legacy” technology forming the background. Here, extant technologies are transformed by core IT teams to provide more API-driven approaches. Legacy systems can restrict companies that are transitioning into digital enterprises. To truly become a lead...
    Digital Transformation (DX) is not a "one-size-fits all" strategy. Each organization needs to develop its own unique, long-term DX plan. It must do so by realizing that we now live in a data-driven age, and that technologies such as Cloud Computing, Big Data, the IoT, Cognitive Computing, and Blockchain are only tools. In her general session at 21st Cloud Expo, Rebecca Wanta explained how the strategy must focus on DX and include a commitment from top management to create great IT jobs, monitor ...
    "Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
    The IoT Will Grow: In what might be the most obvious prediction of the decade, the IoT will continue to expand next year, with more and more devices coming online every single day. What isn’t so obvious about this prediction: where that growth will occur. The retail, healthcare, and industrial/supply chain industries will likely see the greatest growth. Forrester Research has predicted the IoT will become “the backbone” of customer value as it continues to grow. It is no surprise that retail is ...