Commit Graph

23 Commits

Author SHA1 Message Date
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
Josh Baker 1c8027c580 updated denied message 2017-10-04 15:58:52 -07:00
Josh Baker f8bc40d881 fix pipeling fragmentation 2017-10-04 13:07:56 -07:00
Josh Baker d817814200 Optimized pipelining
Performance gains for pipelining commands over the network.
Using tile38-benchmark and the -P flag it's possible to see 2x-10x boost
in requests per second.
2017-09-30 19:34:25 -07:00
Josh Baker 56e0bac24c TCP Keepalives
Enabled TCP keepalive packets to determine if the connection is still
valid, and terminate if needed. It also helps with maintaining idle
connections.

Default to 300 seconds and can be changed by:

    CONFIG SET keepalive 300

addresses #145: clients not being cleaned up properly
2017-02-09 10:01:59 -07:00
Pavel Makarenko a4e5d38461 Disable HTTP & WebSocket transports on demand. (#128)
* Added .idea folder into .gitignore

* Added --http-transport flag

* Fixed test & Removed some dumps

* Added support of yes/no
2017-01-13 08:45:28 -07:00
Josh Baker 6d944ada32 fixed #49. fragmented pipeline requests. 2016-09-08 16:11:53 -07:00
Josh Baker 56de0c9743 allow multispace delim in native proto, fixes #51
thanks @huangpeizhi
2016-09-08 05:33:35 -07:00
Josh Baker c81883a629 info command 2016-08-26 12:54:19 -07:00
Josh Baker 01c05b2ce9 support all versions of HTTP, fixes #38 2016-08-26 06:55:22 -07:00
Josh Baker 02ff2a70bf basic string support 2016-07-10 22:40:18 -06:00
Josh Baker 37d73caf11 extra newline on http POST command fixed #12 2016-04-18 13:26:08 -07:00
Josh Baker 6b9468d01b lint cleanup 2016-04-02 19:16:36 -07:00
Josh Baker cdc2bbee73 fence detect option 2016-04-01 12:46:39 -07:00
Josh Baker 9ece493a8e resp replication 2016-03-31 16:26:36 -07:00
Josh Baker 4ce4e1af71 optional output formats 2016-03-29 12:29:15 -07:00
Josh Baker 4e2bbf1c33 resp config 2016-03-29 05:53:53 -07:00
Josh Baker ba9139be02 resp crud 2016-03-28 08:57:41 -07:00
Josh Baker c6619a529f replication auth 2016-03-08 08:35:43 -07:00
Josh Baker 95125e0a04 allow optional protected-mode 2016-03-08 06:11:03 -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 72de5cc778 refactor 2016-03-06 07:55:00 -07:00