In light of the recent COVID-19 pandemic - OPTASY would like to offer DRUPAL website support for any Health Care, Government, Education and Non-Profit Organization(s) with critical crisis communication websites or organizations directly providing relief. Stay Safe and Stay Well.

Drupal on Blockchain: Why Would You Want to Decentralize Your Drupal Network?

Drupal on Blockchain: Why Would You Want to Decentralize Your Drupal Network?

by RADU SIMILEANU on Jun 28 2019

Just imagine: you update content on one of your Drupal websites and it gets automatically synchronized across your whole network! That's Drupal on Blockchain in just a few words...

Say you manage a national library's infrastructure of Drupal websites. One for each one of its local branches.

Now, here's how moving all the user data stored in there from your centralized database onto a decentralized blockchain system would benefit you:

 

  • readers get to validate their own user data since there's no central entity having full (and exclusive) control over it
  • once they've updated their user data on one of the library's websites, it'll get synchronized across the entire network
  • the well-known vulnerability to errors of centralized multi-site structures gets eliminated; there's no longer a centralized database acting as a single point of failure
  • the decentralized architecture speeds up any operation that gets performed across the network
  • you'd avoid scenarios where the same reader enters his login credentials on one of the library's websites and gets asked to enter them, once again, when accessing the website of another library branch

     

And I would also add: increased transparency, lower transaction costs...

But I'd better dive into more details on how Blockchain and Drupal can work together and how you can benefit from the decentralized architecture that they'd put together:

 

1. Blockchain: What You Need to Know About Its Potential

But first, here's Blockchain in plain words:

A decentralized shared system where multiple participants store their data, interact directly with each other, manage and keep record of their transactions.

How is it different from the “old” way of managing transactions across a network?

 

  • there's no more a centralized database for storing data and transactions; participants (nodes) store it among themselves
  • … this grants them total control over their own data/created content
  • users involved in a blockchain network get to interact with one another freely, with no need of a third-party as an intermediary
  • it establishes a system of rule-based transactions
  • each transaction — editing, deleting content, etc. — gets documented
  • it enhances communication between nodes/participants
  • transactions get carried out at higher speed and, implicitly, with fewer costs
  • with no central entity as a unique storage source, there's no single source of failure anymore
  • enhanced transparency

     

In short: blockchain enables you to set up a secure and immutable architecture for your network.

 

2. Blockchain and a New Content Distribution Model

“Transparency” is the keyword here. Decentralizing a content distribution platform would benefit both content creators and content consumers:

 

  • digital publishers become the only ones allowed to update or delete their own content
  • consumers pay producers directly for the content they consume (written content, songs, videos, etc.)

     

This way: content creators get full control over their own content — there's no platform owner who could remove it to his/her liking — and get paid fairly and in real-time, for each piece of content that gets “consumed”.

 

3. Drupal on Blockchain: Why, How, and With What Costs?

Why would you want to decentralize your CMS — in this case, Drupal — and store your data on Blockchain? 

To answer your question, let me highlight just a few of the inconveniences of managing your content on a centralized Drupal database:

 

  • each transaction is explicit and irreversible
  • it poses a higher vulnerability to errors
  • multiple-user functionality can turn out to be a serious dread
  • the centralized database acts as a single point of failure: if something crashes in there, the whole system is at risk
  • updating content in your database doesn't automatically update it across your entire network of Drupal websites...

     

And how would the 2 technologies work together? Considering the fundamental differences between them:

 

  • Drupal uses a centralized architecture to manage content
  • Blockchain uses a decentralized, middleman-free workflow based on a verification element

     

Before I try to answer your legitimate question, let me ask you this:

Do you seize any similarity between Drupal's “open data” phylosophy and Blockchain's “decentralized data” principle?

Now, here's how your hypothetical “Drupal on Blockchain” architecture would look like:

 

  • it'd be a much more secure, decentralized structure (you'd remove the single point of failure, remember?)
  • since a blockchain workflow would use an immutable validation of data, it'll act as a guarantee that no content can get modified by other than its creator/distributor
  • user data/content would be easily accessible across the entire infrastructure (take the example of an enterprise-level business, running a multi-site Drupal network)
  • … and it'd synchronize in real-time across all your Drupal instances, as well...
  • transactions performed within this architecture would be rule-based: every single content update or removal will get documented

     

“But at what costs?” you might ask. What compromises would you need to make to run Drupal on Blockchain? 

What challenges should you get prepared for?

Here are 2 potential “dares” to ponder upon:

 

  • first of all, integrating your current Drupal data into a blockchain system won't be quite a “piece of cake”
  • secondly, getting the consensus of all the participants (say users whose data would be easily accessible network-wide) is also a serious issue to consider

     

4. Drupal Development Efforts in this Direction: The Blockchain Module

This duo — Drupal and Blockchain — has generated quite a lot of talk these years. And quite a handful of promising initiatives and even prototypes have been presented (integrations with Etherium and bitcoin...)

From all these initiatives of the Drupal community, I've decided to put the spotlight onto the Blockchain module (not yet covered by Drupal's privacy policy).

Take it as a “scaffolding” to support your future “Drupal on Blockchain” architectures. It provides the functionality you need to:

 

  • set up your Drupal installations as blockchain nodes; ”nodes” that are independent, meaning they can get configured independently
  • ensure that your newly set up nodes are compatible with each other

     

The END!

This is the “why, how and at what costs” of this topic. One which has been on the lips (and on the Drupalcon slides) of members of the Drupal community for quite a while now.

What do you think?

Would such a decentralized Drupal on Blockchain architecture suit your own project's needs and constraints? Would you trade your central point of storage for the convenience of automated content synchronization?

Photo by Clint Adair on Unsplash

Development

We do Web development

Go to our Web development page!

Visit page!

Recommended Stories

10 Best Tools for Conducting a Drupal 8 Site Audit (to evaluate its performance, security, and stability)
You want to audit your Drupal website's infrastructure, SEO, best practices, security, stress, overall performance... And you ask yourself: Are there tools that help you run a Drupal 8 site audit? ... and generate the reports you need? There are quite a few, actually. To narrow down your too many options, we've made a list of 10 tools and Drupal modules that you can use to test your website's performance, security, and stability. 1. 3 Best Tools to Run a Website Security Audit 1.1. Coder     What does it do? it checks your code to see whether it meets the industry standards it checks your text, so you'll know whether i's properly sanitized or not quite In short, a Drupal 8 audit module you'll want to have in your toolbox when conducting a website security audit. 1.2. Qualys SSL Server Test Another tool that you'll want to use during your Drupal 8 security audit process. Why? Because it performs a thorough analysis of a public SSL certificate and generates a grade for you. 1.3. Security Kit How does it work?  It provides you with a set of security-hardening options, that strengthen the shield around your site against CSRF, XSS, and clickjacking attacks. 2.3 Best Tools to Run a Drupal 8 Site Audit Focused on Its Performance 2.1. PageSpeed Insight, YSlow, GTMetrix  Take these 3 website performance audit tools as your the "swiss army knife" in your toolbox.  They run multiple tests on your website and generate a whole set of practical recommendations on how you can boost its front-end performance. Here are just some examples of recommendations: cut down on the number of elements the browser's forced to parse by simplifying the DOM cut down on the number of requests  by aggregating your JS files or using image sprites 2.2. New Relic An all-into-one Drupal site audit module that helps you monitor different sections on your website: from infrastructure to server, to browser and application. Now, here's precisely why you'll want to keep it close at hand while assessing your website's performance: it allows you to set up multiple customized dashboards that show graphs and charts of your website's performance data it enables you to keep an eye on your website's traffic and performance in real-time it allows you to isolate bottlenecks and set up alerts for key events 2.3. Performance Monitor   Let's say you've just moved your Drupal website to another hosting and you now feel that it has slowed down. And that the new server needs to be optimized for Drupal. This is precisely where this module comes in handy: It gives you a clear picture of how your website's performing now, while comparing different servers/hostings. Here are some of the features you'll love: it checks the Mysql status and variables (and provides recommendations) it tests the overall system performance (it runs database, CPU, and file operations performance tests) it evaluates the "Performance score"  3. 4 Best Tools to Evaluate Your Website's Stability 3. 1. Behat, PHPUnit, Nightwatch Or you can put together your own "combo" of unit and functional testing tools. Automated testing will improve your website's stability... in the long-term (and nothing can beat the peace of mind that you'll get). 3.2. Code Sniffer Whenever you need to assess your code's quality, just reach out for this Drupal 8 audit tool. It will... "sniff on" your code and signal you if it doesn't meet the coding standards.  Also, while testing your code's stability, you'll want to have a look at: the quality of your links the cycles of peer review for codes the factors that influence the SEO the access and breadth of documentation the modules you have on your website: are there any outdated ones? 3.3. Tugboat You save time and money using Tugboat (or an alternative continuous integration tool). Here's how: it runs the automated and linting tests that you will have set up and generates a report to your developer before even merging or reviewing the code it builds a completely working website that incorporates that new feature you've added or has that specific bug fixed before it gets merged A true time-saver that you'll definitely want to have in your toolkit when testing newly added code for stability.  3.4. Linting Tools How do they help you increase the stability of your Drupal website? they get all the developers in your team on the same page when it comes to the code format to be used they (i.e. Drupal Code Sniffer) enforce the Drupal coding standards once integrated to your developers' text editors Tip! Make sure you incorporate your linting tools into your automated testing routine, the one that gets performed on each pull request. The END! These are your best options when it comes to the Drupal 8 site audit tools to include in your toolkit. But what if you dread the idea of digging deep into your code, checking every single one of your Drupal modules, evaluating the CPU performance... What if you could still get a clear picture of how you're website's performing without the dread of going through all these tedious, time-consuming tasks? Just shift the burden to us! Drop us a line and let's get your Drupal website checked for all the issues and bottlenecks affecting its performance, security level, and stability! Image by Free-Photos from Pixabay   ... Read more
Adriana Cacoveanu / Aug 06'2020
7 Ways that You Can Reduce Image Size on a Large-Scale Drupal Site, With a Lot of Images
Images can make or... break the user experience. Especially if we're talking about large amounts of images. So, what are your best options to reduce image size on a large-scale Drupal 8 site? And, most importantly: How do you strike a balance between the smallest file size and the best possible image quality? Well, just keep on reading... Here are 7 ways that you can manage image compression on your image-heavy Drupal site without affecting their quality: 1. Use a PNG Optimizer to Reduce Image File Size Let's say that you have a lot of PNG images on your Drupal website. How do you reduce the image file size? Simple: you use TinyPNG to... squeeze them. Expect to reduce them somewhere around 60% (while keeping the lossless image quality). 2. Use a JPEG Compressor to... Compress Your Images Server-Side  "How to make images load faster on my website?" Just use a compressor to reduce image size for your JPG and JPEG files: TinyJPG CompressJPEG Compress Now JPEGOptim It will take... a while, especially since we're talking about an image-heavy Drupal site. Different JPG files mean different settings for you to... play with till you've balanced out size and quality. 3. How to Improve Image Load Times: Use Drupal 8 Image Styles It's a tool that you get... out of the box. And what you gain is more control over the size of the images on your website: Set several image styles, of different sizes, that will go on various areas of a page. Good to know! Configure your image styles just once: from then on, they'll resize all your new images by default. Here's how you do it: Go to "Manage display", in the content type setup section Click the gear wheel icon next to the image field to open the settings tab and choose an image style There, you can either choose one of the previously configured image styles or... create a new one, by selecting the "Configure Image Style" option from the dropdown menu Source: Drupal.org          Good to know! Once you've set your image style, the module updates all the created images... automatically. 4. Use Drupal 8 Image Toolkit to Adjust Their Quality (And Their Size) It's the best way to resize images in Drupal 8. And the easiest way, as well: Go to Admin > Configuration > Media > Image Toolkit Choose the setting that allows you to compress your images (the JPEG quality field) Play with it till your strike the perfect size-quality balance Save the new settings Note! The new setting will apply to all your images; there's no way for you to adjust the quality for each image, one by one. Tip! Stick to somewhere between 60% and 80% when setting the image quality. 5. Use the Responsive Images Module to Resize Your Images  "Which module is used for image optimization?" Which is the best Drupal 8 module to reduce image size on pages that contain lots of images... Responsive Images is (but) one of them. Here's how it works: Its image formatter maps the breakpoint of the original image and renders a responsive image instead. All that by using an HTML5 picture tag (that has sizes and srcset attributes). It basically enables browsers to select the image to display according to the image style selections. And here's how you set up responsive images on your Drupal 8 website: Enable the module (for, even if it's a core module, it's not enabled by default) in Admin > Configuration Select "Responsive Image" Hit "Install" What about breakpoints? How do you set them up? Go to your editor (if it's a custom theme that you're using) Create a file named "yourthemename.breakpoints.yml" in your theme directory ("/themes/custom/yourthemename") Now, its time to configure the image styles for your responsive images: Different breakpoints call for... different image sizes.  Go ahead and pair each breakpoint that you set up at your_theme_name.breakpoints.yml with an image style and create your responsive image styles. 6. Use the ImageMagick Module to Reduce Image Size   "How do I manage compression on my image-heavy Drupal site?" You use ImageMagick. It's another one of your best options for Drupal 8 image resize. Here's why: Drupal might provide the GD2 image manipulation toolkit out of the box and enable you to set multiple alternatives, of different sizes, for the same image. Yet, it lacks some key features, such as... TIFF format support or GIF support with an image style. And this is where the ImageMagick module comes in handy. To install it, just run this command: Composer require 'drupal/imagemagick' And here's how you use it to reduce image size: enable it via ‘yoursite/ path set the quality for your image to 100% in the ImageMagick image toolkit The results? you've just enabled the GIT format support with image style you've reduced your image size by 20-40% Mission accomplished... 7. If It's Still Not Enough, Lazy Load Your Images  "How to load images faster?" Use the Lazy Loader, the ultimate Drupal 8 image optimization solution. Have you tried them all — all the dedicated modules and Drupal core features available — and you're still not satisfied with how fast your image-heavy pages load? Then go even further and incorporate a lazy loading functionality into your website. The END! But maybe you have better things to do — a business strategy to improve, urgent projects to work on — than finding and implementing the best solution to reduce image size on your Drupal website. Yet, you still want to make your pages load faster... So, just pass on the "burden" to us! We'll identify the best solution for speeding things up on your image-heavy web pages and... implement it for you sitewide. Image by Alexandra_Koch from Pixabay   ... Read more
Silviu Serdaru / Jul 23'2020
Drupal Performance Optimization: 17 Drupal Caching Best Practices To Speed Up Your Page Load Time- Part 2
"How can I make my Drupal 8 website faster?" Are you still struggling with this? Still striving to figure out which are the best (and most straightforward) Drupal performance optimization techniques for your website? Well, here I am today with a handful of 9 more ways that you can speed up your Drupal site. In addition to the 8 ones that I covered in the first part of this post. And yes: it's another round of Drupal caching best practices that'll help you boost your page load time. So, let's dive right into it: Tip #9: Use the Dynamic Page Cache Module  ... to cache for both authenticated and anonymous users. Unlike the Internal Page Cache module, that I mentioned in Part 1, which only caches pages for anonymous users. Tip #10: Use Distributed Cache, A Highly Effective Drupal Performance Optimization Technique But how does it work, more precisely? Once you've installed a distributed cache, it'll store your database's cache tables (Drupal's "cache_" tables) either in: file or memory Tip #11: Enable Drupal Cache for Anonymous Users Another one of those quick, yet powerful Drupal performance tuning steps that you can take. Tip #12: Use Squid to Cache Images and Static Content on Your Website "How to optimize Drupal for better performance?" You could go for Squid, an open-source caching proxy server. Now, since Drupal's already famed for its particularly dynamic content, the only cases where Squid does make a great performance booster are those where you need to cache static content. Tip #13: Add a Front-End Cache (i.e.Varnish Cache) Here's another handy Drupal performance optimization method for you: Use Varnish Cache to reduce the load on your server. How does it do it? It stores the HTML response, so that next time that the same page is requested, it serves it from memory. The result? Bypassed PHP and web server and... improved page load time. Tip #14: Use the Advanced CSS/JS Aggregation Module to Improve the Front-End Performance of Your Website  Combining your assets together is one of the most straightforward and effective ways to address those Drupal performance issues on your website. From: file grouping to caching to compressing ... the AdvAgg module handles all the steps that you need to take to aggregate your CSS and JS files. Tip #15: Install Memcache to Reduce Your Database Load You know how you're often struggling with keeping your database load to a minimum by caching database objects in RAM? In this respect, Memcache makes a great Drupal 8 performance optimization technique. It helps you reduce that load on the database and boost your page loading time. How? By taking standard caches out of the database. And by caching the results of resource-intensive database operations... Tip #16: Use the Entity Cache Module to Cache... Entities   Another caching best practice to boost Drupal 8 with is installing the Entity Cache module.  And its name says it all: it helps you cache entities. Tip #17: Cache Views  Here's the situation: Page requests made by registered users on your website lead to loads of queries to your database. Which impact the page load time. Now, to query the database, views are being used. And this is where this views caching module comes in handy to... boost things in there.   The END! These are our 17 recommendations for you on the best Drupal performance optimization methods for boosting your page load time. Not thrilled about the idea of having to go through the... Memcache installation process or to configure Varnish for Drupal? Or to put your current projects on hold so that your team can set up a... distributed cache? Maybe you don't have a professional Drupal maintenance team that could handle all these caching settings? We're here to help! Just drop us a line and let's figure out which of these 17 techniques are best suited for your website and the specific performance issues that it's struggling with. Let's speed things up in there! Image by Izwar Muis from Pixabay   ... Read more
Silviu Serdaru / Jun 23'2020