From b4d3d2f78a6bb55114d4acafb748ed943fb942d9 Mon Sep 17 00:00:00 2001 From: Costin Condrachi <109347079+costinberty@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:54:45 +0200 Subject: [PATCH 1/7] Create README.md --- posts/2023-09-29_gnomobile/README.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 posts/2023-09-29_gnomobile/README.md diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/posts/2023-09-29_gnomobile/README.md @@ -0,0 +1 @@ + From a20493d3e41767f981af6b1ecfa2721d5bb35b96 Mon Sep 17 00:00:00 2001 From: Costin Condrachi <109347079+costinberty@users.noreply.github.com> Date: Fri, 29 Sep 2023 09:56:33 +0200 Subject: [PATCH 2/7] Update README.md v1 of the blogpost --- posts/2023-09-29_gnomobile/README.md | 68 ++++++++++++++++++++++++++++ 1 file changed, 68 insertions(+) diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md index 8b13789..982b47e 100644 --- a/posts/2023-09-29_gnomobile/README.md +++ b/posts/2023-09-29_gnomobile/README.md @@ -1 +1,69 @@ +# GNO Blogpost 1 +# GnoMobile, a Framework for Building Gno Mobile Apps + +*This blog post is written by Berty Technologies, an NGO that is building open and free communication solutions without any of the limitations imposed by centralized systems. Berty is a proud partner and grantee of Gno.land.* + +The year is 2023. Current Gno apps run on desktop or laptop computers that have Go installed. To run on mobile, the app would need to bundle the Go runtime, which is complicated for most developers. At Berty, we have years of experience using Go on mobile and overcoming difficulties with Android and iOS operating systems. We built Wesh Network, a decentralized communication protocol that enables p2p users to reliably and securely send messages over async networks, even in environments with poor or no connectivity. + +This stage is thus set to take the leap and make it easier for builders to develop Gno applications for mobile devices. + +# What is GnoMobile? + +Simply put, GnoMobile is a framework for developing Gno mobile applications. This is how it works: + +*WARNING: Deep technical sections ahead. Grab a coffee before venturing forth*. + +For communication between the mobile app and the Gno code, GnoMobile uses [gRPC](https://grpc.io/), a well-supported framework that sends and receives Google Protobuf messages. Even though the core Gno code is written in Go, the app code can use React Native, Java, Swift, etc. The following system diagram shows how gRPC is used. + +[https://lh3.googleusercontent.com/wC2AbI9V_rvpEzt2_RnbKPjHydagdm1SFji6MZccep5jbvGZxX-EBEoyvLseR0HXr8Uiv1k9stQ67_wErAuP_TW8yixmJttsUAzVg7v3FGO5kH4MAtZ9hy1c6TJUIhOptLiYKRE00PxuiE0J6uWLtA](https://lh3.googleusercontent.com/wC2AbI9V_rvpEzt2_RnbKPjHydagdm1SFji6MZccep5jbvGZxX-EBEoyvLseR0HXr8Uiv1k9stQ67_wErAuP_TW8yixmJttsUAzVg7v3FGO5kH4MAtZ9hy1c6TJUIhOptLiYKRE00PxuiE0J6uWLtA) + +Moving from the bottom to the top, this is how the flow looks: + +1. At the bottom are Go packages in the gno codebase. A **gnoclient.Client** supports communication with the remote Gno.land node with methods like Call to call a realm function. The Gno codebase also has **keys.Keybase** to support a wallet stored on the local device with methods like CreateAccount. +2. These methods are called directly from the next level up by the **GnoMobile** Go code. A Go object can’t be passed through the gRPC interface, so the GnoMobile Go code maintains a persistent gnoclient.Client object, which is accessed by gRPC calls. The GnoMobile API functions are registered by an amino package.go file and the generated Protobuf files are used to configure the gRPC server. +3. Finally, at the top of the diagram, the **gRPC client in the mobile app** communicates with the GnoMobile gRPC server over a local connection using Protobuf messages. A gRPC call can either return an immediate result (for example, GetKeyCount) or an asynchronous gRPC stream object, which can return delayed results (for example, a Call to a remote realm function). The gRPC framework uses the Protobuf API to generate convenient API functions in the mobile app’s [preferred language](https://grpc.io/docs/languages) (React Native, Java, Swift, etc.). + +# How GnoMobile benefits builders + +The first version of the framework will include three main sets of features: + +1. **Blockchain Operations**: These refer to the core block of functions that the apps need to interact with the blockchain. Things like the gnoclient API to effectively bring the benefits of the Gno framework on mobile, the gas estimation interface and calling realm functions, querying a blockchain node (and more) are included here. +2. **Wallet**: As the name suggests, here we have all the standard wallet operations like create or delete an account, set the recovery phrase, account balance, and so on. +3. **Toolkit**: We want to make it as easy as possible for devs to start building apps with our framework, so we’ll provide them with install instructions, example apps, and more technical stuff like genproto options to support gRPC and helper functions to parse the render output. + +Those should be enough to allow builders to get started on using and experimenting with Gno mobile apps. + +- *Support for secure p2p communication, even when the Internet is down?* +- *Yes, please!* + +Something that is not necessarily essential for V1, but for sure will open the doors to some powerful capabilities later on is to add an interface and a constructor to adapt the communication transport. This will make it possible for devs to incorporate other tools like Wesh Network and give their apps the ability to securely and reliably send messages even in very poor network conditions. But that’s a story for another time. + +# When will GnoMobile be ready? + +V1 is planned for release in mid-December 2023. + +Until then, you can check out our progress [here](https://github.com/gnolang/hackerspace/issues/28). + +Got feedback or want to drop us a question? Ask away on our [repo](https://github.com/gnolang/gnomobile/issues). + +# What does the future look like beyond V1? + +We see a lot of potential directions for GnoMobile after the initial release that will improve the user experience, extend its functionality, and make GnoMobile even more secure. We’re still scratching the surface in terms of how far we can take its development, and we look forward to working on further iterations and improvements. Some of our ideas for the future beyond V1 include: + +1. Making it easier for developers to **build** **desktop apps** **and** **browser extensions**: +2. Through GnoMobile, we can gradually enable “desktop” devs to use our React Native gRPC interface to write desktop applications while using existing functionality from the core Go code. This way, developers will not necessarily have to learn Go to leverage its advantages. +3. Browser extensions are usually written in JavaScript in the same way as in React Native. This opens the door to getting the benefits of Go via the GnoMobile framework. Otherwise, you’d have to either make the Go code run inside the browser extension (which is not easy) or use a remote server (which is not pretty). +4. Making it possible to **execute smart contracts directly from mobile**. + +*Why is this important?* + +If you want to add a new message to a blockchain, you need to actually interact with it (the blockchain) and update its state with the new message. However, if you just want to browse through the messages, you can execute the Render function locally without needing to use your network and, at the same time, get the results much faster. This is because the node runs locally on the mobile device without needing to spend crypto coins to get a remote node to do the operation for you. + +Gno nodes run on GnoVMs (gnovm), and for the moment, these are only available on desktops. We believe it is possible to make them available on mobile as well, but we need to find clever ways to overcome the constraints of mobile devices (like putting the apps in the background (iOS), addressing network bandwidth limitations, and so on). + +1. Developing a **decentralized push notification service** for *both* mobile and desktop apps. Getting notifications is now a standard (and very important) functionality of centralized apps. Technically, this happens via a central server. Naturally, having a centralized server is not possible for a p2p app, but there are other ways to implement notifications, and we are considering including them in the GnoMobile framework. +2. Making it possible for decentralized apps to **interact with the blockchain even if the network connection is poor or virtually unavailable**. Through the **[Wesh Network** protocol](https://wesh.network/), we are opening up the possibility of using alternative transport mediums to exchange messages between peers in an asynchronous but reliable manner in off-grid environments. Enabling reliable, secure, and censorship-resistant communication is our main cause at Berty Technologies. We want to open the door for p2p users to send messages and interact even in extreme situations or adverse scenarios, and Wesh Network is built specifically for this purpose. It is only natural to make it easier for developers to use it through the GnoMobile framework. +3. Advancing **edge networking for enhanced blockchain resilience**. Edge networking refers to bringing functionality like computing power or storage closer to the user so that they don't need to travel through the whole Internet to interact with a server. The same edge concept can be applied to bring the necessary services to interact with the blockchain closer to each p2p user. For example, hosting a copy of the blockchain so a user can sync it or even execute smart contracts. Having these fundamental services closer to the p2p users is especially important in the case of mobile apps. We want to offer developers the possibility of taking advantage of the edge networking benefits by allowing them to use, for instance, network address redirections or special HTTP headers in the configuration of their applications. + +In all honesty, it’s hard not to get excited about all the different possibilities that lie ahead for GnoMobile, but we’re keeping our focus on shipping V1 for now and collecting feedback from the community. After that, well, we hope you’ll stick around to see what happens next! From c126c805df55f7363af5cedb21818f38af96e8e2 Mon Sep 17 00:00:00 2001 From: Costin Condrachi <109347079+costinberty@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:00:40 +0200 Subject: [PATCH 3/7] Update README.md v2 blog draft --- posts/2023-09-29_gnomobile/README.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md index 982b47e..148b86c 100644 --- a/posts/2023-09-29_gnomobile/README.md +++ b/posts/2023-09-29_gnomobile/README.md @@ -1,3 +1,10 @@ +--- +title: "GnoMobile, a Framework for Building Gno Mobile Apps" +publication_date: 2023-09-29T13:37:00Z +slug: gnomobile +tags: [gnomobile, berty, wesh network] +authors: [jeff, remi, costin, iuri] +--- # GNO Blogpost 1 # GnoMobile, a Framework for Building Gno Mobile Apps From 8c769f3603543729c47517d5f96c3961f3ca7836 Mon Sep 17 00:00:00 2001 From: Costin Condrachi <109347079+costinberty@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:03:13 +0200 Subject: [PATCH 4/7] Update README.md --- posts/2023-09-29_gnomobile/README.md | 2 -- 1 file changed, 2 deletions(-) diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md index 148b86c..ff8ac45 100644 --- a/posts/2023-09-29_gnomobile/README.md +++ b/posts/2023-09-29_gnomobile/README.md @@ -5,8 +5,6 @@ slug: gnomobile tags: [gnomobile, berty, wesh network] authors: [jeff, remi, costin, iuri] --- -# GNO Blogpost 1 - # GnoMobile, a Framework for Building Gno Mobile Apps *This blog post is written by Berty Technologies, an NGO that is building open and free communication solutions without any of the limitations imposed by centralized systems. Berty is a proud partner and grantee of Gno.land.* From fa56e956f46b527eda8ed26d7523b5cd8674be08 Mon Sep 17 00:00:00 2001 From: Costin Condrachi <109347079+costinberty@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:07:13 +0200 Subject: [PATCH 5/7] Update README.md --- posts/2023-09-29_gnomobile/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md index ff8ac45..ca27329 100644 --- a/posts/2023-09-29_gnomobile/README.md +++ b/posts/2023-09-29_gnomobile/README.md @@ -3,7 +3,7 @@ title: "GnoMobile, a Framework for Building Gno Mobile Apps" publication_date: 2023-09-29T13:37:00Z slug: gnomobile tags: [gnomobile, berty, wesh network] -authors: [jeff, remi, costin, iuri] +authors: [jeff, costin, remi, iuri] --- # GnoMobile, a Framework for Building Gno Mobile Apps From 0dc4cd83337ea82bfea42d33d3c81d1708800a6f Mon Sep 17 00:00:00 2001 From: Costin Condrachi <109347079+costinberty@users.noreply.github.com> Date: Fri, 29 Sep 2023 10:38:17 +0200 Subject: [PATCH 6/7] Update README.md --- posts/2023-09-29_gnomobile/README.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md index ca27329..00fad64 100644 --- a/posts/2023-09-29_gnomobile/README.md +++ b/posts/2023-09-29_gnomobile/README.md @@ -21,7 +21,10 @@ Simply put, GnoMobile is a framework for developing Gno mobile applications. Thi For communication between the mobile app and the Gno code, GnoMobile uses [gRPC](https://grpc.io/), a well-supported framework that sends and receives Google Protobuf messages. Even though the core Gno code is written in Go, the app code can use React Native, Java, Swift, etc. The following system diagram shows how gRPC is used. -[https://lh3.googleusercontent.com/wC2AbI9V_rvpEzt2_RnbKPjHydagdm1SFji6MZccep5jbvGZxX-EBEoyvLseR0HXr8Uiv1k9stQ67_wErAuP_TW8yixmJttsUAzVg7v3FGO5kH4MAtZ9hy1c6TJUIhOptLiYKRE00PxuiE0J6uWLtA](https://lh3.googleusercontent.com/wC2AbI9V_rvpEzt2_RnbKPjHydagdm1SFji6MZccep5jbvGZxX-EBEoyvLseR0HXr8Uiv1k9stQ67_wErAuP_TW8yixmJttsUAzVg7v3FGO5kH4MAtZ9hy1c6TJUIhOptLiYKRE00PxuiE0J6uWLtA) +
+ +
+. Moving from the bottom to the top, this is how the flow looks: From 2ba31223ddcadae8a9c65cb28d1079c6f3fb2901 Mon Sep 17 00:00:00 2001 From: Costin Condrachi <109347079+costinberty@users.noreply.github.com> Date: Tue, 3 Oct 2023 21:52:37 +0200 Subject: [PATCH 7/7] Update posts/2023-09-29_gnomobile/README.md Co-authored-by: Manfred Touron <94029+moul@users.noreply.github.com> --- posts/2023-09-29_gnomobile/README.md | 1 - 1 file changed, 1 deletion(-) diff --git a/posts/2023-09-29_gnomobile/README.md b/posts/2023-09-29_gnomobile/README.md index 00fad64..b6aa4f6 100644 --- a/posts/2023-09-29_gnomobile/README.md +++ b/posts/2023-09-29_gnomobile/README.md @@ -5,7 +5,6 @@ slug: gnomobile tags: [gnomobile, berty, wesh network] authors: [jeff, costin, remi, iuri] --- -# GnoMobile, a Framework for Building Gno Mobile Apps *This blog post is written by Berty Technologies, an NGO that is building open and free communication solutions without any of the limitations imposed by centralized systems. Berty is a proud partner and grantee of Gno.land.*