CSCE 590N: Problem Set 3
Due: Tuesday, 4 May 2004, @midnight
Figure 1:A deployment view of your
servlet. It shows two instances of your servlet running on
different machines and being accesses by a single user.
An Online Distributed Sharing Library
In this problem set you will implement a servlet slighltly
similar to PS1. In this problem set, we assume that each person
is running their own servlet-enabled webserver and wants to run
an servlet that will allow them to enter and display to the
world the books they own along with some personal information
(input by the person) and some other information (gathered from
Amazon). The owner of a servlet can enter the books he owns. For
each book he can say whether he owns it or not and, if he owns
it, whether it has been lent out and, if so, when he expects it
to be returned. The owner can also enter URLs for SOAP services
of other servlets. The servlet will then query these via their
SOAP interface (which you must define) whenever anyone does a
search. That is, when a user (owner or not) does a search on the
servlet, the servlet will search its own databse as well as
query the other SOAP services it knows about asking them to do
the same search on their local databases.
Requirements
The specific requirements you need to satisfy are:
Technology
- You will be using Amazon
web services. Namely, their SOAP version. You will need to
download their toolkit and register with them for a token. Here
is their WSDL
file.
- You will be using Tomcat and Axis
- You will be reading and writing information to an XML file
that obeys the bibtexml-strict.dtd. Here
is a sample XML
file that obeys this DTD. Note that you do not need to use
all the fields provided by the DTD (namely, you will only be
storing books) but those fields you do store must conform to the
DTD. More information on this DTD can be found here.
User Interface Functionality
- Only the owner can add books. You can hardcode the
user/password of this one user in the code. But, make sure you
tell us what it is.
- The dialogue to add a book first asks the user for some
keywords then the servlet does an Amazon title search on that
and show the user all the matches asking him to pick from
one. The user can then pick one, hit "Add" and the servlet adds
that book to the database.
- The search dialogue asks the user (anyone, in this case) for
some keywords. The servlet then does a search on its local
database of books and ask all the other servlets that it knows
about to do the same search.
- There is another dialogue that asks the user to enter the
URLs of the SOAP services provided by other copies of this
servlet running on other machines. These are used when
performing the search from step three.
- The page that displays a book must contain
- title
- author
- isbn
- the medium sized image of the cover
- the list price
- the status of the book: who owns it, and for each of those whether they have lent it out or not
- at your discression, you can display more of the information that Amazon provides (reviews would be nice!).
SOAP Interface
- As you've gathered, your servlet also exposes a SOAP
service. This service consists of one call to do a keyword
search on the local database and return any hits. You can use
ISBN numbers as the unique identifiers.
Submission Instructions
As will all the problem sets, you will hand them in using our
department's dropbox. You will hand in:
- a .war file that is ready to run (assuming Axis is already installed),
- a README file should be part of that directory and include
the academic integrity statement below and step by step
instructions on how to run your servlet using three machines,
- when first started the servlet should read an XML database that you provide which contains 10 books.
Name(s):
email(s):
I understand that it is the responsibility of every member of the
Carolina community to uphold an maintain the academic standards and
integrity of the University of South Carolina. Any member of the
University community, who has reasonable grounds to believe that an
infraction of the Code of Student Academic Responsibility has
occurred, has an obligation to report the alleged violation.
I certify that I have neither given nor received unauthorized aid on
this problem set.
Questions
Q:Are we required to have user logins for each
individual wanting to search our database or is the owner the only one
required to login? Also, who is allowed to enter the URLs of other SOAP
services?
A: Each servlet should have one "administrator"
account. Only the administrator is allowed to to enter
URLs. Everyone is allowed to search, without the need to login.
José M. Vidal
Last modified: Mon May 3 10:06:01 EDT 2004