Loading presentation...

Present Remotely

Send the link below via email or IM

Copy

Present to your audience

Start remote presentation

  • Invited audience members will follow you as you navigate and present
  • People invited to a presentation do not need a Prezi account
  • This link expires 10 minutes after you close the presentation
  • A maximum of 30 users can follow your presentation
  • Learn more about this feature in our knowledge base article

Do you really want to delete this prezi?

Neither you, nor the coeditors you shared it with will be able to recover it again.

DeleteCancel

Make your likes visible on Facebook?

Connect your Facebook account to Prezi and let your likes appear on your timeline.
You can change this under Settings & Account at any time.

No, thanks

Infinispan

No description
by

Sebastian Laskawiec

on 13 October 2015

Comments (0)

Please log in to add your comment.

Report abuse

Transcript of Infinispan

Datagrids
Sebastian Łaskawiec @
About me
Sebastian Łaskawiec
Where to find examples?
http://www.jboss.org/developer-materials/
#!keyword=infinispan
Where to look for help?
Forum - general advice, configuration, tuning
https://developer.jboss.org/en/infinispan
Contribution
How to get it?
Download page
( http://infinispan.org/download/ )
Docker repository
https://registry.hub.docker.com/
docker pull jboss/infinispan-server
docker run -i jboss/infinispan-server
What's inside the box?
Clustered instance without security
https://github.com/slaskawi/docker-infinispan-clustered
JSR - 107
JCache
CacheManager cm = Caching.getCacheManager("test");
CacheBuilder builder = manager.createCacheBuilder("test");
Cache cache = builder.build();
cache.put("test", "test");
cache.get("test);
Server + database
Server + cache + database
Server cluster + Cache cluster + database
Server cluster + Cache cluster
C++/C#
Distribution
Consistent hashing
Distribution
Rebalancing
CAP theorem
Formulated by Eric Brewer in 1998
Partitioning
Consistency
Availability
http://img3.wikia.nocookie.net/__cb20130825073829/smurfs/images/0/05/21510.png..
What is Infinispan?
http://stackoverflow.com/questions/11292215/where-does-mongodb-stand-in-the-cap-theorem
<distributed-cache>
<partition-handling enabled="false"/>
</distributed-cache>
<distributed-cache>
<partition-handling enabled="true"/>
</distributed-cache>
Mailing list - stay in touch and development questions
https://lists.jboss.org/mailman/listinfo/infinispan-dev
IRC - I need help ASAP - my Prod is burning
FreeNode #infinispan

https://github.com/jboss-developer/jboss-jdg-quickstarts
Source code
https://github.com/infinispan/infinispan

How to setup IDE, code guide
http://infinispan.org/docs/7.0.x/contributing/contributing.html

Find something to work on
https://issues.jboss.org/browse/ISPN/

Project meetings
Freenode, #infinispan, Mondays at 4 PM

sebastian.laskawiec@gmail.com
@slaskawi
+SebastianŁaskawiec
Distributed, in-memory
Key / Value store
OpenSource technology,
Mostly Java and Scala
Fast moving
3 year full support
Community based help
Consulting
Knowledge base access
Bleeding edge
Rock solid
2 year maintenance support
Basic configuration
Persistence
EmbeddedCacheManager manager = new DefaultCacheManager("infinispan.xml");
Cache defaultCache = manager.getCache();
<?xml version="1.0" encoding="UTF-8"?>
<infinispan
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="urn:infinispan:config:7.1 http://www.infinispan.org/schemas/infinispan-config-7.1.xsd"
xmlns="urn:infinispan:config:7.1">

<cache-container default-cache="default">
<local-cache name="default">
<eviction max-entries="1000" />
</local-cache>
</cache-container>

</infinispan>
GlobalConfiguration globalConfig = new GlobalConfigurationBuilder()
.globalJmxStatistics()
.cacheManagerName("SalesCacheManager")
.mBeanServerLookup(new JBossMBeanServerLookup())
.build();
Configuration config = new ConfigurationBuilder()
.clustering()
.cacheMode(CacheMode.DIST_SYNC)
.sync()
.l1().lifespan(25000L)
.hash().numOwners(3)
.build();
new DefaultCacheManager(globalConfig, config);
EmbeddedCacheManager manager = new DefaultCacheManager("infinispan.xml");
Configuration c = ...

manager.defineConfiguration("testCache", c);
Cache<String, String> cache = manager.getCache("testCache");
Write through
cache.put("test", "test")
Synchronous
Write behind
cache.put("test", "test")
Asynchronous
Cache Modes
Querying
Annotate
Replicated cache
Distribution mode
Invalidation mode
numOwners = 2
@Indexed
public class Book {
@Field String title;
@Field String description;
@Field @DateBridge(resolution=Resolution.YEAR) Date publicationYear;
}
Use Lucene query

SearchManager searchManager =
org.infinispan.query.Search.getSearchManager(cache);
org.apache.lucene.search.Query luceneQuery =
queryBuilder.phrase()
.onField("description")
.andField("title")
.sentence("a book on highly scalable query engines")
.createQuery();
CacheQuery cacheQuery = searchManager.getQuery( fullTextQuery );
List<Object> found = cacheQuery.list();
http://infinispan.org/tutorials/
Using XML
Using Java only
Mixed
Standalone
Library (cluster)
Client - Server
Modes
`
Hash function
Use common space
"My cool text"
0..0xFF
0
0xFF


"test"
fixed size
Map to nodes

10.10.10.123
http ://openwaterfoundation.org/wp-content/uploads/2014/03/opensource.jpg
Full transcript