Jax London 2013
Upcoming SlideShare
Loading in...5
×
 

Jax London 2013

on

  • 536 views

Fast Data: Parallel Processing on the Grid. ...

Fast Data: Parallel Processing on the Grid.

You may think of in-memory datagrids as a big cache, a key value store accessed using put and get. However to really reap the power and scale of modern data grids you need to move beyond cache semantics and turn your architecture on its head. Moving the processing to the data rather than pulling the data across the grid massively increases parallelism and reduces network latency, leading to huge increases in throughput. In this session, we will explore why traditional cache semantics sometimes struggles to scale and how through using parallel processing and event processing on the grid we can rearchitect our systems for massive scalability and utilise all our grid cores for parallel processing.

Statistics

Views

Total Views
536
Views on SlideShare
507
Embed Views
29

Actions

Likes
1
Downloads
2
Comments
0

1 Embed 29

http://www.c2b2.co.uk 29

Accessibility

Categories

Upload Details

Uploaded via as Microsoft PowerPoint

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • Without computation you just have a big cache!Good but not radical!Very Expensive to pull all the data across the grid. Could be Gigabytes of data you pull across the network.
  • Moves the processing the the data not the other way around!Much more efficient and the processor will likely have a small amount of data associated with it whereas the cache size may be very large!

Jax London 2013 Jax London 2013 Presentation Transcript

  • Steve Millidge | C2B2 Fast Data: Parallel Processing on the Grid
  • SAFE HARBOR This talk may contain nonsense. www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • WHO AM I Founder C2B2 Java since 1.0 EG Member JSR107 and JSR347 (bit dead) Our Mission We ensure the middleware that forms the foundation of our customer’s mission critical systems is Fast, Reliable, Manageable and Secure. www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Diagnose Before You Prescribe www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Can you add more? CPU Disk Memory Bandwidth www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Ability to add more capacity in response to more demand. Without a reduction in performance! 900 800 700 600 500 Linear Scalability 400 Typical Scalability 300 200 100 0 1 www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting 2 3 4 The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Time delay in requesting an operation and it being initiated www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • 1Gb Ethernet : 25 – 30MB/s 10Gb Ethernet : 250 – 350MB/s Infiniband : 6GB/s (maybe) www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • PING TIMES Local : 57µs LAN segment : 300µs LAN: switches : 4ms UK : 30ms USA : 100ms 3G : 100s ms www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Spinning Rust Source: tomshardware.com Typical SSD Speed 540MB/s www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting Disk BUS Speeds SATA 1.0 : 150MB/s SATA 2.0 : 300MB/s SATA 3.0 : 600MB/s SAS : 600MB/s Fibre Channel : 1GB/s Infiniband : 1GB/s The Leading Independent Middleware Experts
  • DDR3 1600 : 12.8GB/s www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Source www.cs.virginia.edu Approx: 3-5GB/s per cpu still about 1 order magnitude faster than SSD and scales with cores The general rule for STREAM is that each array must be at least 4x the size of the sum of all the last-level caches used in the run, or 1 Million elements -- whichever is larger. www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • “As an extreme example, several current highend machines run simple arithmetic kernels for out-of-cache operands at 4-5% of their rated peak speeds --- that means that they are spending 95-96% of their time idle and waiting for cache misses to be satisfied” http://www.cs.virginia.edu/stream/ref.html www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Other manufacturers are available ;-) XF PREMIUM LUXURY Settle into soft grain leather seats with 10/6 way electric adjustment and heating for driver and passenger. The soft grain stitched instrument panel and Gloss Rich Oak veneer complete the luxurious look, while assertive 18 inch Vela alloy wheels further enhance the dynamic exterior. The rear parking aid and Touch-screen visual indicator make slipping into tight spaces easy, while distractions at night are reduced by autodimming rear view mirrors. The Meridian™ 380W Sound System, with Digital Audio Broadcasting (DAB) radio receiver and Front Media Interface with USB and iPod® connectivity, lets you listen to your favourite music in rich detail. www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • http://www.datasciencecentral.com/forum/topics/the-3vs-that-define-bigdata www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • GET B PUT C PUT B B Application Application C Application Application Key Partition Key Partition Key Partition C Key Partition B B www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • public static void main( String[] args ) { CacheManager cacheManager = Caching.getCachingProvider().getCacheManager(); MutableConfiguration<String, String> config = new MutableConfiguration<String, String>(); cacheManager.configureCache("C2B2",config); Cache cache = cacheManager.getCache("C2B2"); cache.put("Key", "Value"); System.out.println(cache.get("Key")); } http://blog.c2b2.co.uk/2013/08/jsr107-getting-started.html www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Consistent Hashing Node 1 Hash Key Hash Node 3 Hash Key Space Hash Ring Node 4 Hash www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting Node 2 Hash The Leading Independent Middleware Experts
  • Key Partitioning • Keys Assigned Partition via Hash • Nodes Own a Partition • Number of Partitions Fixed • Number of Nodes isn’t www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting Partition Partition Partition Partition Partition Partition Partition The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • PUT B B Application Key Partition B Application Application Application Key Partition Key Partition Key NODE Partition www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting CRASH !!! The Leading Independent Middleware Experts
  • Application Application Application Application Application Application Application Cache Cache Cache Cache Cache Cache Cache Application Application Application Application Application Application Application Cache Cache Cache Cache Cache Cache Cache Application Application Application Application Application Application Application Cache Cache Cache Cache Cache Cache Cache 21 Amazon m2.xLargeMemory Instance with 17Gb RAM 3 Nodes Per Instance with 4Gb 64bit JVM Heap + 5 Gb OS 63 Cluster Nodes 252 Gb JVM Heap Available Approx 125Gb Data in the Grid when taking into account duplicates 42 vCPUs Approx $3633 per month www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Application Application Application Application Key Partition Code Key Partition Key Partition Key partition www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • 1Gb Ethernet : 25 – 30MB/s 10Gb Ethernet : 250 – 350MB/s Infiniband : 6GB/s (maybe) www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Application Application Application Application Cache Cache Cache Cache Code www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Class Size of code to Serialize is a few Kb www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • // Invoking a Map Object oResult = map.invoke(key, agent); // Invoke on a subset of the cache NamedCache map = CacheFactory.getCache("trades"); Filter filter = new AndFilter(new EqualsFilter("getTrader", traderid), new EqualsFilter("getStatus", Status.OPEN)); Map mapResults = map.invokeAll(filter, agent); // The Agent Interface public interface EntryProcessor extends Serializable { public Object process(Entry entry); Map processAll(Set setEntries); } www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • <T> T invoke(K key, EntryProcessor<K, V, T> entryProcessor, Object... arguments) throws EntryProcessorException; <T> Map<K, T> invokeAll(Set<? extends K> keys, EntryProcessor<K, V, T> entryProcessor, Object... arguments); T process(MutableEntry<K, V> entry, Object... arguments) throws EntryProcessorException; } www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • • Financial Risk Calculation – Can I book this Order • Bet Placement – Can I place this Bet Application Keys Application Keys Application Keys • Hotel Availability Search – What hotels are available • Web Translation – Gather Translated Text www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • • Consumer Trend Analysis – Who orders what when • Route Optimisation – Delivery Trucks Application Keys Application Keys Application Keys • Social Graph Search – Patterns in social media graphs • Fraud Detection – Transaction analysis www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • public interface CacheEntryListener<K, V> extends EventListener { } public interface CacheEntryUpdatedListener<K, V> extends CacheEntryListener<K, V> { /** * Called after one or more entries have been updated. * * @param events The entries just updated. * @throws CacheEntryListenerException if there is problem executing the listener */ void onUpdated(Iterable<CacheEntryEvent<? extends K, ? extends V>> events) throws CacheEntryListenerException; } www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • • Product Recommendations – Related products • Alerting – Truck has Stopped! • Financial Position Calc – Check regs during booking • Nudge Purchasing Application Keys Application Application Keys www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting Keys – 5 people are looking at this hotel The Leading Independent Middleware Experts
  • http://blog.c2b2.co.uk/2012/06/infinispan-event-push-to-tomcat.html http://demo.c2b2.co.uk:8080/infinispan/ www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • Coherence GlassFish WebSocket http://demo.c2b2.co.uk:7080 or Full URL http://demo.c2b2.co.uk:7080/CleanStockTicker/stockticker.jsp http://blog.c2b2.co.uk/2012/10/java-one-2012-slides-and-code.html www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts
  • www.c2b2.co.uk blog.c2b2.co.uk @c2b2consulting The Leading Independent Middleware Experts