|
Final Report
April 29, 2002
DLC Course, Spring 2002
By: John DeRiggi and Serina Croll
Statement of Problem:
Current media does not support real-time collaborative development across space. With the help of BeanShell, a java real-time interpreter, and networking solutions we believe it is possible to create an environment where developers can sit on different computers in different spaces and collaborate on learning new programming skills. Over the course of developing this program it became more apparent that the real challenge was not in creating a good development environment, but in creating a good networking design. As development took its course the complexity of design a peer to peer network became more and more apparent.
Rationale:
The intent of jumping into this project, is to improve both learning and collaboration in terms of development. Through this class we have learned that as the availability of information grows it is important that humans collaborate to make learning a community activity. When humans collaborate it makes it easier to utilize the available information.
As computer languages, such as Java, provide more and more functionality their API's become larger making it more difficult to utilize all the available features. With such large API's it is nearly impossible for one individual to know all the functionality provided by the Java Language. Using all the API's available in Java, or just knowing about their existence is more easily accomplished through collaboration. As is commonly stated "muliple heads are better than one."
In the article "Models of Teaching and Learning: Participation in a Community of Learners", Rogoff, B., Matsuov, E., & White, C.(1998), the authors discuss three different learning concepts one being a "community of learners." This model "...involving both active learners and more skilled parteners who provide leadership and guidance..." is the model that the new technology hopes to mimic.
Through this project we have designed a system where people can easily collaborate in programming. Users can log into a group of fellow programmers, and share code. The code is share by sending it between users in an environment similar to an IM window. As the code is sent it is also compiled on the recievers computer so the reciever can see the output of the code. Beanshell provides a real-time compiler that can give instant results of a person's work.
Technical Approach:
As mentioned above the project will require the use of BeanShell, an open source real-time java compiler. Since BeanShell is made for Java, Java is the most reasonable language to use for the rest of the development. Development will include a GUI interface, integrating BeanShell, and the use of the Java networking library.
The GUI interface four text areas, one area allows the user to type text messages to be sent to other users, one area displays the communication between users, the other is a code area where the user can edit their own code, and finally there is the area that displays the community code.
Integrating bean shell is three steps; 1) redirecting the input in the code area to the beanShell interpreter 2) redirecting the output from beanShell to the GUI 3)redirecting the error code from BeanShell to the user's GUI.
Implementing the networking scheme requires the use of java sockets and threads. The structure of the network is discuss in more depth later in the paper.
Description of the System:
As discussed in the "Technical Approach" section there are three technical elements to the system the network, beanshell, and the GUI. Each of these elements is discussed further in the following text.
The network schematic is escentially peer-to-peer. When a new instance of the program is opened the user is prompted for an IP address so that the system can connect to other users on the system. In each application there is a thread that is always listening. So after the system has the user's IP address it sends a message trying to connect with other people in the system. Every application that is open has a single thread listening. The listening thread sees a new user and sends the user a message with the IP of all connected users. To implement the the networking scheme there is a central server. The server keeps track of all the clients, by IP address, connected to the system. The server does not actually relay packets it simply allows the users to registar its IP so that the initial messages are sent to a specific system.
Tying BeanShell into the back of the systems did not require much more than opening and redirecting the proper I/O streams. In Java it is pretty simple to open new output and input streams and redirect their input or output. So once the input stream for BeanShell is mapped to the users text area the code is ran immediately by BeanShell. The same thing works with the output stream for BeanShell. As soon as the error and standard output are redirected the messages will appear in the appropriate window on the user's GUI.
Developing the GUI was a matter of using different objects provided by Java to create a simple user interface. The GUI provides buttons to send differnt types of messages. A text area to view the IM conversation amoungst all the connected users. An editable text area to type code, a third area to view the state of the community code, and finally an area to view the interpreter output.
In the end the system is similar to other development environments and it allows the user to collaborate with other developers in different spaces. The help of BeanShell also makes it easier to develop short test code and things that are more similar to scripts.
Description of the System's Behavior:
When the system is instantiated it immediately kicks off a listening thread that is always listen for new users that are requesting to connect. The IP address as specified by the user is sent off to a central server. Once the server registers the IP the instance is allows to connect with another user on the system. When the system sees that a new user wants to connect, it sends the new system a map of all the other connected systems. Thus although there is a central server that keeps track of the IP addresses the packets do not actually relay through the server.
Once the communication is up and running the user can send two types of messages to any of the other connected systems. The user can send an IM message or a new chunk of code. If a new chunk of code is recieved from a user it is immediately sent to the BeanShell and interpreted so the other users can instantly see the results of the code.
Each user can also develop and test their own code in a text area that the community does not see. This way the user can test their code before sending out to the world for scrutiny.
If a user is coding and suddenly runs into a problem or something they are not sure about they can simply query the other members of the community for some advice. A user can also instantly send the piece of code they are working on to the community and ask for advice on what is going wrong with the code if it isn't working.
Evaluation of the Program:
Potential Further Developments:
References:
http://www.beanshell.org
|
|