Skip to content

Latest commit

 

History

History
90 lines (50 loc) · 2.21 KB

README.md

File metadata and controls

90 lines (50 loc) · 2.21 KB

Informations

Goal

We want to create a Todo App. The functionallities will be basic (CRUD), so we can focus on the technical aspect of gRPC.

We will see step by step how to implement a golang grpc server, with full TLS encryption. This server will be made avalaible by the envoy proxy with a grpc-web filter, to translate browser sent request.

Once the backend part is done, we will develop the frontend with svelte. Enforced by typescript and tailwindcss, implementing an application with svelte is a breeze.

Prerequesites

Backend

Golang

Frontend

Svelte

Reverse Proxy

Envoy

Database

Postgres

Certificate & Images

CERTIFICATE

DOCKER COMPOSE

Golang

GOLANG INIT

CONFIG

DATABASE

START

GRPC

SERVER

REAL START

Envoy

ENVOY SERVICE

GRPC WEB

Svelte

SVELTE INIT

GRPC WEB

TODO APP

Server Stream

To test out more of the grpc possibilities, let's implement a server side streaming service. This will be used to update the view, and synchronize all the pages that are open on our todo app.

PROTO UPDATE

SERVER STREAM

CLIENT SIDE

Conclusion

gRPC on the browser is now possible. It is a little complex to put in place, but once the foundation are set up it becomes a breeze to develop new functionalities, have a nice and secure bi-directionnal stream, backward and forward compatibility...