Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

controllers

 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

In my project I have a 3 tier architecture. One is the client,server and the firewall.
1)My task is to monitor data from the firewall that is every say 30 seconds
2)So the data from the firewall is dynamic
3)The actor clicks a button which then it should contact server which in turn contacts firewall to get data
4)now im actually modelling sequence diagrams
5)here my actor is administrator
6)boundary object is my gui client
7)business object or entity object is in the server
8)Now I im maintaing a thread in the server which collects data from the firewall
9)Im making a socket object and a log object to hold the transient data from firewall
10)client first makes a socket connection to server
11server makes a connection to firewall
12)Now the thread runs and collects data
13)Can i put the objects thread,socket and log in one class
14)the thread and socket shud close when actor clicks stop on the GUI

here is there a necessity of controller.
bye
nitin
 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
can anyone give me the solution for this
bye
nitin
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'd love to help, but I'm not sure what you are asking. You have give some of the steps and components in some sort of design, but I can't work out what you are asking about it.
Would it be possible for you to expand on what you are asking from us?
 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi frank
I have defined the communication diagram.I would like to if we at all need a controller for this.
Im going for a sequence diagram
bye
nitin
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm afraid I still don't understand. In particular I still don't understand what sort of answer you want.
I have defined the communication diagram
So are you just drawing pictures of this system at the moment, or are you involved in some other sort of design as well. Do you want help with drawing pictures, or are you happy with your pictures and want help with some other aspect of the design ?
I would like to if we at all need a controller for this.
Can you clarify which part of the design you are looking at when you consider a "controller"? For example, are you talking about some sort of low-level routing system (hardware or software) to connect the "server" and "firewall"? Or are you talking about some sort of architecture or pattern for building one or other of these systems ? Or something else entirely.
Perhaps it would help if you described the sort of answer you would like to receive from us.
 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
yeah
Im actually talking at the server side .Do we need a controller to create a thread to get the data etc.And connection to firewall.Hope u get me
bye
nitin
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitin,
I will try to help here
13)Can i put the objects thread,socket and log in one class

Yes you can, but here's the question. You are using Sockets to connect, so can mutliple threads contact the Firewall each with their own sockets? or is there just one client contacting the Firewall to get the data and log it?
If the latter, then yes again to 13, except you would want your actual logger information running from the client. You would pass the Firewall object back to the client to interpret that data and log it.
You would need a controller for just the Buttons of the GUI, if you really wnat to spereate it out correctly. Know you really only have mabe just two buttons but the controller needs to work with the Sockets, so that is were the bulk of your code will be, and therefore better to have one.
I hope that is what you are looking for and asking.
Mark
 
nitin kumar
Ranch Hand
Posts: 105
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi mark
There is little modification.
Here there is one client, one server but many firewalls
2)the server has a thread to each firewall .In this thread the server reads data from a particular firewall
3)The server manages to get data from the firewall
4)now Im taking a class putting the thread socket .In server there are actually 2 threads one main thread to run ServerSocket as soon as it accepts connection from firewall dynamically a child thread is created which handles the communication between the management server and firewall
5)now a controller should be between boundary object and entity here what could be my boundary and what could be my entity objects
bye
nitin
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic