Richard Andersen
Posted on February 28, 2024
This blog is part of a continuing series showing how to use the Aerospike LINQPad driver. For other blogs in this series, please see:
The Aerospike LINQPad driver is now able to connect to the Aerospike Cloud, providing all the power of LINQPad combined with the Aerospike LINQPad driver.
This includes a graphical interface, LINQ support, and enhanced driver features to support the Aerospike Database. Find more information about LINQPad here.
Let’s look at the new connection dialog and some of the features of the LINQPad driver.
Connection dialog
The new connection dialog will now have two tabs. The first tab will be for native, “self-managed”, Aerospike clusters, and the second tab is used to connect to Aerospike Cloud.
Below shows the connection properties:
A review of each property is below:
- The host name is provided in the cloud dashboard. The hyperlink will take you to the Aerospike login screen or, if you are already logged in, to the dashboard.
- The cloud client connection port.
- If a VPC (AWS private link) is defined, this would be the host name displayed on the cloud dashboard. The host name field would be the VPC endpoint.
- The API key is created via the dashboard.
- If the API key and secret were exported from the dashboard to your local machine, this button will allow you to import that API Key CSV file. Properties “API Key” (item 4) and “API Secret” (item 7) are not required.
- If enabled, the built-in LINQPad password manager is used. When enabled, a dropdown will be displayed to select the Password Name you defined in the manager. The Password Manager can be found on the File menu of LINQPad.
- The associated API Key’s secret.
- If checked, it will show the API secret in plain text.
- The associated cloud namespace.
- If provided, a list of set names separated by a comma or space. The set names will be used to populate the sets under the namespace in the LINQPad connection tree (see below image). Also, set and bin “detection” will be performed to obtain the bins and data types. Regardless of whether this field is provided, you can always obtain this information from the “Null Set.” See the “Using Null Set” section below.
- Hyperlinks to additional topics.
- The timeout values that will be used when obtaining the connection or performing an operation. Note that the “Sleep” field is ignored for cloud connections.
Below shows the relationship between the “set names” connection property and the LINQPad connection tree:
Driver overview
All the features of the Aerospike LINQPad driver are available, including the following:
- Graphical interface with all LINQPad features
- Drag-and-drop of set names
- LINQ
- Serialize and deserialize any C# object via the Object-Mapper (POCO)
- Auto-Values, which provide dynamic data type conversion from Aerospike types to .Net types without testing or casting
- JSON support
- Explore the Aerospike API directly or use the driver’s enhanced API
Using the Aerospike null set
If the “Set Names” connection property is not provided, the set and bin names will not be provided in the LINQPad connection tree (see image above).
You can still perform queries and API calls using the driver’s API features. Below is an example of a driver API call to obtain the records for Aerospike set “Artist”:
aerospike_cloud.NullSet.Where(ns => ns.Aerospike.SetName == "Artist")
Below is the output:
You can always extend the “where” clause or interact with the result set.
Samples
You can find samples for Aerospike LINQPad Cloud under the samples folder or under the “Samples” tab in LINQPad.
Review
In this installment of the Aerospike LINQPad driver blog series, we learned how to use LINQPad to connect to Aerospike Cloud. This connection makes exploring your data in the cloud just as easy as other deployment options. Stay tuned for more articles in this series highlighting additional features of the driver.
Posted on February 28, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
February 28, 2024