简体   繁体   中英

Architecture Java EE ? many ressources : database, xml

I have a Java application and now I want to make it an web app. Now I think about how to make the architecture of this app.

In fact, I have many resources, matlab, exe files and XML files and a MySQL database. so we will have a 3-tier architecture.

Client: Browser
Treatment: Java EE server (maybe Servlet and EJB container)
Data: matlab, exe files and XML files and a MySQL database

So, how can I create this application without having a problem even if we have several clients connected which sends many queries at the same time?

Knowing that the processing is calling an EXE and reading and writing XML files, and execute MATLAB.

More details

INPUT -RESSOURCE-> OUTPUT

image(query) -exe-> XML

XML -JDOM-> Java Objects (List)

Java Objects -JDOM-> n XML files

n XML files -JDOM-> txt files

txt files -matlab-> txt files

txt files -MYSQL-> java objects (List)

txt files --> Images (results)

This is pretty broad question. So I will keep my answer at a high level and we can dig deeper as you have more questions.

Initially this is how I would structure the application.

  1. Pick a MVC framework. I would pick JSF2 but anything else is fine too. Your view and controller layer will be defined here.
  2. Create 3 DAO classes at bare minimum - one for reading data from XML, one for reading data from mySql, and one for reading text files. To parse XML files you can use XPath and ofcourse SQLs to get data from the database.
  3. Create a MDB to asynchronously kick off the EXE process via JMS .
  4. Package the application as an EAR file.

Tools you can use:

  1. Eclipse for IDE
  2. JBoss-AS (or any other container that you have access to)
  3. Some sort of build/packaging tool (ANT, Maven, etc)

I am not familiar with image manipulation so I can't comment on that part. However, I think you need to break down your design into various components first. That's why I started listing the ones that I could think of without enough details. So image query will be one of the components. Try to create a black box diagram of the system with each major component in & out. After that start developing each of them and then I bet a lot more folks here can help you with more specific questions. Does this make sense?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM