Posts Tagged ‘REST’

TweetDive Source Code

Wednesday, April 14th, 2010 by Jared Peterson

I’m happy to announce that we’ve made the TweetDive source code publicly available (finally). I know a number of people have been waiting to get their hands on it. For details on how to grab it from Subversion take a look at this page.

We hope this code will provide a quick-start for developers getting started with SaffronSierra. TweetDive uses a number of different REST APIs available on SaffronSierra. You can use it as a reference as you build your own stuff, or you can extend TweetDive with new features. If you’d like to see your changes incorporated into the running version of TweetDive please contact us. We’d be happy to incorporate patches.

(more…)

Tags: , , , , ,
Posted in SaffronMemoryBase, SaffronSierra, TweetDive | No Comments »

REST API Announcement

Tuesday, March 23rd, 2010 by Jim Fleming

Today Saffron announced our REST APIs for sense-making and decision support applications using SaffronMemoryBase (SMB).  With these REST APIs, we’ve taken an otherwise difficult subject and made it easy.  Similar to how REST has simplified SOA, Saffron’s REST APIs have simplified analytics.  Notable features of our API are:

  1. Powerful, yet simple to use.  For example, to ask what products are connected to the company saffron in the context of announcement, would be as easy as HTTP GET: http://hostname/ws/spaces/default/connections?q=saffron,announcement&c=product
  2. Includes both administration and application APIs.
  3. Includes both ingestion (write) and query (read) APIs.
  4. Queries cover everything from low-level (e.g. returning a sub-matrix of association counts) to high-level (e.g. returning rank-ordered list of association trends) operations.
  5. The API is not overwhelming.  There are a small number of APIs that can be applied different ways to solve many problems.
  6. Dynamically combine associations together in various ways at query time.  SMB’s virtual attribute system even allows the system to “see” multiple attributes as one, providing a way to fix-up data cleansing errors (e.g. Bill and William are really the same person).
  7. Standard JSON/XML input/output formats.
  8. SMB’s performance and REST API is ideally suited for today’s new class of analytical applications.

For more information about Saffron REST APIs please visit SaffronSierraSaffron Technology or view today’s news announcement.

Tags: , ,
Posted in SaffronMemoryBase | No Comments »

What is SaffronSierra (in plain english)?

Wednesday, February 17th, 2010 by Jared Peterson

I recently received a request to describe SaffronSierra “in plain english”, this post will attempt to do just that.

SaffronSierra is a cloud-based, hosted version of SaffronMemoryBase. SaffronSierra enables developers to easily leverage the analytical powers of SaffronMemoryBase using a simple REST API. Using SaffronSierra, you don’t have to worry about downloading, installing and configuring software. You simply login to your SaffronSierra console and press “Start”. Within minutes, you will have a private instance of SaffronSierra ready for your use. Once your service is available you can start putting your data into SaffronSierra and powering your applications with advanced analytics. We hope that SaffronSierra enables people to quickly realize the benefits of SaffronMemoryBase in a low-cost, low-risk way.

(more…)

Tags: , , , , ,
Posted in SaffronSierra | No Comments »

Observing & Querying Tweets (Part 3)

Wednesday, January 13th, 2010 by Jared Peterson

In my previous posts I’ve discussed how to fetch data from Twitter and massage it into the form that is needed when observing data in Sierra. I also talked about how to “POST” that data to Sierra so that it’s available to query. In this post I’m going to discuss the process of actually querying that data once it’s in Sierra.

Before you read on you may want to browse over the Sierra documentation. These docs list all of the REST calls that are available on Sierra. In my example below I’ll be using the “connections” call.

I should also note that I’ve made some additions to the source code that I’ve used across all of these posts. That code is available along with the rest of the Sierra sample code. In particular I’ve made the code aware of command-line options that specify whether you are “observing” (-o) or “querying” (-q). You can also define all of the needed usernames and passwords via the command-line as well.

(more…)

Tags: , , , , ,
Posted in SaffronSierra | 1 Comment »

Ingesting Data into Sierra

Monday, January 11th, 2010 by Chet Patel

After signing up for a Sierra account, a few simple steps can be taken to push your data into Sierra and then analyze your data.

First, you’ll need to grab our sample code. You can find the instructions for downloading our sample code here.

Once you have downloaded the sample code, look for the Ingest.java class (in the src/java directory). This is a command line tool that can be run from your JAVA IDE or as a compiled java application.

(more…)

Tags: , ,
Posted in SaffronSierra | No Comments »

Observing & Querying Tweets (Part 2)

Monday, December 28th, 2009 by Jared Peterson

In my last post I walked through grabbing tweets from Twitter using their API. We then took those tweets and built the necessary XML “resource” for pushing that data into Saffron Sierra. In this post I’m going to cover the process of actually getting the data into (observing) Sierra.

To start, I should probably cover a minor modification I made to the code from the last post as I worked through this post. Last time, I created one XML resource for Sierra that contained all of the tweets from my timeline. After some testing, and thinking, I decided to put each tweet into it’s own separate XML resource. I think this is cleaner, and it’s the “supported” path for Sierra anyway.

(more…)

Tags: , , , ,
Posted in SaffronSierra | 2 Comments »

Observing & Querying Tweets (Part 1)

Monday, November 9th, 2009 by Jared Peterson

As we look to build compelling examples using Saffron Sierra we’ve often talked about using Twitter as a datasource.  If we could get Twitter data/tweets into Sierra then we could builds lots on interesting analytical capability using Sierra’s APIs.  To enable our exploration, and others, I’ve decided to start a little series (probably 3 parts) of blog post about observing and querying Twitter data in Sierra.

In this first part I’m going to cover the process of grabbing a Twitter feed and building the necessary resource XML for Sierra observations.  For now, you can think of a “resource” in Sierra speak as our method of “inserting” data into the system.  For my example I’m going to be using Groovy .  This code should be easily replicated in your language of choice.  I choose Groovy because I’m familiar with it and it provides a few tools that make this kind of stuff really easy.

(more…)

Tags: , , , ,
Posted in SaffronSierra | 5 Comments »

Grails, The Good and The Bad

Monday, September 21st, 2009 by Jared Peterson

As I’ve mentioned here before we’ve been using Grails to build the web front-end for Sierra as well as the Sierra REST API.  This week has provided a couple of great examples of the joys, and pains, of using open source software.  Let me start by saying that using Grails is mostly all joy, and not much pain.

While working on the administration console for Sierra this week I ran into a case where I needed to paginate a set of results.  Having built web applications for years now I have some pretty tried and true methods for doing this.  However, in the past while using other frameworks these methods have involved me writing a decent chunk of code.  With Grails that chunk of code is no longer needed.  Or, a least I don’t have to write it.  Let me show you a simple example.  Let’s say we have a “show” method on a UsersController that either fetches a single user (if we pass in an id), or returns a list of all users.  It might look something like this:

def show = {
    if (params.id && User.exists(params.id.toLong())) {
        def user = User.get(params.id)
        [user: user]
    } else {
        // default max num for the page to 10 if not specified
        if (!params.max) {
            params.max = 10
        }
        render view: "list", model: [userList: User.list(params)]
    }
}

Notice the call to “User.list(params)”.  This is passing in the URL parameter coming from the client into call to fetch the users.  If those parameters contain paging information then the list() method will fetch the proper subset of users.  I didn’t have to code the list() method.  Grails just gives it to me.
(more…)

Tags: , , ,
Posted in SaffronSierra | 1 Comment »

REST, jQuery, JSONP, & Grails

Monday, September 14th, 2009 by Jared Peterson

As we started building the REST API for Saffron Sierra we wanted an easy way to test it from within a web browser.  REST APIs run on top of HTTP so this makes pretty good sense.  At first we used the REST Client plugin for Firefox, which was great, but as we added authentication and other things to the API using the REST Client plugin began to be a little cumbersome.  I started toying with the idea of putting together a very basic test harness using HTML and Javascript.  The hope was that it would provide a good testing tool, but also give future users of Sierra a basic tool to use and learn from.

I had been wanting to use and learn jQuery for quite some time.  We (Saffron Technology) had used Prototype in the past for a lot of our applications.  I noticed a while back that there seemed to be a lot of buzz surrounding jQuery and wanted to see what it was all about.  The hope was that jQuery would provide a quick an easy way to consume the JSON responses from the Sierra REST APIS.  It well exceeded my expectations in this department.

The development of the first few pages and API calls went very smoothly and things looked great while testing on my local development workstation.  However, as I tried to use the test harness to access remote Sierra instances I noticed I wasn’t getting the responses I would expect, in fact, I wasn’t getting responses at all.  It turns out this was due to web browsers enforcing tight security when it comes to calling other domains/sites from the domain on which you’re currently running.  This issue is well documented in this wikipedia article.
(more…)

Tags: , , , , , ,
Posted in SaffronSierra | 1 Comment »

Using Grails for SaaS Deployment

Friday, September 4th, 2009 by Jared Peterson

First, a little history…

About 6 months ago we began using Grails for our new and ever growing set of REST apis.  Overall our experience has been great.  Grails has really allowed us to accelerate development and focus on the things that are important to us.  Naturally, when we started talking about Sierra and knew that we’d need to build a user dashboard, admin console, etc… we turned to Grails.

Grails is implemented using Groovy, which is a scripting language that runs in the Java JVM.  Seeing as the rest of the Saffron stack uses Java this was another strong selling point for us, but it also means that in order to stand up Sierra we’d have to jump through all of the same hoops that come along with running a Java stack.
(more…)

Tags: , , , , , , ,
Posted in SaffronSierra | 1 Comment »