A gRPC Kotlin based server and client starter that builds with Gradle and runs on the JVM

Overview

gRPC Kotlin starter

Overview

This directory contains a simple bar service written as a Kotlin gRPC example. You can find detailed instructions for building and running example from below

File organization

The starter sources are organized into the following top-level folders:

  • protos: .proto files for generating the stubs
  • stub: regular Java & Kotlin stub artifacts from protos
  • server: Kotlin servers based on regular stub artifacts
  • client: Kotlin clients based on regular stub artifacts

Set up and run the starter on macOS

  • Install Homebrew

    Download and install Homebrew:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • Install JDK

    Install any version of JDK (8 preferred):

    brew install openjdk@8

    Add the installed version of JDK to your path through .zshrc or .bash_profile

    > ~/.zshrc source ~/.zshrc ">
    echo 'export PATH="/usr/local/opt/openjdk@8/bin:$PATH"' >> ~/.zshrc
    source ~/.zshrc

    or

    > ~/.bash_profile source ~/.bash_profile ">
    echo 'export PATH="/usr/local/opt/openjdk@8/bin:$PATH"' >> ~/.bash_profile
    source ~/.bash_profile
  • Clone the project and run the bar service and client starter

    Clone and navigate into the project:

    git clone https://github.com/hwslabs/grpc-kotlin-starter.git
    cd grpc-kotlin-starter

    Start the server:

    ./gradlew :server:BarServer

    In another console, run the client which will make requests to the server:

    ./gradlew :client:BarClient
You might also like...
Cli lightning network server, based on LDK (rust-lightning). Provides DUMB-RPC interface (telnet friendly).

Hello Lightning Cli lightning network server, based on LDK (rust-lightning). Provides DUMB-RPC interface (telnet friendly). Example: Build it run it:

Simple kafka client for monitoring topic events. Client has UI powered by Darklaf
Simple kafka client for monitoring topic events. Client has UI powered by Darklaf

kafka-client Simple kafka client for monitoring topic values. How to start $ java -jar kafka-client-1.0.jar How to use specify kafka hosts in config.y

Multiplatform coroutine-based HTTP client wrapper for Kotlin

networkinkt This is a lightweight HTTP client for Kotlin. It relies on coroutines on both JS & JVM platforms. Here is a simple GET request: val text =

Android network client based on Cronet. This library let you easily use QUIC protocol in your Android projects

Android network client based on Cronet. This library let you easily use QUIC protocol in your Android projects

Monitoring water tanker level using NodeMCU ESP8266 and HC-SR04P Ultrasonic Sensor and broadcasting it using a simple HTTP server inside NodeMCU ESP8266 and show data in an Android App
Monitoring water tanker level using NodeMCU ESP8266 and HC-SR04P Ultrasonic Sensor and broadcasting it using a simple HTTP server inside NodeMCU ESP8266 and show data in an Android App

WaterLevel Preface This project aims to finding a tanker water level using NodeMCU with ESP8266 core and HC-SR04P Ultrasonic sensor and broadcasting i

A js websocket server that handle an android app that connect to the sever with a QR code, to move a red square on a webpage with the gyroscope and accelerometer

online game a js websocket server with an express server, with a mobile app. backend express is used to handle the creation page, game page and the cr

HTTP Server for Android Instrumentation tests

RESTMock REST API mocking made easy. RESTMock is a library working on top of Square's okhttp/MockWebServer. It allows you to specify Hamcrest matchers

WebRTC Ktor Signaling Server Example

This repo is part of WebRTC examples, see also: P2P Android client based on WebRTC

Kotlin-REST-Retrofit - Simple client to consume a REST API with Retrofit using Kotlin
Kotlin-REST-Retrofit - Simple client to consume a REST API with Retrofit using Kotlin

Kotlin REST Retrofit Sencillo cliente para consumir una API REST con Retrofit us

Comments
  • Upgraded dependencies + works on arm64

    Upgraded dependencies + works on arm64

    protobuf added support for arm64 in version 3.20.1. See https://github.com/protocolbuffers/protobuf/issues/8062

    Also upgraded all other dependencies and plugins.

    The project is now working on arm64.

    opened by cesdperez 0
Owner
Hypto
Open source initiatives from the Hypto community
Hypto
A Kotlin client for the gRPC based Bar Service

Bar Service Kotlin Client Overview This directory contains a simple bar service client written in Kotlin against generated models (protos) You can fin

Hypto 1 Nov 18, 2021
gRPC-Kotlin/JVM - An RPC library and framework

gRPC-Kotlin/JVM - An RPC library and framework A Kotlin/JVM implementation of gRPC: A high performance, open source, general RPC framework that puts m

null 2 Nov 25, 2021
Ktor-Client this is the client part that uses the Ktor server

Ktor-Client this is the client part that uses the Ktor server Previews Tech stack & Open source libraries Minimum SDK level 21. Kotlin+ Coroutines + F

Mohamed Emad 4 Dec 23, 2022
A product registration service using the Kotlin language and the Micronaut and Grpc framework

A product registration service using the Kotlin language and the Micronaut and Grpc framework

Mateus Araújo 30 Nov 2, 2022
Asynchronous socket, http(s) (client+server) and websocket library for android. Based on nio, not threads.

AndroidAsync AndroidAsync is a low level network protocol library. If you are looking for an easy to use, higher level, Android aware, http request li

Koushik Dutta 7.3k Jan 2, 2023
Ktorfit - a HTTP client/Kotlin Symbol Processor for Kotlin Multiplatform (Js, Jvm, Android, iOS, Linux) using KSP and Ktor clients inspired by Retrofit

Ktorfit is a HTTP client/Kotlin Symbol Processor for Kotlin Multiplatform (Js, Jvm, Android, iOS, Linux) using KSP and Ktor clients inspired by Retrofit

Jens Klingenberg 637 Dec 25, 2022
Square’s meticulous HTTP client for the JVM, Android, and GraalVM.

OkHttp See the project website for documentation and APIs. HTTP is the way modern applications network. It’s how we exchange data & media. Doing HTTP

Square 43.4k Jan 5, 2023
A type-safe HTTP client for Android and the JVM

Retrofit A type-safe HTTP client for Android and Java. For more information please see the website. Download Download the latest JAR or grab from Mave

Square 41k Jan 5, 2023
Starter code for getting and saving data from the Internet using Kotlin.

Doggos Description Doggos is an app that fetches (pun intended) information from a third party API. The API returns data about a random dog that conta

Latifah President 0 Nov 4, 2021
Kotlin-echo-client - Echo client using Kotlin with Ktor networking library

Overview This repository contains an echo server implemented with Kotlin and kto

Elliot Barlas 2 Sep 1, 2022