Commit Graph

63 Commits

Author SHA1 Message Date
tidwall 13ceb7da41 Removed global variables from core package
The core package uses global variables that keep from having
more than one Tile38 instance runnning in the same process.

Move the core variables in the server.Options type which are
uniquely stated per Server instance.

The build variables are still present in the core package.
2022-09-24 15:44:32 -07:00
tidwall dd11eded5c Cleanup code for Go 1.19 2022-09-12 17:06:27 -07:00
tidwall 10f85640c0 Added option to "not found" for DEL 2022-03-08 15:58:23 -07:00
tidwall 54a574bbc2 Deprecate sparse 2021-12-08 15:52:04 -07:00
Benjamin Ramser bc62edb692 feat: add sector 2021-09-05 11:48:34 +02:00
Sepehr Rafiee 27cdf6a1a0 remove deprecated threads flag 2021-05-09 07:53:03 +04:30
Josh Baker e8801fd45a
Merge pull request #447 from rshura/fix-timeout-desc
Fix description of TIMEOUT command -- seconds are not optional.
2019-04-26 12:47:46 -07:00
Alex Roitman 51b0de5670 Fix description of TIMEOUT command -- seconds are not optional. 2019-04-26 12:46:15 -07:00
tidwall 3ae59274e3 Removed evio option 2019-04-26 11:50:49 -07:00
Alex Roitman 5da63881c6 Adjust commands.json 2019-04-25 14:22:25 -07:00
tidwall 878f9dedb2 Updated commands_gen.go 2019-04-24 16:14:30 -07:00
Alex Roitman d3350c033f Add session timeout description to commands.json 2019-04-24 13:26:25 -07:00
Alex Roitman 7177a6468f Add TIMEOUT description to the commands.json 2019-04-24 12:08:07 -07:00
Alex Roitman d179a8f2a3 Forgot to add POINT to commands.json 2019-02-10 14:56:11 -08:00
Alex Roitman a3b17258c9 Add command description 2019-02-08 13:57:48 -08:00
tidwall dab6a7ea65 Updated core 2018-12-29 13:35:56 -07:00
Alex Roitman 2a544f2d2c Add command stubs for new commands. Fix typos. 2018-12-28 15:00:13 -08:00
tidwall 737561fa8b Fix version not being set at build, close #386 2018-11-15 13:45:55 -07:00
tidwall 161c6faff9 Added evio flag 2018-11-11 09:03:47 -07:00
tidwall 555e47036c Replaced net package with evio
- Added threads startup flag
- Replaced net package with evio
- Refactored controller into server
2018-10-28 15:51:47 -07:00
tidwall 6257ddba78 Faster point in polygon / GeoJSON updates
The big change is that the GeoJSON package has been completely
rewritten to fix a few of geometry calculation bugs, increase
performance, and to better follow the GeoJSON spec RFC 7946.

GeoJSON updates

- A LineString now requires at least two points.
- All json members, even foreign, now persist with the object.
- The bbox member persists too but is no longer used for geometry
  calculations. This is change in behavior. Previously Tile38 would
  treat the bbox as the object's physical rectangle.
- Corrections to geometry intersects and within calculations.

Faster spatial queries

- The performance of Point-in-polygon and object intersect operations
  are greatly improved for complex polygons and line strings. It went
  from O(n) to roughly O(log n).
- The same for all collection types with many children, including
  FeatureCollection, GeometryCollection, MultiPoint, MultiLineString,
  and MultiPolygon.

Codebase changes

- The pkg directory has been renamed to internal
- The GeoJSON internal package has been moved to a seperate repo at
  https://github.com/tidwall/geojson. It's now vendored.

Please look out for higher memory usage for datasets using complex
shapes. A complex shape is one that has 64 or more points. For these
shapes it's expected that there will be increase of least 54 bytes per
point.
2018-10-13 04:30:48 -07:00
Josh Baker 7e9871bb69 Refactor project layout
Move internal and support packages to pkg directory
2018-04-19 08:43:32 -07:00
Josh Baker 2e68024e39 Update core commands 2018-04-12 17:25:38 -07:00
Josh Baker 11b42c020b Add flags to disable AOF or to use a custom path
New server flags:
  --appendonly     yes/no
  --appendfilename path

Please note that leaders that have disabled AOF cannot be followed.
2018-04-11 10:53:36 -07:00
Alex Roitman 9ffca9aa10 Tests and commands.json for WHEREEVAL. 2018-02-15 16:42:07 -08:00
Josh Baker 89662d9c89 update FSET args 2017-11-16 18:19:07 -07:00
Alex Roitman 2a5e760cee Update commands.json for new fset 2017-11-10 14:58:51 -08:00
Josh Baker 4d79f3973c updated commands.json 2017-10-05 15:05:12 -07:00
Alex Roitman abffd5ce74 Lua (#226)
* Typos
2017-10-05 15:03:50 -07:00
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
Josh Baker 33e915ecce updated core 2017-08-24 11:33:44 -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 e71c7af21b varadic optional arguments, #213 2017-08-24 10:11:16 -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