How can server side languages be used?
How can server side languages be used?
SAFE Network removes servers from the internet
But, you could write apps in any language (once there are bindings for the language at least [of which we’ve JS bindings, the rust libs themselves and C# bindings in the works as things stand]). Although the concept of ‘server’ is somewhat lost on the safe network. You could be writing in any language, but with the idea for a user to run on their machine.
Does that make sense?
Kinda unnecessary tho
Has the paradigm of server client changed with this network?
Even if there are no servers, wouldn’t the client still have to interact with the distributed network as if it were a separate server, even if that “server” is distributed?
Saying there are no servers is a good general approximation, a good way of conveying the fundamental change that SAFEnetwork brings.
To answer your question about how this changes program operation, think of the network more like a very large storage device in a shared network (like a file server on a world wide LAN). The point is that while technically you can regard the SAFEnetwork as a very large decentralised server, it is really more like storage than what we generally mean when we talk of servers on the www - which are both storage and computation these days, where the server has strayed ever further from the original vision of the www, and become every more complex and centralised.
If you look at Project Solid, it has servers which are essentially just storage - with a standard interface for controlled access to storage (the Linked Data Platform or LDP). So there are strong similarities between Solid and SAFE, where both provide a standard for controlled access storage, and the computation is mostly in the client.
If a computer is a node on the network then isn’t it both a client and a server (or part of the larger server) depending on which viewpoint you see it from?
If you submit data through a site and and a calculation was required that needs some other data on the network and then return a calculated value, where would the calculation processing take place.
Wouldn’t this processing be done on the decentralised server space or would the processing of the data be done on the users client PC? If it was done on the client, wouldn’t the data have to be submitted then the dependent data be sent to the client PC, then the calc done on it then displayed to the user?
Or would the calculation be carried out on the network? Or can it be done either way depending on how the app is written?
I think that the safenet is more of a database. you have APIs which allow you to retrieve and modify data. Also there is no domain specific code running on the safenet, that’s actually part of the client code.
This all makes sense to me, mostly, but where I get lost is: what about things like online gaming? If SAFE is meant to replace the www as we know it (which I could be mistaken—maybe it isn’t?) what does a solution to something like running a Minecraft server look like?
WWW and fast passed games are two different things. The SAFENet is a Database, how do you want to run a game without a server on only a database? You need a entity which is validating all the world stats in a game, that’s in most cases a centralized authority, a game server.
The SAFE Network essentially represents state.
You could theoretically run a Minecraft world on top of that, as long as the clients connecting were able to achieve state quorum. All the players upload their actions to a data structure, if the other players agree between them that it was a valid action, the action stands.
It’s a shift away from server/client relationships to client/client relationships, but it’s how games used to work (think peer-to-peer Age of Empires, etc)
That’s to slow for real time games. Game engines do a lot of magic just to hide the network latency from the players.
What do you define as a real-time game? This is exactly how Age of Empires works (serverless, peer to peer, performance limited by the slowest network connection). Sure it’s not going to be great for FPS games, but it’d probably be fine for something like Minecraft.
I’ve been digging Clojure/ClojureScript these days. The Clojure community likes their Datomic Database - which tends to move most of the query duties to the client… So it may be similar to the way SAFE winds up working…
For gaming you can have external relay servers that relay the traffic between the players - matching and exchanging encryption keys could run through the slow process inside safe and then it could utilize the encrypted fast lane (while paying your relay server in safecoin for his service)
You could use this ‘traffic routers market place’ for all kinds of data streams - the relay server can’t know what he relays and you stay anonymous to the other side of the connection