2
2
3
3
Redis GEO is a simple example showing how to make use of [ Redis 3.2.0 new GEO capabilities] ( http://antirez.com/news/104 ) :
4
4
5
- [ ![ ] ( https://raw.githubusercontent.com/ServiceStack/Assets/master/img/livedemos/redis-geo/redisgeo-screenshot.png )] ( http://redisgeo.netcore.io )
6
-
7
- > Live Demo: http://redisgeo.netcore.io
5
+ ![ ] ( https://raw.githubusercontent.com/ServiceStack/Assets/master/img/livedemos/redis-geo/redisgeo-screenshot.png )
8
6
9
7
If Redis hasn't already cemented itself as the venerable Swiss-Army-Knife component present in
10
- [ many high-performance server solutions] ( http ://techstacks.io/tech/redis) , the latest 3.2.0 release has made
11
- it even more versatile and enhanced it with new [ GEO powers] ( http ://redis.io/commands/geoadd) .
8
+ [ many high-performance server solutions] ( https ://techstacks.io/tech/redis) , the latest 3.2.0 release has made
9
+ it even more versatile and enhanced it with new [ GEO powers] ( https ://redis.io/commands/geoadd) .
12
10
13
11
Aiming for the simplest possible useful demonstration of this new functionality, Redis GEO App lets you
14
12
click on anywhere in the U.S. to find the list of nearest cities within a given radius.
@@ -106,7 +104,7 @@ This just parses the `US.txt` file in our Web Applications
106
104
folder and extracts the ** state** which we'll use as the key for our Redis GEO sorted set and populate
107
105
it with the ** longitude** and ** latitude** of each ** city** , skipping any duplicates. The script also
108
106
imports the dataset for each state in separate batches using
109
- [ GEOADD] ( http ://redis.io/commands/geoadd) multi argument API.
107
+ [ GEOADD] ( https ://redis.io/commands/geoadd) multi argument API.
110
108
111
109
### Implement the FindGeoResults Service
112
110
@@ -129,7 +127,7 @@ That's the only DTO our App needs which returns a `List<RedisGeoResult>`. Implem
129
127
[ RedisGeoServices] ( https://github.com/NetCoreApps/redis-geo/blob/master/src/RedisGeo.ServiceInterface/RedisGeoServices.cs )
130
128
is then just a matter fulfilling the above contract by delegating our populated Request DTO properties to the
131
129
` IRedisClient.FindGeoResultsInRadius() ` Redis Client API which itself just calls
132
- [ GEORADIUS] ( http ://redis.io/commands/georadius) and returns its results:
130
+ [ GEORADIUS] ( https ://redis.io/commands/georadius) and returns its results:
133
131
134
132
``` csharp
135
133
public class RedisGeoServices : Service
@@ -159,7 +157,7 @@ which is just a jQuery App that just consists of the following markup:
159
157
160
158
<div id =" instructions" >
161
159
Click on Map to find nearest cities using
162
- <a href =" http ://redis.io/commands/georadius" >Redis GEO</a >
160
+ <a href =" https ://redis.io/commands/georadius" >Redis GEO</a >
163
161
</div >
164
162
165
163
<div id =" info" >
0 commit comments