Tuesday, 16 June 2020

Infinispan Native Server Image

Starting with Infinispan 11, it’s now possible to create a natively compiled version of the Infinispan server.

TL;DR

We have a new image that contains a natively compiled Infinispan server and has a footprint of only 286MB. Try it now:

docker run -p 11222:11222 quay.io/infinispan/server-native:11.0

Infinispan Quarkus Extensions

Quarkus provides built in support for generating native executables, providing several abstractions to improve the development experience of creating native binaries. Building upon the new server, the Infinispan team have created a Quarkus extension for both embedded and server use-cases. These extensions allow a native binary version of the server to be compiled and ran by simply executing:

mvn clean install -Dnative
./server-runner/target/infinispan-quarkus-server-runner-11.0.0.Final-runner
    -Dquarkus.infinispan-server.config-file=infinispan.xml \
    -Dquarkus.infinispan-server.config-path=server/conf \
    -Dquarkus.infinispan-server.data-path=data \
    -Dquarkus.infinispan-server.server-path=/opt/infinispan &

Native Server Image

For many developers compiling your own Infinispan native binary manually is not desirable, therefore we provide the infinispan/server-native image that uses a native server binary. The advantage of this over our JVM based infinispan/server image is that we can no provide a much smaller image, 286 vs 468 MB, as we no longer need to include an openjdk JVM in the image.

The server-native image is configured exactly the same as the JVM based infinispan/server image. We can run an authenticated Infinispan server with a single user with the following command:

docker run -p 11222:11222 -e USER="user" -e PASS="pass" quay.io/infinispan/server-native:11.0

From the output below, you can see the Quarkus banner as well various io.quarkus logs indicating which extensions are being used.

################################################################################
#                                                                              #
# IDENTITIES_PATH not specified                                                #
# Generating Identities yaml using USER and PASS env vars.                     #
################################################################################
2020-06-16 09:27:39,638 INFO  [io.quarkus] (main) config-generator 2.0.0.Final native (powered by Quarkus 1.5.0.Final) started in 0.069s.
2020-06-16 09:27:39,643 INFO  [io.quarkus] (main) Profile prod activated.
2020-06-16 09:27:39,643 INFO  [io.quarkus] (main) Installed features: [cdi, qute]
2020-06-16 09:27:39,671 INFO  [io.quarkus] (main) config-generator stopped in 0.001s
2020-06-16 09:27:40,306 INFO  [ListenerBean] (main) The application is starting...
2020-06-16 09:27:40,481 INFO  [org.inf.CONTAINER] (main) ISPN000128: Infinispan version: Infinispan 'Corona Extra' 11.0.0.Final
2020-06-16 09:27:40,489 INFO  [org.inf.CLUSTER] (main) ISPN000078: Starting JGroups channel infinispan with stack image-tcp
2020-06-16 09:27:45,560 INFO  [org.inf.CLUSTER] (main) ISPN000094: Received new cluster view for channel infinispan: [82914efa63fe-12913|0] (1) [82914efa63fe-12913]
2020-06-16 09:27:45,562 INFO  [org.inf.CLUSTER] (main) ISPN000079: Channel infinispan local address is 82914efa63fe-12913, physical addresses are [10.0.2.100:7800]
2020-06-16 09:27:45,566 INFO  [org.inf.CONTAINER] (main) ISPN000390: Persisted state, version=11.0.0.Final timestamp=2020-06-16T09:27:45.563303Z
2020-06-16 09:27:45,584 INFO  [org.inf.CONTAINER] (main) ISPN000104: Using EmbeddedTransactionManager
2020-06-16 09:27:45,617 INFO  [org.inf.SERVER] (ForkJoinPool.commonPool-worker-3) ISPN080018: Protocol HotRod (internal)
2020-06-16 09:27:45,618 INFO  [org.inf.SERVER] (main) ISPN080018: Protocol REST (internal)
2020-06-16 09:27:45,629 INFO  [org.inf.SERVER] (main) ISPN080004: Protocol SINGLE_PORT listening on 10.0.2.100:11222
2020-06-16 09:27:45,629 INFO  [org.inf.SERVER] (main) ISPN080034: Server '82914efa63fe-12913' listening on http://10.0.2.100:11222
2020-06-16 09:27:45,629 INFO  [org.inf.SERVER] (main) ISPN080001: Infinispan Server 11.0.0.Final started in 5457ms
2020-06-16 09:27:45,629 INFO  [io.quarkus] (main) infinispan-quarkus-server-runner 11.0.0.Final native (powered by Quarkus 1.5.0.Final) started in 5.618s.
2020-06-16 09:27:45,629 INFO  [io.quarkus] (main) Profile prod activated.
2020-06-16 09:27:45,629 INFO  [io.quarkus] (main) Installed features: [cdi, infinispan-embedded, infinispan-server]

Further Reading

For more detailed information abou how to use the infinispan/server and infinispan/server-native image, please consult the official documentation.

Get it, Use it, Ask us!

The Quarkus extension and the server-native image are currently provided as a tech preview, so please try them out and let us know if you run into any issues.

Please download, report bugs, chat with us, ask questions on StackOverflow.

Posted by Ryan Emerson on 2020-06-16
Tags: docker native quarkus

Thursday, 07 March 2019

Subatomic Infinispan Client

Today, the Quarkus project was released as a public beta. https://quarkus.io/ For those of you not familiar, Quarkus allows you to write your enterprise apps as you have done in the past with Hibernate/JAX-RS, but also to compile these applications to a Graal-VM native image. Running in a native image allows for the application to be started up in mere milliseconds, depending upon the app, all while using much less memory.

The Infinispan team is proud to announce that you can use the HotRod Java client in Quarkus and supports being compiled to a native image as well. This can allow you to startup and connect to a remote Infinispan server faster than ever before.

If you want a quick and simple example of how you can get this working you can take a look at the quick start which can be found at https://github.com/quarkusio/quarkus-quickstarts/tree/master/infinispan-client. This example covers configuring the client connection, cache injection and simple get/put operations as a basis.

The Infinispan Client Quarkus extension in addition to providing an easy way to create a Graal-VM native image with Infinispan Client also provides the following features to help the user get stuff done quicker.

Automatically Inject Important Resources

  1. RemoteCache (named)

  2. RemoteCacheManger

  3. CounterManager

User based ProtoStream Marshalling

Querying (Indexed / Non Indexed)

Continuous Query

Near Cache

Authentication/Authorization

Encryption

Counters

More details for these features as well as how to configure them can be found at https://quarkus.io/guides/infinispan-client-guide

Please let us know of any questions, concerns or suggestions at the usual places: forum or chat. We expect to continue enhancing this extension and would love to have any feedback.

Posted by Unknown on 2019-03-07
Tags: quarkus graalvm native substratevm

News

Tags

JUGs alpha as7 asymmetric clusters asynchronous beta c++ cdi chat clustering community conference configuration console data grids data-as-a-service database devoxx distributed executors docker event functional grouping and aggregation hotrod infinispan java 8 jboss cache jcache jclouds jcp jdg jpa judcon kubernetes listeners meetup minor release off-heap openshift performance presentations product protostream radargun radegast recruit release release 8.2 9.0 final release candidate remote query replication queue rest query security spring streams transactions vert.x workshop 8.1.0 API DSL Hibernate-Search Ickle Infinispan Query JP-QL JSON JUGs JavaOne LGPL License NoSQL Open Source Protobuf SCM administration affinity algorithms alpha amazon anchored keys annotations announcement archetype archetypes as5 as7 asl2 asynchronous atomic maps atomic objects availability aws beer benchmark benchmarks berkeleydb beta beta release blogger book breizh camp buddy replication bugfix c# c++ c3p0 cache benchmark framework cache store cache stores cachestore cassandra cdi cep certification cli cloud storage clustered cache configuration clustered counters clustered locks codemotion codename colocation command line interface community comparison compose concurrency conference conferences configuration console counter cpp-client cpu creative cross site replication csharp custom commands daas data container data entry data grids data structures data-as-a-service deadlock detection demo deployment dev-preview development devnation devoxx distributed executors distributed queries distribution docker documentation domain mode dotnet-client dzone refcard ec2 ehcache embedded embedded query equivalence event eviction example externalizers failover faq final fine grained flags flink full-text functional future garbage collection geecon getAll gigaspaces git github gke google graalvm greach conf gsoc hackergarten hadoop hbase health hibernate hibernate ogm hibernate search hot rod hotrod hql http/2 ide index indexing india infinispan infinispan 8 infoq internationalization interoperability interview introduction iteration javascript jboss as 5 jboss asylum jboss cache jbossworld jbug jcache jclouds jcp jdbc jdg jgroups jopr jpa js-client jsr 107 jsr 347 jta judcon kafka kubernetes lambda language learning leveldb license listeners loader local mode lock striping locking logging lucene mac management map reduce marshalling maven memcached memory migration minikube minishift minor release modules mongodb monitoring multi-tenancy nashorn native near caching netty node.js nodejs non-blocking nosqlunit off-heap openshift operator oracle osgi overhead paas paid support partition handling partitioning performance persistence podcast presentation presentations protostream public speaking push api putAll python quarkus query quick start radargun radegast react reactive red hat redis rehashing releaase release release candidate remote remote events remote query replication rest rest query roadmap rocksdb ruby s3 scattered cache scripting second level cache provider security segmented server shell site snowcamp spark split brain spring spring boot spring-session stable standards state transfer statistics storage store store by reference store by value streams substratevm synchronization syntax highlighting tdc testing tomcat transactions tutorial uneven load user groups user guide vagrant versioning vert.x video videos virtual nodes vote voxxed voxxed days milano wallpaper websocket websockets wildfly workshop xsd xsite yarn zulip

back to top