Finding a no backend language to replace things like PHP and MySQL

Wasn’t sure where exactly to put this. I’m not a high level coder but I was thinking: A lot of the issues people are having is that not a lot of apps have been created so far that DON’T use servers. I mean servers up to this point in history have been ubiquitous. Our whole internet has relied on them so far. Therefore in creating a serverless internet perhaps it follows we need to find, or create, new database and programming languages for the new internet we are creating to serve this new paradigm of internet environment. So are there any languages that currently serve this function? I’ve heard a bit about nosql (don’t know much about that) but it seems there aren’t many apps written scrictly for local hosting. So what is there and do we have to start creating something new?

Don’t need a new language, just need APIs. The separation between clients and servers is usually via an API (regardless of how well specified). I plan in not too long to release a safe browser that lets you make safe API calls from inside the webpage on behalf of the user. Nosql means a gazillion things (it’s where my day job is). Essentially it means non-relational (but that’s not always true even). Again, there is no need for a new language or any of that, just need ways to use existing ones. “No centralized server” does not mean “no backend”, it just means “no centralized backend”.

5 Likes

Whatever works man just so long as we can get something functioning. Question still stands though as even with the APIs how would one use existing languages with them. How would one set up a database for example? Maybe the issue is just a matter of lateral thinking and education but in any case I think some resources and tutorials would be in order.

Define “set up a database”. Databases are a means to an end and you must first know what you want before you put stuff there. You just have to pretend the database is in the open these days. So say you wanted to build a forum like the one we’re on. Your app might post self encrypted data somewhere as a post on behalf of a user and then update some structured data with where that is. The real challenge people get into is permissions and restricted-yet-still-shared access (meaning some people, i.e. more than one, can do something but not everyone). Since this is probably not gonna be built into the network (it’s either “public” or “private”) developers have to come up with their own ways to do it. This comes into play for, say, moderators. One way might be to sign actions on behalf of the user that clients can choose to ignore if not proven to be done by a user set to be a mod. There are plenty of other ways (e.g. shamir, pki, etc).

I could write forever on this. I say the question is not “how do you setup a database”, that’s no problem (though things like speed, atomicity/acid, and correctness/relations are NOT easy). The question is “how do you make an app using safe as a shared database with different privs”. The way to think about it IMO is to decide the app and work backwards to the data model. For instance, my idea of media sharing site, people could make “channels” which has “recommended forks” which are other channels that others have made that may “fork” the media (e.g. for a different format). The key to all of this is having the API expose the keys for the users so apps can encrypt or sign something on the user’s behalf on top of the safe network. Sorry, I am in a typing mood…

2 Likes

The entire safe network is basically one giant database harddrive.

We don’t exactly need new programming language but I did came up with an idea which is more orientate towards safe: Verbose, Monads, and Concurrency on top of just in time compiler. It is basically RustJIT. Build SafeVirtualManager(SVM) and stored in the safenet. Any rustJIT scripts will contact SVM, and does things with it, without having it on your machine.

Normal websites with javascript has links to repository…

 < src script="linktogooglejavascriptrepository.com">

instead of having that, it would be

   <src script="linktosafejvm"> 

I dunno, just rambling my thoughts on here.

Sounds centralized unless I misunderstand. Not sure I follow exactly.

One thing I was thinking about using http://electron.atom.io/docs/v0.37.2/api/web-view-tag/#preload in a “safe browser” that injects a JS API. Then the first time the website uses any of the API, it pops up in the user’s face asking for permission, then it is available for that page. I have done some early work on refactoring https://github.com/cretz/safe-poc-browser into something more usable at https://github.com/cretz/shrewd, but nowhere near ready to show it off.

It isn’t centralized.

All it does is link to the code, and does things with it. In clearnet, it saves time, and loading time. No reason to have multiple javascript repository in each website when all websites can link to one javascript repository.

Oh, you’re just talking about file sharing and code reuse. Sure, I can write some JS code and host it at safe://myplace.whatever/mylib.js.

Right! I actually created a link, and forgot to share it. I haven’t got time to test it to see if it does work.

if I remember correctly, it was jquery.javascript.safenet

It’s not so much the database side that could well spawn new languages (or perhaps frameworks), but ways to do decentralised processing and so on. Either client side, such as the things @eblanshey is doing and I was trying to get going with SAFEpress, or when decentralised compute becomes possible, it may include support for having the network doing processing above and beyond the view NoSQL storage functionality.

While you call yourself a none techy @blindsite2k, you do come up with useful technical questions and insights IMO. I find the same kind of thing discussing SAFEnetwork with others, they often ask questions, or suggest solutions to things I’m puzzling over, that are right on the money :slight_smile:

I conclude that SAFE really is something anyone and everyone can understand and contribute to.

1 Like

Just today I was thinking it would be time to start adding post to the wiki in a yet nonexistent “Safe Design Patterns” category; things can be done in so many new ways.

4 Likes

We should have a collaboration wiki where we can throw in ideas what is possible with safenet that isn’t possible with clearnet.

1 Like

For what it is worth, I am really enjoying dabbling in Clojure – I haven’t ventured into Clojurescript yet - but it compiles to javascript and may work well on SAFE… Even if it isn’t a perfect fit, it does teach some concepts that should translate well…

The convention that “The program is data” is probably a good building block to the mindset you will need to make these things work in a distributed fashion… Also the idea most all data is immutable – and that when you want to change something you just change the pointers so that it points to the 95% old chunks and the 5% new or replaced stuff… I believe IPFS does this with their IPNS system – SAFE will need to use structured data blocks as “content pointers” in a simular fashion.

2 Likes

Why Clojure?

Why did I write yet another programming language? Basically because I wanted:

A Lisp
for Functional Programming
symbiotic with an established Platform
designed for Concurrency

Holy shit, this is something I been looking for. I wanted monads, verbose, and concurrency (also can run on top of just in time compiler?). You found the perfect language for safenet. I’m going play with it. Thank you!

2 Likes