jhipster / generator-jhipster

JHipster is a development platform to quickly generate, develop, & deploy modern web applications & microservice architectures.
https://www.jhipster.tech
Apache License 2.0
21.58k stars 4.02k forks source link

Add asynchronous message support, with Kafka #4129

Closed jdubois closed 8 years ago

jdubois commented 8 years ago

One important feature we currently don't provide is asynchronous messaging. I'm not listing here why it's a good thing :-)

There are a number of implementations to achieve this: with ActiveMQ, RabbitMQ, Kafka, Redis, etc... And of course we need a good API for this.

I've already got something working with Kafka, but I'm using Spring Kafka directly: I'm not satisfied with it, but I know how to do it, and I know it works :-)

My current idea is to:

Then that would add a new question on the generator, so my idea is to refactor some existing questions:

deepu105 commented 8 years ago

👍 to refactor the questions. But we should keep the yo-rc format same as today.

Do you want to add Kafka to monoloth as well or just for microservices?

I can help you with refactoring the prompts part if you need.

I would merge the below into a single option with multiselect.

xetys commented 8 years ago

I am currently taking a look to Spring Cloud Bus, which is the default messaging solution for spring cloud microservices...so I would like to participate on this part, when I did some experiments with it.

One other hot topic is something called event sourcing, which in short is another way of service-to-service communication, as an allternate way to REST communication

jdubois commented 8 years ago

Great!

codenullhackaton commented 8 years ago

One alternative to clustered HTTP sessions is to use Spring-Session, it allows to cluster sessions in redis, jdbc, mongo, supports websockets, and I think supports undertow also

devedipoint commented 8 years ago

@xetys Regarding to event sourcing and whole JHipster's microservice approach I consider to align JHipster with Axon Framework - please look at it - as another approach to building microservice architecture with CQRS and DDD. Maybe it would be reasonable to align Spring Cloud Bus to Axon as a message bus and leverage whole Axon's CQRS?

deepu105 commented 8 years ago

@jdubois OK then ill rewrite the promts first. you can add the kafka option to it later

cbornet commented 8 years ago

Aside from the docker config, what will we generate in the app ? Send the application logs and metrics for logstash ?

jdubois commented 8 years ago

For the moment, I would also add the dependencies, and configure the .yml files. Maybe we will need a specific Configuration class, but I'm not sure yet.

Nothing very complex, probably, so that would be small option, with little effect on the other options.

jdubois commented 8 years ago

Just commited a first version, no Gradle support yet.

jdubois commented 8 years ago

Just commited a new version with Gradle + microservices working.

jdubois commented 8 years ago

Closing as this is merged

deepu105 commented 8 years ago

Should we add any default sample like we have the tracker for websocket?

jdubois commented 8 years ago

That's one of my goals, but not now: