JavaScript is fine as that will work in the browser. But what about the server side?
How can server side languages be used?
JavaScript is fine as that will work in the browser. But what about the server side?
How can server side languages be used?
SAFE Network removes servers from the internet
Oh yea
actually javascript js a server side language with nodejs.
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?
Local php
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?
If JavaScript is on the client, it would have to make a call to a remote location if you were doing some Ajax stuff?
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.
https://developer.valvesoftware.com/wiki/Source_Multiplayer_Networking
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