BT

InfoQ Homepage News restQL V3 Released

restQL V3 Released

Leia em português

This item in japanese

Bookmarks

The latest version of restQL, a microservices query language, has been released, providing notable new features including content aggregation, support for additional HTTP methods, self-healing functionality, and a version for node.js apps. Comprehensive performance improvements have made the latest version up to twice as fast as its predecessor. There are no breaking changes from V2 to V3, so users can safely upgrade. Code for the open-source project is available under an MIT license.

RestQL is intended to simplify front-end code that needs to query multiple microservices. While a microservices architecture can make backend systems easier to support and maintain, a common, unintended consequence is additional complexity being pushed into the front-end application layer. RestQL reduces the complexity of orchestrating calls to multiple microservices, and leverages native browser caching functionality due to its use of standard HTTP calls.

One of restQL's defining characteristics has been automatic parallel calls to separate resources. However, the individual responses would also be separated, requiring the client to consolidate related objects, such as a customer with multiple orders. In the latest version, the new in operator allows the developer to specify the aggregation structure up front in the query, resulting in a single, combined result.

The latest version offers improved resilience of the restQL server, which sits between clients and the microservice APIs. When the system detects it is getting overloaded, it introduces a form a backpressure. A configuration setting defines the threshold for acceptable processing time overhead. If that threshold is reached, the system will start returning HTTP 507 responses (insufficient storage) for some requests, while allowing a portion of requests to continue executing successfully.

This pattern of returning failed responses requires the application to have some form of retry logic. Ricardo Mayerhofer, one of the creators of restQL, said this is something often implemented using a service mesh, such as Istio. "We advise using service meshes along with restQL. Due to the HTTP and REST nature of restQL, it plays nicely with service meshes (for both the incoming query and outgoing calls). Because it's common to have an auto-scaling algorithm, it's just a matter of time until new nodes are spun up and restQL is back to normal."

Earlier versions of restQL only supported querying data, by using the from keyword, which translated to an HTTP GET request. V3 adds the standard set of HTTP verbs for CRUD operations, including POST, PUT, and DELETE, through the keywords to, into, and delete, respectively.

The creators of restQL realized that standing up and maintaining an additional server could be a barrier to adoption, so they have created an npm package for node applications, @b2wdigital/restql. The corresponding GitHub page includes implementation code samples.

Mayerhofer describes more of the features of restQL V3 in a recent blog post. InfoQ previously covered the initial release and origin of the language.

Rate this Article

Adoption
Style

Hello stranger!

You need to Register an InfoQ account or or login to post comments. But there's so much more behind being registered.

Get the most out of the InfoQ experience.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Community comments

  • Thanks for update, really helpful

    by Anil Kurmi /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Does it support Observable or we simply have to rely on Premises?

  • Re: Thanks for update, really helpful

    by Ricardo Mayerhofer /

    Your message is awaiting moderation. Thank you for participating in the discussion.

    Hello Anil!
    Thanks for the question. If you're talking about the java version, it supports syncronous execution and java.util.consumer callback.

    If it's about the Node.JS it currently works with promises, but you can easily convert to observables using RxJs.

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

Allowed html: a,b,br,blockquote,i,li,pre,u,ul,p

BT

Is your profile up-to-date? Please take a moment to review and update.

Note: If updating/changing your email, a validation request will be sent

Company name:
Company role:
Company size:
Country/Zone:
State/Province/Region:
You will be sent an email to validate the new email address. This pop-up will close itself in a few moments.