Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ISPN-6561 Spring Boot Starter demo #19

Merged
merged 1 commit into from Dec 19, 2016

Conversation

slaskawi
Copy link

<dependency>
<groupId>org.infinispan</groupId>
<artifactId>infinispan-embedded</artifactId>
</dependency>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO the starter should take a decision (the one that's the most common or the less involved). What happens if you don't specify neither infinispan-embedded neither infinispan-remote. If adding your starter has no effect at all, something isn't right.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately it's a bit complicated...

Users who want to use embedded mode need to decide whether they want to use Uber Jars (infinispan-embedded) or Small Jars (infinispan-core for the instance).

Client/server mode has also the same kind of dilemma.

And finally, it is possible to use both modes in the same deployment (store data along with the app and occasionally connect to a remote Infinispan Server).

So as you can see, there are many different deployment scenarios here. Adding either of those dependencies, and satisfying one group of our users, we might cause some troubles for the other group (they would need to use exclusions in Maven...yuck!). So I would prefer to make them unhappy equally....

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am afraid that doesn't follow the principle of a Spring Boot starter then. If you look at spring-boot-starter-web we took the decision to bring Tomcat with it (because adding that starter should be all that's required to get you started for building a web application). If you don't like that, yep, you need to exclude the spring-boot-starter-tomcat and replace it with either the jetty or undertow one.

Users who want to use embedded mode need to decide whether they want to use

No they don't. They chose to use a starter and that starter is going to bring them the best practice and whatever you guys recommend (or want to push forward). Probably not the uber jar 😄

So as you can see, there are many different deployment scenarios here.

Yes there is. That's fine. The starter should bring a default, something predictable with a minimum amount of required configuration. I would bring client/server by default (because it must be the most lightweight dependencies-wise), requiring the user to provide the location of the remote infinispan cluster. They could go embedded by adding the necessary code to do that (if that's not a single dependency, maybe a separate starter that would nicely play with this one?). Granted, they'd get both client/server and embedded but what is the actual problem with that?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, granted. If that's the convention that we should probably follow it.

So let me add the infinispan-core artifact and some instructions how to switch to client/server mode.

@slaskawi slaskawi force-pushed the ISPN-6561/Spring_boot_starters branch from 7a210d5 to d9ac702 Compare December 9, 2016 08:54
@slaskawi
Copy link
Author

slaskawi commented Dec 9, 2016

The code is now updated and issues were addressed.

@slaskawi slaskawi force-pushed the ISPN-6561/Spring_boot_starters branch 2 times, most recently from 3044f1e to 9ae2e94 Compare December 13, 2016 08:21
@gustavocoding
Copy link

Can't build it against central:

Could not resolve dependencies for project 
org.infinispan.tutorial.simple:infinispan-simple-tutorials-spring-boot:jar:1.0.0-SNAPSHOT: 
Could not find artifact org.infinispan:inifinispan-spring-boot-starter:jar:1.0.0.Alpha1\
in central (https://repo.maven.apache.org/maven2)

@slaskawi
Copy link
Author

I've just released it. Try using JBoss Repository. The sync usually takes a day or two.

@gustavocoding
Copy link

@slaskawi ok, build works now.

We need to make the tutorial "executable" via mvn exec:exec, I think you need to add a plugin in the pom

@slaskawi slaskawi force-pushed the ISPN-6561/Spring_boot_starters branch from 9ae2e94 to 6bcad4a Compare December 14, 2016 13:11
@slaskawi
Copy link
Author

@gustavonalle Added README.md

@slaskawi slaskawi merged commit fa821fa into infinispan:master Dec 19, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants