DEV Community

loading...

Fasty, an open source app builder using OpenResty and ArangoDB

solisoft profile image BONNAURE Olivier ・2 min read

Why I used this weird stack ?

Here a brief history about why I did create this tool. I was a Ruby on Rails developer. I was concerned about performances, ressources used. Crystal language was looking promising, but I wanted to start something new using a different langage.

Few years ago I was in a meeting in Hong-Kong about ArangoDB (which I already knew) and an another project called OpenResty. The developer was so excited about it, and it was also a RoR developer... So I was intrigued. How a tool can be better than Rails ?

After some times I started digging about OpenResty and I found the excellent framework Lapis

So here I am : I have chose my tools. OpenResty (using Lapis) and ArangoDB for the backend.

What does Fasty Cover ?

Before creating Fasty I wrote foxxy. A tool to generate automatic admin UI based on ArangoDB. It was useful but I was still using my Ruby CMS.

My daily needs are :

  • Manage views (Layouts, partials, components, pages)
  • I18n
  • Manage my backend APIs

So Fasty cover all my needs and much more.

With Fasty you can :

  • Manage views
  • Manage I18n content
  • Manage backend API
  • Manage NodeJS scripts (think about socketIO scripts)
  • Upload assets
  • Manage datatypes (create CRUDs in minutes)
  • Render views on server side (like ERB for Ruby but using Lua)
  • Create SPA (it use RiotJS for web components)
  • Multi Tenant (with a workflow (eg. DEV => QA => PROD))

Looks good, but why Lua / OpenResty / ArangoDB ?

The main advantage of Lua / OpenResty is that it's very fast and don't consume lot of RAM (Fasty use 1,5Mb). OpenResty is a Nginx + some Lua libraries. It's top solid.

Lua also allow you to write procedural code but it can use coroutines to make them asynchronous. So by example http calls won't block your script. It will use Nginx loop and resume your script when ready.

ArangoDB is a multi-document NoSQL database. It allow you to manage complex data with ease and work with Graph documents. It come with Foxx which allow you to host Rest API in the heart of your database. Fasty allow you to manage them and deploy them automatically. It's very fast and reduce the number of http/tcp calls to your database.

Requirements

There is a docker-compose file, so starting with Fasty is very easy. It can run on a tiny VM. But beware, database will consume some RAM if you use millions of documents.

What's next ?

I'm gonna create some videos about how to start with Fasty and how to manage your content, your data, dynamics views & web components.

Discussion

pic
Editor guide