Using the Internet domain sockets, Interest Groups implements a network application that supports interest-based discussion groups.
CSE 310 Computer Networks course project
Authors: Liwen Fan, Jia Sheng Ma, Melanie Lin
- What it does
- Documentation
- Rules of the Game
- Demo of the Game
- How we built it
- Challenges we ran into
- Accomplishments that we're proud of
- What we've learned
- What's next for Interest Groups
Using the TCP socket, Interest Groups implements a network application that supports interest-based discussion groups.
The implementation consists of a client program and a server program. The client program allows an application user to login to the application, browse existing discussion groups, subscribe to those groups that are of interest, and read and write posts in a subscribed group. The server program maintains all the discussion groups, updates the posts in each group, and interacts with clients to support user activities.
Browse to the server folder
$ cd InterestGroup_S/
Create a new build folder
$ mkdir build
Compile with
$ javac -cp lib/jackson-core-2.8.2.jar:. src/*/*.java -d build/
Browse to the build folder
$ cd build
Run the project with
$ java -cp ../lib/jackson-core-2.8.2.jar:. interest_group_s.InterestGroup_Server HOSTMACHINE PORTNUMBER
All discussion groups are hosted at a single server. Each user must use an unique ID to access this single server to participate in discussion groups.
We decided to use the TCP protocol because all data transferred between the server program and the client program, including login credentials, browsing history, and discussion groups information, cannot tolerate data loss. We also decided to use JSON to store these data because JSON organizes its content in key-value pairs.
Next, we designed the TCP protocol involved for transferring data, as well as other supporting elements such as how discussion groups and user posts are formatted, stored, and accessed and how user history is formatted and maintained.
Finally, we wrote handlers on the client program for commands that do not involve saving or retrieving data from the server. This approach reduces the number of messages exchanged between the client and the server, and may allow the server to more efficiently support a large number of clients.
Interest Groups aims to provide a multi-server environment