JavaOne Trip Report and Technology Overview Ron Mackenzie April 2002 This presentation is on the Web at: http://www.slac.stanford.edu/~ronm/JavaOne2002.html.

Download Report

Transcript JavaOne Trip Report and Technology Overview Ron Mackenzie April 2002 This presentation is on the Web at: http://www.slac.stanford.edu/~ronm/JavaOne2002.html.

JavaOne Trip Report and
Technology Overview
Ron Mackenzie
April 2002
This presentation is on the Web at:
http://www.slac.stanford.edu/~ronm/JavaOne2002.html
JavaOne vs DECUS
• My personal observations:
– Sun is much more open about release timing and
contents than DEC ever was.
– That is understandable given the open nature of Java.
– Sun cares about what developers think and wants them
involved in the process of Java Platform definition.
– Sun is actively trying to get developers excited about
the technology and asking them to develop
applications.
– It's fun to have the focus on Software completely
Outline
• Technology overview
– Lots of 3 and 4 letter acronymns
– It’s all on the web off my home page ~ronm
• Conference Highlights
You’ll see many of the acronyms twice. Once in this
Overview and again with more detail from Greg
Web Services
• Everything connects to everything via soap".
• Not just for browser applications. B2B and
Machine to Machine applications too.
Web Services - Key Technologies
• Java Servlets
• JavaServerPages (JSP) and JSP standard tag library (JSTL)
• JavaXML Pack (JAX). A set of API's providing:
–
–
–
–
JAXM-messaging via soap
JAXP-processing api
JAXR-client side registry
JAX-RPC- RPC call ingerface including stub and skeleton
generation
• WSDL (Web Services Definition Language). Tools
generate WSDL(not very readable). Like IDL, it defines
interfaces across web application
Web Services Supporting Technologies
• Apache Tomcat, (Servlet and JSP container)
• Ant (or some other build tool).
• Registry server
SOAP and XML
• SOAP - Simple Object Access Protocol.
– Provides standard packaging structure for transporting XML
documents over HTTP, FTP, SMTP, etc
• XML - Extensible Markup Language.
– XML is an industry-standard, system independent way of
representing data. Like HTML, it is a markup language that
encloses data in tags. The difference is that XML tags describe the
content (HTML only tells you how to display it). Also, XML tags
are extensible (you can write your own tags to describe the data
content). You can retrieve from data sources like Oracle efficiently
with XML.
JSP’s and Servlets
• Java Server Pages (JSP)
– Put the code into the web page. It's like an HTML page with Java
in it. Easier for most people to write than Servlets.
• Servlets
– Put the html into the application code.
Both technologies allow you to run programs as a result of
web requests. These programs can access databases and
other systems for example.
They can do
-SOAP parsing, EJB and JMS execution …..
Sun Has Grouped Java Technologies
Into Three Editions:
1. Standard (J2SETM technology)
2. Enterprise (J2EETM technology).
-
Set of standards that provide a web application development and
deployment platform. J2EE includes standards for middleware
(EJB and JMS), database connectivitiy (JDBC), transactions
(JTA/JTS), presentation (servlets and Java Server Pages) and
directory services (JNDI).
3. Micro (J2METM technology)
1. Minimum sized JVM and set of API's that fit in consumer devices.
Big Java / Little Java. These were cute terms used by one
speaker to describe J2EE/Web Services vs J2ME.
SunOne and JCA
• SunOne Sun's Open Net Environment. It's Sun's software
strategy (and set of tools) for developing and deploying
Web Services
–
–
–
–
–
–
Solaris
Forte Tools
Java
iPlanet Application Server
more...
www.sun.com/sunone
• JCA - Java Connector Archetecture. As with JNI (Java
Native Interface), JCA is used to access Native or Legacy
Applications
JCP
• JCP - Java Community Process (not JC Penney's).
– The way the Java platform evolves
– Open organization of developers who develop and
revise Java technology specifications and reference
implementations.
– Created by Sun but has people from all over the map.
– Java Specification Requests (JSRs) are descriptions of
proposed and final specifications for the Java Platform.
What is Microsoft .NET?
• The dark force?
• It is Microsoft's propriatary solution providing XML Web
Services.
See http://www.microsoft.com/net/
• Notice that the words "Web Services" are not used in
Microsoft's description of .NET:
Microsoft® .NET is the Microsoft platform for XML
Web services. XML, an industry standard data format,
Is the "lingua franca" that enables data-sharing among
disparate applications and devices.
Microsoft .NET (it’s not Servlets/JSPs)
• Notice the missing words "Servlet" and JSP in
Microsoft's description of .NET servers:
The Microsoft .NET Enterprise Servers,
Windows 2000 Server family, and the
upcoming Windows .NET Server family, with
their built-in security, their support for XML
and their ability to quickly scale-out to meet
increased demands, provide the best solution
to host and deploy XML Web services and the
.NET platform
Microsoft .NET (interoperability)
• Microsoft says .NET will interoperate with other Operating
systems/languages.
• This statement is from Sun:
Sun ONE platform services and .NET services use
common open standards such as those based on XML and
SOAP. Therefore, the Sun ONE platform is able to use
.NET Web services and is able to provide Web services to
the .NET environment.
• BUT… .NET is a propriatary solution any you'll only be
able to run on Microsoft based platforms.
.NET
• Java (the language and the platform) is not part of the
.NET solution.
– So, your Java serverside code won't run on a .NET server.
• The .NET solution requires that you use Microsoft
products for development and deployment of XML Web
Services
• Microsoft: .NET + Visual Studio .NET = $$ for Bill Gates
• OpenSource: tomcat +J2EE + linux which is free.
Leveraging Open-Source for complete
J2EE application
•
•
•
•
•
•
•
•
•
•
CVS - Same as we use.
Jakarta ANT – XML based Java based build tool.
Junit - Simple framework to write repeatable tests. http://www.junit.org/
Jakarta Cactus - Test framework for J2EE server-side java code
Jakarta log4j - Distributed application logger.
AspectJ - aspect-oriented extension to the Java
– "seperate program logic into different aspects". http://aspectj.org/
Jakarta Struts –
– Use MVC framework to create Servelet, JSP, and JavaBean systems.
Jakarta Tomcat -Servlet Container
JBoss - J2EE Application Server http://www.jboss.org/
mySQL - Very popular open source database http://www.mysql.com/
Conference Highlights
• Web Services, XML, and SOAP were the hot topics.
• Wireless technology was a major thrust of the
conference which I largely skipped (where possible).
• J2SE (standard edition) 1.4 (code name Merlin) is
available. It's solid. Start using it.
–
–
–
–
–
Improvements in Security and Performance.
Corba is provided.
X-connections on sun and linux can be 10x faster.
Complete X rewrite, sending less over the wire.
Swing/J2D is 20-60% faster because it now accesses
platform specific graphics card features.
Java New IO (NIO)
• Java.nio (new IO API package) added to J2SE 1.4
–
–
–
–
–
–
–
–
–
New API for doing I/O.
Much faster than usual java.io package.
Scalable I/O
Fast Buffered binary and character I/O
I/O Multiplexed over multiple sockets (App Servers have done
this already).
No longer one thread per socket
Scatter IO support
Improved file system interface (almost as fast as native).
Async I/O not there
• http://www.jcp.org/jsr/detail/51.jsp
Other networking improvements
• Networking improvements in J2SE 1.4 besides NIO
– IPV6 support. Expanded routing and addressing (128 bit addresses format)
Solaris 8 and 9 have dual stack capability (apps can support both).
WinXP does not have dual stack support, so no IPV6 Java support.
http://www.ipv6.org/
• Multicast, datagram, tcp, NIO: all support with IPV6
– SetSockOpt and other operations supported before connection
– URI: java.net.uri. Uniform Resource Identifier (more flexable than URL
class for files, paths, url’s).
– java.net.NetworkInterface - for accessing network hardward (like ethernet
adaptors). Makes it easy to find the adaptors on your system and restrict
I/O to one of them for example.
– Window size negotation support (for >64k buffers)
– Partial out-of-band support
– More... SOCKS support, Name Server improvements, JSSE (Server Socket
Extension).
The “Why” and “How” of Web Services
• Reduced development time is one of the big advantages of
Web Services.
– Forte for Java (sun IDE) was demonstrated. It does Web Services
Development and deployment. Saw a demo where an EJB was
used to accesses a legacy DB. Then, they used the tool to publish
it as a web service. This all took 5 minutes.
• Basic XML Web services are being delivered now by Sun
using iPlanet, Java, and Forte products.
– Lots more is coming. This is a rapidly evolving technoligy.
• The Sun Web Services Development Pack was being given
away.
– It contains the suite of Web Services technologies.
More of the “How” of Web Services
• For graphics, one speaker said that Browsers are
low quality. So, use J2SE's Swing/AWT/2D in
non-browser applications instead.
– But, if you're deploying into a web environment, you
must use "Web Start" or a Java plug in.
• Sun encouraged people to
–
–
–
–
Use J2SE 1.4 - it's stable
Build Web Services with JAX-RPC
Build Rich Clients with Swing/AWT
Don't just target browsers.
Finally…
• Windows XP doesn't include JRE (that's what the latest
law suit is about, right?).
– Of course you can download it, but that's a problem for casual
users.
• The solaris JVM supports 64 bit operations.
– This is great for large dataset transfers (>4GB).
• Message logging technologies:
– Jakarta log4j - runtime message logging and application
tracing. Configurable at run time. Small performance
cost. Provides detailed descriptions of applicaiton failures.
– J2SE 1.4 has a NEW logging API built in.
– System.out.println - the old standby.