Using Anvil for engineering consultants

Hi there,

I’m an engineering consultant who wants to make computational tools for my clients.
I found Anvil online and it looks really promising. I just had some questions before I dive into it.
I’m very new to all this web dev stuff so sorry for the dumb questions.

  1. My simulations require a lot of resources (2 GB RAM and runs can last up to 48 hours). Am I able to configure how much RAM my app has on Anvil, and can I run my apps for more than the 15mins timeout I saw on other posts?
  2. How can I monetize my app with a paywall? I want to charge my clients to use my apps. I saw some posts suggest some workarounds, but has this been supported natively now?
  3. I was looking at some alternatives to Anvil and my co-worker had suggested https://mecsimcalc.com to me. Has anyone tried this before and know how it differs from Anvil?

Thanks for your help!

A fellow (proper) Engineer! Welcome aboard!

  1. yes,there are several ways. Probably the simplest is to run your own server somewhere for those and use uplink to connect it to your app.
    https://anvil.works/docs/uplink

  2. Yes, you can integrate stripe payments into your app
    https://anvil.works/docs/integrations/stripe

  3. No. Why would I? I have anvil!

Good luck

1 Like

When you need processes longer than 30 seconds, you can launch a background task.

The amount of resources available to background tasks is limited according to your plan. The more you pay, the more resources you get, but I don’t think there is a way to determine exactly how much memory or other resources you have available.

If you get a dedicated server, you will decide how many cores and how much ram your server will have. The dedicated is more expensive than most other plans, but you have a one stop solution: the Anvil team will take care of setting it up and maintain for you.

Another solution is to keep a cheaper plan and use another machine for the long running processes. In this case your app would generate a key to use in an uplink script. Then you run a python script on any computer, the script uses the key to connect to the server, and you can do whatever you want, because it’s your computer, while accessing (almost) all the resources available to the app, because you are connected to it.

I have a dedicated server. I run some background processes in the Anvil server and other tasks, the ones requiring Excel, CAD, CAM, Notes and other Windows desktop application, on 3 virtual machines that I have in my server room. The tasks last anywhere between seconds and days. These machines start the task and keep updating a database row with the status of the task. When the task is done, they set its status to “Success” or “Failed”. The app UI shows the queue of the tasks.

Like @owen.campbell, I haven’t tried other tools, because I have Anvil. Perhaps there are better tools for doing that one specific thing, because they do that one specific thing. But Anvil does that thing and much more, so I will stick with Anvil.

2 Likes

Hello Fellow Engineer,

Welcome to the awesome world of Anvil. Several of my apps use a paid software as a service model. Anvil makes it easy to implement. This is what worked well for our subscription based model:

Paywall
Add and Check User Account Status

  1. Create subscription in Stripe
  2. Stripe to collect payment (use payment links for low code option)
  3. Scheduled background task to poll your stripe user list (or use webhooks)
  4. Background task sends welcome email and creates new user

OR

Add users manually if you only have a few users.

Validate User

  1. Build a library with a check user account status function. If the user doesn’t have a valid subscription or access type then throw an exception.
  2. Put all your paid features on the server-side. On each of these paid uses the check function (including the ones used to launch your long running analysis).

Plan Level
When building your business model with a dedicated plan expect to start at ~$900 / month.

Alternatives
Same feedback as @owen.campbell and @stefano.menci haven’t needed to look elsewhere because Anvil does exactly what I need it to in order to deliver to our customers.

Best of luck building your app!

1 Like