FroMage / redpipe

Redpipe Web Framework
Apache License 2.0
70 stars 10 forks source link

API Gateway use-case #5

Open FroMage opened 6 years ago

FroMage commented 6 years ago

Figure out if we can support that use-case.

Check:

fiorenzino commented 6 years ago

Starting from the api gateway use-case, i created a big application with microservices with a custom api-gateway+serviceDiscovery in vertx and docker. I changed something for file upload and for naming conventions for microservices.

If you want, with your help, i can create a little prototype.

FroMage commented 6 years ago

What ideas do you have? ATM I'm working on getting async injection working so I can get service registry URLs injected from the vertx-service-discovery module.

fiorenzino commented 6 years ago

My idea is simple:

docker-compose.yaml

version: "2" services: mysql: image: mysql:5.7 volumes:

My redpipe services docker images should have the same java libraries inside, and a single jar with classes of specific service (to slim the docker image creation - no fat jar). redpipe images should start vertx in cluster mode. they should share the eventbus and the service discovery. This night i will try to code a little my idea: i must read more of the Redpipe engine code. I have questions like: does Redpipe start the vertx verticles in cluster mode? etc etc

my experience with vertx microservices: i used the service discovery between docker machine in cluster (using docker-compose) without kubernetes. for me, it was really simple to deploy without infrastructure like openshift.

FroMage commented 6 years ago

We don't start Vert.x in cluster mode, but that should be enabled by config file. Sounds like a good experiment.

fiorenzino commented 6 years ago

this night..i will try!

fiorenzino commented 6 years ago

the use case complete is here: git@github.com:fiorenzino/redpipe-clustered.git

why don't create a repository for all examples (and to remove from the source of project)?

rdruss commented 6 years ago

+1 ... seems reasonable to have examples in a separate repo