Commit Graph

29 Commits

Author SHA1 Message Date
Alex Roitman bfa4bbe237 Lua (#225)
* Add periodic pruning of the lua state pool
2017-10-05 14:13:02 -07:00
Alex Roitman b55300b729 Lua scripting feature. (#224)
* Start on lua scripting

* Implement evalsha, script load, script exists, and script flush

* Type conversions from lua to resp/json.
Refactor to make luastate and luascripts persistent in the controller.

* Change controller.command and all underlying commands to return resp.Value.
Serialize only during the ouput.

* First stab at tile38 call from lua

* Change tile38 into tile38.call in Lua

* Property return errors from scripts

* Minor refactoring.  No locking on script run

* Cleanup/refactoring

* Create a pool of 5 lua states, allow for more as needed. Refactor.

* Use safe map for scripts.  Add a limit for max number of lua states.  Refactor.

* Refactor

* Refactor script commands into atomic, read-only, and non-atomic classes.
Proper locking for all three classes.
Add tests for scripts

* More tests for scripts

* Properly escape newlines in lua-produced errors

* Better test for readonly failure

* Correctly convert ok/err messages between lua and resp.
Add pcall, sha1hex, error_reply, status_reply functions to tile38 namespace in lua.

* Add pcall test. Change writeErr to work with string argument

* Make sure eval/evalsha never attempt to write AOF

* Add eval-set and eval-get to benchmarks

* Fix eval benchmark tests, add more

* Improve benchmarks

* Optimizations and refactoring.

* Add lua memtest

* Typo

* Add dependency

* golint fixes

* gofmt fixes

* Add scripting commands to the core/commands.json

* Use ARGV for args inside lua
2017-10-05 08:20:40 -07:00
Alex Roitman 1e4b635e19 Add tests for WHEREIN. Add WHEREIN to the commands.json 2017-08-24 10:57:07 -07:00
Josh Baker 9fb312b3cc updated docs, fixes #117 2017-01-13 09:04:09 -07:00
w1n2k 44a596b12b Added DISTANCE to command generation 2017-01-10 21:03:09 +03:00
Josh Baker d3164f8bb9 fixed error in command documentation
The COMMANDS keyword was incorrectly documentated as COMMAND.

Thanks to @juanpabloaj for discovering this. closes #117
2017-01-07 09:10:06 -07:00
Josh Baker 34ae007700 1.7.0 2016-12-29 11:54:35 -07:00
Josh Baker bafb1823b3 Metadata for Webhooks
Added the `META name value` keyword to the SETHOOK command.

Allows for adding metadata to a webhook. For example:

    SETHOOK myhook http://endpoint/ META m1 12 META m2 13 NEARBY ...

Would result in notification that contain the "meta" element, which is
represented like:

    "meta":{"m1":"12","m2":"13"}

Thanks for the suggestion @amorskoy

closed #105
2016-12-29 08:50:54 -07:00
Josh Baker 73fd3cf7de Added PDEL command
PDEL key pattern

Removes all objects where the id matches the pattern

Thanks to @GameFreedom for the suggestion. closes #104
2016-12-29 07:53:01 -07:00
Josh Baker dad63f9b1f removed value from EX command 2016-10-03 13:39:55 -07:00
Josh Baker 46072f614f added [NX|XX] to SET, fixes #60 2016-10-03 08:31:13 -07:00
Josh Baker 89cfedeb08 added PDELHOOKS 2016-09-11 19:28:54 -07:00
Josh Baker 5d48c99612 updated SEARCH documentation 2016-09-09 08:43:44 -07:00
Josh Baker 1d427c849f Added BOUNDS command
It's now possible to get the combined minimum bounding rectangle for all
objects in a key by issuing the command "BOUNDS key".
2016-08-19 08:33:58 -07:00
Josh Baker e766dd75ae added EXPIRES, PERSISTS, TTL, and EX keyword 2016-07-15 13:06:11 -07:00
Josh Baker b08c686c64 SEARCH command 2016-07-12 21:11:02 -06:00
Josh Baker 75adea6a9c scan order asc/desc 2016-07-12 13:18:16 -06:00
Josh Baker fbe19564b9 added string type 2016-07-10 13:23:50 -07:00
Josh Baker d0fd48b813 added ROAM keyword to help 2016-05-24 15:58:52 -07:00
Josh Baker 2449fd495d added OUTPUT to commands 2016-04-13 12:28:44 -07:00
Josh Baker 6561fcec30 typo in command docs 2016-04-12 18:47:57 -07:00
Josh Baker 03a3c1642c updated commands 2016-04-02 14:43:46 -07:00
Josh Baker cdc2bbee73 fence detect option 2016-04-01 12:46:39 -07:00
Josh Baker 6e9ae37707 added webhook commands 2016-03-20 08:41:59 -07:00
Josh Baker 8faeceac8e updated command syntax 2016-03-15 18:21:56 -07:00
Josh Baker 857f8cb155 typo 2016-03-13 18:31:59 -07:00
Josh Baker a1abccc6fd updated config summary 2016-03-08 05:32:39 -07:00
Josh Baker 73ea8b8ee4 authentication resolves #3 2016-03-07 17:38:59 -07:00
Josh Baker 4fc58f7f5c first commit 2016-03-04 16:08:16 -07:00