Each of the layers of the application is used to hide
implementation details of the functionality. The
motivation for splitting applications into separate
individual layers is a generalization of communication
between the layers. Individual layers communicate with
each other using a defined group of methods, regardless of
the internal functionality. This approach achieves
universality and closeness of functional units. Even
though this approach requires more complex
implementation, it is possible to reuse certain parts of the
methods. If design changes and so should the
implementation of one of the layers, this requires change
only within the layer while maintaining public methods by
which they communicate with a given layer, which means
that, in this architecture, the individual layers are opaque
from the perspective of other layers of abstraction and that
ensures standardization of communication data.
In the event that the application needs should connect
to another database type or to the same database with a
different scheme it will be needed just to adjust only
database layer. Other layers due to the opaque character of
the database layer will not have to be changed.
Database layer separates the database with information
about events from the rest of the application. Thus
abstracts access to the actual data in an opaque manner.
After the application requests a new data, this data is
retrieved from the database server through SQL requests.
It normalizes the data retrieved and for each record creates
an event object, which is then stored in the event list. This
list of events is all located in the memory due to the speed
of data processing. At the moment when the data is
requested it causes increased demands on system memory
size, but delivers faster loading and processing.
Part of this application is designed for loading and
providing data on the geographical location of IP
addresses. IP address location database is stored in a
database csv file type, which is loaded into memory on
start-up. The class is using design pattern "Singleton" has
only one instance, a private constructor and static method
for access to single instances. Again at this point there is
approach that the entire database loaded into memory with
the intention to increase the response speed applications
while loading a large number of records. During a search,
the location of the IP address is also used by "caching" -
storing already retrieved records into a smaller list that is
scanned before scanning the entire database, since the
greater the chance that another search IP address has
already been found and thus its next search will be faster
because there is less items in the list [8]. DinaGraph is the
main application class. Unofficially, this solution should