Posts Tagged ‘SaffronSierra’

Newer Entries »

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 admin

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 admin

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 »

Online Documentation

Wednesday, November 4th, 2009 by admin

This past year as we’ve developed Sierra and SMB (Saffron Memory Base, our enterprise product) we’ve tried to embrace the power of the web to deliver information to our users. Hosting our documentation online felt like a very natural, and valuable thing to do (still does). We decided to use PBworks to host our documentation. We probably made this decision because Twitter was using it for their online documentation,

As we lived with this solution for a few months we’ve noticed a problem with this approach that continues to haunt us. What’s the problem you ask? Versioning! We need versioning. As we’re developing features and fixing bugs for a new build we often need to update the documentation. We may change something subtle about the JSON that is returned from a REST call. We may add a new request parameter that we didn’t have before. The documentation stays fresh, but unfortunately our customers, both Sierra and enterprise, are not always on the latest build. Sometimes that is due to a choice they’ve made, but often the latest build hasn’t even been released. Either way we end up confusing our customers in an effort to keep documentation up to date. We’ve worked with PBworks support and have a strategy for helping with this, but I can already tell that the new strategy will not be perfect. We have customers on many different versions and we need them all to have documentation that matches their version.

Are there other tools that we should look at? We want it to be a hosted solution. We need to for all our developers to be able to edit and contribute.  We like the “wiki” approach. Thoughts?

Tags: , ,
Posted in SaffronSierra | 2 Comments »

Bootstrapping, An Environmentalist's Perspective

Monday, September 28th, 2009 by admin

Grails gives you a handy little class called Bootstrap.groovy.  As it’s name implies this class allows you to “bootstrap” your application at startup (and shutdown).  This is pretty handy in development when you want your application to start with some sample data loaded.  For example, you might use Bootstrap.groovy to create a bunch of test user accounts (that’s what we do for Sierra).  As you start to move your application into production you might find yourself commenting out lines of code (I did) in Bootstrap.groovy so that the production version of your application does not launch with all of your sample data loaded.

This week as I was working on some administrative functions for Sierra I found myself thinking there had to be a better way, and it turns out there is.  As I’ve discussed before when Grails launches it knows what mode/environment it’s running in.  The default environments are “development”, “test”, and “production”.  The Grails configuration scripts Config.groovy, DataSource.groovy, etc… give you handy “environments” blocks, but what about classes such as Bootstrap.groovy.  What should we do there?  The answer is the grails.util.Environment class.  This class knows what the current running environment is.  If we use this in Bootstrap.groovy we now have a way to only load our sample data if we are in “development” mode.  This is how it looks:

if (Environment.getCurrent() == Environment.DEVELOPMENT) {
    // Insert sample data here
}

Tags: ,
Posted in SaffronSierra | No Comments »

Grails, The Good and The Bad

Monday, September 21st, 2009 by admin

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 »

Using Grails for SaaS Deployment

Friday, September 4th, 2009 by admin

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 »

Newer Entries »