WORKSHOP: Java Support for WebComputing

1. ABSTRACT

ABSTRACT

The goal of this workshop is to introduce CS faculty to the Java packages that support network programming and web computing, and to show how these can be used in the CS classroom, in CS education support software and in CS student research projects. We will cover the traditional socket layer classes but pay most of our attention to the servlets and httpServlets, RMI (remote method invocation) and object serialization.

Keywords

Java, WWW, network computing. servlets, RMI

INTRODUCTION

Whether introduced in the first two courses or somewhat later in the CS curriculum, Java is rapidly becoming widely available as a viable language platform for advanced undergraduate CS courses such as distributed or parallel programming and network computing. Furthermore, Java provides a number of packages that provide useful support for building systems in precisely those areas. These packages do not hide the important conceptual elements of the field, but they do remove many of the onerous programming details associated with using network facilities. This makes these packages ideal for the courses that strive to present key concepts and issues but that are naturally constrained to durations of a semester. What's good for the goose is good for the gander-- these packages are also very useful for faculty seeking to build web-based CS education tools.

AUDIENCE AND PREREQUISITES

This workshop is aimed at CS faculty who want to expand their facility with the Java class library to support classroom use of Java's network programming facilities, to use those facilities in development of web-based courseware, or to help students use them in research projects.

Participants need to be comfortable with the Java language and have a minimal familiarity with basic network and client-server concepts and terminology and with HTML forms.

TOPICS COVERED

We start with an exposition of the three basic technologies (other than applet) that Java provides in the realm of network computing. Following that, we look at educational applications

The "Traditional" Socket Layer

We will discuss the client and server stream-oriented Java classes and use that discussion as a framework for reviewing basic network programming concepts. This discussion will be much more brief than the others, in part because there already is a rich textbook literature in this area.

Remote Method Invocation

RMI provides an elegant means for making objects accessible across a network. There are a number of mechanical details that must be attended to first. We will discuss all of these (creating and accessing RMI registries, the concept , creation and use of stub and skeleton classes, the RMIC utility). We will examine the precise semantics and implementation of remote method invocations, remote and local references, parameter passing and value returning.


At this point, a short breakout-group-work exercise will serve to reinforce the new material introduced. Then we go on to look at issues that affect performance (such as garbage collection), as will the special role that the object-oriented paradigm plays here. We close this part of the workshop with a quick explanation of object serialization and techniques for implementing the Serializable interface.

Servlets

We start with a brief review of HTML forms and CGI and discuss the difficulties of CGI programming. We then introduce a "hello world" Servlet example and go through the entire mechanics of setting up an Apache HTTP daemon with this servlet, and managing the daemon. This is followed by an introduction to the Servlet and HTTPServlet classes as well as related classes that model client requests and response to clients. This is done through a sequence of simple examples, each one of which extends the previous one, to cover GET and POST processing, different encoding schemes, responding to and setting MIME information. This sequence of examples will be interspersed with group exercises to help participants master the use of these classes. We also will look at the special role that the Java I/O model plays here. Finally, the use of the Session and related classes is introduced.

Classroom Use

We will pose three quite different course settings for the use of this technology: a second course in programming (post CS1, pre-data structures, or CS1 itself depending on the institution), an intermediate course in "internet programming", an advanced course in parallel computing. We show how a simple servlet-based framework can balance the applet-driven emphasis on the "client side" of the picture so that early CS students can get a hands-on balanced picture of the client-server world. We present exercises in servlet use for an internet programming course and finally we discuss how RMI can be used to support a workpile parallelism architecture that students can use in an advanced course to experiment with parallel applications.

Using Servlets To Build Web-based Courseware

WebToTeach is a web-based automated CS programming exercise checker, that is in the process of being converted from a CGI-program based implementation to a servlet based one. (By the time of the conference this conversion should be completed.) We will examine a small portion of the servlet-based system and compare it with the earlier CGI-based one.

WORKSHOP INSTRUCTORS

Professors Arnow and Weiss are both on the faculty of the Department of Computer and Information Science at Brooklyn College of City University of New York. Each possesses nearly twenty years of teaching experience in both university and industrial settings including Brooklyn College, NSA, Bell Labs, Bellcore, NYU, and William Patterson College. Both have taught graduate and undergraduate courses in Java and object-oriented programming and have presented workshops in Java, OOP and related matter at the City University of New York. In the fall of 1998 they are giving workshops on the AWT at several CCSC conferences and at WebNet98.


They are the authors of the recently published Introduction to Programming Using Java-- An Object-Oriented Approach (Addison-Wesley, 1998).


Since joining Brooklyn College in 1981, Professor Arnow's research has encompassed data structures, distributed programming, scripting languages, and parallelization of decision support software. He has published papers on CS education in SIGCSE and related settings, organized or participated in CS education panels in SIGCSE and regional conferences, led two NSF-funded projects in areas of CS education, and organized or co-organized several nationally attended workshops on logic and formal methods in CS education. Currently his research, supported by a grant from the ONR, focuses on the use of web computing technology to support parallel distributed applications.


Since joining Brooklyn College in 1980, Professor Weiss's research has encompassed data structures, programming language design and translation, object-oriented programming, and multimedia conferencing. He has published papers on CS education in SIGCSE and in other ACM and IEEE publications. He has acted as an educational consultant to industry. Professor Weiss has written and worked on commercial compilers for C, Modula 2, and Pascal. He has also developed several high level language and application translators, most recently, a translation system, written in C++, that converts Visual Basic applications to Visual C++. Currently his research, supported by a grant from the ONR, focuses on the development of web-based front ends to server-based decision support systems.