{"id":57747,"date":"2025-08-09T21:21:04","date_gmt":"2025-08-09T21:21:04","guid":{"rendered":"https:\/\/www.newsbeep.com\/ca\/57747\/"},"modified":"2025-08-09T21:21:04","modified_gmt":"2025-08-09T21:21:04","slug":"new-rust-client-enables-building-safe-high-performance-apps-with-aerospike","status":"publish","type":"post","link":"https:\/\/www.newsbeep.com\/ca\/57747\/","title":{"rendered":"New Rust Client Enables Building Safe, High-Performance Apps with Aerospike"},"content":{"rendered":"<p>Aerospike has officially <a href=\"https:\/\/aerospike.com\/blog\/introducing-aerospike-rust-client\/\" rel=\"nofollow noopener\" target=\"_blank\">released its Rust client<\/a> to support high-throughput, low-latency applications interacting with its real-time NoSQL database.<\/p>\n<p>The decision to officially adopt the previously community-supported Rust client, explains Aerospike\u2019s Brian Porter, was driven by the growing use of Rust to build high-throughput, low-latency applications across industries such as finance, telecommunications, cloud infrastructure, and embedded systems.<\/p>\n<p>&#13;<\/p>\n<p>Organizations such as Amazon, Cloudflare, and Discord have adopted Rust to build reliable infrastructure and eliminate classes of memory-related bugs that commonly affect C\/C++-based software.<\/p>\n<p>&#13;<\/p>\n<p>The Rust client adopts an async-first concurrency model, allowing developers to choose either the <a href=\"https:\/\/tokio.rs\/\" rel=\"nofollow noopener\" target=\"_blank\">Tokio<\/a> crate or <a href=\"https:\/\/async.rs\/\" rel=\"nofollow noopener\" target=\"_blank\">async-std<\/a> as the underlying implementation. For legacy or mixed environments, it also includes a sub-crate that exposes a blocking I\/O API.<\/p>\n<p>In addition to atomic operations, the client supports <a href=\"https:\/\/aerospike.com\/docs\/develop\/client\/rust\/usage\/multi\/batch\/\" rel=\"nofollow noopener\" target=\"_blank\">batch commands<\/a> to operate on multiple records in a single call. <a href=\"https:\/\/github.com\/aerospike\/aerospike-client-rust\/tree\/v2\" rel=\"nofollow noopener\" target=\"_blank\">Version 2 of the client<\/a> adds full support for read, write, delete, and UDF operations. It also enables to query records using both primary and secondary indexes, with support for pagination and limiting the number of returned records.<\/p>\n<p>Other important features of the Rust client include support for replica policies and throttling as well as high-level representations for data model types like Exists, OrderedMap, and UnorderedMap.<\/p>\n<p>The following snippet succinctly demonstrates how to run a query on a primary index to retrieve records that meet a given condition:<\/p>\n<p>&#13;<br \/>\nlet client = &#8230;&#13;<br \/>\nlet mut policy = ScanPolicy::default();&#13;<br \/>\npolicy.include_bin_data = false;&#13;<br \/>\nmatch client.scan(&amp;policy, &#8220;test&#8221;, &#8220;demo&#8221;, None) {&#13;<br \/>\n    Ok(records) =&gt; {&#13;<br \/>\n        \/\/ process the records&#13;<br \/>\n    },&#13;<br \/>\n    Err(err) =&gt; println!(&#8220;Error fetching record: {}&#8221;, err),&#13;<br \/>\n}&#13;<\/p>\n<p>Likewise, this is how you create a record by associating it to a key:<\/p>\n<p>&#13;<br \/>\nlet key = as_key!(&#8220;test&#8221;, &#8220;myset&#8221;, &#8220;mykey&#8221;);&#13;<br \/>\nlet bin = as_bin!(&#8220;mybin&#8221;, &#8220;myvalue&#8221;);&#13;<br \/>\nmatch client.put(&amp;policy, &amp;key, &amp;vec![&amp;bin]) {&#13;<br \/>\n    Ok(()) =&gt; println!(&#8220;Record written&#8221;),&#13;<br \/>\n    Err(err) =&gt; println!(&#8220;Error writing record: {}&#8221;, err),&#13;<br \/>\n}&#13;<\/p>\n<p>On Aerospike\u2019s roadmap for its Rust client are several powerful features, including support for partition queries, <a href=\"https:\/\/www.infoq.com\/news\/2025\/02\/aerospike-database-8-acid\/\" rel=\"nofollow noopener\" target=\"_blank\">distributed ACID transactions<\/a>, strong consistency, and full TLS support.<\/p>\n<p>Aerospike offers several other client libraries to help developers build applications with its database in an idiomatic way, including Node.js, Java, Python, C, and more.<\/p>\n","protected":false},"excerpt":{"rendered":"Aerospike has officially released its Rust client to support high-throughput, low-latency applications interacting with its real-time NoSQL database.&hellip;\n","protected":false},"author":2,"featured_media":57748,"comment_status":"","ping_status":"","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[6],"tags":[38205,62,49,48,2057,4113,17770,38206,38207,38208,61],"class_list":["post-57747","post","type-post","status-publish","format-standard","has-post-thumbnail","category-technology","tag-aerospike-rust-client","tag-ai","tag-ca","tag-canada","tag-cloud","tag-development","tag-ml-data-engineering","tag-nosql","tag-open-source","tag-rust","tag-technology"],"_links":{"self":[{"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/posts\/57747","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/comments?post=57747"}],"version-history":[{"count":0,"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/posts\/57747\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/media\/57748"}],"wp:attachment":[{"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/media?parent=57747"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/categories?post=57747"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.newsbeep.com\/ca\/wp-json\/wp\/v2\/tags?post=57747"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}