<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Eugene Rizhkov on Medium]]></title>
        <description><![CDATA[Stories by Eugene Rizhkov on Medium]]></description>
        <link>https://medium.com/@rizhkoy?source=rss-c878109e40b9------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/2*XD__9-XZBN06ca0kIVwMSw.jpeg</url>
            <title>Stories by Eugene Rizhkov on Medium</title>
            <link>https://medium.com/@rizhkoy?source=rss-c878109e40b9------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 21 Nov 2026 06:25:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rizhkoy/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Aerospike Trino Connector — Chapter Two]]></title>
            <link>https://medium.com/aerospike-developer-blog/aerospike-trino-connector-chapter-two-363e7545275?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/363e7545275</guid>
            <category><![CDATA[aerospike]]></category>
            <category><![CDATA[secondary-index]]></category>
            <category><![CDATA[database]]></category>
            <category><![CDATA[presto]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Mon, 02 May 2022 14:16:06 GMT</pubDate>
            <atom:updated>2022-05-02T14:16:06.716Z</atom:updated>
            <content:encoded><![CDATA[<h3>Aerospike Trino Connector — Chapter Two</h3><h4>Speed up your SQL queries using Aerospike secondary indexes</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Yjst0a2Ieot5M_bg" /><figcaption>Photo by <a href="https://unsplash.com/@sl33vo?utm_source=medium&amp;utm_medium=referral">Danny Sleeuwenhoek</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>With <a href="https://aerospike.com/blog/database-queries-json-db-6/">Aerospike Server 6.0</a>, we have enhanced secondary index queries to allow for querying by partition, throttling, etc. The Trino connector now leverages this functionality to accelerate your secondary key queries at scale.</p><p><strong>What is a secondary index?</strong></p><p>A <a href="https://docs.aerospike.com/server/architecture/secondary-index">secondary index</a> is a data structure used to quickly locate all the records in a namespace, or a set within it, based on a bin value in the record. When a value is updated in the indexed record, the secondary index automatically updates. You can retrieve records whose indexed value matches specified criteria using a secondary index query.</p><p>A query in Trino against a non-primary key bin that does not have a secondary index would invariably trigger a set (table) scan leading to an inefficient query. You can imagine the performance penalty that you would incur when dealing with a billion record table. <a href="https://docs.aerospike.com/tools/aql/index_management">Creating a secondary index</a> (sindex) on a high-cardinality bin can help significantly speed up your Trino queries.</p><p>As shown in Figure 1, Aerospike secondary indexes are stored in DRAM for fast look-up, built on every partition in each cluster node, and are co-located with the primary index. Each secondary index entry contains only references to records local to the node.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7usxNeb_o8dPOA0J" /><figcaption>Figure 1: Secondary index query</figcaption></figure><p><strong>How do I get started?</strong></p><p>Creating a secondary index on a bin in Aerospike is easy. You can use an Aerospike tool, such as asadm, or the API to dynamically create and remove indexes based on bins and data types you want to index. For an indexed bin, updating the record to include the bin updates the index. See <a href="https://docs.aerospike.com/tools/aql/index_management">how to create a secondary index</a> for more information.</p><p>The Trino connector automatically analyzes the query and applies a secondary index to it, if one is available. If you know the cardinality of the secondary indexes, you can declare which sindex should be used for your query using the `sindex_name` <a href="https://trino.io/docs/current/sql/set-session.html">session property</a>. The `__sindex` table is created for each schema and provides details on available secondary indexes. You can change its name using the `aerospike.index-table-name` configuration property.</p><p>Here is an example of secondary indexes that we’ll see in action later:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m0TvtLQzBIkwUUaxLjMwyA.png" /></figure><p>We recommend that you provide the sindex to use in the query. The statement below shows an example of declaring a sindex to use:</p><blockquote>set session aerospike.sindex_name=idx1;</blockquote><p>If you do not declare a sindex for your query when multiple sindexes are available, the connector will pick the sindex with the highest lexical order from the list of available secondary indexes.</p><p><strong>Will this really improve my Trino SQL query performance?</strong></p><p>Prior to supporting secondary indexes, each query that was not a primary key search ended up with a full table scan on the Aerospike side. To illustrate my point, I will use a large (~20M records) data set to compare query response times with and without a secondary index.</p><p>A query for a particular `pkup_datetime`:</p><p>With a string secondary index:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1jnt7PYNuHOjFSB5dVP1cA.png" /></figure><p>Without a secondary index:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dAM-lsyGQxXRh9xKwXdCUA.png" /></figure><p>Another example of a range query on the `id` column:</p><p>Using a numeric secondary index:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F_DuaVvf38EBJy1_hfbUnw.png" /></figure><p>Without a secondary index:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5J5mNrOVFYYG9VniUrK9eQ.png" /></figure><p>The response time is in seconds and we can see that the performance gain is significant. The primary index (PI) query was ~80 times slower than the secondary index (SI) query.</p><p><strong>Summary</strong></p><p>Aerospike secondary indexes can make a huge performance difference to your SQL queries. Make sure you read the official documentation regarding the compatibility and installation.</p><p>And finally, process your data faster than ever with the new <a href="https://docs.aerospike.com/connect/presto">Aerospike Connect for Presto</a>!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=363e7545275" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/aerospike-trino-connector-chapter-two-363e7545275">Aerospike Trino Connector — Chapter Two</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analyze Data with Aerospike and Starburst anywhere]]></title>
            <link>https://medium.com/aerospike-developer-blog/analyze-data-with-aerospike-and-starburst-anywhere-9f3be34fcbe4?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/9f3be34fcbe4</guid>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[aerospike]]></category>
            <category><![CDATA[presto]]></category>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[starburst]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Wed, 02 Jun 2021 11:04:28 GMT</pubDate>
            <atom:updated>2021-06-02T11:04:28.726Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BuLD1oBOyM6YxLMI" /><figcaption>Photo by <a href="https://unsplash.com/@anglopic?utm_source=medium&amp;utm_medium=referral">Daniel Cooke</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://www.starburst.io/">Starburst Enterprise</a>, based on open source <a href="https://blog.starburstdata.com/prestosql-becomes-trino">Trino</a> (formerly PrestoSQL) is a SQL-based MPP query engine. It enables you to run Trino on a single machine, a cluster of machines, on-prem or in the cloud. Further, <a href="https://www.starburst.io/platform/starburst-galaxy/">Starburst Galaxy</a> offers a SaaS experience.</p><p>Aerospike is a fast NoSQL database, which is extensively used for low latency and high throughput use cases in Ad Tech, Financial services, Telco, and several other verticals. With its <a href="https://aerospike.com/products/features/hybrid-memory-architecture/">hybrid memory architecture</a>, it serves as an ideal database for data analysis. In addition to supporting on-prem deployments, Aerospike is also offered in the cloud as a managed service or self-managed via <a href="https://aerospike.com/products/kubernetes-operator/">Kubernetes Operator</a> to make database-related operations frictionless and flexible.</p><p>We recognize that SQL is the lingua franca for data analysis. Hence, we launched <a href="https://aerospike.com/blog/accelerate-time-to-insight-presto/">Aerospike Connect for Presto</a> earlier this year to empower data and business analysts to pursue their data analysis projects. We recently released the <a href="https://docs.aerospike.com/docs/connect/access/presto/presto-connector-docker.html">Dockerized Presto Connector</a> to streamline the deployment of Trino and the Presto Connector. We are now pleased to announce that we have extended that to support Starburst Enterprise. The Presto connector seamlessly bridges the Aerospike Enterprise Edition (EE) and Starburst Enterprise. It allows you to leverage the scalability, speed, reliability, and TCO benefits of Aerospike, while leveraging the speed, massive parallelism, and support for Trino that Starburst Enterprise offers.</p><h4>Why does it matter to you?</h4><p>We have heard time and again from our users that Presto is hard to set up and tune for optimal performance and scale. A sad but true fact is that the time spent to deal with infrastructure issues is the time not spent on issues that matter most to your business. With the product offerings from Aerospike and Starburst along with their best in class support, users can now focus on generating valuable insights at scale from the data stored in Aerospike using ANSI SQL to drive their critical business decisions.</p><h4>How to get started?</h4><p>Here are a few steps that you can follow to get it going:</p><p><strong>Step 1 - Build the Starburst Trino image along with the Aerospike Presto Connector</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*37JWIDSCPh6RbDi1" /></figure><p><strong>Step 2 - Run the Aerospike Database and load the data</strong></p><ol><li><a href="https://aerospike.com/lp/try-now/">Download and run the Aerospike Database Enterprise Edition</a></li><li>Load data into Aerospike (you would need to download the <a href="https://docs.aerospike.com/docs/client/python/start">Aerospike Python client</a>)</li></ol><p><strong>Step 3 - Run the docker image that you created in Step 1</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SKPm2tSd1aCbZtq4" /></figure><p><strong>Step 4 - Query using Trino CLI</strong><br><a href="https://trino.io/docs/current/installation/cli.html">Download the Trino CLI</a> and run the following command:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*pT_V80WSBRCBFnP0" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*4yAg_Z8Eo4GLM1MH" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*EDHLK1VTQHEEch54" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*HBBYDt2WvYzOA7GK" /></figure><p>The above will launch the image in standalone mode i.e. coordinator and worker running on the same host, but you can easily extend it to the distributed mode for production purposes as<a href="https://docs.aerospike.com/docs/connect/access/presto/distributed.html"> described here</a>. Alternatively, you can use a Trino supported <a href="https://medium.com/aerospike-developer-blog/bi-dashboarding-with-presto-aerospike-and-tableau-a9869854aa08">BI tool such as Tableau </a>or <a href="https://docs.aerospike.com/docs/connect/access/presto/jupyter-notebook.html">Jupyter notebook as well as using the PyHive library</a>.</p><p>In conclusion, with the deployment options and the best in class support offered by Aerospike and Starburst, you can go from zero to insights to meet your business needs. The time that you would otherwise spend dealing with infrastructure issues can now be spent on tasks that matter most to your business.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9f3be34fcbe4" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/analyze-data-with-aerospike-and-starburst-anywhere-9f3be34fcbe4">Analyze Data with Aerospike and Starburst anywhere</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Continuous Integration with Aerospike on GitHub]]></title>
            <link>https://medium.com/aerospike-developer-blog/continuous-integration-with-aerospike-on-github-9d98f05819ee?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d98f05819ee</guid>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[github-actions]]></category>
            <category><![CDATA[aerospike]]></category>
            <category><![CDATA[continuous-integration]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Wed, 21 Apr 2021 09:48:11 GMT</pubDate>
            <atom:updated>2021-04-21T09:48:11.661Z</atom:updated>
            <content:encoded><![CDATA[<h4>Set up an Aerospike server using a GitHub action with ease</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/200/1*IzHjbtaF33IFeL25uUW-Ag.png" /></figure><p><a href="https://www.aerospike.com/">Aerospike</a> is a highly available and scalable NoSQL distributed database used in production to provide blazingly fast performance at a Petabyte scale.</p><p>As a software engineer developing with Aerospike, you probably needed integration tests, and you already have your own way to set up an Aerospike cluster for this.</p><p>In this short post I will show you how to add an Aerospike server to your development workflows using the <a href="https://github.com/marketplace/actions/set-up-aerospike-database">GitHub Action</a> in seconds.</p><p>As a GitHub user, you may already know what GitHub actions are. They were <a href="https://github.blog/2018-10-16-future-of-software/">launched</a> in late 2018 and set a new standard for CI/CD on GitHub.</p><h4>Getting Started</h4><p>The first thing you need is to have your repository hosted on GitHub. Better understand the <a href="https://docs.github.com/en/actions">GitHub Actions</a> if you’re new to them.</p><p>My Aerospike GitHub action repository is <a href="https://github.com/reugn/github-action-aerospike">here</a>, and it is also <a href="https://github.com/marketplace/actions/set-up-aerospike-database">published</a> on the GitHub marketplace.</p><p>Now what’s left is to see some</p><h4>Usage examples</h4><p>You can set up either Aerospike Community Edition or Enterprise Edition. What makes the difference is the feature-key-file parameter. Specify it to have an Aerospike Server Enterprise Edition.</p><h4><strong>Aerospike Community Edition</strong></h4><p>To set up an Aerospike Community Edition server with the default configuration</p><blockquote>- name: Set up Aerospike Database</blockquote><blockquote>uses: reugn/github-action-aerospike@v1</blockquote><h4><strong>Aerospike Enterprise Edition</strong></h4><p>To set up an Aerospike Enterprise Edition server by specifying the port, the server configuration and the feature key files</p><blockquote>- name: Set up Aerospike Database</blockquote><blockquote>uses: reugn/github-action-aerospike@v1</blockquote><blockquote>with:</blockquote><blockquote>port: 3300</blockquote><blockquote>config-file: ‘.github/aerospike/aerospike.conf’</blockquote><blockquote>feature-key-file: ‘.github/aerospike/features.conf’</blockquote><p>Make sure to commit the configuration and the feature key files in your repository and provide the path, they must be in the same directory.</p><p>Now you have your Aerospike server running on Docker and ready for integration tests.</p><p>A complete list of supported inputs is available <a href="https://github.com/reugn/github-action-aerospike#inputs">here</a>.</p><p>That was fast as I promised. Both the read and the setup. Hope you found this useful, and don’t forget to subscribe to our <a href="https://www.aerospike.com/forms/subscribe-the-aerospike-standup/">newsletter</a> to get updated with Aerospike weekly news.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d98f05819ee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/continuous-integration-with-aerospike-on-github-9d98f05819ee">Continuous Integration with Aerospike on GitHub</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Skyhook: a Redis-compatible interface to Aerospike Database]]></title>
            <link>https://medium.com/aerospike-developer-blog/skyhook-a-redis-compatible-interface-to-aerospike-database-98e4538b79c2?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/98e4538b79c2</guid>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[redis]]></category>
            <category><![CDATA[gateway]]></category>
            <category><![CDATA[aerospike]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Tue, 20 Apr 2021 16:10:33 GMT</pubDate>
            <atom:updated>2021-04-20T16:10:33.516Z</atom:updated>
            <content:encoded><![CDATA[<h4>Or how to communicate with Aerospike using Redis clients</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*7fofmoiBhIEqK_60" /><figcaption>Photo by <a href="https://unsplash.com/@jmsdono?utm_source=medium&amp;utm_medium=referral">James Donovan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p><a href="https://www.aerospike.com/">Aerospike</a> is a highly available and scalable NoSQL distributed database used in production to provide blazingly fast performance at Petabyte scale. Production deployments of Aerospike are almost always serving their data from NVMe drives, though it’s possible to run namespaces in memory.</p><p>Redis is a well loved key-value data store that is widely used by developers, which was designed to run single node (single-threaded originally) and in-memory.</p><p>This article might be interesting to developers who are using <a href="https://redis.io/">Redis</a> and looking for more scalable and highly available alternatives, or maybe already have some applications running on Aerospike.</p><p>Migrating to a different technology is always a challenging process. You need to train engineers, rewrite the codebase, and set up a production cluster to take over. Using <a href="https://github.com/aerospike/skyhook">Skyhook</a>, you can move applications to Aerospike first, then come back to rewrite them as Aerospike native, or if you’re satisfied with their performance, keep them as they are.</p><p>Or maybe you’re looking to expose your Aerospike data to external Redis-based applications? We would love to hear how you would use this project.</p><h4><strong>Skyhook to the rescue</strong></h4><p>We, as a company, observed this need and came up with the highly performant bridge service, which acts as a fully-fledged (with commands support limitation) Redis server, bridging the clients’ commands to Aerospike clusters.</p><h4>Technical details</h4><p>Skyhook is a standalone server application written in Kotlin, which projects Redis protocol commands to an Aerospike cluster using the Aerospike Java client under the hood. The server supports a single namespace and set configuration, where the incoming commands will be applied. This project uses<a href="https://netty.io/"> Netty</a> as a non-blocking I/O client-server framework.</p><p>Netty, is a highly performant JVM asynchronous event-driven network application framework. Its customizable thread model and native transport support forge an incredibly performant network communication layer.</p><p>What’s left is to translate Redis commands to Aerospike commands, and here come the async capabilities of the Aerospike Java Client.</p><h4>Installation and configuration</h4><p>You will need JDK8 and an Aerospike Server version &gt;= 4.9 because Skyhook uses the new scan capabilities which are available starting from that version.</p><p>Clone <a href="https://github.com/aerospike/skyhook">aerospike/skyhook</a> or grab a prebuilt executable JAR from the <a href="https://github.com/aerospike/skyhook/releases">releases</a> to get started.</p><p>To build the service from the sources:</p><blockquote>./gradlew clean build</blockquote><p>This command will build an executable JAR file.</p><p>Skyhook is configured using a configuration file and it’s in YAML format. You will need to specify it using the -f flag.</p><p>To run the server:</p><blockquote>java -jar skyhook-[version]-all.jar -f config/server.yml</blockquote><p>An example configuration file can be found in the config folder under the project repository.</p><p>Here are the current configuration properties available.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*SErB36lB_jO757UMfSkS-w.png" /></figure><p>workerThreads property is used to configure the size of the<a href="https://www.aerospike.com/docs/client/java/usage/async/eventloop.html"> Aerospike Java Client EventLoops</a> as well.</p><p>workerThreads and bossThreads are the Netty thread pool sizes and can be easily fine-tuned for optimal performance.</p><p>After the server is up and running, any Redis client can connect to it as if it were a regular Redis server.</p><p>For the test purposes you can use<a href="https://redis.io/topics/rediscli"> redis-cli</a> or even the<a href="https://www.commandlinux.com/man-page/man1/nc.1.html"> nc</a> (or netcat) utility:</p><blockquote>echo “GET key1\r\n” | nc localhost 6379</blockquote><h4>Benchmarking</h4><p>From the very beginning, the project was built with an attention to performance, and the results speak for themselves.</p><p>Running this Redis benchmark:</p><blockquote>redis-benchmark -t set -r 100000 -n 1000000</blockquote><p>We had the following results on local Skyhook with a single-node default configuration Aerospike cluster on Docker:</p><blockquote>Summary:</blockquote><blockquote>throughput summary: 13453.88 requests per second</blockquote><blockquote>latency summary (msec):</blockquote><blockquote>avg min p50 p95 p99 max</blockquote><blockquote>3.627 0.864 3.263 5.583 7.463 1012.223</blockquote><p>While those were the results for the Redis node running on Docker:</p><blockquote>Summary:</blockquote><blockquote>throughput summary: 14967.15 requests per second</blockquote><blockquote>latency summary (msec):</blockquote><blockquote>avg min p50 p95 p99 max</blockquote><blockquote>3.275 0.608 2.935 5.087 6.679 1006.591</blockquote><p>You can see that they are really close. More than that, we can multiply the number of the Skyhook nodes and significantly improve performance working with the same aerospike cluster. For instance, you can use the Round-robin DNS or any popular load balancer like HAProxy. This will not require any specific configuration since Skyhook is completely stateless.</p><h4>Summary</h4><p>The project is constantly evolving, having more and more commands being supported. You can find the coverage of the supported Redis commands in the <a href="https://github.com/aerospike/skyhook">repo readme</a>.</p><p>It will be really great to hear from you about the experience of using it. Also, your contributions to the project are very welcome.</p><p>If you encounter a bug, please report it or <a href="https://github.com/aerospike/skyhook/issues">open an issue</a> stating the commands you would like to be supported.</p><p>Please subscribe to <a href="https://www.aerospike.com/forms/subscribe-the-aerospike-standup/">The Aerospike Standup</a> to be updated with the latest developer news about Aerospike.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98e4538b79c2" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/skyhook-a-redis-compatible-interface-to-aerospike-database-98e4538b79c2">Skyhook: a Redis-compatible interface to Aerospike Database</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Deploy Aerospike and Trino based analytics platform using Docker]]></title>
            <link>https://medium.com/aerospike-developer-blog/deploy-aerospike-and-trino-based-analytics-platform-using-docker-40244cdf5e04?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/40244cdf5e04</guid>
            <category><![CDATA[data-analytics]]></category>
            <category><![CDATA[trinos]]></category>
            <category><![CDATA[presto]]></category>
            <category><![CDATA[docker]]></category>
            <category><![CDATA[aerospike]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Mon, 19 Apr 2021 17:18:20 GMT</pubDate>
            <atom:updated>2021-04-19T17:18:20.798Z</atom:updated>
            <content:encoded><![CDATA[<h4>Data to insights, quick and easy</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/899/1*AaV6N_51Vjv4GO-3wh815Q.png" /></figure><p><a href="https://www.aerospike.com/blog/accelerate-time-to-insight-presto/">Aerospike Connect for Presto</a> was released earlier this year to address the need to convert data stored in Aerospike into valuable insights quickly using the Trino (formerly known as PrestoSQL) distribution of Presto. Based on the feedback that we received from our users, we are pleased to announce that you can now deploy the Presto connector along with Trino quickly using Docker.</p><p>Here are the salient features of our Docker based solution:</p><ol><li>Supports multiple deployment modes depending on your use case:</li></ol><ul><li>Standalone - both coordinator and worker are launched within the same container, which when coupled with Aerospike launched within a separate container can help you with rapid prototyping. Consider trying it out with the Aerospike single-node Enterprise edition to test the waters.</li><li>Distributed - coordinator and several workers are launched within separate containers across a Trino cluster to offer the scale needed for production workloads.</li></ul><p>2. Provides the flexibility to your CI pipeline for building a single image that consists of the connector and the Trino version of your choice so that you can launch the combined image later using the simple docker run command.</p><p>3. Allows you to easily configure the connector container using either <a href="https://docs.docker.com/engine/reference/commandline/run/#set-environment-variables--e---env---env-file">environment variables</a> or using <a href="https://docs.docker.com/storage/bind-mounts/">bind-mounts</a> to mount your connector configuration files, schema JSON files along with the Trino configuration files.</p><h4>Build Trino and Connector images</h4><p>Aerospike does not provide pre-built Trino images, hence you need to build a Trino and the connector image by choosing the versions of your choice, so that you can run it using a docker command. The Trino version is available on the Trino<a href="https://trino.io/docs/current/release.html"> release page</a> and the connector versions can be found on the <a href="https://www.aerospike.com/enterprise/download/connectors/aerospike-trino/1.0.0/">Connector release page</a>. Here are the steps:</p><ol><li>git clone <a href="https://github.com/aerospike/trino-aerospike.docker">https://github.com/aerospike/trino-aerospike.docker</a></li><li>Change directory to trino-aerospike.docker</li><li>docker build . -t trino-aerospike</li></ol><p>The above command will build TRINO version 351 and the latest connector version. If you plan to use a different version of Trino and/or the connector, you can pass the TRINO_VERSION and the CONNECTOR_VERSION as build arguments with the docker build command. For example, use the below command to build TRINO version 353:</p><blockquote>docker build — build-arg TRINO_VERSION=353 . -t trino-aerospike-353</blockquote><h4>Configure and run the image</h4><p>There are a couple options available to deploy the connector by modifying the docker run command.</p><p><strong>Option 1: Launch Trino along with the connector in standalone mode</strong><br>Standalone mode i.e. Trino coordinator and worker run on a single node mode, is suitable for testing purposes. For example, if your Aerospike server is running on port 3000, you can use the following command to run the connector container on a Mac. See the configuration section for more information on how to configure the connector container.</p><blockquote>docker run — rm -p 8080:8080 -e AS_HOSTLIST=docker.for.mac.host.internal:3000 — name trino-aerospike trino-aerospike-353</blockquote><p>Based on our testing, you can launch a Trino cluster with the connector in the standalone mode with defaults in under 5 minutes.</p><p><strong>Option 2: Launch along with the connector in distributed mode</strong></p><p>Distributed mode i.e. a single coordinator and multiple workers, is usually preferred for production deployments. See the configuration section for more information on how to configure the connector container.</p><ul><li>Start a Trino coordinator.</li></ul><blockquote>docker run — rm -p 8080:8080 -e TRINO_NODE_TYPE=coordinator -e AS_HOSTLIST=docker.for.mac.host.internal:3000 — name trino-aerospike-coordinator trino-aerospike-353</blockquote><ul><li>Start a Trino worker, specify the TRINO_DISCOVERY_URI to be the URI of the Trino coordinator. For example,</li></ul><blockquote>docker run — rm -e TRINO_NODE_TYPE=worker -e AS_HOSTLIST=docker.for.mac.host.internal:3000 -e TRINO_DISCOVERY_URI=http://example.net:8080 — name trino-aerospike-worker1 trino-aerospike-353</blockquote><p>Replace example.net:8080 to match the host and port of the Trino coordinator. This URI must not end in a slash. Note that the above command will only run a single docker container instance of the worker. If you would like to spin up multiple worker instances, create a bash script and include the below command as many times as the number of workers desired, for automation. However, you would have to change the name of the worker instance e.g. trino-aerospike-worker-2, and so on.</p><blockquote>docker run — rm -e TRINO_NODE_TYPE=worker -e AS_HOSTLIST=docker.for.mac.host.internal:3000 -e TRINO_DISCOVERY_URI=http://example.net:8080 — name trino-aerospike-worker2 trino-aerospike-353</blockquote><p>You can configure the Trino connector using either environment variables or mounting configuration files to the container. For more information on how to configure the Trino connector and launch the Trino and connector containers, visit our <a href="https://aerospike.com/docs/connect/access/presto/presto-connector-docker.html">documentation</a> website.</p><p>Once you have successfully launched the Presto and the aerospike connector containers, you can generate insights from 100’s of TB of data stored in Aerospike using the <a href="https://trino.io/docs/current/installation/cli.html">Trino CLI</a>, <a href="https://medium.com/aerospike-developer-blog/bi-dashboarding-with-presto-aerospike-and-tableau-a9869854aa08">create insightful dashboards using Tableau</a>, or manipulate data using Presto and Python libraries via the <a href="https://aerospike.com/docs/connect/access/presto/jupyter-notebook.html">PyHive Python interface</a>. If you would like to quickly try out our Docker based solution with a single node Aerospike Enterprise Edition, please follow the instructions <a href="https://www.aerospike.com/lp/try-now/">here</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40244cdf5e04" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/deploy-aerospike-and-trino-based-analytics-platform-using-docker-40244cdf5e04">Deploy Aerospike and Trino based analytics platform using Docker</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aerospike as a Backend Storage for HashiCorp Vault]]></title>
            <link>https://medium.com/aerospike-developer-blog/aerospike-as-a-backend-storage-for-hashicorp-vault-7d77cbcda50b?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/7d77cbcda50b</guid>
            <category><![CDATA[vault]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[hashicorp]]></category>
            <category><![CDATA[secure-storage]]></category>
            <category><![CDATA[aerospike]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Mon, 05 Apr 2021 17:23:04 GMT</pubDate>
            <atom:updated>2021-04-05T17:23:04.320Z</atom:updated>
            <content:encoded><![CDATA[<h4>A quick introduction from installation to insights</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/554/1*dYnizFdFCECjaWdATlZSNg.png" /></figure><p><a href="https://www.vaultproject.io/">Vault</a> 1.7.0 is released, and it includes my contribution to support the <a href="https://www.aerospike.com/">Aerospike</a> database as backend storage. See the <a href="https://www.vaultproject.io/docs/release-notes/1.7.0">release notes</a> for more details.</p><p>From now on, Aerospike users can store their sensitive data using Vault almost seamlessly.</p><p>I will not talk about the benefits of using Vault and will jump into the installation and configuration details right away.</p><h4>Setup</h4><p>First thing you’ll need is to <a href="https://learn.hashicorp.com/tutorials/vault/getting-started-install#install-vault">install Vault</a> if you haven’t done this yet.</p><p>Make sure that the Vault binary is available on the PATH. See<a href="https://stackoverflow.com/questions/14637979/how-to-permanently-set-path-on-linux"> this page</a> for instructions on setting the PATH on Linux and Mac.<a href="https://stackoverflow.com/questions/1618280/where-can-i-set-path-to-make-exe-on-windows"> This page</a> contains instructions for setting the PATH on Windows.</p><p>Verify the installation worked by opening a new terminal session and checking that the vault binary is available.</p><blockquote>$ vault version<br>Vault v1.7.0 (4e222b85c40a810b74400ee3c54449479e32bb9f)</blockquote><h4>Configuration</h4><p>Outside of development mode, Vault servers are configured using a file. The format of this file is<a href="https://github.com/hashicorp/hcl"> HCL</a>. Let’s configure our Aerospike cluster to be the Vault’s backend storage:</p><blockquote>storage “aerospike” {<br> hostname = “localhost”<br> port = “3300”<br> namespace = “test”<br> set = “vault”<br>}<br>listener “tcp” {<br> address = “127.0.0.1:8200”<br> tls_disable = 1<br>}</blockquote><p>You can find more information about the Aerospike backend configuration <a href="https://www.vaultproject.io/docs/configuration/storage/aerospike">here</a>.</p><p>To start the server:</p><blockquote>vault server -config aerospike_backend.hcl</blockquote><p>The Vault server is up and running on the default 8200 port.</p><p>Now open a new terminal window and go through the <a href="https://learn.hashicorp.com/tutorials/vault/getting-started-deploy#initializing-the-vault">guide</a> to initialize the Vault server.</p><p>It is a little bit cumbersome with all those unseals and login, but you’ll figure it out.</p><p>After the successful login, we need to enable a version 1 kv store:</p><blockquote>vault secrets enable -version=1 kv</blockquote><h4>Usage</h4><p>Now is the time to try things out.</p><blockquote>$ vault kv put kv/my-secret my-value=s3cr3t<br>Success! Data written to: kv/my-secret</blockquote><blockquote>$ vault kv get kv/my-secret<br>====== Data ======<br>Key Value<br> — — — — -<br>my-value s3cr3t</blockquote><p>Your first secret was successfully stored and retrieved from Aerospike using Vault!</p><p>In this short introduction blog post, we covered the setup of Vault using Aerospike as a storage backend.</p><p>The Aerospike backend supports both CE and EE and doesn’t expose all the configuration properties available. We will work to include those in future releases.</p><p>I hope you are excited about this new Vault capability. Please <a href="https://discuss.aerospike.com/">let us know</a> if you encounter any issues using it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7d77cbcda50b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/aerospike-as-a-backend-storage-for-hashicorp-vault-7d77cbcda50b">Aerospike as a Backend Storage for HashiCorp Vault</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introducing Aerospike JDBC Driver]]></title>
            <link>https://medium.com/aerospike-developer-blog/introducing-aerospike-jdbc-driver-fe46d9fc3b4d?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/fe46d9fc3b4d</guid>
            <category><![CDATA[java]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[jdbc]]></category>
            <category><![CDATA[aerospike]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Mon, 15 Mar 2021 13:36:21 GMT</pubDate>
            <atom:updated>2021-03-15T13:36:21.123Z</atom:updated>
            <content:encoded><![CDATA[<h4>A lightweight Java SQL layer for Aerospike</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Q1feFp2lih3LfM9h" /><figcaption>Photo by <a href="https://unsplash.com/@fr3nks?utm_source=medium&amp;utm_medium=referral">Daniel Frank</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>One of the most common ways to interact with databases on JVM is the <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/">JDBC API</a>.</p><p>JDBC stands for Java Database Connectivity, which is a standard Java API for database-independent connectivity between the Java programming language and a wide range of databases.</p><p>Aerospike is a fast and durable No-SQL database. It has its own Java client, but this article will introduce you to a supplementary way of interacting with it using SQL.</p><p>Get yourself a hot cup of tea or coffee (for the true Java look and feel) and we will dive into the details of the Aerospike journey into the JDBC world.</p><h4><strong>Introduction</strong></h4><p>The Aerospike JDBC driver requires Java 8 and is compliant with JDBC 4.2. Also, Aerospike server 5.2+ is required, because the driver uses the new <a href="https://docs.oracle.com/javase/8/docs/technotes/guides/jdbc/">Filter expressions</a>.</p><p>The first release of the JDBC driver supports the following SQL statements:</p><ul><li>SELECT</li><li>INSERT</li><li>UPDATE</li><li>DELETE</li></ul><p>You can also add WHERE conditions and LIMIT your queries. JOINS, ORDER BY and GROUP BY are not supported.</p><p>From the very beginning, the driver was designed to support operations that could be done using the regular Java client, without UDFs and other compute and memory hungry components. So, the original intention is to keep it small and easy to start, without workarounds to support features that aren’t native to the Aerospike Database.</p><p>The driver doesn’t support SQL functions as well as the Aerospike <a href="https://www.aerospike.com/docs/guide/cdt.html">collection data types (CDTs)</a>.</p><h4><strong>Getting Started</strong></h4><p>Install the Aerospike JDBC driver and add the location of it to your classpath.</p><p>You can take the JAR file from the <a href="https://github.com/aerospike/aerospike-jdbc/releases">releases</a>, add a <a href="https://mvnrepository.com/artifact/com.aerospike/aerospike-jdbc">Maven dependency</a>, or build it from the <a href="https://github.com/aerospike/aerospike-jdbc#build">sources</a>.</p><p>The Aerospike JDBC driver is statically registered in the AerospikeDriver class. So the only thing required is to load this class.</p><blockquote>Class.forName(“com.aerospike.jdbc.AerospikeDriver”).newInstance();</blockquote><p>The next thing you’ll need to do is to specify the JDBC URL. The URL template is:</p><blockquote>jdbc:aerospike:HOST[:PORT][/NAMESPACE][?PARAM1=VALUE1[&amp;PARAM2=VALUE2]</blockquote><p>For example the <strong>jdbc:aerospike:localhost</strong> URL will connect to the Aerospike database running on a local machine and listening on the default port (3000). The <strong>jdbc:aerospike:172.17.0.5:3300/test</strong> URL connects to the test namespace on the Aerospike database running on 172.17.0.5:3300.</p><p>After the initial setup let’s see a simple usage example of it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b214a5cd14d6866295a7744c49e38585/href">https://medium.com/media/b214a5cd14d6866295a7744c49e38585/href</a></iframe><h4><strong>JDBC Client tools</strong></h4><p>You can browse and manipulate data in Aerospike with any of the available SQL client tools using the JDBC driver.</p><p>There are a number of multiplatform and free database tools available like <a href="https://dbeaver.io/">DBeaver</a>, <a href="http://squirrel-sql.sourceforge.net/">SQuirreL</a>, and others.</p><p>Here are the steps to configure the DBeaver SQL Browser with the Aerospike JDBC driver:</p><ol><li>Database -&gt; Driver Manager -&gt; New<br> Fill in settings:</li></ol><ul><li>Driver Name: Aerospike</li><li>Driver Type: Generic</li><li>Class Name: com.aerospike.jdbc.AerospikeDriver</li><li>URL Template: jdbc:aerospike:{host}[:{port}]/[{database}]</li><li>Default Port: 3000</li></ul><p>2. Click the Add File button and add the JDBC jar file.</p><p>3. Click the Find Class button.</p><p>4. Click OK.</p><p>Create a connection:</p><ol><li>Database -&gt; New Database Connection</li><li>Select Aerospike and click Next.</li><li>Fill in the connection settings</li></ol><ul><li>Host and Port</li><li>Database/Schema: the namespace you are connecting to</li><li>Username and Password if you have security turned on in Aerospike Database Enterprise Edition</li></ul><p>4. Click Finish.</p><p>Now you can open an SQL editor and query your Aerospike cluster:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rp9h6SpuPT3rZI8BfwkQQQ.png" /></figure><h4><strong>Summary</strong></h4><p>The Aerospike JDBC driver is in its very early stages. It will be great if you could try it and give us some feedback. Any contributions to the <a href="https://github.com/aerospike/aerospike-jdbc">project</a> are very welcome.</p><p>Check out my previous Aerospike SQL series if you haven’t done this yet.</p><ol><li><a href="https://www.aerospike.com/blog/introducing-aerospike-connect-for-presto/">Introducing Aerospike Connect for Presto</a></li><li><a href="https://medium.com/aerospike-developer-blog/aerospike-data-browser-c70c05b34a5f">Aerospike Data Browser</a></li></ol><p>And don’t forget to subscribe to the Aerospike developer blog to get updated with our latest news.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fe46d9fc3b4d" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/introducing-aerospike-jdbc-driver-fe46d9fc3b4d">Introducing Aerospike JDBC Driver</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Aerospike Data Browser]]></title>
            <link>https://medium.com/aerospike-developer-blog/aerospike-data-browser-c70c05b34a5f?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/c70c05b34a5f</guid>
            <category><![CDATA[sql]]></category>
            <category><![CDATA[visualization]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[data-browser]]></category>
            <category><![CDATA[aerospike]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Mon, 01 Feb 2021 18:39:13 GMT</pubDate>
            <atom:updated>2021-02-01T18:39:13.159Z</atom:updated>
            <content:encoded><![CDATA[<h4>Discover data in Aerospike, quick and easy, using SQL</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*a6kAkiOPDRK-0jVQ" /><figcaption>Photo by <a href="https://unsplash.com/@tofi?utm_source=medium&amp;utm_medium=referral">Tobias Fischer</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Aerospike is an extremely fast and reliable data store that supports millions of transactions with incredibly low read and write latency. SQL is the lingua franca for data analysis. The key challenge here is that Aerospike is a No-SQL database, hence you cannot use standard SQL tools to analyze data stored in it. Aerospike offers <a href="https://www.aerospike.com/docs/tools/aql/">AQL</a> for lightweight administrative tasks for database maintenance. However, our developer community has been asking for a tool that would enable them to quickly browse or discover data stored in the Aerospike clusters visually along with the ability to run ANSI SQL queries. This has provided the impetus for our effort to create a data browser.</p><p>There are a few open-source data browsers such as <a href="https://github.com/rashidmayes/Clairvoyance">Clairvoyance</a> that can help you view data stored in Aerospike however, but none of them are feature-complete or actively maintained.</p><h4>Enter Aerospike Data Browser</h4><p><a href="https://trino.io/">Presto </a>is a highly parallel and distributed SQL query engine. We recently announced the GA of the <a href="https://aerospike.com/docs/connect/access/presto/index.html">Aerospike Connect for Presto</a>, which can be used to run ANSI SQL queries to perform in-place, on-demand analytics on massive amounts of data in the Aerospike database via Presto.</p><p>So, it was a logical next step for us to leverage Presto and the Presto connector for our data browser design.</p><p>Aerospike Data Browser is basically a stack that consists of <a href="https://github.com/wix/quix">Quix</a>,<a href="https://prestosql.io/"> Presto</a>, and the<a href="https://www.aerospike.com/docs/connect/access/presto/index.html#"> Aerospike Connector for Presto</a>, and is dockerized. Figure 1 depicts an under the hood view. The Quix UI provides a DB Explorer and a SQL editor, in addition to a notebook manager for managing your notebooks. Presto exposes a JDBC interface to Quix and uses the Aerospike Connector to translate SQL queries into API calls to the DB. Building a stack with the aforementioned components for a desktop installation is not trivial by any means. Presto can scale to 100’s of nodes for a large scale deployment, but we wanted to limit the data browser to a single Presto instance that would run both the coordinator and worker in the developer’s desktop environment. Our initial size of the Presto docker image was over 2GB, which was not acceptable. Hence, we stripped out all but the Aerospike connector from the plugin directory. Similarly, we had to downsize the Quix connector. Finally, we got the compressed docker image size under 1GB. We also made a design decision to default to schema inference so that a user that does not know the schema apriori is not left out.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4jfidEVlDPwMsATfmIbQYg.png" /><figcaption>Figure 1 — Under the hood view</figcaption></figure><h4>Why should you care?</h4><p><strong>The data browser enables you to:</strong></p><ul><li>View namespace/set/schema of data stored in Aerospike, without the need to know the schema apriori, across multiple Aerospike clusters.</li><li>Run ANSI SQL queries for data exploration, including<a href="https://prestosql.io/docs/current/functions/aggregate.html"> aggregate functions</a>.</li><li>Visualize data.</li></ul><p>It can be installed very easily using docker. See the <a href="https://github.com/aerospike/aerospike-data-browser">Github repo</a> for details on installation, configuration, and usage.</p><h4>See it in action</h4><p>The DB explorer component of the UI allows you to browse the database and list catalogs, namespaces, and sets that are available as shown in Figure 2. Note that a catalog corresponds to an Aerospike cluster name, schema to a namespace, and table to an Aerospike set name. See<a href="https://trino.io/docs/current/sql.html#sql--page-root"> SQL syntax page</a> for examples and more information.</p><p>Also, there is an option to save your queries to a notebook for future use.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*F46695tuynnNU25wpsv0uQ.png" /><figcaption>Figure 2 — DB Explorer</figcaption></figure><p>Supported SQL statements:</p><ul><li>SHOW CATALOGS</li><li>SHOW SCHEMAS</li><li>USE</li><li>SHOW TABLES</li><li>DESCRIBE</li><li>SELECT</li><li>INSERT INTO</li><li>EXPLAIN</li></ul><p>Figure 3 depicts the result of a query that was written in the query editor built into the UI.</p><blockquote>SELECT * FROM aerospike.test.covid_stats LIMIT 1000</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZkLKKIy_fhoCnRLFT4l9kw.png" /><figcaption>Figure 3 — Query Editor</figcaption></figure><p>You can also visualize the data using the charting capabilities built into the UI as depicted in Figure 4.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GOqwjVlvDDWDDpn-uGCkzA.png" /><figcaption>Figure 4 — Visualizer</figcaption></figure><p>Finally, you can use <a href="https://prestosql.io/docs/current/functions/aggregate.html">aggregate functions</a> as depicted in Figure 5.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/497/1*GeU6x4VzZzxZNT2gqfdROg.png" /><figcaption>Figure 5 — Using aggregate functions</figcaption></figure><h4>What’s next?</h4><p>If you find your data in the Aerospike database staring at you waiting to be quickly discovered, look no further. Use the Aerospike Data Browser to browse through the namespaces and sets to understand the schema of the data. Further, you can run supported ANSI SQL queries against it to generate quick insights. And finally, create some cool visualization. So, try it out by downloading the <a href="https://www.aerospike.com/lp/aerospike-community-edition/">Aerospike Community edition</a> if you don’t have an existing Aerospike deployment, and follow the instructions in the data browser repo.</p><p>Keep in mind that the data browser is not an analytics tool and should not be used for complex analysis of large datasets. You should consider using the <a href="https://www.aerospike.com/blog/accelerate-time-to-insight-presto/">Aerospike Connect for Presto</a> for analytics use cases.</p><p>Spoiler alert! We are working on the Aerospike JDBC driver, which is lightweight, more aligned with the Aerospike server functionality, and easily droppable in any JDBC data browser application. Stay tuned!</p><p>Subscribe to the <a href="https://medium.com/aerospike-developer-blog">Aerospike Developer Blog</a> for interesting blogs and other info.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c70c05b34a5f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/aerospike-data-browser-c70c05b34a5f">Aerospike Data Browser</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Authentication and Authorization using Aerospike REST Client]]></title>
            <link>https://medium.com/aerospike-developer-blog/authentication-and-authorization-using-aerospike-rest-client-ae0837301775?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/ae0837301775</guid>
            <category><![CDATA[authentication]]></category>
            <category><![CDATA[authorization]]></category>
            <category><![CDATA[aerospike]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[kubernetes]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Thu, 30 Jul 2020 10:41:23 GMT</pubDate>
            <atom:updated>2020-07-30T11:14:02.376Z</atom:updated>
            <content:encoded><![CDATA[<h3>Authentication and Authorization using Aerospike REST client</h3><h4>Different approaches with examples</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xcGnUMPDCra5mqcP" /><figcaption>Photo by <a href="https://unsplash.com/@mr_williams_photography?utm_source=medium&amp;utm_medium=referral">Micah Williams</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In this article we will explain and give some examples of the authentication and authorization flows with the <a href="https://github.com/aerospike/aerospike-client-rest">Aerospike REST client</a>.</p><p>If you’re new to the Aerospike REST client please read the <a href="https://medium.com/aerospike-developer-blog/aerospike-rest-client-cb7e5967f423">introduction blog post </a>by Robert Marks.</p><p>Starting from version 1.0.0, the Aerospike REST client has support for a user and password configuration used to login to the Aerospike cluster. Database administrators need to create these credentials first with the required permissions.</p><p>It’s important to mention that the Access Control feature is available only in Aerospike <a href="https://www.aerospike.com/products/product-matrix/">Enterprise Edition</a>.</p><p>This setup works perfectly, but what if we want to support multiple users to enable multi-tenancy?</p><p>In this case, customers might establish multiple Aerospike REST client clusters, authenticated with different credentials, and route the traffic accordingly. But this setup will require tedious installation operations and will tend to waste resources most of the time.</p><p>Starting with Aerospike REST client v1.6.0, multi-user authentication is supported. So how does it work? As we already know, the REST client uses the Java client under the hood. Using the single authentication configuration, the REST client shares a singleton authenticated Java client for all requests.</p><p>The multi-user feature introduces an LRU based Java client cache. To start using it, customers will need to send Aerospike login credentials using<a href="https://en.wikipedia.org/wiki/Basic_access_authentication"> Basic access authentication</a>.</p><blockquote>For example, using the default admin:admin credentials, send the Authorization: Basic YWRtaW46YWRtaW4= header with your requests to make authenticated queries.</blockquote><p>The REST client will seek for a properly authenticated Java client in the LRU cache and if such does not exist, it will create a new one using the given username and password.</p><p>If the cache capacity is exceeded, the least recently used client will be dropped.</p><p>To use the new feature, set the following configuration variables:</p><ul><li><strong>aerospike.restclient.requireAuthentication</strong> - Set this boolean flag to true to require Basic Authentication on each request.</li><li><strong>aerospike.restclient.pool.size</strong> - Represents the max size of the authenticated clients LRU cache (default value: 16). Please note that an oversized client cache will consume a lot of resources and affect performance.</li></ul><p>Refer to the <a href="https://github.com/aerospike/aerospike-client-rest/blob/master/docs/installation-and-config.md">Installation and Configuration</a> REST client page for installation, configuration and running manual.</p><p>All this is good but we should talk about different approaches to setting up a multi-user environment, right? Let’s move to the next one.</p><h3>Kubernetes</h3><p>To deploy the Aerospike REST client in <a href="https://kubernetes.io/">Kubernetes</a> please use the official <a href="https://github.com/aerospike/aerospike-client-rest-kubernetes">Helm chart</a>.</p><p>The installation and configuration details are available in the readme file, but still, here are the first steps we need to get started.</p><h4>Add Aerospike repository</h4><p>helm repo add aerospike <a href="https://aerospike.github.io/aerospike-kubernetes-enterprise">https://aerospike.github.io/aerospike-kubernetes-enterprise</a></p><h4>Install the chart</h4><p>helm install rest-client aerospike/aerospike-rest-client --set config.hostname=&lt;aerospike_hostname&gt;</p><p>We can configure <a href="https://kubernetes.io/docs/concepts/services-networking/ingress/">Ingress</a> and route the traffic to different K8s deployments. Kubernetes will manage the resources for us. The multi-user header based authentication is available here as well though.</p><h3>Using a proxy server authentication middleware</h3><p>This approach changes the way we handle auth flows and shifts it to a third party software layer instead of using the Aerospike cluster Access Control (hey there Community Edition folks…)</p><p>To get things up and running we need the following:</p><ul><li>A proxy server. It can be Traefik, Envoy, Nginx or any other proxy that we like with the auth middleware support.</li><li>An authentication and authorization software to handle the auth requests (like <a href="https://auth0.com/">Auth0</a> or any other <a href="https://en.wikipedia.org/wiki/OAuth">OAuth</a> provider).</li><li>The Aerospike REST client itself.</li></ul><p>The proxy will require authorization from the auth middleware and if the check passed will route the request to the REST client. See the following <a href="https://github.com/aerospike-examples/aerospike-rest-client-auth">example</a> implementing this architecture.</p><p>I’ll paste here the architecture diagram just in case.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/0*lbrgd7jdnWhLen0y" /></figure><p>Also, you may find the <a href="https://github.com/aerospike-examples/rest-client-gateway-spa-example">REST client gateway example</a> using an API Gateway and Auth0 to be useful.</p><p>In this article we’ve listed a number of approaches on how to use the authentication and authorization with the Aerospike REST client and have seen some examples.</p><p>I hope it was interesting and beneficial at the same time. If you have any questions regarding the Aerospike REST client, don’t hesitate to open an issue under the <a href="https://github.com/aerospike/aerospike-client-rest">GitHub repository</a> or contact our team on the <a href="https://discuss.aerospike.com/">https://discuss.aerospike.com/</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ae0837301775" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/authentication-and-authorization-using-aerospike-rest-client-ae0837301775">Authentication and Authorization using Aerospike REST Client</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dealing with Predicate Expression Filters in Aerospike REST Client (Part 2)]]></title>
            <link>https://medium.com/aerospike-developer-blog/dealing-with-predicate-expression-filters-in-aerospike-rest-client-part-2-b9d9358c8a4e?source=rss-c878109e40b9------2</link>
            <guid isPermaLink="false">https://medium.com/p/b9d9358c8a4e</guid>
            <category><![CDATA[database]]></category>
            <category><![CDATA[rest-api]]></category>
            <category><![CDATA[nosql]]></category>
            <category><![CDATA[aerospike]]></category>
            <category><![CDATA[predicate]]></category>
            <dc:creator><![CDATA[Eugene Rizhkov]]></dc:creator>
            <pubDate>Sun, 26 Apr 2020 23:03:42 GMT</pubDate>
            <atom:updated>2021-10-18T18:25:50.340Z</atom:updated>
            <cc:license>https://creativecommons.org/licenses/by-sa/4.0/</cc:license>
            <content:encoded><![CDATA[<h4>Diving deeper</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*K4LhwnDNC2rlINKx" /><figcaption>Photo by <a href="https://unsplash.com/@adigold1?utm_source=medium&amp;utm_medium=referral">Adi Goldstein</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>In the previous <a href="https://medium.com/aerospike-developer-blog/dealing-with-predicate-expression-filters-in-aerospike-rest-client-part-1-a43e43ac8c7d">part</a> we spoke about using simple Predicate Expression Filters with the <a href="https://www.aerospike.com/docs/client/rest/index.html">Aerospike REST Client</a>. In this post I want to dive deeper and show how special filter operators could come in handy.</p><p><strong>LAST_UPDATE</strong></p><p>Asserts the last update time before processing the transaction.</p><p>Parameters:</p><ul><li>comparison operator</li><li>time in seconds since the epoch time (1970–01–01)</li></ul><p>Example:</p><pre>LAST_UPDATE(&gt;=, 1577880000)</pre><p>Java equivalent:</p><pre>PredExp.recLastUpdate()<br>PredExp.integerValue(1577880000000000000) //in nano<br>PredExp.integerGreaterEq()</pre><p><strong>VOID_TIME</strong></p><p>Asserts the record’s expiration time before processing the transaction.</p><p>Parameters:</p><ul><li>comparison operator</li><li>time in seconds since the epoch time (1970–01–01)</li></ul><p>Example:</p><pre>VOID_TIME(&gt;=, 1577880000)</pre><p>Java equivalent:</p><pre>PredExp.recVoidTime()<br>PredExp.integerValue(1577880000000000000) //in nano<br>PredExp.integerGreaterEq()</pre><p><strong>DIGEST_MODULO</strong></p><p>Asserts a modulo against the record’s digest. The 160 bits (20 Bytes) digest field is generated by hashing the set name and the user key using the RipeMD-160 hashing function.</p><p>Parameters:</p><ul><li>modulo divisor</li><li>comparison operator</li><li>expected remainder value</li></ul><p>Example for digest(key) % 3 == 1:</p><pre>DIGEST_MODULO(3, ==, 1)</pre><p>Java equivalent:</p><pre>PredExp.recDigestModulo(3)<br>PredExp.integerValue(1)<br>PredExp.integerEqual()</pre><p><strong>STRING_REGEX</strong></p><p>Asserts that the regular expression matches the string valued bin.</p><p>Parameters:</p><ul><li>string bin name</li><li>regular expression</li></ul><p>Example:</p><pre>STRING_REGEX(str, [0–9]*)</pre><p>Java equivalent:</p><pre>PredExp.stringBin(“str”)<br>PredExp.stringValue(“[0–9]*”)<br>PredExp.stringRegex(RegexFlag.NONE)</pre><p><strong>LIST_ITERATE_OR</strong></p><p>Creates a predicate expression to match <strong>any</strong> item in a list value bin.</p><p>Parameters:</p><ul><li>list bin name</li><li>comparison operator</li><li>value</li></ul><p>Example:</p><p>Find records where any list item v = “hello” in list bin x.</p><pre>LIST_ITERATE_OR(x, ==, hello)</pre><p>Java equivalent:</p><pre>PredExp.stringVar(“v”)<br>PredExp.stringValue(“hello”)<br>PredExp.stringEqual()<br>PredExp.listBin(“x”)<br>PredExp.listIterateOr(“v”)</pre><p><strong>LIST_ITERATE_AND</strong></p><p>Creates a predicate expression to match <strong>all</strong> items in a list value bin.</p><p>Parameters:</p><ul><li>list bin name</li><li>comparison operator</li><li>value</li></ul><p>Example:</p><p>Find records where all list elements v != “world” in list bin x.</p><pre>LIST_ITERATE_AND(x, !=, world)</pre><p>Java equivalent:</p><pre>PredExp.stringVar(“v”)<br>PredExp.stringValue(“world”)<br>PredExp.stringUnequal()<br>PredExp.listBin(“x”)<br>PredExp.listIterateAnd(“v”)</pre><p><strong>MAPKEY_ITERATE_OR</strong></p><p>Creates a predicate expression to match <strong>any</strong> map key.</p><p>Parameters:</p><ul><li>map bin name</li><li>comparison operator</li><li>value</li></ul><p>Example:</p><p>Find records where any map key k = 7 in map bin m.</p><pre>MAPKEY_ITERATE_OR(m, ==, 7)</pre><p>Java equivalent:</p><pre>PredExp.integerVar(“k”)<br>PredExp.integerValue(7)<br>PredExp.integerEqual()<br>PredExp.mapBin(“m”)<br>PredExp.mapKeyIterateOr(“k”)</pre><p><strong>MAPVAL_ITERATE_OR</strong></p><p>Creates a predicate expression to match <strong>any</strong> map value.</p><p>Parameters:</p><ul><li>map bin name</li><li>comparison operator</li><li>value</li></ul><p>Example:</p><p>Find records where any map value v &gt; 100 in map bin m.</p><pre>MAPVAL_ITERATE_OR(m, &gt;, 100)</pre><p>Java equivalent:</p><pre>PredExp.integerVar(“v”)<br>PredExp.integerValue(100)<br>PredExp.integerGreater()<br>PredExp.mapBin(“m”)<br>PredExp.mapValIterateOr(“v”)</pre><p><strong>MAPKEY_ITERATE_AND</strong></p><p>Creates a predicate expression to match <strong>all</strong> map keys.</p><p>Parameters:</p><ul><li>map bin name</li><li>comparison operator</li><li>value</li></ul><p>Example:</p><p>Find records where all map keys k &lt; 5 in map bin m.</p><pre>MAPKEY_ITERATE_AND(m, &lt;, 5)</pre><p>Java equivalent:</p><pre>PredExp.integerVar(“k”)<br>PredExp.integerValue(5)<br>PredExp.integerLess()<br>PredExp.mapBin(“m”)<br>PredExp.mapKeyIterateAnd(“k”)</pre><p><strong>MAPVAL_ITERATE_AND</strong></p><p>Creates a predicate expression to match <strong>all</strong> map values.</p><p>Parameters:</p><ul><li>map bin name</li><li>comparison operator</li><li>value</li></ul><p>Example:</p><p>Find records where all map values v &gt; 500 in map bin m.</p><pre>MAPVAL_ITERATE_AND(m, &gt;, 500)</pre><p>Java equivalent:</p><pre>PredExp.integerVar(“v”)<br>PredExp.integerValue(500)<br>PredExp.integerGreater()<br>PredExp.mapBin(“m”)<br>PredExp.mapValIterateAnd(“v”)</pre><p>At the end you can glue those with logical operators (and | or) mixing with simple filters, Base64-encode the whole expression and send it as a GET parameter.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/5ceafb6406c6165d29024efa1078517a/href">https://medium.com/media/5ceafb6406c6165d29024efa1078517a/href</a></iframe><p>To summarize, we’ve seen that Predicate Expression Filters are a very powerful tool and learned how to use them with the Aerospike REST Client.</p><p>If you still haven’t tried Aerospike REST Client and want to do so, you can find it <a href="https://github.com/aerospike/aerospike-client-rest">here</a>. I have more code examples here: <a href="https://github.com/aerospike-examples/rest-client-usage">https://github.com/aerospike-examples/rest-client-usage</a></p><h3>Deprecation Note</h3><p>As of Aerospike Database 5.2, Predicate Expressions (PredExps) are obsolete, and are scheduled for removal in version 5.8. Please use <a href="https://docs.aerospike.com/docs/guide/expressions">Aerospike Expressions</a> instead. The REST gateway adds the ability to attach an Expression filter in <a href="https://github.com/aerospike/aerospike-client-rest/releases/tag/1.9.0">release 1.9.0</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b9d9358c8a4e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/aerospike-developer-blog/dealing-with-predicate-expression-filters-in-aerospike-rest-client-part-2-b9d9358c8a4e">Dealing with Predicate Expression Filters in Aerospike REST Client (Part 2)</a> was originally published in <a href="https://medium.com/aerospike-developer-blog">Aerospike Blog</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>