Posts Tagged ‘REST’
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:
- 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
- Includes both administration and application APIs.
- Includes both ingestion (write) and query (read) APIs.
- 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.
- The API is not overwhelming. There are a small number of APIs that can be applied different ways to solve many problems.
- 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).
- Standard JSON/XML input/output formats.
- 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 SaffronSierra, Saffron Technology or view today’s news announcement.
Tags: REST, SaffronSierra, smb
Posted in SaffronMemoryBase | No Comments »
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: development, REST, SaffronSierra
Posted in SaffronSierra | No Comments »
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: bugs, grails, REST, SaffronSierra
Posted in SaffronSierra | 1 Comment »
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: grails, html, javascript, jquery, json, prototype, REST
Posted in SaffronSierra | 1 Comment »
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: development, grails, Groovy, Java, REST, Saas, SaffronSierra, Slicehost
Posted in SaffronSierra | 1 Comment »