Skip to content

Component Dependencies

suryayadavalli edited this page Aug 4, 2020 · 11 revisions
Common Library (Maven artifact : Jar)

Common Libraries include all the utilities, libraries that all other modules in the system will use. This is included as a dependency by any other library (jar), or service (war) in the system. Examples of common libraries include

  • Custom Date / String Operations
  • Custom XML or JSON utility methods
  • Common validations
  • Converters
Core Persistence (Maven artifact : Jar) - depends on Common Library / Core Model

Core persistence includes all the common persistence layer classes along with all the DAO layer classes (for instance EnrollmentDAO, AccountDAO, AuthorizationDAO). As service layer interacts with DAO layer, this is included as Maven dependency in the service layer library's POM.xml. All configurations (db connection configurations, db caching configuration, other DB parameters), utilities will be included in this jar.

Core Model (Maven artifact : Jar) - depends on Common Library

Core Model includes all the components/ classes/ utilities that handles request and response to the client. Essentially, this module contains all the classes that we interface with the client. In addition to the business objects , any JSON / XML object that is being received/sent by/to the clients is marshalled / unmarshalled into one of the model objects in the module and being serialized /deserialized (as needed) using the utilities from this Jar.

Examples of model classes in core-model module

  • User
  • Account
  • Event
  • Organization

Examples of other utilities in core-model module

  • Date serializers / deserialziers
Core Client (Maven artifact : Jar) - depends on Common Library

Core client module is responsible for interactions between the services. As the objective is to have a system with loosely coupled components the interactions among the services should be bridged but should not be dependent. For instance, if Enrollment service need to send a notification to a User, it interacts with Notification Service, however, not directly but using this client library. This module contains all the necessary classes / utilities / configurations for the services to be able to talk to each other. This gives us the flexibility to be able to deploy the services not as a single system but as a distributed system as needed.

Core Service (Maven artifact - Jar) - depends on Core Client, Core Model, Core Persistence, Common Library modules

Core Service module contains all the business layer components and associated utilities and this is the module that handles the data to and from the client. This depends on all other core modules in the system and any service that we build depends on this module.

Services (Enrollment Service, Audit Service, Event Service) - depends on Core Client, Core Model, Core Service, Common Library module

These the modules that define our REST APIs that are exposed and depend on the core modules in the system. These services will be developed as Micro services and the interactions among the services will be handled by Core Client module. Also, the APIs with in these services will be categorized as Internal / External APIs and access control will be set up as to who are allowed to use what APIs.

Examples of these services

  • Enrollment service (public / API grants will be given to the clients)
  • Auditing service (private / clients- trusted apps can't use Audit service directly , All APIs will be marked as Internal)
  • Notification service (private / clients- trusted apps can't use Notification services directly, All APIs will be marked as Internal)
Clone this wiki locally