CatchTheTornado / askql

AskQL is a query language that can express any data request
https://askql.org/
MIT License
387 stars 27 forks source link

Frontend-driven database access aka. "The Ultimate Endpoint" #566

Open pkarw opened 3 years ago

pkarw commented 3 years ago

Hi guys! I just wanted to share some ideas for the production usage of AskQL. I mean business case - which actually can be an idea for another product using AskQL :)

Use case Imagine a legacy system having its own MySQL, Oracle, MongoDB database. You're a frontend developer building some new features and you need a single, additional piece of information from this DB. Wait - you need to match it and join with some other data from the REST endpoint.

OK, now you're writing down your specs into JIRA and waiting. Waiting, and ... waiting. In some extreme cases, the backend folks from another department that is handling the database maintenance are needing weeks if not months to deploy this change to prod. And you're blocked.

They can potentially think of GraphQL but it's still is not that elastic. If you need some heavy processing (like merging the data with REST API resources) you gonna still develop a middleware fetching the data first from GQL, then REST, and then mixing it all together. With AskQL you don't need to.

Now, imaging having a single JS endpoint with AskQL server and the resources - generated (think: prisma.io) or coded by these backend folks exposing you a set of data tables and collections.

Now, the whole app development is driven by frontend guys. They can send out the whole micro-askql application against this endpoint.

Moreover, it simplifies the data access - because the access language is always the same: AskQL and not MongoDB/JS or SQL.

pkarw commented 3 years ago

it's a gamechanger for no-code/low-code envs too. Imagine airtable. You can fetch some data from REST/GraphQL but if you need a custom query you gonna ask backend dev anyway to prepare an endpoint. And you're blocked. With such a tool you gonna just ask the guys to install askQL server from an NPM + configure which resources it has access to. The app should have bindings (using Prisma or mongoose or whatever) to some popular databases like mongodb / MySQL + predefined AskQL functions like db-cursor and query features. To ensue data safety there could be an ACL based security system (we could potentially even anlyse the AskQL AST of the resources being used (and how) against the ACL rules assigned to specific user identity)

mhagmajer commented 3 years ago

Thanks @pkarw, I really like this idea!

lukasz-xfaang commented 3 years ago

@pkarw , thank you for refreshing the topic of business ideas for AskQL. The vision is consistent with the vision we had. The most important question that comes to my mind is how to get there.

pkarw commented 3 years ago

Let's do it.

pkarw commented 3 years ago

Related: #410, #514

pkarw commented 3 years ago

Related: #45

pkarw commented 3 years ago

Related: #364 - schema discoverability