A look into our new API

We are finally ready to show you a sneak peek into our new and fast, search-driven API. This blog post will take you through the major changes from the technical perspective.

Back in September last year, we introduced an exciting new project named Project Bolt. The Bolt-project is set out to solve a lot of the challenges our partners have experienced regarding performance on the platform. Our new unified API will make searching and querying much more straightforward as well as bring incredible performance to the Ucommerce platform. Read more about Project Bolt here

The key vision of the new API is to ensure top performance on the Ucommerce platform regardless of which CMS the solution uses.  

In the video below our Chief Product Officer, Søren Spelling, will take you through the different aspects of the new API in V9. 



Current API vs New API

Going forward with the new API of V9, the old API will be removed in its entirety; however, even though we highly recommend upgrading to the new API, it is not essential for using Ucommerce. A major difference between the old API and the new is that the old API were divided into two APIs with different purposes, where the new API is unified, easier to work with and will provide massive upgrades on performance.


Replacing RavenDB

One of the key elements in the new API is that we are replacing the NoSQL database of RavenDB with Lucene and Elasticsearch. The reason is that Lucene and Elasticsearch have proved to be the most used search engines of our partners. Lucene will be shipped as an out-of-the-box solution for simple, non-scaled use-cases, it requires no setup. As a second provider, we are introducing Elasticsearch. Elasticsearch is for those solutions that require a scalable approach across multiple servers. 

It will be possible to switch transparently between search providers, and it will be possible to write your own search provider as well, but Lucene and Elasticsearch will be the ones supported directly by the new API in V9. 


Safe-by-Default API

With the new Safe-by-Default API, we want to guide you into the right directions when creating a Ucommerce project. What this basically means is that the API will force you to work in a paged way, where if you are dealing with lots of data on the platform, paging the data will have to be dealt with explicitly rather than implicitly. 

Apart from the Safe-by-Default approach, we are building the API on search-driven technology, where we move away from the SQL database and on to search engines. This means that our Project Bolt will be very fast, and you will be able to use your search engine of choice, as the API will be provider based.


Consequences for existing solutions 

From a technical point of view, it will require that you redo some code on existing solutions to benefit from the newest version of Ucommerce. The key here is to map your entities to your data-transfer objects or view models, so when Bolt is introduced, the new API will replace it, without the solution even realising that Ucommerce is there to begin with. 

When the new API from V9 is introduced, the old API will be removed, but no matter if you are working with a pure MVC or a SPA approach, the best way to transition from the old API to the new API is to create a service layer between the Ucommerce API and your Rest Endpoint or controllers. This service layer would be translating the entities of the Ucommerce models into your DTOs, allowing for a simpler transition. 


"By no means will it be simple to do this - well, it will be simple, but it won't be easy. There will be some time required to transition your application from the existing version of Ucommerce to the new.”

— Søren Spelling Lund


So even though the new API will be fairly simple to integrate into current solutions, it will not be easy. It will be time consuming, as a lot of recoding has to be done, however, when the transition is complete, you will be left with nothing short of an amazing speed as a result of the new API. 

Show more

{{lineitem.VariantName}} - {{lineitem.Quantity}} x {{lineitem.FormattedPrice}} {{lineitem.FormattedPrice}}

Your cart is empty ;(
Total {{basket.FormattedProductsTotal}}