Database connectivity

Database connections (see System Settings) are driven by HTTPS requiring a host/port combination along with authentication credentials to establish access. As a result, your physical database can reside either on-premise or in a cloud setting. Integration patterns can be:

  • On-Premise with the database installed in a bare-metal or virtualised server made accessible to Neptune DXP by whitelisting access through your internal firewall systems.

  • Hybrid as per on-premise, albeit, deployed in provisioned cloud compute service.

  • Cloud-Native subscribing to services such as Microsoft Azure’s PostgreSQL or AWS RDS or GCP Cloud SQL to alleviate the need for maintenance, scaling and high-availability arrangements.

Below are some indicative configurations that can be used to integrate an SQL database with Neptune DXP and there are of course many more, in between these, that can be implemented:

database connect

Depending on your circumstances, you can start with pure local on-premise installation and progress towards a pure cloud-native approach. Neptune Software provides a docker image for Neptune DXP giving you the flexibility to either install it in a computed instance or in a containerised service, such as Kubernetes. Similarly, the database can either be an own installation or a managed cloud service, for example, AWS RDS PostgreSQL. Whilst all approaches are valid a cloud-native approach utilising a managed database services provides increased agility to build in high availability, scalability and performance:

database connect2

In the above example, you can leverage inbuilt capabilities offered by cloud services to introduce a slave database that automatically becomes the master when a failover is detected, without impacting Neptune DXP. Read replicas can be automatically generated to absorb data reads leaving data writes to the master database. Finally, you can implement a cache in front of the database to further increase performance and minimise access costs to the database.

If Neptune DXP’s runtime connected to your database is located outside the database’s designated virtual private network and security grouping you may wish to buttress the protection of your data, whilst in-flight, by utilising a private/leased connection, such as Microsoft Azure Express Route or AWS Direct Connect. Similarly, inbuilt encryption mechanisms provided by database products should be used to ensure your data is secure whilst at rest.

Data segregation

Neptune DXP’s configuration data is stored in pre-defined tables created in the database schema provided in tables, generated upon initial installation. Business data can be stored by creating additional tables segregated from Neptune DXP’s internal data.

Data access

To eliminate opinionated database implementations Neptune DXP provides an abstracted user interface facilitating:

  • Tables Definitions automatically generating unique IDs and maintenance DateTime/user stamps along with the option to define entity relationships, foreign keys to maintain your data’s referential integrity during maintenance, indices for fast access, role-based security access and packaging to facilitate you schemas propagation through environments landscape.

  • Table Browser for rudimentary data operations useful for configuration settings or to pre-populate your tables with data.

This allows you to migrate out of a specific database product, without impacting the logic implemented to around your data.

Access to database entities is programmatically possible through an in-built Object Relational Mapping (ORM) library. Neptune DXP has adopted the TypeORM library accessible via NodeJS server scripts along with pre-defined snippets for CRUD operations to accelerate development. This approach ensures a provider-agnostic model ensuring the longevity of your development if you decide to migrate your data to another database provider.

Neptune DXP’s accelerator NodeJS snippets are comprehensive in scope covering a multiple of areas:

  • Record level CRUD operations (Create, Read, Update, Delete)

  • Entity level management operations (CRUD, pre-load, count, find, merging)

  • Advanced searching using complex operators, such as Any, Between, Equal, In, IsNull, LessThan, LessThanOrEqual, Like, MoreThan, MoreThanOrEqual, Not, Raw.

The use of NodeJS snippets can be particularly valuable when implementing Neptune DXP microservice API query parameters, helping to shortcut their delivery. This allows for APIs with rich query interfaces which limits the need to proliferation your API endpoints. In turn, your enterprise APIs are concise and easier to consume by clients.