vol21.4bacp 4 IASSIST Quarterly A Web-Based Archive of Psychological Experiments: Challenges for Client Server Interactions by Ruediger Oehlmann * Abstract: The Virtual Psychology Laboratory (VP- Lab) is an ongoing project which will provide psychology educators, students, and researchers with a tool that supports the analysis, modification, and re-execution of previously archived experiments. The archive will include experimental materials, designs, procedures, and results which will be submitted by active researchers and educators. A user will be able to access VP-Lab via the World Wide Web using one of the widely used Web browsers. The paper identifies several requirements of providing psychological experiments in the World Wide Web. In addition, it discusses an approach to Web programming which satisfies all the requirements. Introduction With an increasing body of psychological research, archives became interested in providing their services to the psychological community. First attempts in this endeavor involved archiving abstracts of psychological research papers and developing a suitable thesaurus (American Psychological Association 1992, 1994). An approach which goes far beyond archiving abstracts is currently taken by the Virtual Psychology Laboratory (VP- Lab) project, a collaboration between the School of Psychology at the University of Cardiff, The Data Archive at the University of Essex, and the Computers in Teaching Initiative, Centre for Psychology at the University of York. It is the objective of the VP-Lab project to provide facilities for archiving complete psychological experiments which will be submitted by active researchers and educators. The user will be able to access VP-Lab via the World Wide Web using one of the widely available Web browsers. The implementation of such a comprehensive service requires an understanding of the elements of psychological research. Given that Psychology is such a diverse discipline, it is not surprising that the field relies on a wide range of methods. Most psychological research methods have the objective of answering empirical questions about behavior or experience by controlled observation. A basic instrument of the empirical approach is the experimental method (Davis 1995, Coolican 1994). We should note that in Psychology as well as in other social sciences other methods are used as well. For example during interviews and surveys, typically the researcher has less control over the environment in which the investigation takes place. The control over the experiment can be viewed as the characteristic difference between the experimental method and other research methods. The advantage of the experimental method in Psychology is that it is potentially capable of providing statistical quantifiable evidence for relationships between cause and effect. Thus the control of variables is an essential aspect of any experiment. There are two categories of variables: independent and dependent variables. Variables which the experimenter manipulates are referred to as independent variables, whilst variables which describe the experimental result are referred to as dependent variables. The statistical quantifiable evidence for relationships between cause and effect is reflected by these two types of variables. Typically, such relationships are formulated as hypotheses which form part of a larger theory. By making observations, the psychologist can make a statistical judgement as to whether or not a prediction is correct; that is predictions can be tested against the evidence . The experimental hypothesis proposes that the change in the behavior as it is measured in the dependent variable(s) is actually caused by changes in conditions of the experimental setting. These changing conditions are described in terms of the independent variables. Events which change the experimental setting in an objective way and which are capable of evoking a response from participants of the experiment are referred to as stimuli. Usually, the evidence cannot be obtained from the total population to which the hypothesis might apply. Therefore a sample of the relevant group is taken. Assumptions need to be made concerning the representativeness of this sample. The selected members of the sample or participants are put into a controlled situation; i.e. a situation where all relevant independent variables are controlled by the experimenter and where the dependent variables can be measured. However, controlling the independent variables does not suppress the variability in people’s behavior. This variability will influence the measurements taken from the Winter 1997 5 dependent variable. Therefore the experimenter will be faced with a whole range of different scores by participants. The question to be decided is whether the differences in the scores are the result of manipulating the independent variables, or are the result of chance fluctuations in people’s performance as stated by the null hypothesis. In other words, are the score changes significant in support of the experimental hypothesis? The experimenter decides this question by performing an analysis of data which involves suitable statistical tests. A considerable amount of psychological research follows the general schema of the experimental method as it is outlined above. Currently, researchers obtain information about previous experiments mainly from journal publications and conference proceedings. This method has two disadvantages: 1. Identification and evaluation of relevant previous work can be very time consuming. 2. Even journal publications often may not contain the degree of detail which is required to repeat or to modify a previous experiment. The aim of the VP-Lab project to overcome these limitations is addressed by making all the details available in the World Wide Web which allows a comparatively fast access to archived information. In addition, this approach enables the archivist to provide more detailed information about an experiment than is possible in a journal paper. In this paper, we will argue that: 1. the Web-based provision of detailed information about psychological experiments requires a) interactive content, b) secure access, c) interface-database connectivity, and d) platform independence. 2. given the current state of the art, the programming language JAVA satisfies these requirements. In the remainder of this paper we will address these claims by inspecting the various components of a psychological experiment in detail (Section 2). This inspection will indicate the requirements for a Web-based provider of psychological experiments. In Section 3, we will describe an approach to Web programming which is based on the programming language JAVA. Finally, in Section 4, we will discuss the merits of this approach from the perspective of providing executable psychological experiments on the World Wide Web. Psychological Experiments In this Section, we will describe the various components which constitute a psychological experiment. From this description, we will then derive technical requirements which have to be satisfied if we wish to provide psychological experiments in the World Wide Web. Typically, descriptions of psychological experiments identify the experimental components: materials, design, procedure, and results. Before we discuss these components, we consider an experiment which will provide the basis for the subsequent sections. An Example Experiment The example we choose is an experiment1 which has been described by Klein (1994). The experiment was based on previous work (Stroop, 1935), in which the reaction of participants who had to identify the colors of ink they saw was measured. In the experimental condition, the participants were presented with words which represented colors such as the words red, blue, and yellow. However, the words were printed in a color which differed from the word’s meaning. For example, the word red was printed in the color blue. In the control condition, participants just had to identify color spots. The reaction time in the experimental condition was significantly longer than in the control condition. This was explained with an interference of the color identification by the processing of the word meaning. Klein studied such inference by varying the meaning of the stimulus words. He compared conditions in which the word was either a nonsense syllable (e.g., BJB), a word that implied a color (e.g., grass), or the name for a color (e.g., red). Then he measured the time his participants required to identify the color under each of these conditions. Materials In the introduction, we have emphasized that changes of the experimental setting described in independent variables play a central role in any experiment. Sometimes this setting involves a complete well designed environment. For example, a developmental psychologist might place a child in a play room with particular toys. Often, changes are achieved by presenting participants with pre-defined text, image, or sound samples. This type of materials can be presented by using a computer with multi-media capabilities. For example, the word stimuli we described in the previous section can be displayed on a computer screen. In addition to these types of information, materials include computer programs to generate and present suitable multimedia files. The programs may be stand-alone programs written in a multi-purpose programming language, or they may have the form of script files which can be read and executed by a commercial experiment generator. 6 IASSIST Quarterly The materials characterized in this section are different from data which can typically found in social science archives. First, stimuli which are contained in the materials are suitable to control the independent variables of an experiment. We have emphasized above that this aspect does not play such a central role in studies which are based on surveys rather than experiments. The need to control independent variables will have consequences for indexing stimuli. For example, a researcher who wishes to use a given stimulus in another experiment has to ensure that the independent variables in this experiment are controlled appropriately. Therefore, the variables to be controlled have to be considered during retrieval of the stimuli. The second important difference to data usually found in social science archives is the need to archive computer programs. Moreover, these programs have to be indexed in a suitable way. The support provided by current psychology thesauri such as APA’s thesaurus (American Psychological Association 1994) is very limited. Moreover, the task of archiving programs raises the problem of maintaining programs over long periods of time. Design For every experiment, it is crucial to group participants and to present stimuli in a way which avoids bias towards a particular experimental result. These general principles of the experimental setup in terms of conditions, participants, and variables used are described as design (Kirk 1995, Leon & Austin 1996). For example the layout of Klein’s experiment mentioned above can be characterized as a three levels of one-factor, between-subjects design. It is based on one independent variable, the word presented to the participant. The three levels are given by the experimenters choice between a nonsense word, an implied color word, and a color name. This design is referred to as between subjects design, because subjects or participants were randomly assigned to each condition without regard to the participants in other conditions, and each participant serves in only one condition. In contrast, a within-subject design would be a design in which the same subjects are repeatedly measured in different conditions, or each subject in one condition is matched with each subject in another condition. In addition to topical retrieval goals, such design characteristics could be used by VP-Lab to retrieve an experiment. However, similar designs are used by a number of different experiments. So design characteristics alone will not uniquely describe a particular experiment, additional characteristics are required. Procedure Whilst the experimental design describes the general arrangements made for an experiment, the procedure provides the detailed steps to be followed in performing the experiment. Therefore the procedure often follows a temporal sequence. They begin with summarizing the instructions given to the subjects and proceed through the tasks performed by the subjects in the order in which they were performed. Results During the experiment all the responses of the subjects are carefully recorded. Often this type of information may be obtained automatically using computers. These raw data are then analyzed to determine the significance of the result. The statistical method used for data analysis is determined by the chosen experimental design type. For example, the method used by Klein in his experiment of the Stroop effect is the one way, between-subjects Analysis of Variance. This method should be employed in a between-subject design with two or more levels of one factor. The method of analysis of variance is a procedure which enables the experimenter to determine whether significant differences exist in an experiment involving two or more sample means (Greene & Oliveira 1995). Such statistical methods can be used to index an experiment. A student may later retrieve the experimental data as example data for the given analysis method. Requirements: I have provided information about the typical components of a psychological experiment because this provides important indications of the requirements a Web-based experiment provider has to address. Interactivity Interacting with stimuli may not be just a two step process of presenting stimuli and recording the response; it may be a sequence of interactive steps. The presentation of a stimulus may even depend on a previous response. Furthermore, a participant might be required to interact with a specified part of a stimulus such as a particular area in an image. Therefore the presentation has to include executable content. This is a feature which allows different responses and supports different reactions of the stimulus depending on the response. Platform Independence Typically, an experiment is developed by using a particular computer system, usually one known or accessible to the researchers. There is no need for them to consider portability to other systems. However, a Web-based experiment will be used by a large number of users with different computers and operating systems. Interface-Database Connectivity The various experimental components have to be stored in a database. Rather than just addressing the issues of interactivity and platform independence, a Web-based provider of psychological experiments has to address the question of how to connect an interactive and platform independent browser with the database. A researcher who interacts with VP-Lab may be merely interested in a particular type of stimuli rather than a complete experiment. Therefore the connection has to be achieved in Winter 1997 7 a flexible way which supports the interaction between user interface and single experimental components. Security In all Web applications, security issues ned to be taken very seriously because networked computer systems are by definition more vulnerable to attacks. In addition to these general considerations, providers of psychological experiments have to ensure the confidentiality of participants. Often psychological data obtained from a single participant reveal highly personal information. This problem appears only to a smaller degree in journal publications because they contain the results of the data analysis rather than the raw data. In addition to the protection of the rights of participants, we have to consider the protection of the rights of the researcher who deposits the experiment. Sometimes in the course of research, highly sophisticated software has been developed over a long period. The researcher may wish to distribute the experiment in terms of stimuli, design, procedures and results, whilst restricting the distribution of the software for generating the stimuli. Providing Psychological Experiments via the Web The requirement that we have identified in the previous section can be addressed by programs written in the programming language JAVA. Interactivity JAVA is a programming language developed in 1995 by Sun Microsystems (Gosling, Joy, & Steele 1997). It is used to create executable content which can be distributed through networks. The JAVA concept distinguishes between two types of code; stand-alone programs referred to as application and pieces of code that are linked to a Web page and sent as executable content through the Internet. This type of program is referred to as applet. In order to view JAVA content on the Web, a user’s browser must be JAVA enabled; i.e., the browser has to be integrated with a JAVA interpreter. An increasing number of Web browsers have this feature. An early example of this type of browser is Netscape Navigator. The content downloaded by a Web browser can include a variety of multimedia documents. If the browser receives a user request, it downloads content that describes a Web page (Figure 1). The Web page can contain a particular hypertext tag called APPLET. When downloading a Web page containing an APPLET tag, the JAVA-enabled browser knows that a special kind of JAVA program called an applet is associated with that Web page. The browser than downloads another file of information, as named in an attribute of the APPLET tag, that describes the execution of that applet. This file of information is written in what are called bytecodes. The JAVA-enabled browser interprets these bytecodes and runs them as an executable program on the user’s computer. The resulting execution then drives the animation, interaction, or further communication which is again displayed by the browser. The overall pattern for the use of content is selection of content by the user, downloading, executing, and displaying of content by the browser. This process in itself already provides considerable support for interactions between a user and psychological experiments described as executable content. However, JAVA has two other supportive features: It is object-oriented and multithreaded. The term object- oriented means that components of an experiment can be represented as separate objects (classes in the JAVA terminology) which store the functionality of the components in the form of methods. This concept supports a highly modular approach because changes in one experimental component could be made independently of other components. Moreover, experimental components would be the building blocks of an experiment on the implementational level rather than just on the conceptual level. The term multithreaded refers to a pseudo-parallel approach. Typically, computers have only a single processor; therefore parallel execution of several programs in the strict sense is not possible. However, JAVA programs can direct the processor in those parts of the program to be executed next. These parts can be very small and a fast switch from one part to the other gives the impression that these parts are executed in parallel. Therefore multithreading also supports rapid interactions between a user and a pre-stored experiment. Platform Independence We pointed out that JAVA applets are transported over the Internet in a particular form which we referred to as bytecode. Every computer that can execute JAVA code has a machine specific interpreter that translates bytecode into machine code. This is the reason why JAVA programs are machine independent; i.e. the same program can be executed on a UNIX system, a PC, or a Macintosh computer. Interface-Database Connectivity The JAVA language includes several tools that extend the language to different tasks. One of these tools supports connections between JAVA code and relational database systems. This tool is referred to as Java Database Connectivity (JDBC) and defines every aspect of making data-aware JAVA applications and applets (Jepson 1996, Patel & Moss 1996). In using this tool, the developer does not need to be concerned about the database-specific syntax when connecting to and querying different databases. Another advantage of this approach is that changes to the applet code can be minimized when the database system is changed. The JDBC concept has recently been extended to a JAVA based three-tier architecture. Typical client server interactions are based on two types of computer systems: a central server that maintains the database and a number of clients that maintain the user interface to the database. In a three-tier architecture this concept is enhanced by an 8 IASSIST Quarterly additional middleware server that connects with the database server on one side and with a number of clients on the other (Symantec 1996). This approach has several advantages. For example, the client systems are easy to manage because no application or database software is required to be installed on the client side. Any system with a JAVA enabled web browser will work as a client with no additional software. The system is easy to program because all code is executed on the client system. The developer of application programs accesses neither the middleware server nor the database server. Security It is the basic principle of the applet approach that JAVA code is downloaded to and executed by the client computer. This involves a considerable potential security risk. Therefore the JAVA language includes the most sophisticated security system of any programming language (Breedlove et al. 1996, Morrison et al. 1996). The complexity of this system is clearly beyond the scope of this paper. However we will discuss some of the basic ideas. JAVA programs can be viewed as a set of classes which in turn can be built-in or user-defined. We focus on the security check for user-defined classes. Each class is checked by three different sub-systems: the JAVA verifier, the class loader, and the security manager. The JAVA verifier is used to check the bytecode to make sure that the safety features of the JAVA language are followed. After incoming code has been checked by the verifier, the protections in the Java class loader are invoked. An important function of the class loader is to avoid overriding of filesystem source classes. It also makes it impossible for a file system source class to access a network source class by accident. Finally, the security manager is used to provide a flexible access control mechanism. Any time a Figure1: JAVA’s View of Client-Server Interaction Winter 1997 9 non-built-in class accesses a system resource such as a file, it must first ask permission from the Security Manager. Ordinary classes are prevented from bypassing the Security Manager because none of the system resources are available to them. Conclusions In the introduction to this paper, we have described the objective of the VP-Lab project as to provide an archive of psychological experiments which can be performed over the World Wide Web. In context of this task we have argued that 1. the Web-based provision of detailed information about psychological experiments requires a) interactive content, b) secure access, c) interface-database connectivity, and d) platform independence. 2. given the current state of the art, the programming language JAVA satisfies these requirements. We have considered typical components of psychological experiments to illustrate the need for interactive content, platform independence, database connectivity, and secure access. Finally, we have addressed these requirements from the perspective of the general purpose programming language JAVA. We will now evaluate this perspective in terms of the identified requirements. This evaluation will be biased because our viewpoint is how useful the language is for supporting the provision of psychological experiments rather than JAVA’s general usefulness for other types of applications. Nevertheless, several of our requirements can be regarded as general requirements for numerous Web applications. Interactivity JAVA code is downloaded rather than executed on a Web server. Therefore performing a psychological experiment will not depend on the load imposed by other users on the Web server. It just depends on the capabilities of the client computer. Downloading JAVA applets can be used to modify the interface of the Web browser. This has two advantages. First, VP-Lab can integrate a standard Web browser with a state-of-the-art interface for browsing its archive and supporting the psychologist in various experimentation tasks. Second, in performing a pre-stored experiment, the interface can be changed automatically to the type of screen used in the original experiment. Platform Independence JAVA programs are executed by the client machine; therefore a very important issue is whether they can be executed by machines of different types under different operating systems. Otherwise, the usability of these programs would be very limited. JAVA applets are already available in the Internet and their platform independence can be tested. The same applet can be downloaded and executed by a PC, a Macintosh, and a UNIX system. In addition, an increasing number of Web browsers have become JAVA-enabled. Interface-Database Connectivity The JDBC-based three-tier approach reduces the programming effort for the actual link between the application program and database because a considerable proportion of this link is already provided by the middleware server and needs only to be adapted to the particular application. This adaptation is performed on the client side rather than on the side of the middleware server or database server. In addition, the middleware server is embedded in a high-level development environment that reduces the programming effort further. Security JAVA controls have by definition no capabilities to read or write to the local file system or to make any operating system calls. Furthermore, JAVA uses a runtime verification of its code. Using bytecode has two advantages from the security perspective. Bytecode can be checked for security violations and it allows accessing of methods and variables by name rather than by number. This makes it easier to determine what is being used and to protect from misuse. All these considerations led to the decision to implement VP-Lab in JAVA. We should note however that VP-Lab is a short-term project that requires a decision about facilities which are immediately available. In a few years time the situation may change. However, we expect that future Web programming languages will incorporate JAVA concepts such as machine independence and multi-layer security mechanisms. However, even more important than these technical aspects will be the fact that psychologists do not need to be aware that they are interacting with JAVA applets or with the World Wide Web. All they will see is an archive of experimental materials, designs, procedures and results. References American Psychological Association (1992). PsycINFO Psychological Abstracts Information Services users reference manual. Washington, DC: Author American Psychological Association (1994). Thesaurus of Psychological Index Terms. 7th ed. Washington, DC: Author. 10 IASSIST Quarterly Breedlove, B. et al. (1996). Web Programming Unleashed. Indianapolis, IN: Sams Publishing. Coolican, H. (1994). Research Methods and Statistics in Psychology. 2nd ed. London: Hodder and Stoughton. Davis, A. (1995). The experimental method in psychology. In G. M. Breakwell, S. Hammond, and C. Fife-Schaw, Research Methods in Psychology. London: Sage Publications. Gosling, J., Joy, B., & Steele, G. (1997). The JAVA Language Specification. Reading, MA: Addison-Wesley. Greene, J. & D’Oliveira, M. (1995). Learning to Use Statistical Tests in Psychology. Milton Keynes, UK: Open University Press. Heiman, G. (1995). Research Methods in Psychology. Boston, MA: Houghton Mifflin Company. Jepson, B. (1986). JAVA Database Programming. New York: John Wiley. Kirk, R. (1995). Experimental Design. Procedures for the Behavioral Sciences. 3rd ed. Pacific Grove, CA: Brooks/ Cole Klein, G. S. (1964). Semantic power measured through the interference of words with color-naming. American Journal of Psychology, 77, 576-588. Leong, F. & Austin, J. (1996). The Psychology Research Handbook. Thousand Oaks, CA: Sage Publications. Morrison, M. (1996). JAVA unleashed. Indianapolis, IN: Sams Publishing. Patel, P. & Moss, K. (1996). JAVA Database Programming with JDBC. Scottsdale, AZ: Coriolis Group Books. Stroop, J. R. (1935). Studies of interference in serial verbal reactions. Journal of Experimental Psychology, 18, 643- 662. Symantec (1996). Evaluating network database architecture. White paper. Author. 1 This description follows closely a review given by Heiman (1995). * Paper presented at IASSIST/IFDO ‘97, Odense, Denmark, May 6-9,1997. Ruediger Oehlmann,University of Essex, The Data Archive, Psychology Unit Colchester CO4 3SQ, UK oehlmann@essex.ac.uk mailto:oehlmann@essex.ac.uk