<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.memcp.org/index.php?action=history&amp;feed=atom&amp;title=MemCP_for_Microservices</id>
	<title>MemCP for Microservices - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.memcp.org/index.php?action=history&amp;feed=atom&amp;title=MemCP_for_Microservices"/>
	<link rel="alternate" type="text/html" href="https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;action=history"/>
	<updated>2026-09-17T11:04:11Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.39.1</generator>
	<entry>
		<id>https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;diff=394&amp;oldid=prev</id>
		<title>Wikiservice: Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference</title>
		<link rel="alternate" type="text/html" href="https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;diff=394&amp;oldid=prev"/>
		<updated>2026-08-28T10:14:01Z</updated>

		<summary type="html">&lt;p&gt;Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 12:14, 28 August 2026&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l23&quot;&gt;Line 23:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 23:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The repository&amp;#039;s &amp;lt;code&amp;gt;apps/keyvalue.scm&amp;lt;/code&amp;gt; example creates a table and parses fixed SELECT/upsert statements once during startup. Each request creates a session, binds the key/value, and evaluates the prepared formula. That avoids parsing and planning the same statement on every request while keeping caller values separate from SQL text.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The repository&amp;#039;s &amp;lt;code&amp;gt;apps/keyvalue.scm&amp;lt;/code&amp;gt; example creates a table and parses fixed SELECT/upsert statements once during startup. Each request creates a session, binds the key/value, and evaluates the prepared formula. That avoids parsing and planning the same statement on every request while keeping caller values separate from SQL text.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&amp;quot;scheme&amp;quot;&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(set item_get (parse_sql &amp;quot;keyvalue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(set item_get (parse_sql &amp;quot;keyvalue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;quot;SELECT value FROM kv WHERE key = @key&amp;quot;))&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;quot;SELECT value FROM kv WHERE key = @key&amp;quot;))&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l29&quot;&gt;Line 29:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 29:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;quot;INSERT INTO kv(key, value) VALUES (@key, @value)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	&amp;quot;INSERT INTO kv(key, value) VALUES (@key, @value)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	 ON DUPLICATE KEY UPDATE value = @value&amp;quot;))&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;	 ON DUPLICATE KEY UPDATE value = @value&amp;quot;))&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The complete example installs a request handler and starts its own HTTP listener:&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;The complete example installs a request handler and starts its own HTTP listener:&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight lang=&amp;quot;scheme&amp;quot;&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(createdatabase &amp;quot;keyvalue&amp;quot; true)&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(createdatabase &amp;quot;keyvalue&amp;quot; true)&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(eval (parse_sql &amp;quot;keyvalue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(eval (parse_sql &amp;quot;keyvalue&amp;quot;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l56&quot;&gt;Line 56:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 56:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(serve 1266 (lambda (req res) (http_handler req res)))&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;(serve 1266 (lambda (req res) (http_handler req res)))&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;−&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #ffe49c; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;del style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;syntaxhighlight&lt;/del&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot; data-marker=&quot;+&quot;&gt;&lt;/td&gt;&lt;td style=&quot;color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;pre&lt;/ins&gt;&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;br/&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Run the maintained repository version with &amp;lt;code&amp;gt;./memcp apps/keyvalue.scm&amp;lt;/code&amp;gt;, store a value using &amp;lt;code&amp;gt;curl --data-binary value http://localhost:1266/key&amp;lt;/code&amp;gt;, and retrieve it with &amp;lt;code&amp;gt;curl http://localhost:1266/key&amp;lt;/code&amp;gt;. This demonstration intentionally omits production authentication and limits; do not expose it unchanged.&lt;/div&gt;&lt;/td&gt;&lt;td class=&quot;diff-marker&quot;&gt;&lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #202122; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;Run the maintained repository version with &amp;lt;code&amp;gt;./memcp apps/keyvalue.scm&amp;lt;/code&amp;gt;, store a value using &amp;lt;code&amp;gt;curl --data-binary value http://localhost:1266/key&amp;lt;/code&amp;gt;, and retrieve it with &amp;lt;code&amp;gt;curl http://localhost:1266/key&amp;lt;/code&amp;gt;. This demonstration intentionally omits production authentication and limits; do not expose it unchanged.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;

&lt;!-- diff cache key memcp_wiki-mediawiki-:diff::1.12:old-344:rev-394 --&gt;
&lt;/table&gt;</summary>
		<author><name>Wikiservice</name></author>
	</entry>
	<entry>
		<id>https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;diff=344&amp;oldid=prev</id>
		<title>Wikiservice: Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference</title>
		<link rel="alternate" type="text/html" href="https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;diff=344&amp;oldid=prev"/>
		<updated>2026-08-28T09:59:33Z</updated>

		<summary type="html">&lt;p&gt;Refresh MemCP documentation: accuracy, operational guidance, performance profile and maintained API reference&lt;/p&gt;
&lt;a href=&quot;https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;amp;diff=344&amp;amp;oldid=198&quot;&gt;Show changes&lt;/a&gt;</summary>
		<author><name>Wikiservice</name></author>
	</entry>
	<entry>
		<id>https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;diff=198&amp;oldid=prev</id>
		<title>Carli: Created page with &quot;MemCP is a neat database to implement microservices.   Here&#039;s a code example for a simple key value store:  /* microservice democase: a simple key value store with prepared statements */  (import &quot;../lib/sql-parser.scm&quot;)  (import &quot;../lib/queryplan.scm&quot;)    /* initialize database and prepare sql statements */  (createdatabase &quot;keyvalue&quot; true)  (eval (parse_sql &quot;keyvalue&quot; &quot;CREATE TABLE IF NOT EXISTS kv(key TEXT, value TEXT, UNIQUE KEY PRIMARY(key))&quot;))    (set item_get (par...&quot;</title>
		<link rel="alternate" type="text/html" href="https://www.memcp.org/index.php?title=MemCP_for_Microservices&amp;diff=198&amp;oldid=prev"/>
		<updated>2024-12-10T19:33:01Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;quot;MemCP is a neat database to implement microservices.   Here&amp;#039;s a code example for a simple key value store:  &lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;microservice democase: a simple key value store with prepared statements: &lt;/span&gt;  (import &amp;quot;../lib/sql-parser.scm&amp;quot;)  (import &amp;quot;../lib/queryplan.scm&amp;quot;)    &lt;span dir=&quot;auto&quot;&gt;&lt;span class=&quot;autocomment&quot;&gt;initialize database and prepare sql statements: &lt;/span&gt;  (createdatabase &amp;quot;keyvalue&amp;quot; true)  (eval (parse_sql &amp;quot;keyvalue&amp;quot; &amp;quot;CREATE TABLE IF NOT EXISTS kv(key TEXT, value TEXT, UNIQUE KEY PRIMARY(key))&amp;quot;))    (set item_get (par...&amp;quot;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;MemCP is a neat database to implement microservices.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here&amp;#039;s a code example for a simple key value store:&lt;br /&gt;
 /* microservice democase: a simple key value store with prepared statements */&lt;br /&gt;
 (import &amp;quot;../lib/sql-parser.scm&amp;quot;)&lt;br /&gt;
 (import &amp;quot;../lib/queryplan.scm&amp;quot;)&lt;br /&gt;
 &lt;br /&gt;
 /* initialize database and prepare sql statements */&lt;br /&gt;
 (createdatabase &amp;quot;keyvalue&amp;quot; true)&lt;br /&gt;
 (eval (parse_sql &amp;quot;keyvalue&amp;quot; &amp;quot;CREATE TABLE IF NOT EXISTS kv(key TEXT, value TEXT, UNIQUE KEY PRIMARY(key))&amp;quot;))&lt;br /&gt;
 &lt;br /&gt;
 (set item_get (parse_sql &amp;quot;keyvalue&amp;quot; &amp;quot;SELECT value FROM kv WHERE key = @key&amp;quot;))&lt;br /&gt;
 (set item_set (parse_sql &amp;quot;keyvalue&amp;quot; &amp;quot;INSERT INTO kv(key, value) VALUES (@key, @value) ON DUPLICATE KEY UPDATE value = @value&amp;quot;))&lt;br /&gt;
 /*(set item_list (parse_sql &amp;quot;keyvalue&amp;quot; &amp;quot;SELECT key, value FROM kv&amp;quot;))*/&lt;br /&gt;
 &lt;br /&gt;
 &lt;br /&gt;
 (define http_handler (begin&lt;br /&gt;
         (lambda (req res) (begin&lt;br /&gt;
                 (set session (newsession))&lt;br /&gt;
                 (session &amp;quot;key&amp;quot; (req &amp;quot;path&amp;quot;))&lt;br /&gt;
                 (if (equal? (req &amp;quot;method&amp;quot;) &amp;quot;GET&amp;quot;) (begin&lt;br /&gt;
                         /* GET = load */&lt;br /&gt;
                         (set resultrow (lambda (resultset) ((res &amp;quot;print&amp;quot;) (resultset &amp;quot;value&amp;quot;))))&lt;br /&gt;
                         (eval item_get)&lt;br /&gt;
                 ) (begin&lt;br /&gt;
                         /* PUT / POST: store */&lt;br /&gt;
                         (session &amp;quot;value&amp;quot; ((req &amp;quot;body&amp;quot;)))&lt;br /&gt;
                         (eval item_set)&lt;br /&gt;
                         ((res &amp;quot;print&amp;quot;) &amp;quot;ok&amp;quot;)&lt;br /&gt;
                 ))&lt;br /&gt;
         ))&lt;br /&gt;
 ))&lt;br /&gt;
 &lt;br /&gt;
 (set port 1266)&lt;br /&gt;
 (serve port (lambda (req res) (http_handler req res)))&lt;br /&gt;
The example can be found in &amp;lt;code&amp;gt;apps/keyvalue.scm&amp;lt;/code&amp;gt; and can be run with:&lt;br /&gt;
 ./memcp apps/keyvalue.scm&lt;br /&gt;
Here&amp;#039;s a benchmark of a mini-demo on a AMD Ryzen 9 7900X3D 12-Core Processor using &amp;lt;code&amp;gt;ab&amp;lt;/code&amp;gt;benchmark tool:&lt;br /&gt;
 Server Software:        &lt;br /&gt;
 Server Hostname:        localhost&lt;br /&gt;
 Server Port:            1266&lt;br /&gt;
 &lt;br /&gt;
 Document Path:          /hi&lt;br /&gt;
 Document Length:        5 bytes&lt;br /&gt;
 &lt;br /&gt;
 Concurrency Level:      10&lt;br /&gt;
 Time taken for tests:   42.083 seconds&lt;br /&gt;
 Complete requests:      1000000&lt;br /&gt;
 Failed requests:        0&lt;br /&gt;
 Total transferred:      106000000 bytes&lt;br /&gt;
 HTML transferred:       5000000 bytes&lt;br /&gt;
 Requests per second:    23762.78 [#/sec] (mean)&lt;br /&gt;
 Time per request:       0.421 [ms] (mean)&lt;br /&gt;
 Time per request:       0.042 [ms] (mean, across all concurrent requests)&lt;br /&gt;
 Transfer rate:          2459.82 [Kbytes/sec] received&lt;br /&gt;
 &lt;br /&gt;
 Connection Times (ms)&lt;br /&gt;
               min  mean[+/-sd] median   max&lt;br /&gt;
 Connect:        0    0   0.0      0       1&lt;br /&gt;
 Processing:     0    0   0.1      0       1&lt;br /&gt;
 Waiting:        0    0   0.1      0       1&lt;br /&gt;
 Total:          0    0   0.1      0       2&lt;br /&gt;
 &lt;br /&gt;
 Percentage of the requests served within a certain time (ms)&lt;br /&gt;
   50%      0&lt;br /&gt;
   66%      0&lt;br /&gt;
   75%      0&lt;br /&gt;
   80%      0&lt;br /&gt;
   90%      0&lt;br /&gt;
   95%      1&lt;br /&gt;
   98%      1&lt;br /&gt;
   99%      1&lt;br /&gt;
  100%      2 (longest request)&lt;br /&gt;
It is noteworthy that &amp;lt;code&amp;gt;ab&amp;lt;/code&amp;gt;even with a concurrency level of 10 took 100% CPU load on a single core while &amp;lt;code&amp;gt;memcp&amp;lt;/code&amp;gt; took a cool portion of 20% of all other cores. So the benchmark tells more about &amp;lt;code&amp;gt;ab&amp;lt;/code&amp;gt;s performance than that of MemCP.&lt;/div&gt;</summary>
		<author><name>Carli</name></author>
	</entry>
</feed>