View
 

Twitter

Page history last edited by Jared Peterson 4 mos ago

TweetDive is an example application that uses Twitter data as a datasource and SaffronMemoryBase as an analytical engine. We've made the source code for TweetDive publicly available in a Subversion repository. TweetDive is an open source product with an MIT-style license. You're free to use the TweetDive code however you'd like. You can read more about the license here. You can look at it for ideas on how to build your own application. It uses a number of different REST API calls. Hopefully this will give developers a head start on their own application development. If you'd like to extend the deployed version of TweetDive we'd love to take your submissions and incorporate them into the codebase. Please contact us.

 

Checking Out Source Code

 

To check out the TweetDive source code from Subversion you'll need to use the following repository URL:

 

https://saffrontech.svn.beanstalkapp.com/twitter/trunk

 

If you're using command-line Subversion the checkout command will look like this:

 

svn co https://saffrontech.svn.beanstalkapp.com/twitter/trunk twitter

 

There are a number of Subversion clients that make this process pretty easy (if you're not comfortable with the command-line). If you use a Mac, take a look at Cornerstone or Versions. Tortoise is a great option on Windows.

 

Running TweetDive

 

TweetDive is a Grails application. It's currently running on Grails 1.2.1. Grails is a web application framework that using the Groovy programming language and runs in the Java JVM. In order to run TweetDive on your local box you'll need Java 1.6, Groovy 1.6 or higher, and Grails 1.2.1 installed. Once you have all of these tools setup you should be able to run the following command from the command-line in the top-level "twitter" directory create by your Subversion checkout:

 

grails run-app

 

Connecting to SaffronSierra

 

In TweetDive the mapping between a Twitter account and a SaffronSierra service is called a "World". Worlds are created by the TweetDive admin user. When you first start TweetDive locally you won't have any worlds. To create a world you'll need to login as the admin user. The username/email address for the admin user is "admin@tweetdive.com" and the default password is "saffron". Once you've logged in as the admin user click on the "Worlds" link at the top-right of the screen.

Once you're on the worlds page select "Create World". On the "Create World" page you'll need to supply the Twitter credentials for the account who's data you'd like to push into SaffronSierra. Then, you'll need to supply the hostname, port, access key, and secret code for your SaffronSierra service. All of that information should be available on the SaffronSierra console. Before creating a world make sure that the SaffronSierra service that you plan on using is actually running.

Once you have created a world TweetDive will begin periodically polling Twitter for new data and pushing it into your SaffronSierra service. 

 

Comments (0)

You don't have permission to comment on this page.