Point-Of-Sale
Business Application
System
Architecture
Project: Point-Of-Sale
Business Application
Date: January 28
th
2008
Revision: 1.0.1
Company: Quantum Blue Technology LLC.
Copyright Notice
Copyright 2005, 2006, 2007, 2008 Quantum Blue Technology LLC. All rights
reserved worldwide. This document is proprietary to Quantum Blue Technology LLC.
And may contain information that is to be maintained as Trade Secret. It is intended for
use only by Quantum Blue Technology LLC. Employees and its contractors, customer
employees, and authorized personnel. It may not be copied, translated, or transcribed in
whole or in part without the express permission of the copyright holder Quantum Blue
Technology LLC.
Quantum Blue Technology LLC
1424 Welsh Way, Ramona
California 92065
U.S.A.
Phone: USA (858) 837-2160
Email: info@QuantumBlueTechnology.com
Web: www.QuantumBlueTechnology.com
Please Note:
Due to ongoing design and development, Quantum Blue Technology LLC. May, at any
time, and without notification, amend and update either this document and/or the
associated POS Business Application software package.
Change History
Date Version Author Reason for Change
1/11/08 1.0.0 Steve McClure Initial Draft.
1/28/08 1.0.1 Steve McClure Added Process Description.
Table of Contents
1 SCOPE........................................................................................................................ 1
1.1 GENERAL ............................................................................................................. 1
1.2 ABBREVIATIONS................................................................................................... 1
2 SYSTEM DEVELOPMENT TOOLSETS.............................................................. 2
2.1 PROGRAM DEVELOPMENT ENVIRONMENT ........................................................... 2
2.1.1 Hardware System........................................................................................ 2
2.1.1.1 Development Work Station..................................................................... 2
2.1.1.2 Test Work Station.................................................................................... 2
2.1.2 Software System........................................................................................... 3
2.1.2.1 Compiler.................................................................................................. 3
2.1.2.2 CodeWright Editor .................................................................................. 3
2.1.2.3 Qsetup Composer .................................................................................... 3
2.2 PROGRAM DEVELOPMENT PROCESS..................................................................... 4
2.3 PROGRAM EXECUTION ENVIRONMENT................................................................. 4
2.3.1 Operating Systems....................................................................................... 4
2.3.2 Hardware Requirements ............................................................................. 4
3 SYSTEM ARCHITECTURE................................................................................... 5
3.1 LIMITATIONS WITH CURRENT POS PACKAGES..................................................... 5
3.1.1 Server / Network Hardware Failures.......................................................... 5
3.1.2 Transaction Posting data can be lost.......................................................... 5
3.1.3 Slow Report Generation and Database Size Limitations........................... 6
3.1.4 Database Backup and Restore Operations ................................................. 6
3.1.5 POS Systems are designed for accountants instead for business owners... 6
3.2 SERVER / CLIENT OPERATION .............................................................................. 7
3.3 DISTRIBUTED DATABASES ................................................................................... 7
3.3.1 System Database Header ............................................................................ 7
3.3.2 Server System Databases ............................................................................ 8
3.3.3 Client System Databases ............................................................................. 8
3.3.4 Quote Databases ......................................................................................... 8
3.3.4.1 Client Quote Database............................................................................. 8
3.3.4.2 Server Quote Database............................................................................ 8
3.4 PROCESSES (TASKS) ............................................................................................. 9
3.4.1 Timer Process.............................................................................................. 9
3.4.2 Network Process.......................................................................................... 9
3.4.2.1 Server Network Operations................................................................... 10
3.4.2.1.1 Auto Initiate specific database downloads ...................................... 10
3.4.2.1.2 Monitor Specific Database.............................................................. 10
3.4.2.1.3 Build POS Quote Database Summary............................................. 10
3.4.2.2 Client Network Operations.................................................................... 10
3.4.2.2.1 Server Drive Remap Attempt.......................................................... 11
3.4.2.2.2 Auto Initiate specific database downloads ...................................... 11
3.4.2.2.3 Monitor Specific Server Database................................................... 11
3.4.2.2.4 Verify License Registration ............................................................ 11
3.4.2.2.5 Obtain Updated POS Quote Database............................................. 11
3.5 DRIVERS............................................................................................................. 12
3.5.1 Cash Register Till Printer Driver ............................................................. 12
3.5.2 Cash Drawer Driver.................................................................................. 12
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 1
1 Scope
This document is the System Architecture Manual for the Point-Of-Sale Business
Application. This manual describes the internal operation of the application.
1.1 General
The Point-Of-Sale (POS) Business Application is designed for the small business and
provides networking capabilities not normally available to general Point-Of-Sale systems.
The principal features which set this POS Business Application Software apart from other
POS accounting software systems are the following:
Ease of Use
Distributed Encrypted Databases
Quicker Data Access via Calendar Indexed Databases
Re-Posting of POS Sales transactions if database recovery is required
Safe Non-Destructive Database Backup and Restore Operations
Please refer to the Overview document for a more detailed description of these features.
1.2 Abbreviations
CSV Comma Separated Variable
IDE Integrated Development Environment
PC Personal Computer
POS Point-Of-Sale
POSBA Point-Of-Sale Business Application
UPS Uninterruptible Power Supply
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 2
2 System Development Toolsets
2.1 Program Development Environment
This section describes the hardware and software which was utilized to develop the
Point-Of-Sale Business Application software.
2.1.1 Hardware System
2.1.1.1 Development Work Station
The work station computer hardware used was an IBM compatible Personal Computer
system utilizing the following configuration:
Intel Motherboard
2.0 GHz Pentium 4 CPU
1 GByte RAM Memory
160 GByte Hard Drive
3 DVI Graphics Adapter cards
Serial and Parallel Interfaces
LAN Interface
Keyboard and optical wireless mouse
3 Sony LCD Monitor Screens (19)
2.1.1.2 Test Work Station
A second computer system was used for testing Server/Client interaction and had the
following configuration:
Intel Motherboard
2.0 GHz Pentium 4 CPU
1 GByte RAM Memory
160 GByte Hard Drive
1 Graphics Adapter card
Serial and Parallel Interfaces
LAN Interface
KVM to interface to development work station keyboard and mouse
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 3
2.1.2 Software System
2.1.2.1 Compiler
The POS Business Application (also called POSBA) was designed using the Borland
C++ Builder IDE development package. This package provides a source code editor and
C++ compiler/linker as well as a built-in debugger for testing.
The IDE details are as follows:
Borland C++ Builder Ver 6.0
2.1.2.2 CodeWright Editor
The CodeWright editor was also used to develop this package. When this editor is
installed it attaches itself to the Borland C++ Builder IDE such that it is possible to swap
between the editors with ease.
The editor details are as follows:
CodeWright Editor Ver 7.5
2.1.2.3 Qsetup Composer
The Qsetup Composer package was used to build a single executable file which could be
located on a web page (or a CD-ROM). When accessed on the web page, the executable
file would be automatically downloaded and installed on the customers computer
system.
The Qsetup details are as follows:
Qsetup Installation Suite Ver: 7.5.0.8
Pantaray Research LTD.
www.pantaray.com
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 4
2.2 Program Development Process
Using a three monitor computer development workstation greatly aided the development
process. The three LCD monitor screen were generally set up as follows:
The CodeWright editor on the left screen
Borland C++ IDE on the middle screen
POSBA product display on the right screen / second computer system
The LCD monitors each contained three input channels DVI plus two VGA interfaces.
The right hand monitor could be switch between the main development computer and a
second test computer when Server/Client testing was required.
2.3 Program Execution Environment
This section describes the hardware and associated software required to execute the
Point-Of-Sale Business Application.
2.3.1 Operating Systems
The POS Business Application software is designed to execute on a standard IBM
Personal Computer System (or compatible) which executes one of the following
operating systems:
1. Windows Vista
2. Windows XP (Professional or Home Editions, or later versions)
3. Windows 2000 (or later versions)
4. Windows 2000 Server (or later versions)
Note: The POS Business Application may operate correctly on previous versions of
Windows, however, at this time it has not been verified.
2.3.2 Hardware Requirements
The following minimum IBM PC compatible computer features are required:
Pentium III 1GHz
512MB RAM
LAN Network Interface
Video Monitor (800 x 600 minimum)
Mouse
Keyboard
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 5
3 System Architecture
3.1 Limitations with current POS Packages
The POS Business Application was designed as an improvement to current POS systems
by having features which are presently not available to small business operations.
When talking with small business owners it became apparent that most Point-Of-Sale
systems suffered from problems in the following areas:
1. Server / Network Hardware Failures
2. Transaction Posting data can be lost
3. Slow Report Generation and Database Size Limitations
4. Database Backup and Restore Operations
5. POS Systems are designed for accountants instead for business owners
3.1.1 Server / Network Hardware Failures
The main restriction with many Point-Of-Sale accounting systems is their reliance on
both the network and on the Server computer system. These accounting systems locate
their central database on the server computer and the client computer systems must
access this database via the network in order to perform any Point-Of-Sale operations.
A major cause for concern with users of such systems is with regard to what would
happen if the network or the server were to fail. If either of these failures were to occur
then the client computer systems would not be able to access the central database and
would therefore not be able to perform Point-Of-Sale transactions. In this situation, the
counter staff would then be required to make hand written sales receipts and refer to
previously printed (and perhaps outdated) price lists. This method of operation is
tedious, slow and can easily generate errors.
Later, when the Server and/or network are once more operational, the handwritten sale
transactions have to be manually entered into the accounting system another time
consuming operation which is also fraught with possible errors.
3.1.2 Transaction Posting data can be lost
Most POS accounting systems use the Server to contain the central accounting databases.
This database usually also includes the Point-Of-Sale transactions for each POS terminal.
At the end of a business period, thee POS sales transactions are posted to the sales history
database and certain inventory database parameters (eg. the On Hand quantity) are
updated. Once this posting operation has completed, the original information is then
deleted since it is no longer required.
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 6
Normally this approach is successful, except under conditions when the database has had
to be recovered due to system related problems (eg. disk drive failure).
If the database is to be recovered, the current days posted (and un-posted) sales
transactions for each POS Terminal may be deleted during the database backup
restoration process. The sales data for the period between the backup date and the current
date will then have to be manually re-entered in order to bring the database up to date.
This is another time consuming operation which is also fraught with possible errors.
3.1.3 Slow Report Generation and Database Size Limitations
General POS accounting systems are very responsive when the system is first installed.
However, as the days and months progress, more and more history data is created and the
system can start to get sluggish. After several years of history data has been collected,
the system can take a long time to scan an entire database in order to access and obtain
specific information pertaining to a report.
In order to minimize this effect, some accounting systems impose database size
limitations which restrict the amount of data history which may be retained.
3.1.4 Database Backup and Restore Operations
During Database Backup operations, some POS Accounting systems use the same backup
storage file name and/or location, which may result in the previous backup file being
overwritten.
During Database Restore operations the same POS Accounting systems active directory
database is overwritten.
With this procedure a healthy database can easily be destroyed if an incorrect restore
operation was performed.
3.1.5 POS Systems are designed for accountants instead for business owners
In many cases the Point-Of-Sale software is Accountant friendly but not small business
person friendly. Any associated documentation is written likewise such that POS
operational instructions are quite vague and ambiguous to the general user.
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 7
3.2 Server / Client Operation
The POS Business Application computer program was designed to be installed on either
the Server computer hardware or the Client computer hardware. With this in mind, the
software was designed to execute Installation Screens which would allow the installer
to select the required Server/Client environment.
Many POS systems use TCP/IP as an interface with which to create a communications
channel between the Server computer system and the various client computer systems.
During Point-Of-Sale operations, the TCP/IP interface would carry product, transaction
and report information between the computer systems.
Although TCP/IP is effective it is also highly confusing to the average home business
user setting up IP addresses. With this in mind it was determined to use a directory
mapping procedure such that server computer system directories may be shared with the
client computer systems this also seemed applicable since entire databases were going
to be transferred between the server and the client computer systems.
3.3 Distributed Databases
In order to allow a client computer system to function during server and / or network
hardware failure conditions it would be necessary to provide the client computer system
with a copy of the relevant server databases. These client databases would need to be
updated whenever a changed was made to the primary server database.
3.3.1 System Database Header
The database header is used to indicate the lock status of the associated system database.
When a system database is locked, the system user and the corresponding computer
systems name is stored in the header. If another user attempts to edit the same system
database, they are informed that it is locked and also provided with the user name and
computer name of the person responsible for the lock. This feature was implemented to
overcome the limitations of other POS applications which simply state that the database
is locked and provide no indication of which user is responsible.
The database header also contains a lock timestamp which is used to automatically
unlock a database if it has been locked for an excessive amount of time. If a system
database is being modified then the lock timestamp will be automatically refreshed by the
relevant computer system. However, if this client system was to become inactive, the
locked database timestamp would no longer be refreshed and once the timestamp was
several minutes old the database lock could be overridden and the file re-accessed. Other
POS systems would require the Server to be reboot to overcome this problem..
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 8
3.3.2 Server System Databases
The principal system databases are stored on the POS Business Application Server
computer system. When any principal system database is edited, all modifications are
performed only on the database which resides on the Server computer system.
3.3.3 Client System Databases
The POS Business Application program executing on a Client computer system
constantly monitors the timestamps of all the system databases residing on the Server.
This monitoring process is controlled by a background process which periodically checks
every system database file on the Server computer system. If the timestamp of any
specific Server database is changed, (ie. the database has been updated), the Client will
automatically copy the database file and any associated database index files down from
the Server on to the Clients local disk drive. The downloaded files are given a specific
file extension to indicate that they are newly downloaded database files ready for
installation.
If the Client determines that these specific database files are not currently being used in a
POS transaction, it will proceed to install these files in the system. When the files are
being installed, the active database files status are changed to Backup status and the
new database files are marked as Active. The newly installed database file lists are
also loaded into all drop down and search lists.
This process occurs on each client computer system. It is the Clients responsibility to
monitor the Server system files for any database updates. The Server does not play any
role in ensuring that the Client system databases are up to date.
3.3.4 Quote Databases
Each Server and Client computer system controls its own respective Quote database.
3.3.4.1 Client Quote Database
When a new Quote has been created on the Client computer system, the quote is
appended to the local Quote database. The Client periodically transfers the local Quote
database up to the Server computer system for incorporation into the system wide Quote
database. The Client periodically checks the Servers system wide Quote database to see
if it has been updated and if so, downloads the database.
3.3.4.2 Server Quote Database
When the Servers Quote database has been updated, or the Server determines that it has
received a Clients updated Quote database, it will proceed to collate its own and all other
Client Quote databases into a combined single system wide Quote database. During this
collating process, any duplicate and expired Quote entries will be discarded.
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 9
3.4 Processes (Tasks)
When simultaneous operation of various events are required, these events are best placed
in separate tasks also called processes or threads.
The following proccesses are used:
1. Timer Process
2. Network Process
3.4.1 Timer Process
The Timer Process was created in order to keep accurate timing. If the timers were
controlled in the main task by a Ttimer event, timer errors might creep in due to main
task loading.
When the Timer Process is created it installs a 100ms event timer which generates 10
timer messages every second. The process threads main loop waits for these messages
and then adjusts all the system timers accordingly.
This implies that each system timer is accurate to 0.1 of a second.
The system timers ar 32 bit variables and therefore permit a timing range between 0.1 of
a second and 429496729.5 seconds (4899.57 years).
3.4.2 Network Process
The Network Process was created in order to monitor the various server databases and to
control the download process as required.
When the Network Process is created it installs a 1 second event timer which generates a
single timer message every second. The process threads mail loop waits for these
messages.
If the POS Business Application is being shut down, the network control variable may be
placed into a deactivating state. If this state is detected, the network control variable will
be placed into the deactivated state and all future network operations blocked.
During normal network operations the network process threads main loop will determine
if the POS Business Application is operating as a Server or as a Client and perform the
relevant operations.
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 10
3.4.2.1 Server Network Operations
When this function executes it performs the following operations:
1. Auto Initiate specific database downloads
2. Monitor specific database
3. Build POS Quote Database Summary
3.4.2.1.1 Auto Initiate specific database downloads
There is a function of this type for every inventory database which may undergo an auto
initiate download. When a user on the POS Business Application Server wishes to auto-
initiate the download of any specific database to the Clients, the relevant function is
called to mark the database file ready for download.
3.4.2.1.2 Monitor Specific Database
There is a function of this type which monitors if a specific database has been modified.
If the database has been modified a flag is set to force the reload of the list files
associated with this specific database.
The main program monitors this flag and if in a safe state (eg. not processing a sale)
controls the load operation to all revevant list boxes after which the flag is reset.
3.4.2.1.3 Build POS Quote Database Summary
This function first determines the name of all the POS Quote Register Files for the server
and all the clients. It then builds a combined POS Quote Register File by combining all
the entries in each of these files into a single file. Any duplicate quotes are deleted, as are
voided and expired quotes. The final combined POS Quote Database Summary file is
then made available to all systems for download. During the Quote database summary
build process, stable sorts are used to ensure that the quote date entries are kept in order.
3.4.2.2 Client Network Operations
When this function executes it performs the following operations:
1. Server Drive Remap Attempt
2. Auto Initiate specific database downloads
3. Monitor Specific Server Database
4. Verify License Registration
5. Obtain updated POS Quote Database
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 11
3.4.2.2.1 Server Drive Remap Attempt
If the Server is inactive, an attempt will be made to try and access the Server and map
onto the server drive.
3.4.2.2.2 Auto Initiate specific database downloads
There is a function of this type for every inventory database which may undergo an auto
initiate download. When a user on the POS Business Application Client wishes to auto-
initiate the download of any specific database from the Server, the relevant function is
called to mark the database file ready for download.
3.4.2.2.3 Monitor Specific Server Database
There is a function of this type which monitors if a specific server database has been
modified. If the database has been modified the revevant database files are downloaded
to the client system and a flag is set to force the reload of the database and list files
associated with this specific database.
The main program monitors this flag and if in a safe state (eg. not processing a sale)
controls the installation of the updated database as well as updating all the associated list
boxes after which the flag is reset.
3.4.2.2.4 Verify License Registration
This function ensures that any changes to the product license is implemented. For
example, if a new product key is installed on the Server to permit additional accounting
modules, this function then permits these same modules to be operational on the client
system.
3.4.2.2.5 Obtain Updated POS Quote Database
This function determine if a new POS Quote Summary database has been created on the
Server and, if so, downloads and installs this database on the client system.
POS Business Application System Architecture
Quantum Blue Technology LLC. Page 12
3.5 Drivers
3.5.1 Cash Register Till Printer Driver
The Cash Register Till Printer Driver is used to communicate directly with the cash
register printer. The driver interfaces with serial or parallel printers and also caters for
ESC/POS printers utilizing standard ESC/POS commands.
3.5.2 Cash Drawer Driver
The Cash Drawer Driver is used to communicate directly with the cash register drawer.
The driver interfaces with serial or parallel cash register drawers and, when required,
transmits the character A in order to open the drawer.
Some cash register drawers are not controlled directly by the PC computer system and
simply monitor the cash register printer communication channel. If communication is
detected, (ie. a sale has been made), the drawer automatically opens.
This document is under construction