title: Google App Engine - Difference between local Dev server and deployed server
body: <p>I'm writing an app on the Google App Engine, and I have been able to write code that runs locally and puts data into the local datastore.  However, when I deploy the code to the google server, no data is put into the datastore.  My primary indicators that nothing is getting put into the datastore are, one, when I go to the Developer Console, I'm told there are no entries, and two, when I run the page that gets data, nothing is returned.</p>
  
  <p>Do I need to define new Kinds in the app.yaml or developer console before they will work on the production datastore?</p>
  
  <p>Here is my put and get methods from the data store.  Again, works in the testing environment and does not work in production, everything compiles just fine.</p>
  
  <pre><code>package tweetdata
  
  import (
      "net/url"
      "time"
  
      "golang.org/x/net/context"
      "google.golang.org/appengine/datastore"
      "google.golang.org/appengine/log"
  
      "github.com/ChimeraCoder/anaconda"
  )
  
  const linkTweetKind string = "LinkTweet"
  const tweetKey string = "Tweets"
  const tweetKeyID string = "default_tweetstore"
  
  //LinkTweet contains the address extracted from a tweet and the original tweet
  type LinkTweet struct {
      Address *url.URL
      Tweet   anaconda.Tweet
  }
  
  //StoreTweet is a struct used for storing a tweet in the datastore
  type StoreTweet struct {
      Address     string
      Text        string
      TweetID     int64
      CreatedTime time.Time
      Retweets    int
      Favorites   int
  }
  
  //TweetScore is a struct that shows the relative score of an address based on
  // it's populatrity
  type TweetScore struct {
      Address    *url.URL
      score      int
      lastActive time.Time
  }
  
  //WriteLinkTweet writes a given Tweet to the datastore
  func WriteLinkTweet(tweet LinkTweet, c context.Context) error {
      log.Infof(c, "Putting Tweet into datastore: %v", tweet.Tweet.Id)
      key := datastore.NewIncompleteKey(c, linkTweetKind, getTweetKey(c))
      created, _ := tweet.Tweet.CreatedAtTime()
      store := &amp;StoreTweet{Address: tweet.Address.String(),
          Text:        tweet.Tweet.Text,
          TweetID:     tweet.Tweet.Id,
          CreatedTime: created,
          Retweets:    tweet.Tweet.RetweetCount,
          Favorites:   tweet.Tweet.FavoriteCount,
      }
  
      err := datastore.RunInTransaction(c, func(c context.Context) error {
          _, err := datastore.Put(c, key, store)
          log.Errorf(c, "Failed to write LinkTweet to datastore. %v", err.Error())
          return err
      }, nil)
      return err
  }
  
  //GetAllNewTweets queries the datastore and gets all tweets created since the last
  // time given
  func GetAllNewTweets(since time.Time, c context.Context) []StoreTweet {
      q := datastore.NewQuery(linkTweetKind).Ancestor(getTweetKey(c)).Filter("CreatedTime &gt;=", since)
      out := make([]StoreTweet, 0, 15)
      q.GetAll(c, &amp;out)
      return out
  }
  
  // guestbookKey returns the key used for all guestbook entries.
  func getTweetKey(c context.Context) *datastore.Key {
      // The string "default_guestbook" here could be varied to have multiple guestbooks.
      return datastore.NewKey(c, tweetKey, tweetKeyID, 0, nil)
  }
  </code></pre>