
ANS is migrating to ao
The Arweave Name Service (ANS) was launched as the first human-readable address protocol on Arweave in February, 2023. Since that launch, 2 years ago, over 1,300 users have registered more than 2,000 domains and helped us gain the traction needed to be integrated in a range of Arweave ecosystem apps like ViewBlock, everPay, and Arweave-compatible wallets. We had a lot of fun building in the wild west of Arweave in its pre-ao days, but it's time for ANS to make the switch for the sake of ...

WeaveVM: the hyperscalable EVM protocol on Arweave
WeaveVM (WVM) is the first EVM-compatible protocol engineered to manage complex, large-scale data computation without the high gas fees typically associated with on-chain state storage on EVM chains. WVM is also the first EVM-compatible protocol that fully relies on Arweave for permanent storage, enabling atomicity of executable EVM bytecode and data of any size on the same ledger. On the principles of VACP, we are building the hyperscalable, lazy-evaluated EVM protocol to compute data at any...

We are Decent Land Labs
Today marks a significant milestone for decent.land as we introduce a refined mission and new flagship protocol. Our journey started in 2021 with a vision to build social and identity primitives on Arweave. The first public app under the decent.land name – a way to create a permanent username on Arweave – evolved into ANS, and as the expansive web3 social landscape matured, we developed Ark Protocol. Ark enables identities from any chain to transfer their reputation into the Arweave social ec...
Storing, verifying, and computing with onchain data

ANS is migrating to ao
The Arweave Name Service (ANS) was launched as the first human-readable address protocol on Arweave in February, 2023. Since that launch, 2 years ago, over 1,300 users have registered more than 2,000 domains and helped us gain the traction needed to be integrated in a range of Arweave ecosystem apps like ViewBlock, everPay, and Arweave-compatible wallets. We had a lot of fun building in the wild west of Arweave in its pre-ao days, but it's time for ANS to make the switch for the sake of ...

WeaveVM: the hyperscalable EVM protocol on Arweave
WeaveVM (WVM) is the first EVM-compatible protocol engineered to manage complex, large-scale data computation without the high gas fees typically associated with on-chain state storage on EVM chains. WVM is also the first EVM-compatible protocol that fully relies on Arweave for permanent storage, enabling atomicity of executable EVM bytecode and data of any size on the same ledger. On the principles of VACP, we are building the hyperscalable, lazy-evaluated EVM protocol to compute data at any...

We are Decent Land Labs
Today marks a significant milestone for decent.land as we introduce a refined mission and new flagship protocol. Our journey started in 2021 with a vision to build social and identity primitives on Arweave. The first public app under the decent.land name – a way to create a permanent username on Arweave – evolved into ANS, and as the expansive web3 social landscape matured, we developed Ark Protocol. Ark enables identities from any chain to transfer their reputation into the Arweave social ec...
Storing, verifying, and computing with onchain data

Subscribe to Decent Land Labs

Subscribe to Decent Land Labs
Share Dialog
Share Dialog


>100 subscribers
>100 subscribers
In this blog post, we’ll demonstrate you can leverage MEM instead of a PaaS to develop identical applications at zero cost.
Instead of opting for a PaaS, MEM enables the development of applications that maintain equivalent scalability and core functionality without incurring expenses. For illustrative purposes, we will focus on Heroku from the range of PaaS options.
What is MEM? MEM is a decentralised serverless functions network used to deploy chain-agnostic smart contracts. Check the MEM docs to learn more about it.
What is PaaS? Platform as a Service (PaaS), also referred to as Application Platform as a Service (aPaaS) is a classification of cloud computing services that empowers users to efficiently provision, instantiate, operate, and monitor cloud computing resources. PaaS aims to streamline app deployment, helping users avoid maintaining the underlying infrastructure required for developing and launching applications.
What is Heroku? Heroku is a cloud platform as a service (PaaS) supporting several programming languages. As one of the first cloud platforms, Heroku has been in development since June 2007.
What are Heroku Dynos? Heroku employs containers known as dynos. Dynos are isolated and virtualized Linux containers specifically crafted to execute code based on a user-specified command.
In this blog post, we’ll demonstrate you can leverage MEM instead of a PaaS to develop identical applications at zero cost.
Instead of opting for a PaaS, MEM enables the development of applications that maintain equivalent scalability and core functionality without incurring expenses. For illustrative purposes, we will focus on Heroku from the range of PaaS options.
What is MEM? MEM is a decentralised serverless functions network used to deploy chain-agnostic smart contracts. Check the MEM docs to learn more about it.
What is PaaS? Platform as a Service (PaaS), also referred to as Application Platform as a Service (aPaaS) is a classification of cloud computing services that empowers users to efficiently provision, instantiate, operate, and monitor cloud computing resources. PaaS aims to streamline app deployment, helping users avoid maintaining the underlying infrastructure required for developing and launching applications.
What is Heroku? Heroku is a cloud platform as a service (PaaS) supporting several programming languages. As one of the first cloud platforms, Heroku has been in development since June 2007.
What are Heroku Dynos? Heroku employs containers known as dynos. Dynos are isolated and virtualized Linux containers specifically crafted to execute code based on a user-specified command.
After providing free services for over a decade, Heroku has announced its decision to discontinue all such offerings, urging users to transition to paid plans.
Commencing on November 28, 2022, the cloud platform as a service, owned by Salesforce, ceased the provision of free product plans and terminated free data services. Furthermore, starting on October 26, 2022, the platform initiated the deletion of inactive accounts along with associated storage for accounts that have remained inactive for over a year.
Heroku users who opt not to migrate to a paid plan will find themselves in a situation where their hosted applications are discontinued and their data erased.
This change has particularly impacted a large user base of students, hobbyists, and developers who rely on the platform for experimenting with their applications.
Apps built on MEM can’t lose data, be erased, or kick out users.
That's because MEM uses the Arweave network, making it a super secure place for data that persists forever. Additionally, MEM applications don't need regular hosting fees, making it a perfect replacement for cost-efficiency.
Now, let's illustrate how you can create identical applications on MEM for free, which might cost you on Heroku $0.007/hour (up to $5/month under the Eco Plan) or $0.012/hour (up to $9/month under the Basic Plan).
The application we're going to build for this article will be quite simple: a REST server that carries out CRUD (Create, Read, Update, Delete) actions on a database of quotes.
To begin, let's create a directory called src in our project’s main directory. Inside this directory, we'll create two files: quotes.js to store our set of quotes, and src.js to house our Express app code:

Now, let's construct a straightforward Express server capable of returning the array of quotes, retrieving a quote by its index, adding a quote to the array, or removing a quote based on the provided index. The code is self-describing:

And now let’s add the app methods:

And finally, let’s edit our package.json file to make it ES6 compatible and start the server.

Finally, you can run npm run start in your CLI to start the server and test it out.
The entire application that was previously written can be condensed into a single file using MEM, simplifying and speeding up the coding process. Here's the serverless function that provides the same functionality:

And the contract (serverless function) state:

As you can see, re-implementing the same application in MEM is significantly more straightforward.
Now, let's create the HTTP requests that enable us to execute CRUD actions on our serverless function.
Here's a live deployment example of the demo serverless function’s state:
https://api.mem.tech/api/state/gUvZDndpoP0toXHT1Vf8w_1omAdJvQIK30YqFQj134c
Code for the front end to demonstrate interacting with MEM:

Moreover, for the GET operation, you can directly retrieve the QUOTES array from the hosted contract state endpoint instead of making a separate read request (get_quotes):

All of the code snippets used in this article can be found here
As demonstrated, you can effectively re-implement the exact application hosted on Heroku using MEM, saving coding time while eliminating hosting hassles and the need to pay recurring fees. MEM provides a streamlined and cost-effective solution for deploying serverless functions as a replacement to Heroku.
Learn more about writing and deploying free decentralized applications on MEM and sign up for the beta here.
After providing free services for over a decade, Heroku has announced its decision to discontinue all such offerings, urging users to transition to paid plans.
Commencing on November 28, 2022, the cloud platform as a service, owned by Salesforce, ceased the provision of free product plans and terminated free data services. Furthermore, starting on October 26, 2022, the platform initiated the deletion of inactive accounts along with associated storage for accounts that have remained inactive for over a year.
Heroku users who opt not to migrate to a paid plan will find themselves in a situation where their hosted applications are discontinued and their data erased.
This change has particularly impacted a large user base of students, hobbyists, and developers who rely on the platform for experimenting with their applications.
Apps built on MEM can’t lose data, be erased, or kick out users.
That's because MEM uses the Arweave network, making it a super secure place for data that persists forever. Additionally, MEM applications don't need regular hosting fees, making it a perfect replacement for cost-efficiency.
Now, let's illustrate how you can create identical applications on MEM for free, which might cost you on Heroku $0.007/hour (up to $5/month under the Eco Plan) or $0.012/hour (up to $9/month under the Basic Plan).
The application we're going to build for this article will be quite simple: a REST server that carries out CRUD (Create, Read, Update, Delete) actions on a database of quotes.
To begin, let's create a directory called src in our project’s main directory. Inside this directory, we'll create two files: quotes.js to store our set of quotes, and src.js to house our Express app code:

Now, let's construct a straightforward Express server capable of returning the array of quotes, retrieving a quote by its index, adding a quote to the array, or removing a quote based on the provided index. The code is self-describing:

And now let’s add the app methods:

And finally, let’s edit our package.json file to make it ES6 compatible and start the server.

Finally, you can run npm run start in your CLI to start the server and test it out.
The entire application that was previously written can be condensed into a single file using MEM, simplifying and speeding up the coding process. Here's the serverless function that provides the same functionality:

And the contract (serverless function) state:

As you can see, re-implementing the same application in MEM is significantly more straightforward.
Now, let's create the HTTP requests that enable us to execute CRUD actions on our serverless function.
Here's a live deployment example of the demo serverless function’s state:
https://api.mem.tech/api/state/gUvZDndpoP0toXHT1Vf8w_1omAdJvQIK30YqFQj134c
Code for the front end to demonstrate interacting with MEM:

Moreover, for the GET operation, you can directly retrieve the QUOTES array from the hosted contract state endpoint instead of making a separate read request (get_quotes):

All of the code snippets used in this article can be found here
As demonstrated, you can effectively re-implement the exact application hosted on Heroku using MEM, saving coding time while eliminating hosting hassles and the need to pay recurring fees. MEM provides a streamlined and cost-effective solution for deploying serverless functions as a replacement to Heroku.
Learn more about writing and deploying free decentralized applications on MEM and sign up for the beta here.
No activity yet