brado426 wrote:I guess what kind of bothers me is that it seems inefficient to be transmitting all that XML back and forth between the application server and the data server. Perhaps that is an old-school concern with today's abundance of processor, memory, and bandwidth.
Even then I think we still need to be sparse but what is larger: An entire database of church information (cut down to what the user could use), or a short response to a query?
What I mean is though you may reduce total traffic, the speed of a 56 Kbit modem could handel the speed needed to transmit the XML formatted data that a human interacting through a program could use in real time. For example (might not apply to this thread but the idea is the same):
Someone has written a program that interfaces with LUWS ward list and displays photos if avaliable. (The photo part might take longer to do since over 56 Kbits that can bottleneck)
The program connets to the API interface (less then 5 KB of data or less then a second for connection time)
Program sends an XML formatted command to the API to get a list of ward members and it gets back an XML formatted list of members with phone address and picture IDs (I'll be generous and say that was 15 KB of data or abour 2 seconds). (The program then starts to download each picture by sending a XML request with the picture ID (This could end up in the MBs but since it is being run in the background as another thread the user only notices that the pictures take time to show and not any interference with the program)
The person wants to look at a detailed view of the family (maybe children with ages and personal email address and cell phone numbers) they click the family and the program sends a request for that family ID to get an XML table of the information of that family (5KB or less then a sec)). (The photo thread is still in the background getting pictures so there might be a slight delay for one image to complete and to get this request through but some good multi-threaded code should be able to make this effect disappear)
The user got his information and then closes the program and to the user it seems that the program was very fast.
Now if you download the entire database first (let's say pictures are store in the database too) you will have to download a multi-MB file before you could even start and the user has to wait a long time.
Hopefully this example shows why I think getting the entire database is not only wasteful but a bad idea personally.