<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Datomic Knowledgebase - Recent questions tagged peer api</title>
<link>https://ask.datomic.com/index.php/tag/peer+api</link>
<description>Powered by Question2Answer</description>
<item>
<title>Why does Datomic block shutting down when using :timeout in d/query?</title>
<link>https://ask.datomic.com/index.php/1027/why-does-datomic-block-shutting-down-when-using-timeout-query</link>
<description>&lt;p&gt;We started adding a &lt;code&gt;:timeout&lt;/code&gt; to our &lt;code&gt;d/query&lt;/code&gt; calls, and noticed that this made our app and test suite not shutdown properly anymore.  I have pinpointed this to an thread &lt;code&gt;pool-2-thread-1&lt;/code&gt; that is keeping the VM alive, because it does not have the daemon flag set. If we don't use &lt;code&gt;:timeout&lt;/code&gt;, this thread is not being created.&lt;/p&gt;
&lt;p&gt;It seems that the ThreadFactory used by &lt;code&gt;datomic.datalog/cancel-service&lt;/code&gt; does not set this daemon flag. Is this intentional?&lt;/p&gt;
&lt;p&gt;As a workaround we now use this, which seems to work and doesn't block shutdown:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(.setThreadFactory datomic.datalog/cancel-service
                   (reify java.util.concurrent.ThreadFactory
                     (newThread [_this runnable]
                       (doto (Thread. runnable)
                         (.setName &quot;cancel-service&quot;)
                         (.setDaemon true))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I think the current behavior is a bug/oversight, and it would be great if these threads were made daemons by default in the future (just like every other thread Datomic seems to create).&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1027/why-does-datomic-block-shutting-down-when-using-timeout-query</guid>
<pubDate>Tue, 16 Jul 2024 12:19:45 +0000</pubDate>
</item>
<item>
<title>Store values encrypted, allowing key rotation.</title>
<link>https://ask.datomic.com/index.php/464/store-values-encrypted-allowing-key-rotation</link>
<description>&lt;p&gt;In our application we have a requirement to store certain fields encrypted. This encryption is done in the application. However, we would like to be able to rotate the encryption key should it become compromised, and retain the historical query features that you would get with unencrypted storage. In order to rotate the key, we have to excise the data and re-transact it with the new key, or store the encrypted values outside of Datomic. It would be nice to have an encryption API that enabled this use case.&lt;/p&gt;
</description>
<category>Datomic</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/464/store-values-encrypted-allowing-key-rotation</guid>
<pubDate>Sun, 25 Oct 2020 19:14:02 +0000</pubDate>
</item>
<item>
<title>Backup and Restore available via Peer API</title>
<link>https://ask.datomic.com/index.php/451/backup-and-restore-available-via-peer-api</link>
<description>&lt;p&gt;Allow for on-prem backup and restore via the peer-api.&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/451/backup-and-restore-available-via-peer-api</guid>
<pubDate>Thu, 22 Oct 2020 18:14:38 +0000</pubDate>
</item>
<item>
<title>Ability to limit the number of results from query</title>
<link>https://ask.datomic.com/index.php/446/ability-to-limit-the-number-of-results-from-query</link>
<description>&lt;p&gt;Currently there is no built in way to limit the results from a query. This puts the task on the user to limit the results by first querying for entity ids, limiting that number and then pulling the data.&lt;/p&gt;
</description>
<category>Datomic</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/446/ability-to-limit-the-number-of-results-from-query</guid>
<pubDate>Thu, 22 Oct 2020 17:42:57 +0000</pubDate>
</item>
<item>
<title>Query explain for datalog</title>
<link>https://ask.datomic.com/index.php/447/query-explain-for-datalog</link>
<description>One of the places that we struggle with the most is understanding query performance. In general we get the idea that in order to write a fast query you need to reduce the search space as quickly as possible. As a result the most specific datalog clause should go first. However, we have found cases when that is not always true. For example when an attribute is a reference or when an attribute is indexed. Since we have little insight into how the query planner works its hard for us to tell what will make a query fast. We can and do optimize our queries by hand. But as our system grows and we add more queries this hand optimization becomes more burdensome. It would be great to have a tool, similar to a sql explain, that would give us the fastest ordering of the datalog clauses and provide suggestions for adding indexes.</description>
<category>Datomic</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/447/query-explain-for-datalog</guid>
<pubDate>Thu, 22 Oct 2020 16:24:23 +0000</pubDate>
</item>
<item>
<title>Expose standby/active transactor status in on-prem metrics.</title>
<link>https://ask.datomic.com/index.php/434/expose-standby-active-transactor-status-in-on-prem-metrics</link>
<description>&lt;p&gt;Provide a method through an API to allow monitoring of standby/active status of transactors in on-prem.&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/434/expose-standby-active-transactor-status-in-on-prem-metrics</guid>
<pubDate>Thu, 22 Oct 2020 16:00:30 +0000</pubDate>
</item>
</channel>
</rss>