DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Refcards Trend Reports Events Over 2 million developers have joined DZone. Join Today! Thanks for visiting DZone today,
Edit Profile Manage Email Subscriptions Moderation Admin Console How to Post to DZone Article Submission Guidelines
View Profile
Sign Out
Refcards
Trend Reports
Events
Zones
Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
  1. DZone
  2. Data Engineering
  3. Data
  4. Microservices: Rearchitecting Your Stack With Tarantool

Microservices: Rearchitecting Your Stack With Tarantool

Learn about Tarantool, one of the most microservice-ready, in-memory databases on the market — and it's open source!

Evan Bates user avatar by
Evan Bates
·
Dec. 29, 17 · Opinion
Like (3)
Save
Tweet
Share
5.85K Views

Join the DZone community and get the full member experience.

Join For Free

Microservices can decrease the risk of experimenting with new technologies and can enable each part of an application to scale at its own pace. Of course, each microservice should be as independent as possible from the other microservices in an ecosystem, ideally only connected by a communications interface. Powering your microservices with technologies that are both versatile and resource lean can help achieve this independence.

Open-source Tarantool is one of the most microservice-ready databases on the market due to its small footprint and unique architecture. It can execute an enormous amount of work on a single core, which means that it can run effectively on everything from an IIoT device to a small cloud VPS instance to a multicore server. The latter could actually run a whole suite of Tarantool services. And the fact that Tarantool has all of the features that it needs to function as an independent database means that any microservice it powers doesn’t require an additional database (as it would, were Tarantool a more conventional cache).

Four key elements contribute to Tarantool’s self-sufficiency and facility:

  1. A non-blocking Lua application server that runs concurrent to its DBMS. Tarantool’s application server runs concurrent to its database server and can serve as an application’s complete backend, functioning entirely without an additional language like Go, Node, Python, or PHP. This speeds up an application, as data doesn’t need to be passed between the database and external application code, thus cutting the overall number of layers in an application down from five to two (Tarantool and NGINX are in fact all you need to build a successful suite of microservices). Note that additional functionality can easily be added to the application server with LuaRocks modules.

  2. Its ability to execute fully ACID transactions with rollbacks. Unlike most in-memory and NoSQL databases, Tarantool is fully ACID-compliant, and transactions can be rolled back. This allows it to handle OLTP loads without relational backup.

  3. Its facility for processing datasets larger than RAM. Tarantool’s write-optimized Vinyl engine enables it to work with data sets up to 100 times larger than available RAM by performing some operations on disk. This means that it can handle a large variety of data processing tasks as size isn’t a limiting factor.

  4. Its complex querying capabilities — including SQL. Tarantool offers much more than the simple key/value searches of most in-memory databases because it includes secondary indexes and as of version 1.8, full SQL support (its SQL implementation sits on top of native data structures). This allows it to be used in situations where queries need to be more complex.

Tarantool microservices can be exposed via REST API or RPC and a suite of services is ideally managed with an API gateway (see here, as well as the first reference in Point #1 above). Tarantool also features multi-node data replication: a must for microservices on virtual machines.

You are likely wondering, “But how can I begin using my current data for microservices?” Martin Fowler suggests that the strangler vines on a fig tree are a natural metaphor for converting a monolith: the vines begin growing on the top of the tree, extend to the roots, and then multiply until the original tree is wholly subsumed. Similarly, your goal should be to slowly begin to offload the parts of your application to microservices where the performance of traditional solutions isn’t good enough. For example, authorization and authentication can be excellent candidates for conversion. Also, keep in mind that Tarantool engineers are available to evaluate your application and suggest the parts that are most appropriate for restructuring.

Tarantool’s dexterity allows it to serve as an effective lynchpin in any application’s transition to microservices. But don’t let its leanness mislead you: Tarantool was born for heavy loads. Although open source, it was developed in-house at one of the world’s largest internet companies.

microservice Tarantool application Relational database Application server Data processing

Opinions expressed by DZone contributors are their own.

Popular on DZone

  • Last Chance To Take the DZone 2023 DevOps Survey and Win $250! [Closes on 1/25 at 8 AM]
  • The Role of Data Governance in Data Strategy: Part II
  • Exploring the Benefits of Cloud Computing: From IaaS, PaaS, SaaS to Google Cloud, AWS, and Microsoft
  • A Beginner's Guide to Back-End Development

Comments

Partner Resources

X

ABOUT US

  • About DZone
  • Send feedback
  • Careers
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 600 Park Offices Drive
  • Suite 300
  • Durham, NC 27709
  • support@dzone.com
  • +1 (919) 678-0300

Let's be friends: