Code Monkey home page Code Monkey logo

dynamodb-geo's Introduction

#Geo Library for Amazon DynamoDB

The Geo Library for Amazon DynamoDB enables Java developers to easily create and query geospatial data. The library takes care of managing the geohash indexes required for fast and efficient execution of location-based queries over a table of items representing points of interest - latitude/longitude pairs.

Along with this library we provide sample applications demonstrating usage of the library for a cloud-backed mobile app development scenario. You can get up and running quickly with a sample AWS ElasticBeanstalk application and a sample iOS project.

##API Reference Geo Library for Amazon DynamoDB Javadoc

##Features

  • Box Queries: Return all of the items that fall within a pair of geo points that define a rectangle as projected onto a sphere.
  • Radius Queries: Return all of the items that are within a given radius of a geo point.
  • Basic CRUD Operations: Create, retrieve, update, and delete geospatial data items.
  • Easy Integration: Adds functionality to the AWS SDK for Java in your server application.
  • Customizable: Access to raw request and result objects from the AWS SDK for Java.

##Getting Started ###Setup Environment

  1. Sign up for AWS - Before you begin, you need an AWS account. Please see the AWS Account and Credentials section of the developer guide for information about how to create an AWS account and retrieve your AWS credentials.
  2. Minimum Java requirements - To run the SDK you will need Java 1.6+. We strongly recommend Java 6 Update 24 at the minimum to mitigate the parseDouble DoS attacks. For more information about the requirements and optimum settings for the SDK, please see the Java Development Environment section of the developer guide.
  3. Minimum iOS requirements - The sample iOS app supports iOS 5 and above.
  4. Download Geo Library for Amazon DynamoDB - To download the code from GitHub, simply clone the repository by typing: git clone https://github.com/awslabs/dynamodb-geo.

###Run the Sample Server App

  1. Go to AWS Management Console and select ElasticBeanstalk.
  2. Click Create a New Application.
  3. Specify Application name and click Create.
  4. Make sure Launch a new environment running this application is selected.
  5. Select Tomcat for Predefined configuration. Environment type can be either Loadbalancing, autoscaling or Single instance. Then click Continue.
  6. Select Upload your own for Source. Click Browse and select /samples/dynamodb-geo-server/dynamodb-geo-server.war. Then click Continue.
  7. Choose your Environment name and Environment URL. Then click Continue.
  8. Make sure Create an RDS DB Instance with this environment is NOT checked. Then click Continue.
  9. Accept the default values for Configuration Details and click Continue.
  10. Review the information and click Create.
  11. Wait until Health becomes Green. This may take a few minutes.
  12. Select Configuration > Software Configuration.
  13. Under Environment Properties, type your AWS_ACCESS_KEY_ID and AWS_SECRET_KEY.
  14. Type your DynamoDB table name for PARAM1 (e.g. geo-test). Make sure you do NOT already have a table with the same name.
  15. Type your DynamoDB region name for PARAM2 (e.g. us-west-2). For the full list of regions, please read Regions and Endpoints.
  16. Click Save.
  17. Click on Dashboard and wait until Health becomes Green. This may take a few minutes.
  18. Open your URL (e.g. http://YOUR-ENDPOINT.elasticbeanstalk.com). NOTE: For security reasons, we strongly encourage developers to use https endpoints on ElasticBeanstalk. Please read Configuring HTTPS for your AWS Elastic Beanstalk Environment for more details.
  19. The status on the website will change as follows: preparing to start > creating a table > inserting test data into the table > running.
  20. Wait until the website says Congratulations! Geo Library for Amazon DynamoDB Sample Server is running. This may take 10 to 20 minutes.

###Run the Sample iOS App

  1. Open the Xcode project under samples/dynamodb-geo-ios/dynamodb-geo-ios.xcodeproj.
  2. Open AWSConstants.m.
  3. Update YOUR-ENVIRONMENT part of http://YOUR-ENVIRONMENT.elasticbeanstalk.com/dynamodb-geo with your actual environment URL.
  4. Click Run on Xcode to run the sample iOS app.

##Building From Source Once you check out the code from GitHub, you can build it using Maven: mvn package

##Reference

###Amazon DynamoDB

###AWS ElasticBeanstalk

###Mobile Development

###Java Development

dynamodb-geo's People

Contributors

brendandixon avatar

Stargazers

YANG YU avatar

Watchers

James Cloos avatar YANG YU avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.