https://github.com/broamski/ordermap-service
RESTful service for geocoding Postal Code data to be plotted on a map..
https://github.com/broamski/ordermap-service
Last synced: 7 months ago
JSON representation
RESTful service for geocoding Postal Code data to be plotted on a map..
- Host: GitHub
- URL: https://github.com/broamski/ordermap-service
- Owner: broamski
- Created: 2013-10-21T23:17:38.000Z (almost 12 years ago)
- Default Branch: master
- Last Pushed: 2013-10-21T23:56:16.000Z (almost 12 years ago)
- Last Synced: 2024-05-07T18:23:28.097Z (over 1 year ago)
- Language: Java
- Homepage:
- Size: 113 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
ordermap-service
===============This application is a RESTful service that consumes semi-generic Postal Code address data, geocodes it using GeoNames data (http://www.geonames.org), and returns the results in JSON format.
The primary address data source for this service is Splunk, but it could easily be adapted to consume from additional services. This can be used as the back end
for eCommerce sites, or similar, to plot customer latitude and longitude on a map solution of their choice.Splunk is polled on an interval, which is defined in the config.properties file, and stores the results in a Singleton that the REST resource accesses. This resource is purged on each roll
as to represent real time streaming data.#### Requirements
This requires the Splunk Java SDK. All other dependencies are managed via Maven.
#### Execution
The following request returns a JSON object indicating:
+ Number of results returned
+ Time taken to fulfill request
+ JSON Array of Address Objectshttp://localhost:8080/ordermap-service/orders
{
count: "2",
requestTimeMS: "0",
zipCodeList: [
{
postalCode: "12345",
latitude: "40.1234",
longitude: "-100.5432",
timestamp: "1382396806000"
},
{
postalCode: "45678",
latitude: "41.4321",
longitude: "-93.9876",
timestamp: "1382396805000"
}
]
}## How would I use this?
This service could be interval polled via client side AJAX, plotting each result on a map.