• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Architecture

 
Ruben Guillen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear All

I would like to have your feedback on the architecture of my project.

I decided to have the following layer division, see attached file.

Also the instantiation of the modules will be as indicated below:

Mode default (Stand-alone)
init Client
init Server
init Service with Stand-alone implementation

Mode Client
init Client
init Service with Network implementation
init Network for client

Mode Server
init Server
init Network for server

Comments are welcome.

Regards.

Filename: ArchProject.bmp
Description: Architecture
File size: 960 Kbytes
[Download ArchProject.bmp] Download Attachment
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Your architecture looks good. Given you are planning to use service layer, it will come down to how you group the network and stand-alone modes into a single service for the client to instantiate. Now this may be bit tricky designing just the service layer.
 
Ruben Guillen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear K. Tsang

What I have in mind is to consider the service layer more like a mecanism to comunicate to Database Layer. when being in Stand-alone mode or client mode the service layer will be instantiate always with the UI, in this way the only condition will be just to use the correct implementation in order to comunicate with the database layer. Now processing will be at the database layer. Probably myself I just using incorrectly the terminology service layer, and most would be something like Service Locator J2EE Pattern and in fact the service layer will at the server.

Taking in account the said above then the instantaition of modules will be as follow:

Mode default (Stand-alone)
init Client
init Service Locator with searching of services through stand alone configuration.
init Service layer
init Database Layer

Mode Client
init Client
init Service Locator with searching of services through Network
init Network for client

Mode Server
init Service layer
init Database layer
init Network for server

Now it is more clear I think.
 
K. Tsang
Bartender
Posts: 3583
16
Android Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hmm thinking about it I think your init sequence is kind of wrong or yes the terms you used are wrong. In my project the flow looks like this:

For stand-alone
1. open GUI for config (enter db location)
2. determine which service layer (local) to init
3. init service
4. get data and display results to JTable

Similar for network client
1. open GUI for config (enter server IP and port)
2. determine which service layer (remote) to init
3. init service
4. get data and display results to JTable

For server
1. open GUI for config (enter db location)
2. init service
3. server is ready for connection
 
Ruben Guillen
Greenhorn
Posts: 28
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Dear K. Tsang

Thank you very much for the information. I will spend some time this week-end to create code based on this architecture.

Regards.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic