DreamFactory 2.3 introduces the Cassandra NoSQL database service. Now, you can easily connect to a local or remote Cassandra database from your DreamFactory instance and perform operations using the same RESTful API that you already use for other NoSQL databases in DreamFactory.
Cassandra is a native DreamFactory service and it is supported by features like role-service-access, lookup usage, live API documentation, and caching. Once your Cassandra service is configured in DreamFactory, all the configuration details are hidden from your client. They are securely stored on your DreamFactory instance database. This allows for a simple and consistent way to access your Cassandra database via the DreamFactory REST API.
Configuring a Cassandra service is as simple as configuring any other database services in DreamFactory admin console. You start by logging into the admin console, head over to the ‘services’ tab, click on the ‘Create’ button on the left sidebar, complete the service configuration form and save it to create your service. Here is how the Cassandra configuration looks.
On ‘Info’ tab provide the basic service information - Name, Label, and description.
On the ‘config’ tab provide the configuration information.
- Host - String. Required. IP Address/Hostname of your Cassandra node. Note that you don’t have to specify the addresses of all hosts in your cluster. Once the driver has established a connection to any host, it will perform auto-discovery and connect to all hosts in the cluster.
- Port - Integer. Optional. Cassandra server port number. Defaults to 9042.
- Username - String. Optional. If your Cassandra server requires authentication. Then provide Username here.
- Password - String. Optional. If your Cassandra server requires authentication. Then provide Password here.
- Keyspace - String. Required. Your Cassandra Keyspace that you will be using. This is equivalent to a SQLDB database name.
- Options - Object/Associative array. Optional. An array of options for the Cassandra connection. Available options are - ssl : boolean, server_cert_path : string, client_cert_path : string, private_Key_path : string, key_pass_phrase : string
Once your service is configured head over to the ‘API Docs’ tab and expand your newly created Cassandra service to see all the available APIs ready for you to consume.