中文国产日韩欧美视频,午夜精品999,色综合天天综合网国产成人网,色综合视频一区二区观看,国产高清在线精品,伊人色播,色综合久久天天综合观看

Lua腳本中的一個NoSQL數(shù)據(jù)庫:Tarantool -電腦資料

電腦資料 時間:2019-01-01 我要投稿
【www.szmdbiao.com - 電腦資料】

   

介紹

   

    Tarantool是一個NoSQL數(shù)據(jù)庫,運行在Lua編程語言中,

Lua腳本中的一個NoSQL數(shù)據(jù)庫:Tarantool

。 它利用了Node.JS強大的網(wǎng)絡編程功能,數(shù)據(jù)存儲利用了Redis持久化功能。

特性

a drop-in replacement for Lua 5.1, based on LuaJIT 2.0; simply use#!/usr/bin/tarantoolinstead of#!/usr/bin/luain your script,

Lua packages for non-blocking I/O, fibers and HTTP,

MsgPack data format and MsgPack based client-server protocol,

two data engines: 100% in-memory with optional persistence and a 2-level disk-based B-tree, to use with large data sets,

secondary keyand index iterators support,

asynchronous master-master replication,

authentication and access control.

    示例代碼:

#!/usr/bin/env tarantoolbox.cfg{}hosts = box.space.hostsif not hosts then    hosts = box.schema.create_space('hosts')    hosts:create_index('primary', { parts = {1, 'STR'} })endlocal function handler(self)    local host = self.req.peer.host    local response = {        host = host;        counter = hosts:inc(host);    }    self:render({ json = response })endhttpd = require('http.server')server = httpd.new('127.0.0.1', 8080)server:route({ path = '/' }, handler)server:start()

    項目主頁:http://www.open-open.com/lib/view/home/1406259221585

最新文章