Discret
A Rust back-end to create peer to peer (P2P) applications, using a GraphQL inspired syntax
It provides the following features:
- A database layer based on SQLite that is managed using a GraphQL inspired API,
- An authentication and authorization layer to define who can access data,
- A Peer to Peer layer that allows you to invite Peers.
Discret will automatically synchronize your data with other peers, based on the access rights you have defined.
Create your datamodel
Define Access Rights
mutate
Insert and mutate data
mutate
Query
query
And let Discret securely synchronize your data with the peers you invited.
Getting Started with Rust Getting Started with Flutter Learn Github
-
Learn more by getting started in the Tutorials.
-
A Flutter binding is provided to easily develop P2P applications without having to write a single line of Rust. Getting Started with Flutter provides all the necessary steps to bootstrap a Flutter app.
-
Dive deeper in the Learn section.
-
And contribution are always welcome in the Github projects!
This website is also available in french.
Features
Ease of use
Discret hides the complexity of peer to peer networks and reduces it to a data access problem.
The API allows you to:
- manage your data using a GraphQL syntax,
- add access right to your data (in graphQL too),
- create and accept invites from other peers.
Discret will synchronize your data with other peers, depending on the access right you have given to those peers.
Privacy First
Your data is not stored in any cloud or third party company. It is up to you to decide who is able to see your data.
There is no central user discovery service. You manually invite people to connect with you, and only them will know that you are using the application.
Strong Security
Discret provides strong security features out of the box:
Easy connections
On local network, peer connections happens without requiring any server. This greatly eases the deployment and use of applications using Discret.
Limitations
As your data lives on your devices, Discret is not suited for Internet scale applications and communities with thousands of connected peoples.
It should only be used for applications generating a reasonable amount of data, synchronizing with hundreds of peers at most.
For peer to peer connections over the Internet, a discovery server is needed to allow peers to discover each others. Discret provides an implementation of the discovery server named Beacon.
However, connections over the internet is not 100% guaranteed to work, because certain types of enterprise firewalls will block the connection attempts. Implementing a relay server would fix the issue, but it is in not planned yet.
P2P connections leaks your IP address and should only be used with trusted peers. It may exposes you to the following threats:
- Leak of your "Real World" location via geolocation services.
- Distributed denial of service ( DDOS )
- State sponsored surveillance: A state watching the network may be able to determine which peer connect to which, giving a lot of knowledge about your social network.