Skip to main content

Posts

Showing posts from September, 2019

Developing Dynamically Created Processes

Developing Dynamically Created Processes Throughout the past couple of weeks I have been developing the ability for my system to create dynamic processes/mobile agents. At first I struggled to develop such a capability, but after reworking code already provided by ' U sing Concurrency and Parallelism Effectively ' I was able to get a basic concept of what I want to do. I copied the code I found in Chapter 18 and got it to a point where I could create multiple of the same process, however it was not implemented with my existing infrastructure. After I got the dynamic processes working I then started to try and manipulate the existing code so that it would allow communications between each of the processes and the parser - the next step would to be allow the parser to contact specific nodes/processes and to create them when they are required. After this I then created a simple email receiver that will email will pass from the sender to the server where it will be ...
Reimagining this project. After spending some time developing GUIs for the email clients I then decided that this was unnecessary as the idea behind this project was to show how parallel programming can be used within Cybersecurity. So, I decided to restart the email client side of the project and recreate the process in Groovy instead of Java as the GUI was unnecessary and doing it this way would allow me to simulate mass amounts of emails being processed a lot easier. Each email client process will send a message with a subject and user id, simulating a real email being sent through the server. I have also now used the built in communication channels that come with JCSP instead of using sockets to communicate the message. In future these communication channels will be net channels.
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 a...