Another note connected with this: for overall performance grounds, in order to prevent race circumstances when keeping nodes
we deferred the processing to Drupal’s queue program. That perfectly eliminated race circumstances around opening nodes during node conserve and held the user software rapid and receptive.
There clearly was another need: Because arriving information is usually partial we must in addition import information from RottenTomatoes.com. For this we created a-two covering system: you’re a simple PHP bundle utilising the Guzzle collection that expressed Rotten Tomatoes content as PHP stuff, as the different subsequently bridges that system generate Drupal nodes inhabited from Rotten Tomatoes data. We subsequently harmonized Rotten Tomatoes movies and recommendations aided by the customer’s supply information and let editors to elect to utilize facts from Rotten Tomatoes in support of unique in which appropriate. That information was actually merged in during the indexing process besides, so as soon as information is in Elasticsearch no matter where it came from. We also uncovered Critic ratings to Elasticsearch as well so customer programs could discover studies of videos and user score before you buy.
Incoming requests from client programs never strike Drupal. They only ever before hit the Silex software machine.
The Silex app does not have even to-do much. Your cable format we chosen the Hypertext program Language, or HAL. HAL is a simple JSON-based hypermedia format employed by Drupal 8, Zend Appagility, as well as others, and is an IETF draft specification. In addition it has an extremely sturdy PHP collection available that people were able to incorporate. Since Elasticsearch currently shop and returns JSON it was trivial to map objects from Elasticsearch into HAL. The heavy lifting had been just in deriving and affixing the right hypermedia links and embedded standards. Key phrase and various other lookup inquiries are just passed to Elasticsearch and also the results accustomed stream the best information.
Ultimately, we wrapped the HAL item up in Symfony’s Response item, put our HTTP caching parameters and ETags, and sent the content on its way.
A huge advantage of the split-architecture is rotating up a fresh Silex case are trivial. There is no meaningful setting beyond determining the Elasticsearch server to utilize, and the majority of rule was yanked down via Composer. It means spinning up multiple cases of the API servers for redundancy, high-availability, or abilities are which has no efforts. We don’t want to fret, though; the API are read-only, thus with proper utilization of HTTP headers and a simple Varnish machine before they the API try remarkably snappy.
The Upshot
A huge part of Drupal’s maturity as a CMS are realizing that it isn’t the be-all end-all response to all trouble.
For Ooyala and its consumers, Drupal is an excellent option for dealing with contents, yet not for offering a web API. Nevertheless, Palantir’s comprehension of the upcoming Drupal 8 launch as well as its dependence regarding Symfony pipeline let us set Drupal with Silex – and is an excellent option for serving a Web API however all of that hot for managing and curating information. Eventually, Palantir chose the best tool for the job, and project gained out of this significantly.
Ooyala now has a powerful and trustworthy API this is certainly capable offer customer software we never ever actually touched ourselves; Ooyala’s customers bring what they need; end users has a quick and receptive online solution powering her media programs. In addition, Palantir met with the opportunity to have the hands dirty with another person in the Symfony family – an investment that may pay lasting with Drupal 8 additionally the raising popularity of Symfony within PHP ecosystem.
Just the thing for Ooyala; an excellent option for Palantir; perfect for the community.
Graphics by Todd Lappin “Above Suburbia” under CC BY-NC 2.0, changed with greeen overlay plus the addition of arrows.
Site Default
Roshini lives and breathes travel. She believes that the road less travelled is always the most interesting, and seeks out experiences and sights that are off the usual tourist-maps. For her, travel is not about collecting stamps on a passport, but about collecting memories and inspiration that lasts way beyond the journey itself.