New pages

Jump to navigation Jump to search
New pages
Hide registered users | Hide bots | Show redirects
  • 22:45, 19 December 2024Comparison: MemCP vs. MySQL (hist | edit) ‎[2,153 bytes]Carli (talk | contribs) (Created page with "MemCP has the following advantages over MySQL: * No 64 character limit for column names * uses only 20% of storage compared to InnoDB and MyISAM storage format * supports natural sort (1, 2, 10, 11 instead of 1, 10, 11, 2) with collations * Up to 10x faster query performance for aggregations") Tag: Visual edit
  • 21:33, 10 December 2024MemCP for Microservices (hist | edit) ‎[2,992 bytes]Carli (talk | contribs) (Created page with "MemCP is a neat database to implement microservices. Here's a code example for a simple key value store: →‎microservice democase: a simple key value store with prepared statements: (import "../lib/sql-parser.scm") (import "../lib/queryplan.scm") →‎initialize database and prepare sql statements: (createdatabase "keyvalue" true) (eval (parse_sql "keyvalue" "CREATE TABLE IF NOT EXISTS kv(key TEXT, value TEXT, UNIQUE KEY PRIMARY(key))")) (set item_get (par...") Tag: Visual edit
  • 21:01, 20 November 2024MemCP Console (hist | edit) ‎[551 bytes]Carli (talk | contribs) (Created page with "There are two ways to access MemCP Scheme Console: a) if you run <code>memcp</code>in the console, just type in your scheme commands b) if you run <code>memcp</code>in docker or pm2 where you don't have access to the console, open a MySQL connection and type <code>SET syntax = 'scheme';</code>and then type in your commands followed by <code>;.</code> In option b) it might be that some commands like (help) output to memcp console instead of your mysql shell. So better...") Tag: Visual edit
  • 20:15, 20 November 2024Migration from MySQL and PostgreSQL (hist | edit) ‎[1,224 bytes]Carli (talk | contribs) (Created page with "thumb|none|640x640px ===Connection to MemCP via MySQL Connector=== MemCP can be connected with any compatible MySQL connector: $db = new \PDO<code>"mysql:host=localhost;port=3307;dbname=system", 'root', 'admin');</code> echo $db->query("SELECT 'it works'")->fetchColumn(); // outouts: it works ===Import data from MySQL and PostgreSQL=== To import data from MySQL into MemCP, you have to perform the following command in<code>memcp</code>console: (l...") Tag: Visual edit
  • 20:10, 19 November 2024Deployment (hist | edit) ‎[1,060 bytes]Carli (talk | contribs) (Created page with "MemCP is relatively easy to deploy. It only requires minimal system requirements (some 10-20 Megabytes of RAM for the base system). There are two deployment methods: === Deployment via pm2 (preferred) === To run memcp, just follow these commands: git clone https://github.com/launix-de/memcp cd memcp go get make # make sure, go is installed pm2 start ./memcp -data ./data/ # use a different path than ./data if you wish; install pm2 If you want to update memcp, just r...") Tag: Visual edit
  • 22:54, 8 October 2024Websockets in MemCP (hist | edit) ‎[6,843 bytes]Carli (talk | contribs) (Created page with "In MemCP, you can call <code>(set send ((res "websocket") onReceiveFunction onCloseFunction))</code>to upgrade a http session into a websocket (<code>res</code> is the response object from your http handler, see serve). The <code>onReceiveFunction</code> will take message as it's parameter. <code>onCloseFunction</code> will be called when the socket is closed. You can call <code>(send 1 "my message")</code> to send a string to th...") Tag: Visual edit