Conversations API Inspector

An all too familiar scenario

Imagine you’re a developer working for Widgets n’More. The marketing team just came up with a new cross platform social media promotion. It’s going to involve collecting user generated content in the form of ratings and reviews. As luck would have it you remember your friend on the Ecom Team had mentioned working with a company called Bazaarvoice last year. Widgets n’More partnered with Bazaarvoice specifically for the purpose of collecting and displaying reviews.

In short order you find yourself at developer.bazaarvoice.com where you start reading the Conversations API documentation. There are a lot of fields and parameters and content types. What’s more, some of them appear to be customizable. They offer custom rating fields, tags, context data questions, and additional free text fields. One company might have “rating_value” while another might be using “rating_quality”. It’s also not immediately clear how any those should be displayed in a webform. The fields can even have customizable properties like min and max length.

So, you call your friend hoping she’ll be able to shed some light on the situation. She explains that Bazaarvoice can even configure fields based on content type, like reviews, questions or answers, and make different custom fields available depending on the parent category of a product. Unfortunately it’s been so long since the initial Bazaarvoice implementation that she doesn’t remember what was set up. If only there was an easy way for you to see exactly what fields are available taking all those factors into account…

Conversations API Inspector to the rescue

The Conversations API Inspector was created with the above scenario in mind. It is a web based app that shows what fields can be submitted to the Bazaarvoice platform using the Conversations API for any API key + content type + ID combination. With the Conversations API Inspector our imaginary developer would be able to see what fields are available, how they must be submitted in an HTTP request, meta-data about each field and much more

The Conversations API Inspector is ready to use and publicly available at http://api-inspector.bazaarvoice.com/. It is well documented at our Developer Portal, so instead of repeating that here I’ll leave you with some screenshots.

noHistory topNoFields topWithFields
fields fieldDetailsProperties fieldDetailsSubmission

Epilogue

Even without the Conversations API Inspector all would not have been lost for our imaginary developer. He could have used the API itself to determine what fields are available. In fact this is exactly how the Conversations API Inspector does it. Of course, the Inspector provides a much more user friendly and interactive GUI than the raw JSON or XML returned by the Conversations API. You can read more about how the inspector works at the documentation under the heading “How it works”.

Using the Bazaarvoice Conversations API to build a UGC template

(This post is by Devin Carr, one of our Summer 2013 interns.)

LightReviewDisplaySmallWorking as a Developer Advocate intern on the Bazaarvoice Developer Relations team has been a great learning opportunity. At the beginning of the Summer I discussed with my mentors, Chas Peacock and Frederick Feibel, what I wanted to learn while interning. We decided on front-end web-development because it is an area in which I had minimal experience. For the rest of the Summer I spent my time creating a simple review display template using the Bazaarvoice Conversations API and some really cool front-end frameworks & libraries. I also researched other ratings and reviews implementations to learn about common industry best practices and incorporated them into what I am calling my LightReviewDisplay Template.

LightReviewDisplay_jsComing from a background limited to Java, I quickly discovered that Javascript is quite a different programming language. I took a few days to learn basic Javascript and HTML from Codecademy to get a grasp of the syntax and functions. Using that knowledge I created the first version of the LightReviewDisplay. I put all of the Javascript and dynamic HTML in one large file that handled loading the reviews and displaying them on the page. During my first code review Chas and Frederick suggested my code was lacking in structure and layout best practices, such as including an Object Oriented Programing model. Instead of most of my code being in just a few functions they recommended I implement RequireJS, self described as a “JavaScript file and module loader”, to encapsulate my code within a maintainable structure. They also suggested that I use Mustache, a HTML template library. Using these two libraries I could divide my code into multiple modules and avoid having large amounts of HTML embedded within my Javascript.

LightReviewDisplay_js_filterThe second version that I made was starting to look more like a modern and modular Javascript project. Chas and Frederick agreed that the increased readability of my refactored project was an improvement, but they felt it could be further improved by imposing more structure. They suggested I research some MVC (Model, View, Controller) frameworks. I looked into Backbone, KnockoutJS, Angular, and Stapes, all very versatile with separated modules for the model (data), the view (page), and the controller (user input). I ended up choosing Stapes because it is lightweight and is a very minimal framework that allows lots of customization.

LightReviewDisplayRatingsSummaryAt this point the project was functional but the user experience needed improvement. I decided to do some research into how a product review page should actually look. I inspected several retailers to see what was common about their layouts and what would be the best way to integrate reviews onto a product page. They all followed a two part system: a summary section at the top of the page and a more detailed section further down. The summary section shows the product’s price, description and a review ratings summary. It typically had the average rating for the product, the total number of reviews, and a rating breakdown per-star. Then towards the bottom of the product page, there was a review module that held all of the consumer reviews. I combined what I had learned about layout with Twitter Bootstrap resulting in an efficient and usable template for displaying UGC.

My Summer project was a great way to get started with Javascript and get familiar with the Bazaarvoice Conversations API. Throughout my internship I learned a lot about being a software engineer, expanded my CS knowledge and got some firsthand experience working amongst a small team of developers. This internship also gave me the opportunity to learn with the latest front-end libraries, architectural patterns, and work with really great developers. A special thank you goes out to Chas and Frederick for taking time out of their days to assist me with any problem I came across.

More about the LightReviewDisplay Template:
Bazaarvoice Inspiration Gallery: https://developer.bazaarvoice.com/inspiration_gallery/lightreviewdisplay
Source: https://github.com/DevinCarr/LightReviewDisplay

BV I/O: Adrian Cockroft

As part of our internal BV I/O conference we’ve previously profiled on the blog, we had Adrian Cockroft, Cloud Architect at Netflix, come give us an overview of a lot of Netflix’s architecture as well as information on their multitude of open source projects and the ways Netflix is engaging the community to contribute. He also talked about some of his personal sources of inspiration when it’s come to things his teams have developed at Netflix. Big thanks to Adrian for taking the time out to come visit with us in Austin. The full talk is below:

Making of the Bazaarvoice SDK for Windows Phone 8

A page displaying item name, item information, and a list of reviews.

Hi, my name is Ralph Pina, I am a Summer ’13 intern and UT-Austin Computer Science student. During this summer I had the privilege of working with another intern, Devin Carr, on Bazaarvoice’s .NET SDK for Windows Phone 8 and Windows 8 Store apps. Our goal was to provide convenient access to our Conversations API and make the app development experience even better. We want our customers’ developers to spend more time figuring out how to make better use of the data in our network and innovating on ways to increase engagement with their brands, products, and services.

We currently provide SDKs for many other platforms including iOS, Android, so moving to cover the third largest mobile platform was a natural extension. As for Windows 8 Store apps, they are not as numerous or popular as traditional Windows Desktop apps, but as the install base for Windows 8+ devices grows, and developers get more accustomed to working with a touch interface on all their devices, their numbers should increase. This will provide an opportunity for first movers to grab a spot in million (billions?) of user’s Start Screen. We’ve got your back.

We tried to implement best practices in our development. Below are some of the technical challenges we experienced:

  • Networking: we used the newly ported Microsoft HttpClient. This is the most popular client in other .NET platforms and Microsoft is actively working to optimize it for Windows Phone. Our first implementation used the RestSharp library, a popular, open source Http client. However, like the Apache HttpClient in Android, this library loaded all data into a byte array before sending. While Windows Phone 8 has a higher max heap size for apps than Android, there is still a limit you may cross with a large image or video. Switching to HttpClient did not completely solve our problems however. While in other .NET platforms the library will buffer and stream content, this seems to be a limitation for Windows Phone. However, we hope this changes in the near future.
  • The getting started .NET app walks a developer through the installation of the SDK and  how to make a simple http request and dump the JSON response on the screen.Windows Phone does not have a native JSON library available, so we used the Newton JSON.NET library. I especially like the array syntax to access items in the JSON hierarchy: for example JSONObj[“tag1”][“tag2”][“tag3”] will access a property named “tag3” which is inside the JSON object named “tag2”, which is itself inside the JSON object named “tag1”, etc, etc.

So you say there are better ways of doing this, or you want a specific implementation for your enterprise to use across various apps/brands/divisions? You are in luck! Our .NET SDK is open sourced and can be found on GitHub: https://github.com/bazaarvoice/bv-.net-sdk. So head over, hack it, maybe even submit a pull request to lay your claim to glory. While you are in GitHub, browse all the other awesome repos we’ve open sourced over the years.

Below I have included some screenshots of a couple of sample apps that demonstrate how to use the .NET SDK to submit and display sample data from our API.

A review details page using the title, user nickname, data, image, and review text.A example of a product page showing ratings.An example of a review submission page

Cheers,
Ralph Pina

Bazaarvoice SDK for Windows Phone 8 has been Open Sourced!

The Bazaarvoice Mobile Team is happy to announce our newest mobile SDK for Windows Phone 8. It is a .NET SDK that supports Windows Phone 8 as well as Windows 8 Store apps. This will add to our list of current open-source mobile SDKs for iOS, Android and Appcelerator Titanium.

The SDK will allow developers to more quickly build applications for Windows Phone 8 and Windows 8 Store that use the Bazaarvoice API. While the code is the same for both platforms, they each need their own compiled DLL to be used in their perspective Visual Basic projects. As Windows Phone 8 and Windows 8 Store apps gain more traction in the marketplace, we hope the Bazaarvoice SDK will prove a valuable resource to developers using our API.

Learn more at our Windows Phone 8 SDK home page, check out our repo in GitHub, and contribute!

The SDK was developed by two summer interns: Devin Carr from Texas A&M and Ralph Pina from UT-Austin. Go horns!

In the next few days we’ll publish a more in-depth post about how the Windows Phone 8 SDK was built, some of design decisions and challenges.

Project Lassie: who let the dog out!

The Bazaarvoice Platform Infrastructure Team recently open sourced project Lassie. Lassie is a Java library that can manipulate the new DataDog screenboards. The Lassie library can create, get, update, and delete the DataDog screenboards via the REST API.

We use DataDog across various teams to collect metrics at both a system-wide and application level to give our teams a clearer view of what’s happening across all environments.

The project was developed by a Bazaarvoice summer intern, Mykal Thomas. Mykal is a senior at Georgia Tech.

Check out the Github for more information: https://github.com/bazaarvoice/lassie

Documentation for DataDog’s Screenboard API: http://docs.datadoghq.com/api/screenboards/

Maintenance Notice: Bazaarvoice Developer Portal

We’ll soon be giving our Developer Portal some love in the way of functionality and style updates. To facilitate this, we’ll be taking the portal offline for approximately 6 hours on Thursday, August 15th; the estimated times are listed in a few timezones below:

Timezone Start date/time End date/time
UTC Thursday, August 15, 2:00 AM Thursday, August 15, 8:00 AM
EDT Wednesday, August 14, 10:00 PM Thursday, August 15, 4:00 AM
PDT Wednesday, August 14, 7:00 PM Thursday, August 15, 1:00 AM
AEST Thursday, August 15, 12:00 PM Thursday, August 15, 6:00 PM
IST Thursday, August 15, 7:30 AM Thursday, August 15, 1:30 PM

Bookmarks to existing documentation will work through at least part of the downtime, but please excuse any styling inconsistencies as we work through the update.

If you need something quickly, tweet us @BazaarvoiceDev and we will do our best to get you the assistance you need.

Thanks for your patience!

Summer 2013 Intern Science Fair

large_groupEvery year at Bazaarvoice we bring on a new class of Summer interns and put them to work creating innovative (and educational) projects. At the beginning of the Summer interns choose from a list of projects and teams that interest them. From there they are embedded in a team where they spend the rest of the Summer working on their chosen project with help from seasoned professional mentors. At the end of the Summer they set up demos and we invite the whole company to visit with them and see what they have accomplished. Read on to learn about our interns and their fantastic and innovative projects.

Below are some of the 2013 intern science fair projects in the creators own words:

Devin Carr
School: Texas A&MField of study: Electrical Engineering

ccarr_intern_scifairI built a product review template using the Bazaarvoice Platform API as well as some of the latest front-end libraries and architectural patterns. It provides a best practice and simplistic model to assist potential/existing clients and their developers with a base to develop an efficient product page integrated with Bazaarvoice Ratings & Reviews.


Lewis Ren
School: UC BerkeleyField of study: Electrical Engineering & Computer Science

Genie is a product recommendation tool based on user clustering. The idea is that you want to give every user the possibility of a product within the network as a recommendation; however, be able to rank them in such a way that is most relevant to the specific user. By clustering users based on modularity we can determine how big of an impact a specific user will have on the rest of the network. For example, a high modularity node that makes a decision will have a stronger impact on its neighbors, but will propagate out slower and have a small to negligible effect on outer nodes. Similarly, a low modularity node that makes a decision will have a lesser impact, but will radiate outwards much more quickly.


Matt Leibowitz
School: University of DallasField of study: Physics / Computer Science

My project is called Flynn, which is a web page for accessing documents out our data store. Flynn allows developers to bypass a fairly long and involved process (up to ten minutes of looking up documentation and performing curl requests) with a quick and simple web interface.


Perry Shuman

My project is a bookmarklet built to provide debug information about a page with injected BV content: information that could help a client fix implementation issues that they might have, without having to know the inner workings of our code. It also allows previously hidden errors to be displayed to a client, giving them a first line of information to debug broken pages.


Ralph Pina
School: UT AustinField of study: Computer Science

rpina_intern_scifair“Over this past summer I interned with Bazaarvoice’s mobile team. In its effort to make it easier to integrate BV’s services into every platform and outlet their clients use it has build and distributed mobile SDKs (Software Development Kits) to display and submit data to the BV API. I worked to improve the Android SDK, and along with another intern, Devin Carr, wrote a new Windows Phone 8 SDK. I also wrote 2 Windows Phone 8 sample applications to demonstrate how to implement the SDK in an app. Afterwards, we opened sourced all our mobile SDKs under the permissive Apache 2.0 license.”


Rishi Bajekal
School: University of Illinois at Urbana-ChampaignField of study: Computer Science

Built a RESTful web service for serving photos from the data stack and worked on the Conversations 2013 API as part of the that team.


Ryan Morris
School: McCombs School of Business at the University of Texas at AustinField of study: Management Information Systems

rmorris_intern_scifairMy project’s theme was predictive modeling and focused around using a client’s web metrics, review count, and average rating to predict orders for products. To create the predictive model, I pulled the client’s visits, orders, and revenue for a certain time period from their web analytics account. I then pulled the client’s number of approved reviews and average rating for each product from the Bazaarvoice database using mySQL. Finally, I ran the data in the statistical program R to come up with a predictive model. With this model, I was able to analyze the effects that varying review count and average rating had on predicted orders for a product.


Schukey Shan
School: University of WaterlooField of study: Software Engineering

sshan_intern_scifairMy project was the brand search summary, which provides both an API and a UI to summarize data we collect on brands. For example, if we search for a brand “Acme”, the API looks for all the brand names that contain the word “Acme”, creates a composite of the matched brand values, and returns the count for pageviews, ugc mpressions, and unique visitors for each client of each brand value in the composite. This would be useful as an overview of how brand values look like over the network.


Steven Cropp
School: Rensselaer Polytechnic InstituteField of study: Computer Systems Engineering and Computer Science

This Summer I worked on an xml file validation service. Users can set up “rules” that dictate how xml files must be formed, and then apply those rules to our clients xml feeds to generate user friendly reports that outline what is wrong with the xml, and some details about how to fix any issues. This should help smooth out the process our clients go through when importing feeds, saving the support team and our clients time.


Thomas Poepping
School: Carnegie Mellon UniversityField of study: Computer Science

tpoepping_intern_scifair1. A tool to inject spreadsheets of UGC into the system.
2. An addition to the web app that generates a payroll report for all moderators, streamlining the payroll process.
3. A pilot WordPress plugin that moderates WordPress comments, then allows administrators to act on rejected comments.

BV I/O: Imagination unlocked

What do you get when you lock 100+ engineers, product managers, designers and other techies in a building for 2 days and ask them to come up with new and creative ways to “unlock the power of our data”? Well, I could tell you, but then I would have to… yeah that’s top secret awesome product roadmap stuff now. (and even redacted)

IMG_7745a_redacted-sm

As an extension to our BV.IO internal tech conference that I recently blogged about, we held an engineering wide Hackathon for everyone in our technical community to go nuts with our data and try to come up with some of the next big ideas for Bazaarvoice. We had over 100 folks participate, form teams of 3, and after 2 days, we had 31 really cool prototypes that they demo’d to the entire company. It was such a great experience to see so many smart and passionate people singularly focused on innovation and building some cool new ideas and value for Bazaarvoice. Here is a quick summary of how things went down:

Tuesday = BV.IO tech conference & speakers, present Hackathon ideas
Wednesday = Form teams & brainstorm
Thursday = Hackathon & XBOX Call of Duty: Black Ops 2 tourney
Friday = Pancake breakfast, Hackathon, Demos, Prizes
Saturday = Sleep

We started the hackathon as a continuation of the BV.IO event at the Alamo Drafthouse, where we had anyone with a proposal come on stage and try and sell the idea. Think about it like trying to sell your idea to a group of engineers to come work with you on your startup idea. After we heard all the interesting ideas, everyone went off and self formed teams, and started brainstorming.

IMG_7747a_neville-sm

On Thursday, we kicked off the Hackathon, and it was eerily quiet in engineering. Everyone split off into small teams and was heads down coding or held up in a breakout room whiteboarding designs. We had tons of food and snacks brought in for breakfast, lunch and dinner to keep everyone energized, and by the end of the day everyone had made some amazing progress and were ready to blow off some steam…and by “blow off”, I mean blow up, and by “steam”, I mean COD:BO2.

IMG_7869a_evan-sm

We set up 8 portable flat screen monitors and 8 Xbox 360s, and we got our game on. It was so simple and so much fun, I don’t know why we hadn’t done this earlier. It was a huge hit, and we are thinking about how we can keep that set up all the time. Everyone self rated their skill level, and we balanced teams for a round robin Call of Duty: Black Ops 2 tournament.

BlackOpsBreak

Friday morning, all the managers got together to show our appreciation for the team with pancakes and bacon. I really think there is no better way to show your appreciation than with bacon.

IMG_7860a_flippin-sm

“That’s way too much bacon”‘, said no one ever…

Coding continued throughout the day, and at 3pm it was pencils down, and time for demos. The company filled the All Hands, and it was rapid fire through 31 demos.

IMG_7886a_allhands-sm

IMG_7908a_demo-sm

We even had a really slick Google Glass hackathon project.We even had a really slick Google Glass hackathon project.

The energy was awesome, the ideas were awesome, and the conversations it inspired across the entire company was awesome. After all the teams had demo’d, the company voted, and winners across several categories were selected. We had a few cool prizes for the winners like iPad Minis, Parrot Drones, Rokus, cash money and of course totally custom Lego trophies.

IMG_7899a_prizes-sm

If you haven’t done a full on Hackathon at your company in a while, I highly recommend it. Every time we do it here, I am amazed by the creativity, the innovative ideas and solutions that are created in such a small time. And the ripple effect that happens from that continues for months as the business internalizes the ideas and roadmaps and direction start to change based on those ideas. The key is to not let the ideas die on the vine. Champion them, advocate them, and push them forward, and you too can change the world one authentic conversation at a time.

IMG_7962a_cto_approved-smThis hackathon is CTO approved.

SQL, NoSQL,… What’s now? New SQL

It has not been long since the holy war between SQL and NoSQL database technologies faded, and now we see a new contender, NewSQL, rising. What is it? Will it cause another round of the war?

Recently at Bazaarvoice we hosted an informational session on VoltDB, one of the better known NewSQL solutions, with several engineers and technical managers from Austin and San Francisco offices participating in that session.  The question we needed answered: what is VoltDB and why it might be an interesting datastore technology for us?

In short, it may be very good for real-time and near real time analytics, where SQL and ACID compliance are desirable. Personalized ad-serving, marketing campaign real-time effectiveness measuring, and electronic trading systems are some of the reference applications that VoltDB provides.

VoltDB is an in-memory database, which makes it extremely fast. However, this is just a small portion of the story. Besides residing in memory, VoltDB has a few performance improving architectural solutions based on research by well known database technologists, including the famous Michael Stonebraker, who was involved in the creation of Ingres, Postgres, and Vertica.

The creators of VoltDB wanted to preserve all the good features of a traditional RDBMS like SQL, ACID compliance, and data integrity, but they also wanted to drastically improve performance and scalability. All the modern commercial and open source RDBMS are built on the same principles, which were created more than 40 years ago for the era of small memory and slow disks. The researchers analyzed the bottlenecks of a traditional RDBMS and found that at high load about 88% of the server capacity is wasted on the traditional RDBMS overheads and only about 12% of the capacity is used for doing  actual useful work.

Screen Shot 2013-07-01 at 2.41.08 PM

VoltDB’s architectural solutions eliminate the traditional RDBMS overheads:

  • The computing power is brought close to data. Data partitions have affinity to specific memory regions and CPU cores ( virtual nodes) in a shared-nothing cluster;
  • Data is located in main memory which eliminates buffer management overhead, let alone access to painfully slow disks;
  • Single-threaded virtual nodes operate on partitions autonomously to eliminate locking and latching overhead;
  • Combination of continuous snapshots and command logging instead of writing db blocks to disks and transaction log for durability drastically reduces logging overhead.

These architectural solutions allow combining all the advantages of a traditional RDBMS with scalability features usually associated only with NoSQL databases: automatic sharding across a shared-nothing cluster, eliminating many overheads, automatic replication and log-less durability for high availability. With these features, VoltDB claims to be one of the fastest databases on the market today.

VoltDB’s impressive performance is illustrated by the results of the TPC-C-like benchmark below, in which VoltDB and a well known OLTP DBMS were compared running the same test on identical hardware (Dell R610, 2x 2.66Ghz Quad-Core Xeon 5550 with 12x 4GB (48GB) DDR3-1333 Registered ECC DIMMs, 3x 72GB 15K RPM 2.5in Enterprise SAS 6GBPS Drives):

Screen Shot 2013-07-01 at 3.09.06 PM

So, will the rising NewSQL technology cause another religious database war? Probably not. VoltDB positions their database as a niche database doing a few things really well. It doesn’t try to be a one size fits all database, and VoltDB’s philosophy is “an organization should use a few datastore technologies, using each for the case where it plays the best.” For example, you cannot use VoltDB if your data does not fit into the combined memory of your cluster.  Long leaving transactions are also not supported on VoltDB. 

Hopefully, if some team has a need for a very fast but consistent, ACID and SQL compliant database for a new project, they would consider VoltDB as as an option.