Commit Graph

168 Commits

Author SHA1 Message Date
w1n2k 872f4c95b2 Fixed disque typo timeout handling 2017-01-11 09:06:19 +03:00
w1n2k 1b20a4c590 Added distance to NEARBY command 2017-01-10 19:49:48 +03:00
Josh Baker c02609ad44 Fixed missing response in TTL json command
Using the tile38-cli, the TTL command omitted the ttl value from the
json response.

For example:

    127.0.0.1:9851> TTL my ufo
    {"ok":true,"elapsed":"5.57µs"}

Is now fixed to show
    127.0.0.1:9851> TTL my ufo
    {"ok":true,"ttl":-1,"elapsed":"5.57µs"}

Where "ttl" is the remaining time before the object is is deleted.
The value -1 means that the object is available, but does not have
an expiration.

Thanks @phulst for finding this bug. closes #116
2017-01-07 09:27:36 -07:00
Josh Baker 738f7eb43c removed panic 2016-12-31 09:39:39 -07:00
Josh Baker b9e61777e6 moved fields to a collection map 2016-12-31 09:29:02 -07:00
Josh Baker d6ca25d14b updated collection ReplaceOrInsert 10% bump 2016-12-30 18:12:18 -07:00
Josh Baker 12bf65bbb9 wip 2016-12-30 14:18:28 -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 3e3d364911 test app for #107 2016-12-28 11:16:28 -07:00
Josh Baker 5d378b8ec9 debug.FreeOSMemory 2016-12-22 14:52:37 -07:00
Josh Baker ef74a63c79 Add SCAN to Roaming Geofences
Can now get back more details about an object:

     NEARBY people FENCE ROAM people * 5000 SCAN :*

For more information see #96

Thanks @amorskoy for suggesting feature in #93

Closes #96
2016-12-15 11:37:38 -07:00
Josh Baker 6c52f3f3f1 added command filter for geofences
It's now possible to mask the fence notifications based on the
command. For example, if we only want "set" and "del" commands.

NEARBY fleet FENCE COMMANDS set,del POINT 33 -115 10000

Suggested by @amorskoy, closes #99
2016-12-15 10:00:08 -07:00
Josh Baker b6c645791f output json fix #98 2016-12-14 18:19:30 -07:00
Josh Baker bf0fee122d persist jset, jdel to aof. fixes #98 2016-12-14 07:37:02 -07:00
Josh Baker 44cf149325 added JSET, JGET, JDEL commands
JSET key id path value [RAW]
JGET key id path [RAW]
JDEL key id path

Allows for working with JSON strings, for example:

  JSET user 901 name Tom
  JGET user 901
  > '{"name":"Tom"}'
  JSET user 901 name.first Tom
  JSET user 901 name.last Anderson
  > '{"name":{"first":"Tom","last":"Anderson"}'
  JDEL user 901 name.last
  > '{"name":{"first":"Tom"}'

All commands use the GJSON path syntax, for more information:

  Setting JSON: https://github.com/tidwall/sjson
  Getting JSON: https://github.com/tidwall/gjson
2016-12-12 10:33:28 -07:00
Josh Baker 3a483e55ff Group geofence events
Feature request by @huangpeizhi #87
2016-12-06 10:30:48 -07:00
Josh Baker 0afdf67c90 fix to aof corruption during aofshrink command.
This addresses an issue #73 that @huangpeizhi discovered while using
Tile38 in production where AOFSHRINK sometimes corrupts the database
causing the server to not start the next time.
2016-12-05 16:24:26 -07:00
Josh Baker 06c873a3e8 Merge branch 'master' into memoptz 2016-12-04 12:15:09 -07:00
Josh Baker a664bade48 added black-box testing 2016-12-02 09:14:34 -07:00
Josh Baker 025a584903 Merge branch 'master' into memoptz 2016-11-17 09:41:02 -07:00
Josh Baker 76ce0e58b2 fix #84, roaming fence deadlock 2016-11-17 09:04:31 -07:00
Josh Baker 8d7290915e doc typos 2016-11-16 13:01:19 -07:00
Josh Baker d61b194e49 allow for precise search for strings, fixes #82 2016-11-14 11:05:28 -07:00
Josh Baker cbeab30d5e allow for precise search for strings, fixes #82 2016-11-14 11:03:54 -07:00
Josh Baker fa74d14942 Merge branch 'master' into memoptz 2016-11-14 08:23:06 -07:00
Josh Baker fbeecaacd9 faster aof loading
About 30% faster loading of AOF file during server restart.
2016-11-09 13:43:57 -07:00
Josh Baker 1ac6ad9ebd optimized idprops field for #71 2016-11-07 13:04:21 -07:00
Josh Baker 062da50888 match on prefix star, fixes #76 2016-11-02 09:15:48 -07:00
Josh Baker 659a715065 Optimized GeoJSON
Removed map[string]interface{} for Feature type.
Replaced "encoding/json" with "tidwall/gjson" for parsing.
Removed ablility to serialize to binary. JSON only.
2016-11-02 05:51:48 -07:00
Josh Baker fbff0f4eef fix #77 NX/XX bug 2016-10-31 10:17:30 -07:00
Josh Baker 36ab60b89c added stats.mem_alloc field 2016-10-24 15:58:30 -07:00
Josh Baker bb2bb451b2 memory optimizations
increased b-tree degrees from 16 to 48
increased r-tree degress from 8 to 15
changed r-tree from float64 to float32
2016-10-24 15:35:47 -07:00
Josh Baker a38228cba0 fix #70, 1.5.2 2016-10-20 17:47:15 -07:00
Josh Baker 4630a78613 fix #67, hang on EXPIRE 2016-10-16 08:50:02 -07:00
Josh Baker c425d76374 Z optimized, fixed #61 2016-10-03 13:03:20 -07:00
Josh Baker 46072f614f added [NX|XX] to SET, fixes #60 2016-10-03 08:31:13 -07:00
Josh Baker d45eb6f92d using bulkstring for info command #37 2016-09-14 09:36:45 -07:00
Josh Baker 3b99a6276e grpc support 2016-09-11 21:25:09 -07:00
Josh Baker f2026e1d8d grpc support 2016-09-11 21:09:02 -07:00
Josh Baker 89cfedeb08 added PDELHOOKS 2016-09-11 19:28:54 -07:00
Josh Baker a0872036d4 persistent endpoints 2016-09-11 19:28:54 -07:00
Josh Baker 3862f70cac refactor hooks and endpoints 2016-09-11 19:28:34 -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 bb97727c7c MATCH with slashes, fixes #50
Thanks to @huangpeizhi for identifying this issue.
2016-09-08 04:51:34 -07:00
Josh Baker 53e3326d75 fixed window build error. bump 1.4.1 2016-08-26 14:18:35 -07:00
Josh Baker adef76af22 type command 2016-08-26 13:42:52 -07:00
Josh Baker 04e5912107 removed gc on info 2016-08-26 12:58:16 -07:00
Josh Baker c81883a629 info command 2016-08-26 12:54:19 -07:00
Josh Baker c68e60ed2f write http response as three chunks 2016-08-26 07:35:19 -07:00
Josh Baker b73cc35749 fixed http response charset 2016-08-26 07:31:09 -07:00
Josh Baker a2fa6444b1 requirepass with no password with remove auth, fixes #39 2016-08-26 07:19:31 -07:00
Josh Baker 01c05b2ce9 support all versions of HTTP, fixes #38 2016-08-26 06:55:22 -07:00
Josh Baker 7b8c2dae85 http auth fixes #36 2016-08-25 05:25:20 -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 638c35b5b9 fixed scan bug 2016-07-15 13:01:15 -07:00
Josh Baker 7455c52cb5 expires 2016-07-15 12:22:48 -07:00
Josh Baker a5069d5fe8 fixed test 2016-07-12 23:03:52 -06:00
Josh Baker 53ceb4ee2e removed ScanType 2016-07-12 22:59:36 -06:00
Josh Baker 4656c4c8f3 refactor field 2016-07-12 22:51:01 -06: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 4fd7e1f821 support for parsing globs 2016-07-12 12:48:40 -06:00
Josh Baker 388409072c added log test 2016-07-12 10:07:28 -06:00
Josh Baker 02ff2a70bf basic string support 2016-07-10 22:40:18 -06:00
Josh Baker fbe19564b9 added string type 2016-07-10 13:23:50 -07:00
Josh Baker 8d89198eaf wip. adding string value type. 2016-07-09 19:44:28 -07:00
Josh Baker 2214cbabbe fix live connection crash 2016-05-24 09:19:13 -07:00
Josh Baker bac8370b6e lcase fields 2016-05-24 05:06:19 -07:00
Josh Baker 13626db762 added maxmemory setting fixes #15 2016-05-23 19:44:25 -07:00
Josh Baker 97332cc3e1 fixed resp count 2016-05-23 14:21:18 -07:00
Josh Baker afa15461de fixed json syntax error 2016-05-23 13:40:08 -07:00
Josh Baker 8fdc35af61 roaming fence 2016-05-23 13:01:42 -07:00
Josh Baker cd217f05d2 fixes #13, invalid object keyword, panic on missing key 2016-04-19 05:38:02 -07:00
Josh Baker 37d73caf11 extra newline on http POST command fixed #12 2016-04-18 13:26:08 -07:00
Josh Baker 929cce09fd glob suffix wildcard fix 2016-04-12 06:23:08 -07:00
Josh Baker 5965394481 fixed native live 2016-04-05 07:15:13 -07:00
Josh Baker cbe849649a dev mi bounds 2016-04-03 18:13:33 -07:00
Josh Baker 2bd1b29128 export comments 2016-04-02 19:23:56 -07:00
Josh Baker fa87ff78d7 gofmt -s 2016-04-02 19:19:43 -07:00
Josh Baker 6b9468d01b lint cleanup 2016-04-02 19:16:36 -07:00
Josh Baker 5dd69b64b3 ineffassign97 2016-04-02 18:34:11 -07:00
Josh Baker 00ae41f0d4 ineffassign97 2016-04-02 18:33:38 -07:00
Josh Baker 8a97ea2218 misspellings 2016-04-02 18:31:45 -07:00
Josh Baker 6eb21b890c fixed shared string issue 2016-04-02 14:13:20 -07:00
Josh Baker a3725c7a2a async hooks 2016-04-02 07:20:30 -07:00
Josh Baker cdc2bbee73 fence detect option 2016-04-01 12:46:39 -07:00
Josh Baker d9103d9dd6 kill aof conns after shrink 2016-03-31 18:20:42 -07:00
Josh Baker 2d6a6ff0a0 follow replication 2016-03-31 17:58:02 -07:00
Josh Baker 4a15a20e27 read backward multibulk 2016-03-31 17:42:22 -07:00
Josh Baker 9ece493a8e resp replication 2016-03-31 16:26:36 -07:00
Josh Baker 560e3d4e3f simple client 2016-03-31 16:25:47 -07:00
Josh Baker 8d75b20617 aof migration 2016-03-30 14:53:29 -07:00
Josh Baker 083f1f1ba1 wip: aof migration 2016-03-30 12:58:34 -07:00
Josh Baker 7f9b9b8abb fence updates 2016-03-30 09:32:38 -07:00
Josh Baker 96283054fc new shrink formula 2016-03-30 09:32:02 -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 a47377ae49 native output 2016-03-28 17:38:21 -07:00