Code Monkey home page Code Monkey logo

ejemplo-grpc's Introduction

ejemplo-grpc

go mod init github.com/yogparra/ejemplo-grpc

bd

docker run --name ejemplo-gppc -p 5432:5432 -e POSTGRES_USER=gmo -e POSTGRES_PASSWORD=1234 -e POSTGRES_DB=GRPC -d postgres

Script squema public

create table JUEGOS(id serial not null primary key, tipo varchar (50), nombre varchar (100));
insert into public.JUEGOS (id, tipo, nombre) values(1, 'peleas', 'mortal kombat');
insert into public.JUEGOS (id, tipo, nombre) values(2, 'peleas', 'kof');
insert into public.JUEGOS (id, tipo, nombre) values(3, 'peleas', 'street fighting');
insert into public.JUEGOS (id, tipo, nombre) values(4, 'supervivencia', 'dont starve together');
insert into public.JUEGOS (id, tipo, nombre) values(5, 'estrategia', 'factorio');
insert into public.JUEGOS (id, tipo, nombre) values(6, 'carrera', 'mario kart');

select * from public.JUEGOS j

export

    Variables de bd
        export DB_USERNAME=gmo
        export DB_PASSWORD=1234
        export DB_HOST=localhost
        export DB_TABLE=GRPC
        export DB_PORT=5432
        export DB_SSL_MODE=disable       

protobuf

protoc --version apt install -y protobuf-compiler

protocol-buffers

https://developers.google.com/protocol-buffers

gRPC clients

Evans (https://github.com/ktr0731/evans)
    ejemplo-grpc/internal/proto$ evans juego.proto
    show package
    call GetJuegoById
    call AddJuego

BloomRPC (https://github.com/bloomrpc/bloomrpc)
    (0.0.0.0:50051)

grpc-gateway

https://grpc-ecosystem.github.io/grpc-gateway/

Rest Insomnia

get     localhost:8081/v1/juego
post    localhost:8081/v1/juego/create

swagger

https://app.swaggerhub.com/apis/yogparra/juego-proto/01

por investigar

  1. a nivel de servidores como se configura gRPC
  2. como integrar esta tecnologia a lo que tenemos

ejemplo-grpc's People

Contributors

yogparra avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.