Open APIs are upending the ecommerce business model and forcing developers to seek out more realtime tools to ensure a positive customer experience. Speaking with ProgrammableWeb at the recent API World conference in San Francisco, Tony*, a lead developer with an online retailer, discussed some of the unique impacts that face retail when using APIs to enhance content delivery.
“Open API is a new initiative to help major retail companies support their ecommerce domain,” Tony said. “…and it has proven to challenge the current social norms in online retail.”
“In general, when you have an ecommerce platform, you don’t want browsing users’ traffic to hit your end resources/servers unless they are committing to add value to the company (for example, when buying products). That’s why multiple caching strategies are implemented – to prevent unnecessary traffic taxing the company’s end resources. But the demand by consumers for the most recent information is exponentially increasing.
“Consumers don’t want to see out-dated and potentially misleading information. They want the most up-to-date information now. This empowers all consumers to make the best decisions. The more knowledge, the more up-to-date information the consumer has, the better shopping decisions they can make. So because of this realtime push, in online retail we need to move away from a paradigm of caching the data to help drive business advantage.”
Research by LoadImpact into retailer expectations of site load times shows that almost half of all retailers surveyed believe that less than one second is an acceptable site load time, and across the board, both ecommerce and brick-and-mortar retailers recognize that a short response time is crucial for the online retail experience.
Retailers unable to get load and response times lower than one second may see less engagement from shoppers. “An individual’s perception of realtime response is actually 600 milliseconds,” Tony explained.
Tony cites the example of giving customers realtime information around product availability as being essential to an online shopping experience. To provide product data to online customers, an application may need to draw from multiple API data streams. For example, by accessing pricing and product information, and then cross-checking this with inventory data to know what products to display. This is further complicated if a product is not in stock, requiring more data to be calculated on the fly in order to make recommendations for alternative items that are available.
“The question is, ‘If I can’t get the most up-to-date inventory, do I show that product and risk a potential bad user experience if the product is out of stock, or do I not show the product and risk the potential loss of a sale?’ These types of conversations need to take place between the business and the developers to define what type of user experience would benefit their consumers and company most.
“As developers we are challenged to build or find tools that help meet the demands of our business partners, while providing the best user experience for our customers.”
Two tools that help mitigate this concern are the Netflix open source projects, Hystrix and rxjava.
“Rxjava enables you to orchestrate asynchronous calling within your application. This can enable the application to deliver realtime information if you so choose to show it. Hystrix protects the system from being overloaded with traffic and will failover to a rule, which the developer/business can decide. Possible failover rules could be a cache, or a ‘please try again response.’
“It’s brilliant because you can set the standard for what your application can handle, so if you can’t throw any more threads to a particular system – like an inventory database – you get to decide how the application behaves when requests exceed that threshold.”
Another challenge API platforms face is the speed in which the content is delivered. “Network latency can be user experience headache. A bigger payload equates to longer upload and download times. So it’s always been the priority to find the best protocol to send the data over the network. You see a lot of APIs that use JSON over XML, because it is efficient and cheep to send. But in some cases, the JSON payload can still be relatively expensive. Protocols from the Apache and Google communities have created methodologies for serializing data. I have seen cases were the JSON payload has been reduced to a quarter of the size by using either of these protocols.
“Our goal is to provide our customers with what they need and deliver an experience they desire. If any of these are below the social norm, for instance the content on a mobile app takes too long to load, there is more of a potential consumers are going to abandon that app. The overall user experience is extremely important.”
All of these approaches are requiring a more in-depth relationship between developers and the business side of an enterprise. It is a trend we have been seeing with the release of more API orchestration services, and was a hot topic of discussion amongst participants at the recent API World conference.
Tony sees the benefits in building relationships across the retail enterprise:
“As a developer, it’s a challenge to communicate, because you are trying to show the value and benefits of a technical solution. A lot of times, with ecommerce businesses, where the core functionality is to sell product, the philosophy has been that the business comes to the technologist to say ‘this is what we want’. Now, the domain is seeing technologists approaching the business and saying ‘this is what you need to compliment the business’ vision’. This relationship has become more intertwined. It’s exciting to see that businesses are trusting developers more to help drive business innovation through technology. There is more respect for what the technologists have to say, and the business partners are respecting the decisions we are making and not just seeing us as a bunch of coders. It is a mutual respect for each other, and an understanding that in this domain, one can’t continue to succeed without the other.”
*EDITOR’S NOTE: In order to adhere to the employing company’s communications protocol, the lead developer’s name has been anonymized.
Graph data from Load Impact’s research into ecommerce websites, see their blog post summarizing their findings.