Hi I am having some trouble understanding how the data access tier and the logic tier interact within the architecture. For the record the application will be an Android exclusive social network
- The presentation tier is an Android device
- The logic tier will be a RESTful API being consumed by the Mobile Device. this tier will use JavaEE JAX-RS/Jersey/Tomcat located on server A
- The data tier is a MySQL DB using JavaEE JPA/Hibernate located on server B
From my understanding the Data tier "delivers" JSON containing the data back to the business tier which then parses/performs whatever computations on the JSON
What confuses me is, what is the deliverable from the logic tier? What should the logic tier actually send to the data tier, I mean ultimately all the logic tier should need to do request from the data tier is "I need this data" right? But what form should this request take?
What is N-Tier architecture? seems to indicate JSON or some kind of encrypted data containing an SQL query (I cannot/should not execute the query from the logic tier as it is on a seperate machine to the DB). But is it ok to send a DB request over the web from the business logic tier to the data tier?
I have also looked at DTO/DAOs which sound like they may be the solution I am searching for, but I am unsure.
Thanks for any help you can offer!