Open brunoamancio opened 6 years ago
I've been doing some research/development with https://github.com/huhn511 in this respect. :)
We're able to have a node load web content from the Tangle and send it to the client in the correct format. Some adjustments are still necessary.
Here's the hello world of the transaction https://thetangle.org/transaction/BUUFWGXQYVHQNEDRHWLMRYWWKRGIJ9FDGQL9AA9XNSKYYPHJDIRBMJNQNGNUJXHMB9UYSQCDDJEJA9999
like this? http://neocities.org/ --> the geocities of today (DLT)
Interessante!!! Parabéns!
I recently made some changes to the API to allow sending binary data from IXI: https://github.com/nullpilot/iri/tree/feature/binary-response - example here Maybe it's interesting to someone. (I was referred to this issue from Discord)
Suggestion description
I've had the idea of allowing an IXI module to return html content to the user, so that there could be something like a "TangleNet", which is decentralized and cannot be tampered with.
Example: The transaction BUUFWGXQYVHQNEDRHWLMRYWWKRGIJ9FDGQL9AA9XNSKYYPHJDIRBMJNQNGNUJXHMB9UYSQCDDJEJA9999 would be sent as a normal web page from any node with "TangleNet IXI Module" as response to any node client.
The issue here is that, currently, IRI Nodes only send JSON format as response (See methods processRequest and sendResponse in https://github.com/iotaledger/iri/blob/d59de9fbaa2432a7123d9a4d65a1555241fcd934/src/main/java/com/iota/iri/service/API.java).
My suggestion is to allow sending HTML content as response, as well as JSON. In sum, IXI modules would dictate the response formats, in case an IXI Module was called.
Am I planning to do it myself with a PR?
Yes, if the idea is found useful by more people.