Skip to main content

Creation Of Server Process Version One

The first process that I thought was necessary to create was the Server process. I first created this process sequentially in Java to ensure that it worked the way I expected it too and then I ported it to
Groovy. The Server has three communication channels:

ChannelOutput outputSubject
ChannelOutput outputBody 
ChannelInput inputChannel

These channels do not handle the communication between the client and the server as that is done over sockets. They only handle the communications between the Parser process and the Server process. During run time the Server process will firstly try to establish a connection with the MySQL database I have running on a local server using this connection string:

con = DriverManager.getConnection("jdbc:mysql://192.168.0.33:3306/emailInbox","root","######")

After it has established the connection it will then create a new ServerSocket listening on port 3000 which will handle all connections between the Email Clients. During its running loop it accepts connections through the socket and once it receives an email it will pass the input to the Parser process and then insert the email into the MySQL database so the users can view the emails again. It will then return to the top of the loop awaiting another input.



Comments

  1. So during the first meeting 17-9-19 Rory told me that he had removed the database as this was not crucial for the project aims. Fundamentally you have a basic email server up and working

    ReplyDelete

Post a Comment