0.22.0 • Published 4 years ago

generator-jhipster-grpc v0.22.0

Weekly downloads
29
License
Apache-2.0
Repository
github
Last release
4 years ago

generator-jhipster-grpc

NPM version Build Status Dependency Status

JHipster module, Adds support for gRPC and generates gRPC CRUD services

Introduction

This is a JHipster module, that is meant to be used in a JHipster application.

WARN : Under developpement. See list of limitations and TODOs

Prerequisites

As this is a JHipster module, we expect you have JHipster and its related tools already installed:

Installation

To install this module:

npm install -g generator-jhipster-grpc

Compatibility :

  • JHipster 4.1 and inferior (Note : never tested with <4.1.0) : module version 0.7.0
  • JHipster 4.2 and 4.3 : module version 0.8.0, 0.9.0
  • JHipster 4.4 : module version 0.10.0
  • JHipster 4.5 to 4.8 : module version 0.11.0
  • JHipster 4.9 : module version 0.12.0, 0.13.0
  • JHipster 4.10 : module version 0.14.1
  • JHipster 4.11 to 4.14 : module version 0.15.2
  • JHipster 5.0 to 5.7 : module version 0.16.0
  • JHipster 5.8: module version 0.17.0
  • JHipster 6.0: module version 0.18.0
  • JHipster 6.1 and 6.2: module version 0.19.1
  • JHipster 6.3: module version 0.20.0
  • JHipster 6.4 and 6.5: module version 0.21.2
  • JHipster master : module branch next-jhipster (nightly build status : Build Status)

Usage

At the root of your project directory:

yo jhipster-grpc

This will configure reactive-grpc and grpc-spring-boot-starter so that the proto files present in src/main/proto are compiled. If you want to add CRUD gRPC services for an entity, just (re)generate it and confirm when the question is asked. The endpoints use Reactor implementation of reactive-streams (Flux) with back-pressure.

Notes :

  • for the moment entities must have a service layer (serviceClass or serviceImpl)
  • just like with DTOs, entities that are referenced by another entity in a relationship (many-to-many owned side, many-to-one or one-to-ine owned side) currently must be grpc activated and thus have a service layer. The service layer constraint should be relaxed in a future release since it's only the gRPC mapper which is required.

TODOs:

  • Generate existing entities
  • Support Gradle
  • Entities without DTOs
  • Entities without service
  • Entities with pagination
  • Support Cassandra
  • Support Mongo
  • Support relationships
  • JWT security
  • OAuth2 security
  • Basic auth security (used for session auth option)
  • Entity javadoc
  • Field javadoc
  • Add ElasticSearch endpoints
  • Management endpoints
    • Account
    • Loggers
    • Audits
    • Users
    • Profile info
    • Spring Boot Actuators
  • Support streaming from the DB (Stream<> in repository)
  • Support streaming back-pressure (reactive streams with rxJava2 or Reactor)
  • Client-side configuration (micro-services)
  • Client-side load-balancing with service discovery (micro-services)
  • Generator tests
  • Sample/demo project
  • Generated code tests
  • Travis CI

Mappings:

JHipsterProtobuf
Integerint32
Longint64
Stringstring
Floatfloat
Doubledouble
Booleanbool
Blob (byte[])bytes
ByteBufferbytes
Instantgoogle.protobuf.Timestamp
ZonedDateTimegoogle.protobuf.Timestamp
LocalDateutil.Date
BigDecimalutil.Decimal
enumenum

util.Date and util.Decimal are custom definitions. Non-required protobuf scalar types and enums are wrapped in OneOf types to provide nullability.

License

Apache-2.0 © Christophe Bornet

0.22.0

4 years ago

0.21.2

5 years ago

0.21.1

5 years ago

0.21.0

5 years ago

0.19.1

5 years ago

0.19.0

5 years ago

0.18.0

5 years ago

0.17.0

5 years ago

0.16.0

5 years ago

0.15.2

6 years ago

0.15.1

6 years ago

0.15.0

6 years ago

0.14.1

7 years ago

0.14.0

7 years ago

0.13.0

7 years ago

0.12.0

7 years ago

0.11.0

7 years ago

0.10.0

7 years ago

0.9.0

7 years ago

0.8.0

7 years ago

0.7.0

7 years ago

0.6.0

7 years ago

0.5.0

7 years ago

0.4.0

7 years ago

0.3.1

7 years ago

0.3.0

7 years ago

0.2.1

7 years ago

0.2.0

7 years ago

0.1.0

7 years ago

0.0.2

7 years ago

0.0.1

7 years ago