mastodon.xyz is one of the many independent Mastodon servers you can use to participate in the fediverse.
A Mastodon instance, open to everyone, but mainly English and French speaking.

Administered by:

Server stats:

819
active users

#keyvalue

0 posts0 participants0 posts today
Sebastian Lasse<p>Any deno kv experts out here? <br>For FLOSS ActivityPub Clients:<br>I am looking for best practices for a key which has a geohash as secondary index and might be searchable by Date as well, like an as `Event` with a `location` <br>:)</p><p><a href="https://digitalcourage.social/tags/deno" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>deno</span></a> <a href="https://digitalcourage.social/tags/kv" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>kv</span></a> <a href="https://digitalcourage.social/tags/keyvalue" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>keyvalue</span></a> <a href="https://digitalcourage.social/tags/denokv" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>denokv</span></a> <a href="https://digitalcourage.social/tags/geohash" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>geohash</span></a> <a href="https://digitalcourage.social/tags/database" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>database</span></a> <a href="https://digitalcourage.social/tags/activitypub" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>activitypub</span></a></p>
Melroy van den Berg<p>I believe I didn't share my blog post yet on my mastodon. So I created a new blog post 😄. It's about <a href="https://mastodon.melroy.org/tags/valkey" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>valkey</span></a> a great <a href="https://mastodon.melroy.org/tags/redis" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>redis</span></a> replacement:</p><p><a href="https://blog.melroy.org/2024/move-to-valkey/" rel="nofollow noopener noreferrer" translate="no" target="_blank"><span class="invisible">https://</span><span class="ellipsis">blog.melroy.org/2024/move-to-v</span><span class="invisible">alkey/</span></a></p><p><a href="https://mastodon.melroy.org/tags/keyvalue" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>keyvalue</span></a> <a href="https://mastodon.melroy.org/tags/database" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>database</span></a> <a href="https://mastodon.melroy.org/tags/redisalternate" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>redisalternate</span></a></p>
Melroy van den Berg<p><span class="h-card" translate="no"><a href="https://fosstodon.org/@linux_mclinuxface" class="u-url mention" rel="nofollow noopener noreferrer" target="_blank">@<span>linux_mclinuxface</span></a></span> More hashtags could help: <a href="https://mastodon.melroy.org/tags/redis" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>redis</span></a> <a href="https://mastodon.melroy.org/tags/keyvalue" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>keyvalue</span></a> <a href="https://mastodon.melroy.org/tags/kvstore" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>kvstore</span></a> <a href="https://mastodon.melroy.org/tags/memory" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>memory</span></a> <a href="https://mastodon.melroy.org/tags/database" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>database</span></a> <a href="https://mastodon.melroy.org/tags/cache" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>cache</span></a></p>
Rafael Caricio<p>It’s incredible how open Netflix talks about internal tech. If you are interested in databases, then this blog post is amazing: <a href="https://netflixtechblog.medium.com/data-gateway-a-platform-for-growing-and-protecting-the-data-tier-f1ed8db8f5c6" rel="nofollow noopener noreferrer" target="_blank">https://netflixtechblog.medium.com/data-gateway-a-platform-for-growing-and-protecting-the-data-tier-f1ed8db8f5c6</a></p><p>I’ve been using the KVDAL and it is indeed awesome. :ablobcatheartsqueeze:</p><p><a href="https://nullpointer.social/tags/netflix" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Netflix</span></a> <a href="https://nullpointer.social/tags/database" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Database</span></a> <a href="https://nullpointer.social/tags/keyvalue" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KeyValue</span></a></p>
Kaan Barmore-Genc<p>Announcing Cuttlestore: A basic <a href="https://fosstodon.org/tags/Rust" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>Rust</span></a> wrapper for generic <a href="https://fosstodon.org/tags/KeyValue" class="mention hashtag" rel="nofollow noopener noreferrer" target="_blank">#<span>KeyValue</span></a> stores like Redis. You can use it with different stores selected at runtime. <a href="https://github.com/SeriousBug/cuttlestore" rel="nofollow noopener noreferrer" target="_blank"><span class="invisible">https://</span><span class="ellipsis">github.com/SeriousBug/cuttlest</span><span class="invisible">ore</span></a></p><p>Currently supported backends are Redis, Sqlite, a basic filesystem store, and a super efficient in-memory store.</p><p>The main goal is using it to build apps that can be used with different stores to suit different deployments. Like using Sqlite for a small deployment and Redis for one that needs to be scalable.</p>
veer66Key-value data in Common Lisp<p>tags: <a class="hashtag" href="https://norze.world/tag/commonlisp" rel="nofollow noopener noreferrer" target="_blank">#commonlisp</a> <a class="hashtag" href="https://norze.world/tag/keyvalue" rel="nofollow noopener noreferrer" target="_blank">#keyvalue</a> <a class="hashtag" href="https://norze.world/tag/plist" rel="nofollow noopener noreferrer" target="_blank">#plist</a> </p><p>I enjoy using key-value data in dynamic languages. For example, in Python, I can create key-value data for storing the metadata of a document as shown below. I don’t discuss why I don’t use struct, class, named tuple in this post.</p><pre><code>doc_metadata = {"title": "The Rust Programming Language", "type": "book", "number-of-pages": 584, "authors": ["Steve Klabnik", "Carol Nichols", "contributions"]}</code></pre><p>I can code read/write a value easily, for example:</p><pre><code># Write doc_metadata["type"] = "text book" # Read print(doc_metadata["type"])</code></pre><p>In Perl and Ruby, we can use Hash, which is almost the same thing as Dict in Python. In JavaScript, we can use an object. </p><p>Common Lisp is different. We can use a hash table, but it is not as convenient as Dict in Python. </p><pre><code>(let ((doc-metadata (make-hash-table))) (setf (gethash :title doc-metadata) "The Rust Programming Language") (setf (gethash :type doc-metadata) :BOOK) (setf (gethash :number-of-pages doc-metadata) 584) (setf (gethash :authors doc-metadata) '("Steve Klabnik" "Carol Nichols" "contributions")))</code></pre><p>Besides construction, printing a hash table is not so convenient. Maybe one can create a function or macro to make creating/printing a hash table convenient. I still felt that I abused Common Lisp. </p><p>My code is usually too buggy when I keep mutating the same variable. So I prefer using an immutable data structure to prevent me from messing things up. Moreover, my key-value data usually do not have more than five keys. So I don’t strictly need to use an efficient data structure, namely, hash table or binary search tree. So I use alist (assosiation list). I can construct a list like below:</p><pre><code>(setq doc-metadata '((:title . "The Rust Programming Language") (:type . :BOOK) (:number-of-pages . 542) (:authors . '("Steve Klabnik" "Carol Nichols" "contributions"))))</code></pre><p>IMO, it looks concise and convenient. We can retrieve key-value pair with a specific key using the assoc function, which I suppose it does linear search. Linear search can be slow. However, my alist doesn’t have a lot of keys. </p><p>Instead of replacing a value with another value, I can add a new key-value pair with an existing key, for example:</p><pre><code>(setq another-doc-metadata (acons :type :TEXT-BOOK doc-metadata))</code></pre><p>By retrieving the value of :type using assoc, we get the new value because assoc function retrieves the first key found in alist, for example:</p><pre><code>(cdr (assoc :type another-doc-metadata)) ;; OUTPUT =&gt; :TEXT-BOOK</code></pre><p>However, with function calls instead of number/string literal, alist doesn’t look concise anymore, for example:</p><pre><code>(list (cons :title (get-title x y z)) (cons :type (get-type x)) (cons :number-of-pages (get-number-of-pages a b c)) (cons :authors (get-authors c d)))</code></pre><p>plist looks much more concise, for example:</p><pre><code>(setq doc-metadata (list :title (get-title x y z) :type (get-type x) :number-of-pages (get-number-of-pages a b c) :authors (get-authors c d)))</code></pre><p>I can retrieve a value corresponding to a key easily by getf function. For example:</p><pre><code>(getf doc-metadata :type)</code></pre><p>A new value can be replaced the old value by setf, example:</p><pre><code>(setf (getf doc-mentadata :type) :TEXT-BOOK)</code></pre><p>setf is different from acons since acons doesn’t mutate the existing list, setf does. Therefore plist is not exactly what I’m looking for. </p><p>Maybe the best way is using an Alexandria function for converting plist ot alist as Michał “phoe” Herda suggested.</p>