#businessintelligence

SlashDB and Data Analysis

SlashDB and Data Analysis

An increasingly popular trend in IT and business intelligence is data analysis. At SlashDB, we celebrate this trend as it contributes to the rising awareness of data’s amazing capabilities. Data analysis tools allow for the construction of predictive models that enable businesses to anticipate the needs of their customers – changing customer service into a proactive rather than reactive element.

Recent advances have made data analysis tools both more affordable and more precise in their predictions. To help predictive models reach their full potential, new data analysis tools are adding API technology to help interpret and organize complex un-structured and real-time data, as well as to support in-house development of data analysis apps.

Pairing Data Analysis and APIs

Pairing data analysis tools with APIs enables more efficient and in-depth data collection. APIs not only help extract more specific data than ever before, they also help expose real-time data for more precise and up-to-date predictive models – predicting trends and modifications ahead of the competition.

Combining data analysis tools with APIs helps businesses create more detailed and consumer-specific predictive
models and applications. These predictive models and apps help businesses to fully gauge the desires and needs of their customers – enabling proactive customer support and, in turn, higher customer satisfaction.

Data analysis tools paired with APIs are helping businesses achieve higher revenue than ever before by speeding up and simplifying data collection. This is a trend that businesses simply cannot afford to miss out on. The best way to get the most out of your data analysis tools, and keep up with the competition, is to adopt an API add-on to streamline data extraction.

Case in Point – SlashDB in Real Life

The theories behind adopting API technology in order to increase the effectiveness of data analysis tools are informative – and well-considered – but real life examples are sometimes even better at illustrating a point. For instance, SlashDB powers APIs for Aruba Tourism Authority. Our API helps them collect valuable data and gives them heightened insight into prospective travelers’ specific interests in the island’s activities. Aruba Tourism Authority uses an attractive web application and digital content on arubashortcuts.com as a platform for gathering important data from prospective visitors.

beachfront-dinner

SlashDB captures the data from their website and seamlessly integrates it into Google Spreadsheets where it is analyzed in real time. By pairing an API with data analysis tools, Aruba Tourism Authority is able to capture and analyze data that will help them attract more visitors and increase revenue. This is an excellent example of the effectiveness and efficiency that APIs bring to data extraction and analysis.

aruba-report

SlashDB: Your Data Analysis API Solution

Adding an API add-on like SlashDB to your data analysis set-up can help you extract important data from predictive models, enabling you to meet and exceed customer expectations across multiple channels.aruba_island

At SlashDB, we focus on creating APIs with both high accessibility and heightened searchability. That’s why our API  add-on relies on a “what you see is what you get” set-up. This kind of set-up increases the speed and efficiency of data extraction. Our technology enables you to access your data through multiple platforms and creates a unique hyperlink for each individual piece of data.

Important Reasons Why You Should Pair SlashDB with Your Data Analysis Tools

  • SlashDB makes databases easily accessible from any analysis tool including (but not limited to): R Studio, Jupyter Notebook, Qlikview, Tableau, and Excel.
  • SlashDB makes working with databases as simple as working with plain files – with the added bonus that the data retains its integrity and authorizations while staying up-to-date.
  • SlashDB allows users to access and retrieve data with ease, relying on their intuition to extract the data they need rather than relying on complicated search queries.
  • With SlashDB, the content in your data analysis software or database becomes accessible through authorized web and mobile applications.SlashDB logo

SlashDB is committed to creating APIs that are highly accessible, searchable, and adaptable to other business and software tools. SlashDB’s API add-on can help streamline your business, allowing for increased profit margins and higher customer satisfaction. Contact us at SlashDB and we’ll work with you to find the best API add-on configuration for your business needs.

How to Prepare Your API for Holiday Traffic

How to Prepare Your API for Holiday Traffic

Did you hear that web’s fiber optic wires light up in different colors during Holiday season? Well, we are not certain that’s true, but without a doubt holiday shopping online is now more popular than ever.

Just to drive the point home, PracticalEcommerce predicts that online retail will increase by 13.9% in 2015.1 If that’s not enough to motivate you to get pull_quote_api_traffic_largeyour e-commerce API into tip-top shape – here are some stats that might convince you. According to data on Kissmetrics, 47% of people leave a website if it doesn’t load within two seconds and 79% of people will not return to a website if they are initially dissatisfied with its performance.2 And to bring it all the way home – 44% of dissatisfied visitors will also tell their friends about their dissatisfying experience.3

You should be sufficiently motivated at this point to take a close look at your API and make sure that it’s ready to meet the heavy demands of holiday shoppers. The configurations below are recommendations from SlashDB developers to help optimize the performance of your API during the holiday season.

 

Reconfiguring Your API to Optimize the User Experience

Our developers took the time to break down some useful NGINX configurations that will help prepare your API for holiday traffic. While there are many shopping_cart_scaled2factors that contribute to the overall functionality of your API, improving the configuration of your load balancing, caching, and rate limiting are three solid ways that you can improve your set-up for holiday traffic. That’s why our developers are focusing on these three configurations to improve the API user experience.

 

Load Balancing

Setting up basic load balancing in NGINX is fairly simple. All you need to do is define an upstream block with multiple servers running – these can be multiple application instances on the same machine or another server in your network. The code below shows a basic load balancing configuration in NGINX.

 

http {
    upstream slashdb_app {
        least_conn;
        server 127.0.0.1:8001 weight=3;
        server 127.0.0.1:8002;
        server 127.0.0.2:8001 backup;
    }
    server {
        listen 80;

        location /db* {
            uwsgi_pass slashdb_app;
            include uwsgi_params;
        }
    }
}

 

Load Balancing Breakdown

The code above might seem a tad intimidating for those with little experience customizing NGINX. It actually makes a lot of sense if you know what these things stand for. Take a look below to get a better understanding of how the code works to help improve your API.

upstream – assigns a name to a group of servers that will receive request traffic; referenced later in the uwsgi_pass directive

least_conn is a method used for distributing requests, other options are ip_hash, hash, least_time. If you don’t set anything yourself then the requests will automatically be distributed evenly among the servers.

weight the weight is directly proportional to the number of requests the server receives. If you set the weight to a high number then the server will receive a high number of requests. Similarly, setting the weight to a low number means that the server will receive a low number of requests.

backup flags the server as a last resort. A request will be sent if other servers are unavailable.

Caching

Another simple way to improve your API performance is to add cache. Before reaching for an advanced solution like Varnish, you should check out NGINX which serves static content very efficiently and is an incredibly capable web cache when placed in front of an application server. The NGINX configuration below proxies a WSGI (Web Server Gateway Interface) application and is similar to a regular proxy_cache.

 

server {
    listen 80 default_server;
    server_name example.com www.example.com;
    uwsgi_cache_path /var/cache/slashdb levels=1:2 keys_zone=slashdb_zone:10m inactive=5m;

    # additional cache key segments from query parameters and HTTP headers
    set $api_auth $arg_app_id$arg_app_key$http_app_id$http_app_key;
    location /db* { 
        uwsgi_pass unix:///var/run/slashdb/slashdb.sock;
        include uwsgi_params;
   
        uwsgi_cache slashdb_zone;
        uwsgi_cache_key $host$request_uri$http_authorization$cookie_auth_tkt$api_auth;
        # cache freshness
        uwsgi_cache_valid 200 302 5m;
        uwsgi_cache_valid 301 1d;
        uwsgi_cache_valid any 0;

        add_header X-Proxy-Cache $upstream_cache_status;
    } 
}

 

Cache Breakdown

The code above might seem a bit lengthy and complex, so we’ve broken it down and provided some explanations to help you feel more comfortable making these changes on your own. This is an important configuration as some locations tend to change more often than others. Using the right caching time values can dramatically reduce redundant calculations, database requests, and speed up your API.

location – URL fragment to which the cache settings apply; you can specify different setting for different parts of your API

uwsgi_cache_path

/var/cache/slashdb is the path to the directory to save cached files.
levels=1:2 sets the sub-directory structure in the cache.
keys_zone=slashdb_zone:10m is shared memory (10 MB) that stores all of the active keys and metadata in the cache.
inactive=5m sets the cache lifetime. If cached data is not accessed within 5 minutes (5m) it will be removed from the cache regardless of its freshness.

uwsgi_cache_key

$host$request_uri$http_authorization$cookie_auth_tkt$api_auth is a key used to differentiate cached files and $api_auth segments assure that each API user request is cached separately.

uwsgi_cache_valid sets the caching time for different response codes.

200 302 5m requests with status code 200 or 302 are cached for 5 minutes (5m).
301 1d sets redirects to be cached for 1 day (1d).

uwsgi_cache defines which zone (shared memory) to use for caching.

add_header adds a header to the response.

X-Proxy-Cache $upstream_cache_status header X-Proxy-Cache will tell you if  a response is HIT, MISS or BYPASS in the cache.

 

Rate Limiting

A very useful feature in NGINX is the ngx_http_req_module which is used to limit the request rate by using a ‘leaky bucket’ method that delays requests so that they are processed at a defined rate. A ‘leaky bucket’ method is useful as it provides a steady rate for requests (in the same way a leaky bucket has a steady drip, hence the name).

http {
  limit_req_zone $binary_remote_addr zone=one:10m rate=10r/s;
  server {
    location /db* {
      limit_req zone=one burst=20;
    }
}

Rate Limiting Breakdown

Rate limiting really is a great way to improve the functionality of your API. Take a look at our explanations below so that you understand the configuration changes and feel comfortable making these adjustments.

 

limit_req_zone

$binary_remote_addr in this example the remote address is used as a key for checking the rate. The key can be a combination of various attributes.
zone=one:10m is the name and the size of the zone.

rate is the desired frequency of requests per second.

limit_req sets the maximum length of a queue with delayed or ‘leaky bucket’ requests. The default setting is 0.

zone=one defines which zone (key or rate) is to be considered.
burst=20 is the allowed number of delayed or ‘leaky bucket’ requests. In this example 20 is set as the allowed number of delayed requests.

 

We hope these configurations will help you have a more relaxing and profitable fourth quarter. SlashDB wishes you a  happy holiday season and a very happy high traffic online shopping season.

 


  1. Armando Roggio, “4 Predictions for 2015 Holiday Shopping Season,” Practical  Ecommerce.com, accessed October 23, 2015. http://www.practicalecommerce.com/articles/92465-4-Predictions-for-2015-Holiday-Shopping-Season.
  2. Sean Work, “How Loading Time Effects Your Bottom Line,” Kissmetrics.com, accessed October 23, 2015. https://blog.kissmetrics.com/loading-time/.
  1. Ibid.
SlashDB Helps Aruba Win #1 Spot in Digital Marketing Index

SlashDB Helps Aruba Win #1 Spot in Digital Marketing Index

Together with ConceptFarm, a leading digital marketing agency in New York, we are delighted to share with you the recent success of our client, Aruba.com.

Caribbean & Co. reports that the happy island of Aruba ranks No. 1 out of 35 Caribbean islands for overall “destination marketing index 2015.” Aruba also ranks No. 1 out of 10 Caribbean islands for Instagram reach, boasting an impressive 23,000 followers, double the number of the runner up. The marketing index ranking was derived by a proprietary weighing of various data, including social media followings, website inbound links, 3rd party rankings, and more (…)

Solidifying its position as the most digitally innovative DMMO, the ATA recently launched The Happiness Builder – a content-rich planning experience (…)

Quick Start With SlashDB

SlashDB connects website to databaseWhen the design team at ConceptFarm outlined their ideas for Aruba’s Happiness Builder it quickly became evident that such an innovative site would need to be custom built. Featuring video clips of nearly 100 attractions housed under six categories, the site allows visitors to create and share custom video “itineraries” of their Aruba vacation, complete with personalized messages and a choice of sound tracks.

The honor of programming of the site was awarded to VT Enterprise (the company that created SlashDB) after a highly competitive Request for Proposal process. Victor Olex, founder and CEO commented:

The sheer scope of the project and the need to launch the site in time for the contest was not a job your neighborhood web developer or digital marketing agency could do by themselves. We took the challenge and delivered on every idea the creative team threw at us.

VTE’s team utilized database design methodologies found in professional enterprise information systems and coupled that with API automation from SlashDB. SlashDB provided an instant API gateway to MySQL, which was the database already in use at Aruba.com. This combination formed the bedrock of the solution and the back-end for the web application.

Focus on User Experience

Once an API layer was in place, the development team focused on delivering the rich interactive features and stunning visuals conceptualized by the creative team. HTML5, advanced Cascading Stylesheets (CSS), and the JavaScript library, AngularJS, were key components in the front-end development process. OpenStreetMap combined with styling from Stamen and Leaflet library rounded off the technology stack and allowed for the innovative special effects on the map of the island. Adds Olex:

Every time our back-end team needed to make a change to the database, SlashDB instantly provided our front-end developers with an API ready for use. In the end we found that the entire site required literally ZERO lines of code in the back-end. SlashDB truly surpassed our own expectations.

At VTE, we view the finished product as one our greatest accomplishments in digital marketing production. This project was richly rewarding as it allowed our developers to explore new concepts and deliver a product that is truly remarkable for both its visuals and dynamic use of technology. We are happy to share the finished product on behalf of our client and hope that this new site will help to inspire plans for your next vacation.

Aruba Happiness Builder - Explore by Map