Collections in Java ppt with examples

inheritance in java ppt with example and java inheritance ppt presentation
NicolusNorton Profile Pic
NicolusNorton,Germany,Professional
Published Date:08-07-2017
Your Website URL(Optional)
Comment
Why Java Works (Well) for Low-Latency Trading Systems Howard Green Azul Systems Inc. 1 1 © 2013 Azul Systems Who we are 2 2 © 2013 Azul Systems Azul Systems: Deep Java DNA • Award-Winning Leader in Java Technology • Founded in 2002, privately held; based in Sunnyvale, CA • Trusted partner to the financial sector for over ten years • Azul CTO Gil Tene on the JCP Executive Committee • Unique technology and IP in Java runtimes and performance ─ Over 40 patents issued, 15 additional filed • Deep low-latency Java expertise • Strong financial partner & ISV ecosystem 3 3 3 3 © 2013 Azul Systems Azul: Proven in Capital Markets Java use cases: • HFT and Algo Trading Platforms • FX, Fixed Income • Real-time Risk • Hedge Funds (CEP) • DMA, Matching Engines, FIX engines, Messaging, BI, & more • Low-latency Java is here – and improving 4 4 © 2013 Azul Systems Java in the low latency world? So… Why do people use Java for low latency apps? 5 5 5 5 © 2013 Azul Systems Are they crazy? 6 6 6 6 © 2013 Azul Systems Are they crazy? • No. • There are good, easy to articulate reasons: • Projected lifetime cost • Developer productivity • Time-to-product, Time-to-market, ... • Leverage, ecosystem, ability to hire 7 7 7 7 © 2013 Azul Systems Why use Java in Algo Trading? • One customer’s perspective: “Our strategies have a shelf life” We have to keep developing and deploying new ones Only one out of N is actually productive Profitability therefore depends on ability to successfully deploy new strategies, and on the cost of doing so Our developers seem to be able to produce 2x-3x as much when using a Java environment as they would with C/C++ ... 8 8 8 8 © 2013 Azul Systems Some Low-Latency Java Examples 9 9 © 2013 Azul Systems FX Example: LMAX Exchange • London-based FX exchange • Primarily Open Source infrastructure • 3 ms average latency; 100% Uptime, 500 usec internal latency • LMAX Disruptor: 6 million TPS in 2011 “LMAX Exchange are already the fastest venue for FX and our deep technological collaboration with Azul will help to ensure we continue to deliver even faster execution for our clients in the future." Edward McDaid, CIO, LMAX Exchange 10 10 10 10 © 2013 Azul Systems Algo Example: OptionsCity • Java-Based (Some Scala) ─ Quoting and execution ─ Options pricing and modeling ─ Algo trading ─ Integrated risk management • Co-location next to matching engines at key exchanges • Under 100 µsec round trip 11 11 11 11 © 2013 Azul Systems What’s Driving Java LL Performance? 12 12 © 2013 Azul Systems 5 Things People Think They Know about Java 1. Java is inherently slower 2. My team of C and C++ developers can write faster code 3. Java isn't for low-latency applications 4. Garbage Collection makes Java impractical for Trading 5. Java heap sizes over 10 GB are asking for trouble 13 13 13 13 © 2013 Azul Systems Is Java Slow? No • A good programmer will get roughly the same speed from both Java and C++ • A bad programmer won’t get you fast code on either • The 50%‘ile and 90%‘ile are typically excellent... 14 14 14 14 © 2013 Azul Systems Tiered Compilation • Today’s C1 and C2 compilers generate high-quality code • C1: “Fast and Dumb” – 5X-10X interpreter speed ─ Smaller code ─ Lower-quality • C2: Slower and Smarter – 30-50% faster than C1 ─ Bigger (aggressive/ more inlining) ─ Much higher peak throughput • Tiered (default) behavior – Both are used ─ C1 for fast startup ─ C2 for peak performance • Ensure sufficient iterations for optimization 15 15 15 15 © 2013 Azul Systems Memory Management • Garbage Collectors are getting better • CMS can be very good in tuned applications • Some Jrockit features being added to Oracle HotSpot • Traditional GC target peaks in low milliseconds • Object allocation much faster than malloc • Can drive peak latencies far lower • With aggressive JVM tuning and optimized application • Tens of microseconds peak latency is the rough current state of the industry 16 16 16 16 © 2013 Azul Systems Thread handling • Concurrency has been key to Java since its inception • Moore’s law / human capabilities • Accelerates developer productivity • Asynchronous development simplified • Very fast, low overhead • Originally depended upon operating system • Major advantage of Java – the JVM does more 17 17 17 17 © 2013 Azul Systems “Mechanical Sympathy” • cf: Martin Thompson’s blog • Modern Intel-architecture servers have lots of cores • …And very good cache designs • Cache miss – “lost opportunity for 500 instructions” • Linux optimizations can help tremendously • Power management can generate more jitter than GC does • Designers that understand how to keep key data in cache… • Locking threads to particular sockets (or cores) • Designing for few (1) writers and many readers 18 18 18 18 © 2013 Azul Systems Better Open Source/ More Profiling Tools • Use of Open Source throughout the financial sector has become widespread • Driven by replatforming onto Linux • Good frameworks and other OSS initiatives help jumpstart development • Java profiling tools are extremely robust ─ AppDynamics ─ New Relic ─ Jprofiler ─ VisualVM ─ Many, many more 19 19 19 19 © 2013 Azul Systems Human Capital is Key • There’s a worldwide war for talent • “The New Kingmakers” – James Governor of RedMonk • You need to provide the best tools and most interesting challenges for your developers • And you’d rather use your best and most creative people to build new functionality and enable new offerings, instead of tuning glitchy legacy systems • Java helps keep your best people engaged in building your business 20 20 20 20 © 2013 Azul Systems