Hey everyone,
Ok so what im trying to do is refactor a recent project into a client/server architecture. Here's the version i want to refactor.
festivalplanner.net
The server will connect to the database and serve the festival info to the clients connected. I know how to setup sockets and setup a basic client and a basic server after reading some simple tutorials.
Here are two scenarios of what a client should be able to do.
1. The client makes a request to the server to list all festivals.
2. The client makes a request to see events for a certain festival.
How do i do this on the server and the client
Client Code
try {
Socket s = new Socket("localhost", 4892);
//input
InputStreamReader streamReader = new InputStreamReader(s.getInputStream());
reader = new BufferedReader(streamReader);
//output
writer = new PrintWriter(s.getOutputStream());
System.out.println("Connection established to Server");
}
Do i do something like writer.write("Get Festival List"); for scenario 1.
Anybody have any experience with stuff like this that could point me in the right direction?