[HN Gopher] Locutus: A platform for building decentralized apps,...
___________________________________________________________________
Locutus: A platform for building decentralized apps, from the
creator of Freenet
Author : sanity31415
Score : 71 points
Date : 2022-04-10 16:58 UTC (6 hours ago)
(HTM) web link (github.com)
(TXT) w3m dump (github.com)
| devmunchies wrote:
| > each key is a cryptographic contract implemented in Web
| Assembly
|
| Hope more language start targeting WASI so the entire industry
| can get behind a single runtime.
|
| For those unfamiliar, this would replace things like containers
| and allow more portability. It's the dream of "write once, run
| anywhere" accept is language agnostic.
|
| I'd imagine there would be a k8s-like infra tool for managing
| instances of WASM processes.
| waynecochran wrote:
| I really would love to see decentralized apps, but I don't see
| how to get around the "back end storage" problem. If you have a
| ton of data (e.g., video) how and where does this get stored in a
| decentralized system? It seems impossible to compete with the
| fast and reliable infrastructure of the big folks (e.g. Amazon,
| Google, MS, ...).
| rklaehn wrote:
| There are plenty of options for long term storage of large
| assets in a decentralised way. Also, decentralised does not
| have to mean that you don't use traditional cloud providers.
|
| What is missing is a really polished way to do decentralized
| apps, so that you don't have to think about the decentralized
| aspect all the time, but just use it because it is the best
| option. But it is coming.
|
| Full disclosure: hacking on something to make writing
| decentralized apps easier: https://github.com/cloudpeers/tlfs
| indigochill wrote:
| > so that you don't have to think about the decentralized
| aspect all the time
|
| Depending how strict you want to be about this, torrents and
| Secure Scuttlebutt are pretty good in this respect. I
| especially love Secure Scuttlebutt because it simply makes
| the client the store of which messages it's seen which also
| means there is no authoritative view of the whole network but
| that's by design.
|
| But probably the even better example here is email. It's the
| OG federated protocol and nobody thinks of it that way.
| Probably because casual users have consolidated around a
| handful of convenient clients (gmail, hotmail, whatever) and
| not thought too hard about how emails get exchanged from one
| corporate mail server to another.
| BlueTemplar wrote:
| I've been quite surprised by the reliability of Popcorn Time
| (relatively bad, but torrents have _not_ been designed with
| this in mind, have they?), and especially PeerTube (how is that
| even possible ?!).
| sanity31415 wrote:
| Locutus is more like a cache than long-term storage, so data
| can fall out of the network if nobody is requesting it, but
| information publishers can serve as a backup for data stored in
| the network, replacing it if it falls out.
|
| I think making the publisher responsible for long-term
| retention and the decentralized network responsible for
| distribution is the best option here.
|
| Other tools like FileCoin take the alternate approach of trying
| to do long-term storage in a decentralized way.
| wmf wrote:
| A bunch of projects are working on storage: Filecoin, Sia,
| Storj, etc.
| trappist wrote:
| Not just working on it. We use Storj in production and it's
| dramatically cheaper than S3.
| sanity31415 wrote:
| I'm the creator of Locutus - happy to answer any questions.
| ilaksh wrote:
| It seems like there is a lot of overlap with some leading edge
| cryptocurrencies (such as Algorand, which also has Turing
| complete contracts that control state). Does Locutus have a
| facility for something like payments?
|
| Also, although web assembly can theoretically be highly
| optimized by compiling to native code, there are hard limits on
| scalability especially since many things need to be executed in
| a specific order. So you have some mechanism for sharding, or
| are all computations repeated by 100% of the network? Also is
| there a mechanism for sharding data?
|
| Anyway, I believe that the future of cryptocurrencies, money,
| and new types of browsers or even normal web applications will
| all skew heavily towards web assembly.
| sanity31415 wrote:
| > Does Locutus have a facility for something like payments?
|
| It should be possible to build a cryptocurrency on Locutus,
| using the arbiter mechanism to prevent double-spending.
|
| > So you have some mechanism for sharding, or are all
| computations repeated by 100% of the network? Also is there a
| mechanism for sharding data?
|
| Computations are not replicated across the network. There is
| a mechanism that serves a similar purpose to sharding but
| it's more "organic". Peers are assigned locations in the
| network when they join (a number between 0.0 and 1.0).
| Contracts also have locations determined from the contract
| code itself, and peers store contracts that are close to
| their location. The more people using a contract the more
| widely cached it will be, as a form of auto-scaling.
| cropcirclbureau wrote:
| Including big overlap with Holochain (which also has WASM and
| Rust but maybe a bit too ambitions), AD4M protocl over
| Holochain and maybe Gun. Always glad to see more effort in
| this area though.
| texaslonghorn5 wrote:
| Given that Locutus was meant to be a centralized human
| intermediary for the Borg, is the name of the platform intended
| to be ironic? If so, I like it!
| sanity31415 wrote:
| :) "Locutus" also means "speaker" in Latin.
|
| Not sure we're going to stick with the name "Locutus" when we
| launch, so for now it's just a working title for the project.
| rklaehn wrote:
| It is really hard to see how this is intended to work from the
| README. Where is a good example of the programming model? This
| one?
| https://github.com/freenet/locutus/blob/main/contracts/test_...
|
| Since this is written in rust: is there also a version of
| freenet in rust in the works?
| sanity31415 wrote:
| We're definitely still working on how we explain it.
|
| That is an example of the contract API - you can find a
| better explanation of it here:
| https://github.com/freenet/locutus/issues/9
|
| We're not re-implementing Freenet in Rust, this is a separate
| project with related but different goals - however it does
| borrow a number of ideas from Freenet (like using a small-
| world network as a DHT).
| traverseda wrote:
| A lot of these projects seem to utilize append-only data
| structures. It looks like this one doesn't?
|
| For example let's say I set of a chat room, and someone spams
| multiple GBs of data into a channel, can my moderators (in
| principle) remove those messages without essentially just
| publishing a new message saying "please ignore all this spam"?
|
| How do you deal with "network splits", that is a smart contract
| that could have two equally valid states?
|
| You say you use contracts as the key in a key-value store, can
| you have the same contract with two different data sets? Like
| two different chat rooms that work the same way but which have
| different moderators and different message histories?
| sanity31415 wrote:
| > A lot of these projects seem to utilize append-only data
| structures. It looks like this one doesn't?
|
| Correct, in Locutus contract state is mutable, with the
| contract determining whether changes are permitted and how
| they are applied to the state.
|
| > For example let's say I set of a chat room, and someone
| spams multiple GBs of data into a channel, can my moderators
| (in principle) remove those messages without essentially just
| publishing a new message saying "please ignore all this
| spam"?
|
| Yes (although such spamming shouldn't be possible in the
| first place thanks to the reputation system).
|
| > How do you deal with "network splits", that is a smart
| contract that could have two equally valid states?
|
| It should be very rare, but contract states that get out of
| sync can always be "merged" to produce a new state, peers
| will do this automatically as soon as they figure out the
| mismatch. The small world protocol that determines network
| topology should make network splits very unlikely.
|
| > You say you use contracts as the key in a key-value store,
| can you have the same contract with two different data sets?
| Like two different chat rooms that work the same way but
| which have different moderators and different message
| histories?
|
| Yes, a contract consists of web assembly code to specify the
| contract functionality, and also "parameters" which are
| arbitrary data that "configures" the contract (chat room
| name, owner, etc).
| traverseda wrote:
| I've got to say, this looks like a solid approach. If you
| can handle content-addressed data storage well I can really
| see this taking off in a way others have not. I've seen a
| lot of thing similar to this, but this is the first one
| that has the right set of features that I think it's
| actually useful.
|
| I'll be keeping a close eye on it!
| the_arun wrote:
| Define - Decentralized. Does it mean my data can stay in
| anyone's computer safely? does it use p2p or such for
| communication? What are the sizing limitations? Where can read
| more?
| sanity31415 wrote:
| Yes, it's P2P. Your data will be distributed around the
| network on the computers of other peers, with data integrity
| guaranteed through cryptography.
|
| With respect to reading more, currently there isn't too much
| beyond the Github project, although you can learn more about
| my previous work here: https://en.wikipedia.org/wiki/Freenet
| tough wrote:
| Can I use this to build a internet video archive a la netflix?
| I don't trust the copyright owners to do so forever.
| [deleted]
| endisneigh wrote:
| > 6. Chat with us We're in #locutus on Discord.
|
| > 7. Stay up to date Follow FreenetOrg on Twitter.
|
| lol
| sanity31415 wrote:
| We'll happily use Locutus for those things once it's ready ;)
| ocdtrekkie wrote:
| Not using IRC/Matrix though is a weird choice, libera.chat is
| a pretty "standard" choice for decentralized open source
| projects.
| sanity31415 wrote:
| We're not married to Discord, we just picked it because it
| was the most convenient option for the early dev team. We
| can change easily.
| romseb wrote:
| I think it's legitimate to first use well-known platforms where
| people are already registered, especially in such an early
| development phase.
|
| This has not much to do with dogfooding.
| endisneigh wrote:
| You can use GitHub discussions and GitHub now has a feed you
| can subscribe to, lol.
|
| Literally no need to use discord or Twitter. For a project
| that complains about centralized entities using more (GitHub)
| than necessary is so dumb.
| adg001 wrote:
| It is called network effect, which is a significant driver. It
| incentives entities to join networks where their target
| audience lives. This does not stop those entities to educate
| the said audience about topics which are in tension with the
| network hosting the conversation (e.g., decentralised vs
| centralised systems).
| logifail wrote:
| > Decentralized email [can be built on Locutus]
|
| I don't understand this particular one.
|
| I've hosted my own email for the last 20+ years, every single
| component of the stack is open-source, all you need is your
| favourite Linux distro, a bit of patience and a [virtual] server
| with a static IP.
|
| Isn't email decentralized the moment you stop using Gmail or
| Office365 - or, $deity forbid, your ISP's webmail...?
| sanity31415 wrote:
| In theory[1] you can run a mail server on your home computer,
| but even then you must depend on the centralized domain name
| system to host your MX record, so I would say it's more
| "federated" than decentralized.
|
| [1] In practice, spam mitigation measures will make it very
| difficult to get other mail servers to trust your home IP
| address.
| mountainriver wrote:
| Yeah but the whole promise of putting dns on the blockchain
| hasn't really ones out either
| sanity31415 wrote:
| The blockchain is a terrible place to put a system like
| DNS.
| zeckalpha wrote:
| You are reliant on the receiver's mail infrastructure. There
| have been past proposals to flip this around, such as
| https://en.m.wikipedia.org/wiki/Internet_Mail_2000
___________________________________________________________________
(page generated 2022-04-10 23:00 UTC)