36 WCTME: Application Development and Case Study
DB2e sync server is only done when the application's Sync button is selected.
The sync server must be running.
Only a small subset of the information the server contains should be synced
down to the device. Ideally this would be only the customers and contracts for
today at your location. The application would only display customers who:
Expect to arrive in the near future
Should have arrived in the resent past
For example, if our small rental company database server had 100,000 pending
contracts all over the country for 65,000 customers, you would not expect to sync
all of that all the time. Filters on the server would sync only the content
appropriate for the device client. For example:
Sync only the contracts for your airport location and for today. This could be,
125 records, for example.
Sync only the customers for those contracts, 125 unless someone has
multiple reservations. Because each customer’s photo is 10,000 bytes or
less, the first sync of the day would take longer than a sync that updates
status only.
The application would filter that data down even more by displaying only
customers arriving within the next hour (10) and those that should have
arrived in the last two hours(20).
Note: The application does indicate known flight delays, but does not take any
further action on that information.
Since this application is just a demonstration, we do not handle every real
use-case. For the purposes of our simple sample application, we do not include
airport, date or time in our database tables. This makes the demonstration
repeatable with out any unnecessary complications.
See Figure 2-4 on page 27 for how to configure the database server settings that
the client uses.
MQe Server
When showing this example application, the MQe server does not need to be
running because the message will be queued. MQe messages are only queued
up to be sent to the server when a customer is marked as arrived, but real-time
responses with updated vehicle location information will happen only if the MQe
server is up and functioning.
There can be a short delay in the delivery of MQe messages, so it will be
necessary to refresh the screen once the message arrives.