Various Stuff
by tidwall
Quickly set up Tile38 for geofence notifications June 18 2018

Make sure Tile38 is properly installed on Server 1 and Server 2.


Start an instance of Tile38 on Server 1.

$ tile38-server

Start a wehbook test consumer on Server 2.

$ tile38-server --webhook-http-consumer-port 8080

Create a webhook on Server 1 that points to an endpoint on Server 2.

tile38> SETHOOK myhook http://server-2-ip:8080/endpoint NEARBY fleet FENCE POINT 33 -115 50000

Now you can send Server 1 data ...

tile38> SET fleet truck1 POINT 33 -115
tile38> SET fleet truck1 POINT 33 -116

... and see the geofence notifications being delivered to Server 2.

{"command":"set","group":"5b2812ded5eefd3f503cc61f","detect":"enter","hook":"myhook","key":"fleet","time":"2018-06-18T13:15:26.515737442-07:00","id":"truck1","object":{"type":"Point","coordinates":[-115,33]}}
{"command":"set","group":"5b2812ded5eefd3f503cc61f","detect":"inside","hook":"myhook","key":"fleet","time":"2018-06-18T13:15:26.515737442-07:00","id":"truck1","object":{"type":"Point","coordinates":[-115,33]}}
{"command":"set","group":"5b2812ded5eefd3f503cc61f","detect":"exit","hook":"myhook","key":"fleet","time":"2018-06-18T13:15:39.54758152-07:00","id":"truck1","object":{"type":"Point","coordinates":[-116,33]}}
{"command":"set","group":"5b2812ded5eefd3f503cc61f","detect":"outside","hook":"myhook","key":"fleet","time":"2018-06-18T13:15:39.54758152-07:00","id":"truck1","object":{"type":"Point","coordinates":[-116,33]}}