Win-Tech takes advantage of RavenDB’s managed cloud option and document data model to reduce complexity, while advanced database indexing and aggressive caching raise performance to the next level.
Win-Tech is the IT-focused subsidiary of a large manufacturing company, for which they are developing a task management web app called Todolo. The database powering Todolo is RavenDB – chosen primarily for its speed and ease of use. To be more specific, Win-Tech is using RavenDB Cloud, our managed Cloud DBaaS (Database as a Service).
Todolo is similar to well-known task management software, like Trello or Jira, but tailored to suit manufacturing processes and workflows.
The Challenges
Win-Tech started the development of Todolo around five years ago, originally using Microsoft SQL Server (commonly known as “MSSQL”) on Azure.
However, they encountered two major problems:
- Dev Ops Complexity – They‘re a very small company, with just two developers working on the project. To continue working with MSSQL as the project developed, they would have needed a dedicated DB Administrator.
- Poor Performance – Performance issues arose as development progressed. The most significant issue was that joining multiple tables produced full (Cartesian) joins. As they increased the amount of data and the number of tables joined, their performance began dropping rapidly. This is a common problem with SQL databases that simply doesn’t exist in RavenDB.
The Solutions
In 2019 they started using RavenDB Cloud, which solved their problems in the following ways:
- The managed Cloud service removed the need for tedious database administration tasks.
- Data modeling in RavenDB made much more sense for their application; related information is now contained in single documents, rather than scattered across multiple tables.
- Advanced indexing – especially map-reduce and automatic indexes – simplified development and improved performance.
- Aggressive caching improved the performance of some user-based queries. More on that later.
After some initial testing on the free tier of RavenDB Cloud, they moved the whole application database over from MSSQL and never looked back.
Technical Information
- Their tech stack is C# with ASP.net Core and React.
- They operate on a 3-node cluster – a standard setup in RavenDB that ensures high availability.
- Their application is multitenant, with one system database and one database per tenant (currently only their parent company and one other).
- Their largest database contains
- 100,000 documents
- 3,500 tasks defined in the application
- 2,000 attachments of up to ~20Mb each
- 7Gb total uncompressed data
Other RavenDB Features Used by Win-Tech
Full-Text Search
Not even a consideration when they switched databases, this built-in feature came as a pleasant surprise to their developers. “I was not even thinking about it with MSSQL and I have it easily out of the box” – Eliran Teller, Win-Tech Developer. Full-text search in RavenDB is built on the industry-standard Lucene library and is comparable in functionality and performance to specialized search engines.
Document Expiration
A great way to reduce administrative overhead and clear unneeded data, Win-Tech uses document expiration to automatically delete outdated records after a certain period of time.
Compare-Exchange
Generally speaking, compare-exchange is a means to perform cluster-wide interlocked distributed operations. Win-Tech uses it to implement pessimistic concurrency, or locking, of any document currently being edited by a user.
Patches
These allow updates to specific properties in a document without rewriting the whole thing. Win-Tech benefits from the speed and efficiency of these targeted updates.
Automatic and Aggressive Caching
RavenDB has caching mechanisms built in – Win-Tech doesn’t need to implement them. For some user-related queries (e.g. checking a folder structure) subscribing to changes with aggressive caching was more efficient than validating the cache at query time.
Attachments
Attachments are easily stored and managed in RavenDB and can be indexed into even while compressed. Todolo makes extensive use of this feature.
In the future, they plan to use:
Time Series
Time Series provide easy storage and processing of large numbers of data points collected over time. They will be ideal for tracking sales to get averages and totals, and retaining historical info for later analysis.
Further Benefits of RavenDB
Access to RavenDB Developers
Win-Tech’s developers enjoy the direct communication they have with the RavenDB team, both in terms of support, and the ability to request new features. Users can get in touch with our devs easily on our community forum or by using our contact form.
Secure By Default
Security is very important for Win-Tech, so they greatly appreciate RavenDB’s “secure by default” philosophy. The use of x.509 certificates for encryption of data in transit is set up and managed automatically, which they see as a big plus.
Challenges in Using RavenDB
Transitioning from SQL
One of the rare negatives of their transition from MSSQL to RavenDB was the difficulty in changing mindset from relational to NoSQL document. While this is unavoidable, we try to accommodate in other ways to make the transition smoother. For example, Raven Query Language (RQL) is based on SQL and uses roughly 80% of the same syntax, so very little adjustment is required.
What’s Next for Win-Tech?
Todolo essentially stops money bleeds in factories and similar environments through early detection and prevention of problems.
They plan to expand their client list by offering this service to other factories and to general factory managers.
We look forward to supporting them as they grow, scale, and add new features to their application.
To see how you can benefit from RavenDB’s NoSQL Database Performance, click here to book a free demo.