The Artima Developer Community
Sponsored Link

News & Ideas Forum (Closed for new topic posts)
Should Linux and Java be Combined?

12 replies on 1 page. Most recent reply: Jul 14, 2003 9:56 AM by Gerry Giese

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 12 replies on 1 page
Gerry Giese

Posts: 18
Nickname: gerryg
Registered: Feb, 2003

Should Linux and Java be Combined? Posted: Feb 26, 2003 5:59 PM
Reply to this message Reply
Advertisement
Despite the "issues" many have with licensing compatibility or philosophy between Linux and Java, these two technologies appear to be very complementary. Are there any efforts to merge or tightly couple the two?

There are a few things I'd like to see, if they don't exist already. First, I'd love to see a minimal run-from-CD Linux distribution with the latest Java and J2EE SDKs and plug-ins and some IDEs and tools. This could be quite useful for educational purposes, performance testing on various PCs, and demonstration purposes.

Second, I wonder if a Java-based desktop Linux could be created. One route would be to use something like Netx (http://jnlp.sourceforge.net/netx/compare.html) or other JNLP/WebStart technology to manage applications. Another would be to build a full-blown window manager like KDE or Gnome fully in Java and designed to run only Java applications.

I'm not sure about cross-platform capabilities in this second case, and something like SWT or SWT-like may need to be considered, but a high-performance Java desktop would, in my mind, be an ideal merger of what I consider two of today's most important technologies. Their combined momentum could propel both further/faster than they could on their own.

Something related but don't know much about is the Java (J2ME?) on Zaurus. Is the technology good? Can it be "upgraded" to J2SE on a full-blown Linux?

I would love to hear comments from all regarding this topic, flames or praise. Thanks!


Tobias Gloth

Posts: 1
Nickname: gloth
Registered: Feb, 2003

Re: Should Linux and Java be Merged? Posted: Feb 27, 2003 3:45 PM
Reply to this message Reply
Let's see what we have here. Linux is a kernel. It manages memory, filesystems, devices etc., and has the capability of running processes.

Java is a programming language that gets compiled into some bytecode, which can be executed by a virtual machine. It comes with a standard library that interfaces with the kernel.

So, you're right. Linux and Java are complementary, because they do completerly different things. Hence they can be combined, but not merged.

What's the purpose of a Java only desktop? Apart from the performance considerations, not allowing the user to run non-Java applications is stupid (sorry, but it's true). It would require to re-invent the wheel over and over again. Rewrite mozilla? Or maybe even relace XFree86 with something that provides only a Java API, so that the desktop doesn't get tainted?

Give me a break!

Gerry Giese

Posts: 18
Nickname: gerryg
Registered: Feb, 2003

Re: Should Linux and Java be Merged? Posted: Feb 28, 2003 4:24 PM
Reply to this message Reply
I'll admit I haven't thought this completely through, which is part of why I opened up the question. What would be the benefits? What would be the costs or tradeoffs? As you say, combine might be the best word, but what combinations [i[]would[/i] make sense?

I brought up the example of the Java implementation on the Sharp Linux-based Zaurus as an example (PersonalJava implmented by JeodeRuntime, Linux implemented by Lineo Embedix). I encourage you to read the following before continuing:

http://www.zaurus.com/dev/support/jaav.htm
http://www.zaurus.com/dev/support/downloads/architecture.pdf
http://wireless.java.sun.com/personal/articles/ztutorial/

Especially if you look at the architecture document, there are a number of things that Java could take the place of. And because of the dynamicly extensible and internet-aware nature of Java, writing new apps or just extending existing ones is very easy.

I'm not in any way proposing that Linux or X apps be replaced, unless it makes sense for the target. Where I see a good Linux/Java comination is the gray area between PDA and full-blown desktop, and specialized vertical-market solutions, such as medical devices, POS cash registers, kiosks, TIVO, PC-to-Home Theatre integration devices, etc.

I would still like to see a Java window manager for Linux if the performance issues could be solved (Java 1.5 will supposedly take care of a lot of GUI and memory-related performance issues). But I wouldn't necessarily want it to run ONLY Java apps. But the ability to have Java apps be "native" to the environment, or rather have the environment be highly "Java-aware", would be useful.

The reason for this is that it is easy to write many basic types of applications in Java, even GUI and internet apps. And doing so is much less complicated than dealing with gcc and bunches of libraries. It brings things that much closer to the average Joe being able to do something cool or useful on his desktop to "scratch the itch" that we always talk about open source developers having.

Adding some integration, combination, or whatever between Linux and Java, through the window manager or whatever mechanism, makes for a very powerful environment to live. The complexity of developing for Qt/KDE or gtk/Gnome is beyond many people, so the accessability of Java is in my mind an important thing to have on a Linux box, whatever size/shape/application function it is.

So the issues then are, I guess, how to get the JVM to be more a part of linux, the x system, the window manager, whatever, and how to tune it for more performance, possibly by coupling it the kernel or some of the service layers that run just above it. Java could be inserted at any of a number of levels, but the question of course is which one makes the most sense in terms of performance, stability, security, and usefulness to the end user.

Am I making any sense now? I may have approached this in a way that seemed silly, but I really don't think it is. I just see so much potential in a Java/Linux hookup that I keep wondering what would be the best way to do it, and whether it could be done well for everyone or would need to be more specialized, as mentioned before.

I believe that Java just needs to move from being purely in the application layer (as an application itself) to being something that applications run on (much like a servlet or EJB container). By moving "deeper" it becomes more useful, in my opinion. The original JavaOS efforts I think, as you were probably thinking I was suggesting, went too far into the deep end thinking that the JVM should be an OS. But leaving it up in the shallows doesn't seem to be the right thing to do, either, at least on the desktop, because then it can't swim as well.

Thanks for your reply, Tobias! Keep up with the reality checks if you still think this is a stupid idea.

Bill Venners

Posts: 2284
Nickname: bv
Registered: Jan, 2002

Re: Should Linux and Java be Combined? Posted: Mar 2, 2003 11:27 AM
Reply to this message Reply
> Let's see what we have here. Linux is a kernel. It manages
> memory, filesystems, devices etc., and has the capability
> of running processes.
>
> Java is a programming language that gets compiled into
> some bytecode, which can be executed by a virtual machine.
> It comes with a standard library that interfaces with the
> kernel.
>
> So, you're right. Linux and Java are complementary,
> because they do completerly different things. Hence they
> can be combined, but not merged.
>
Actually, I put "merged" in this topic's title, trying to clarify the title with what Gerry posted. I just changed the title to "Combined," which I think better captures what Gerry was trying to say.

> What's the purpose of a Java only desktop? Apart from the
> performance considerations, not allowing the user to run
> non-Java applications is stupid (sorry, but it's true). It
> would require to re-invent the wheel over and over again.
> Rewrite mozilla? Or maybe even relace XFree86 with
> something that provides only a Java API, so that the
> desktop doesn't get tainted?
>
One reason I can think of for a Java desktop is to give apps the benefit of the JVM's memory management without needing to load the JVM all the time. The JVM would be running and just suck in class files. One would have to keep a close eye on performance if you decided to run a user's desktop apps on a VM, but in theory the user might end up with more robust apps. But I believe this is to some extent what Microsoft wants to achieve with the Common Language Runtime (CLR), the VM that runs .NET apps.

Another reason I have imagined a Java-only desktop making sense is not really a desktop, but a net-top. If the code for the apps is sitting all over the network, then having it expressed in Java bytecodes does make more sense than C. This is the basic idea behind our Place project, which has been on hold for a good year and a half probably now while we focused on SuiteRunner and ServiceUI. But once we get some spare cycles, we want to push out a new release of Place.

Gerry Giese

Posts: 18
Nickname: gerryg
Registered: Feb, 2003

Re: Should Linux and Java be Combined? Posted: Mar 3, 2003 11:03 AM
Reply to this message Reply
The "net-top" idea should be integrated with the desktop. You should be able to run any app or use any service you have permissions for, paid for (if needed), and available bandwidth/cpu for, regardless of where that app or service resides. This, along with the single JVM point you bring up, is the reason I brought up NetX earlier (see post #1 with link).

Thanks for the edit on the title, BTW. I always know what I mean but don't always say it, if you know what I mean. :-)

Does anyone else have ideas or comments on this topic? I'd love to hear more! Thanks!

Gerry Giese

Posts: 18
Nickname: gerryg
Registered: Feb, 2003

Re: Should Linux and Java be Combined? Posted: Mar 10, 2003 8:58 AM
Reply to this message Reply
I've started wondering - are there any non-X graphical environments for desktop linux? I started thinking about it and it seems that I recall X's client/server model, even on a local desktop, was a bit of a performance limitation. Using a different graphical environment and running Java directly on it would theoretically give it much better performance, right?

And, becasue there is at least one X client I've seen written in Java, and VNC for java exists as well, hooking up to other X boxen wouldn't be too much trouble. Using NetX or another JNLP/WebStart-based desktop environment to load apps from wherever they are would also keep with the Linux tradition of networked enviroment. RMI, Web Services, and Application Servers allow the running of processes remotely. The more I consider having a thicker layer of Java on the desktop the more it makes sense to me, but it's still not a general-purpose solution, especially if X were ditched.

Thoughts?

o27

Posts: 1
Nickname: o27
Registered: Apr, 2003

Re: Should Linux and Java be Combined? Posted: Apr 30, 2003 11:04 AM
Reply to this message Reply
What you asked for can be found in the JD4X project. Check out the project at http://jdx.sourceforge.net/
It's not fully functional yet. It is still alpha but I'm already working on a possible beta version soon.

b'b

Posts: 7
Nickname: bawjaws
Registered: May, 2003

Re: Should Linux and Java be Combined? Posted: May 1, 2003 9:08 AM
Reply to this message Reply
> I started thinking about
> it and it seems that I recall X's client/server model,
> even on a local desktop, was a bit of a performance
> limitation.

I personally know nothing about this topic, but I have seen this intuitively appealing, "commonsense" notion put forward many, many times and each time it has been shot down in flames by people who sounded like they knew what they were talking about.

Jim Greer

Posts: 2
Nickname: jbgreer
Registered: Apr, 2003

Re: Should Linux and Java be Combined? Posted: May 1, 2003 10:36 AM
Reply to this message Reply
Yes, there are non-X graphical environments for Linux. For instance, there is a SVGA library. There are other, more ambitious projects to replace X, though obviously that's not going to happen any time soon. For instance, the Fresco project [ http://www.fresco.org/ ]

Jim Greer

Posts: 2
Nickname: jbgreer
Registered: Apr, 2003

Re: Should Linux and Java be Combined? Posted: May 1, 2003 10:56 AM
Reply to this message Reply
This is not intended as a flame, but... have you actually *used* X? That is, exactly how much more performance are you looking for? Every 6 months or so, I load up the latest video game on my machine at home and walk through some amazingly detailed graphical environment being updated at a substantial FPS rate; at such times I'm reminded that the argument about the lack of video games on Linux is a marketing argument, not a technical one.

Some misguided folks think that X's client-server model means that graphics commands pass via TCP/IP between the system parts! I consider the ability to change the underlying transport layer from TCP/IP to local networking layers to be one of the beauties of X.

X certainly does have implementation characteristics that might be reconsidered today. [ I'm certain that I am preaching to the choir here. ] In a time of expensive computing resources and relatively cheaper display technology, network-based interactions was a good choice. Today, our cheap all-in-one-supercomputers-on-a-desk would demand a useful application to require such a decision.

One answer to your concern about X performance is to say that the computing performance curve makes the issue you mention a non-issue; i.e. machines will be fast enough to provide the desired performance characteristics. Except for extreme cases, I think that is true right now.

If the idea of wasting cycles doesn't appeal to you, (you embedded assembly uber-hacker ;-> ), you could take some comfort in knowing that X goes through a different 'path' (DRI/DRM) when run in its highest performance (from a FPS) mode. "But", I can hear your reply, "if that's true, why not get rid of the unused portion?" I think efforts like FreeSco are attempting to do just that. Such efforts are fighting a huge amount of X inertia, though. I wish them well.

Eric Borm

Posts: 1
Nickname: ericb
Registered: May, 2003

Re: Should Linux and Java be Merged? Posted: May 5, 2003 9:25 AM
Reply to this message Reply
> Let's see what we have here. Linux is a kernel. It manages memory, filesystems, devices etc., and has the capability of running processes.

> Java is a programming language that gets compiled into some bytecode, which can be executed by a virtual machine. It comes with a standard library that interfaces with the kernel.

Actually, I believe the original poster intended to suggest that the *jvm* and kernel functionality could be merged. The jvm has its own memory manager as well as providing abstractions for files, network connections, windows, threads, etc (very much like an operating system kernel does).

Of course, the traditional jvm happens to be implemented by accessing the kernel but doing so makes it essentially a secondary kernel executing in user space. From that perspective, the notion that the jvm could be more tightly integrated with the kernel, therefore, seems quite sensible to me.

I don't see why this integration would prevent non-java applications from running.

Personally, if this configuration would allow java apps to run faster, I'm all for it. Unfortunately, I'm not familiar enough with either the jvm or the linux kernel to speculate concretely as to whether that is possible.

Chris Hartjes

Posts: 12
Nickname: bloodshot
Registered: May, 2003

Re: Should Linux and Java be Combined? Posted: Jun 2, 2003 5:56 AM
Reply to this message Reply
> > I started thinking about
> > it and it seems that I recall X's client/server model,
> > even on a local desktop, was a bit of a performance
> > limitation.
>
> I personally know nothing about this topic, but I have
> seen this intuitively appealing, "commonsense" notion put
> forward many, many times and each time it has been shot
> down in flames by people who sounded like they knew what
> they were talking about.


As a long-time Linux guy, I can second that thought. The only thing holding back a re-write of X is the need for backwards compatability, but X really isn't that bad. On similiarily configured machines, I find the performance of Windows XP and X to be the same. The only real difference is support of graphics cards, which makes a HUGE difference in the "look and feel" of the site.

A Java-based desktop would be interesting but I wouldn't trust it until it was rock-solid and stable. I've used enough Java apps (some of the well written, others not) to know that it would reduce high-end machines to slag unless Java 1.5 is a huge improvement performance-wise.

Gerry Giese

Posts: 18
Nickname: gerryg
Registered: Feb, 2003

Re: Should Linux and Java be Combined? Posted: Jul 14, 2003 9:56 AM
Reply to this message Reply
Java 1.4.2 definitely showed some improvements in performance. Hava you tried it out yet? And yes, being able to throttle and kill rogue java processes in the JVM would be a big issue. It would be a good idea to have an independent group test out apps and verify a reasonable amount of stability before making an app available to the masses on the java desktop (through some sort of signing authority? logo program??). Microsoft has the WHQL to go through for drivers, and some sort of logo program as well. Not sure what would work best in the open community, but I agree, some method of assurance would have to be developed in order to breed confidence.

Flat View: This topic has 12 replies on 1 page
Topic: Plain Text and XML Previous Topic   Next Topic Topic: Lessons Learned from JDOM

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use