Quantcast
Viewing all articles
Browse latest Browse all 47

Yahoo! Cocktails: When the client is in the cloud

One of the reasons I’m proud to work at Yahoo! is that we have some very nice products that reach hundreds of millions of people worldwide. Another reason is that Yahoo! is behind the development of several advanced technologies and platforms, such as Hadoop. This is no coincidence, since sophisticated solutions are required to serve efficiently so many users and to handle effectively the huge quantities of data they consume and generate.

But the engineers inside the company are not the only ones to benefit from these innovations. Very often Yahoo! makes its technologies available to the broader development community. The latest such contribution is called Cocktails, a solution for the implementation of Web applications that addresses both the client and the server-side. Cocktails is based on a mix of standard Web technologies such as HTML5, Node.JS, CSS3 and JavaScript.

Yahoo! Cocktails is composed of Mojito, an environment-agnostic JavaScript web application framework, and Manhattan, a hosted platform (PaaS) for Mojito-based applications.

Image may be NSFW.
Clik here to view.

Mojito

Mojito is a JavaScript web application framework that can run both on the client and on the server-side. This allows developers to maintain the same codebase for the browser frontend and the server backend. During execution, if JavaScript is enabled in the device, the Mojito module will be deployed from the server runtime to the browser runtime. Otherwise, if JavaScript is not enabled, the same application will simply run on the server side.

Manhattan

Manhattan is a server-side JavaScript hosting environment for Mojito-based applications running on Yahoo!’s Cloud. It is a platform that provides essential capabilities such as security, scalability, high availability and monitoring. Manhattan is an extension of Node.JS that has a very simple interface for the deployment of Mojito-based applications. The fact that it runs on Yahoo!’s Cloud makes it possible for these applications to easily access services such as the Yahoo! Content Distribution Network.

Write once, run anywhere

One of the main promises of Cocktails is that the client code, based on JavaScript, can run on any connected device: Web browsers on the desktop, smartphones and tablets. The possibility of maintaining a single code base for all devices is a real advantage for developers. The benefits are in the form of reduced development time, easier maintenance and, in the bottom line, lower costs:

“Going forward, Mojito and Yahoo! Manhattan will allow you to develop ONE app and deploy it on several devices to lower cost, increase agility and keep a uniform design across platforms (web, mobile, tablet). With the power of Yahoo! Cocktails, you’ll be able to build that app – deployable on several platforms –in the same time it currently takes to build each app individually.”

When the client becomes part of the cloud

I think that the most innovative concept of Cocktails is that it transforms the client device in an additional machine running in the cloud. Since the client and server sides execute the same language, all code that runs in the client side may also run in the server side.

When the client starts, the server offloads its code to the device. If the client device is not able to run JavaScript, the client business logic simply runs on the server side. Moreover, if for some reason the client functionality becomes too heavy for execution on the device, it can migrate back to the server side and be executed there, improving the perceived performance.

In other words, the functionality associated with the client may run on the server, and this may be changed dynamically, following a decision based on performance issues. This in practice blurs the boundaries between client and server machines, and transforms the client device in an integral part of the cloud.

Present and Future of Cocktails

Cocktails is the technology behind one of Yahoo!’s most recent products: Livestand, a personalized magazine for tablets.

In the future, Yahoo! plans to make the Mojito framework available as open source and the Manhattan platform accessible to the community of developers of Mojito applications.

Check the video below for more information about Yahoo! Cocktails:

Enjoy your cocktails!


Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.

Viewing all articles
Browse latest Browse all 47

Trending Articles