The document discusses invokedynamic, a new bytecode introduced in Java 7 that allows for user-definable bytecode behavior. It provides more flexibility compared to the traditional bytecode instructions like invokevirtual. invokedynamic calls a bootstrap method that prepares a CallSite object and MethodHandle to invoke the target method. This allows dynamic dispatch, fast method pointers, and optimizable behavior like normal Java code. The document includes examples of using invokedynamic to implement dynamic language features and define new domain-specific languages.
* История JRuby;
* Платформа JVM и ее возможности;
* Почему стоит попробовать JRuby;
* Как мы в Хот Спот используем JRuby для разработки;
* Сравнение с другими JVM языками.
My goals have been:
- focusing on several project areas, where you can use jruby successfully
- share the experience that I made using ruby in the last years
- proove that things can be done easier as they are done in typical java projects
* История JRuby;
* Платформа JVM и ее возможности;
* Почему стоит попробовать JRuby;
* Как мы в Хот Спот используем JRuby для разработки;
* Сравнение с другими JVM языками.
My goals have been:
- focusing on several project areas, where you can use jruby successfully
- share the experience that I made using ruby in the last years
- proove that things can be done easier as they are done in typical java projects
Just a brief introduction I have given my team to get into the OSGi topic. Guess it is not the highest academic level, but should be enough to understand the fundamentals of OSGi.
Srihitha Technologies provides Java Online Training in Ameerpet by real time Experts. For more information about Java online training in Ameerpet call 9885144200 / 9394799566.
Srihitha Technologies provides Java Training in Ameerpet by real time Experts. For more information about Java training in Ameerpet call 9394799566 / 9290641808.
Just a brief introduction I have given my team to get into the OSGi topic. Guess it is not the highest academic level, but should be enough to understand the fundamentals of OSGi.
Srihitha Technologies provides Java Online Training in Ameerpet by real time Experts. For more information about Java online training in Ameerpet call 9885144200 / 9394799566.
Srihitha Technologies provides Java Training in Ameerpet by real time Experts. For more information about Java training in Ameerpet call 9394799566 / 9290641808.
Part 1/3 of our Devoxx University session. An introduction to some of the features of Java 7!
We're still working out where to host the torrent of our Virtual Box image with the coding exercises, we'll update the description when we sort it out.
Presented at BJUG, 6/12/2012 by Roger Brinkley
This talk is on 55 new features in Java 7 you (probably) didn't hear about in an ignite format of one per minute. No stopping, no going back....Questions, sure but only if time remains (otherwise save for later).
The Spring framework packs a lot of punch, out of the box! The surface-level component model's extraordinarily flexible, and works well with in most situations, but the real power of Spring lays just underneath, in the numerous SPIs that Spring exposes, so that you can tailor the component model to your own use cases. Spring's SPI's are a great example of what Bob Martin describes as the open-closed principle, and it provides the solid underpinnings upon which the other Spring frameworks, including Spring Integration, Spring MVC and Spring Batch are built. In this talk, Josh Long, the Spring developer advocate from SpringSource, provides a walking tour of Spring's extension points.
jQuery Mobile, Backbone.js, and ASP.NET MVCTroy Miles
Websites designed for smart phones are one of the fastest growing segments of the internet. jQuery Mobile makes it easy to create sites for mobile devices, but it is mostly about UI. It doesn’t address the needs of an enterprise application. Things like how to load data from and persist data to the server, how to tie the JavaScript and HTML together, and minimize the amount of data transmitted. In this session I will show how to combine jQuery Mobile with Backbone.js and a ASP.NET Web API back-end. The end result is a website which is fast, efficient, and easy to enhance and maintain.
JRuby is Ruby for the JVM, right? But what does that really mean? What do you get out of the deal?
We'll explore what makes JRuby unique among Ruby implementations, and why the JVM is a Rubyist's dream come true. Using JRuby means you have the best GC, real threads, easy and scalable deployment, high performance, no-compile cross-platform libraries, and the best monitoring and profiling tools of any VM. And you get it all without leaving Ruby behind. If you're not using JRuby already, this talk will convince you to give it a try.
A status update on JRuby, covering compatibility, Rails, and next-gen performance numbers. JRuby is currently the fastest way to run Rails apps, and we're doing work to make it even faster in the future.
JRuby 9000 introduced a new intermediate representation that allows us to use classic compiler strategies to optimize Ruby. This talk describes what we're doing with this new IR and why current JVM capabilities are not sufficient.
Fast as C: How to Write Really Terrible JavaCharles Nutter
For years we’ve been told that the JVM’s amazing optimizers can take your running code and make it “fast” or “as fast as C++” or “as fast as C”…or sometimes “faster than C”. And yet we don’t often see this happen in practice, due in large part to (good and bad) development patterns that have taken hold in the Java world.
In this talk, we’ll explore the main reasons why Java code rarely runs as fast as C or C++ and how you can write really bad Java code that the JVM will do a better job of optimizing. We’ll take some popular microbenchmarks and burn them to the ground, monitoring JIT logs and assembly dumps along the way.
Have you ever used an open source project? Of course you have, but have you made any contributions yourself? Filed a bug report? Submitted a patch? Have you ever started your own OSS project, or taken a closed/private project public? What licenses should you use? How do you manage contributions? How do you encourage contributors and get work done? In this talk we'll go over the basics of OSS: how to get involved, how to start a project, how to manage contributions. We'll discuss project lifecycles, legal CYA tips, and how to keep projects moving. You'll see the inner workings of real OSS projects, and learn how to be a better OSS user and producer.
Presented at Jfokus 2015
InvokeBinder: Fluent Programming for Method HandlesCharles Nutter
The MethodHandle API provides a powerful way to build optimized function pointers that do a wide variety of call-path adaptations. Unfortunately, the API as designed requires mental contortions to write anything more than trivial handle chains by hand. Adaptations must be made backwards from the target, argument-list modifications are done by index and length, and debugging failed adaptations can be a terrific challenge. InvokeBinder seeks to make method handles fun and easy to use by providing a fluent API, building adaptations from the call forward, allowing argument-list manipulation by name and wildcard, and much more. We'll explore everything InvokeBinder does today and talk about improvements for the future.
JRuby 9000 represents the biggest-ever leap forward for JRuby. Not only have we caught up on compatibility (9000 will be 2.2-compatible from release), but we've completely redesigned our JVM-based runtime and have opened our codebase up to the JRuby+Truffle research project from Oracle Labs. The changes we've made will make it easier to keep up with MRI on compatibility and give us the potential to run Ruby as fast as Java or C. The entire Ruby world will change over the next year, and JRuby 9000 will be leading the way. We'll talk about what Ruby's going to look like once JRuby is "over 9000".
Have you ever used an open source project? Well of course you have, but how about contributed to one? Filed a bug report? Submitted a patch? Have you ever started your own OSS project, or taken a closed/private project public? What licenses should you use? How do you manage contributions? How do you encourage contributors and get work done? In this talk we'll go over the basics of OSS: how to get involved, how to start a project, how to manage contributions. We'll discuss project lifecycles, legal CYA tips, and how to keep projects moving. You'll see the inner workings of real OSS projects, and learn how to be a better OSS user and producer.
A survey of all the hard problems JRuby developers have had to solve, whether the JVM likes it or not. Topics include parsing, interpreting, compiling, optimization, native libraries, posix, startup time, console features, and much more.
The Art of the Pitch: WordPress Relationships and SalesLaura Byrne
Clients don’t know what they don’t know. What web solutions are right for them? How does WordPress come into the picture? How do you make sure you understand scope and timeline? What do you do if sometime changes?
All these questions and more will be explored as we talk about matching clients’ needs with what your agency offers without pulling teeth or pulling your hair out. Practical tips, and strategies for successful relationship building that leads to closing the deal.
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...DanBrown980551
Do you want to learn how to model and simulate an electrical network from scratch in under an hour?
Then welcome to this PowSyBl workshop, hosted by Rte, the French Transmission System Operator (TSO)!
During the webinar, you will discover the PowSyBl ecosystem as well as handle and study an electrical network through an interactive Python notebook.
PowSyBl is an open source project hosted by LF Energy, which offers a comprehensive set of features for electrical grid modelling and simulation. Among other advanced features, PowSyBl provides:
- A fully editable and extendable library for grid component modelling;
- Visualization tools to display your network;
- Grid simulation tools, such as power flows, security analyses (with or without remedial actions) and sensitivity analyses;
The framework is mostly written in Java, with a Python binding so that Python developers can access PowSyBl functionalities as well.
What you will learn during the webinar:
- For beginners: discover PowSyBl's functionalities through a quick general presentation and the notebook, without needing any expert coding skills;
- For advanced developers: master the skills to efficiently apply PowSyBl functionalities to your real-world scenarios.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
Key Trends Shaping the Future of Infrastructure.pdfCheryl Hung
Keynote at DIGIT West Expo, Glasgow on 29 May 2024.
Cheryl Hung, ochery.com
Sr Director, Infrastructure Ecosystem, Arm.
The key trends across hardware, cloud and open-source; exploring how these areas are likely to mature and develop over the short and long-term, and then considering how organisations can position themselves to adapt and thrive.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
GraphRAG is All You need? LLM & Knowledge GraphGuy Korland
Guy Korland, CEO and Co-founder of FalkorDB, will review two articles on the integration of language models with knowledge graphs.
1. Unifying Large Language Models and Knowledge Graphs: A Roadmap.
https://arxiv.org/abs/2306.08302
2. Microsoft Research's GraphRAG paper and a review paper on various uses of knowledge graphs:
https://www.microsoft.com/en-us/research/blog/graphrag-unlocking-llm-discovery-on-narrative-private-data/
GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using Deplo...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Accelerate your Kubernetes clusters with Varnish CachingThijs Feryn
A presentation about the usage and availability of Varnish on Kubernetes. This talk explores the capabilities of Varnish caching and shows how to use the Varnish Helm chart to deploy it to Kubernetes.
This presentation was delivered at K8SUG Singapore. See https://feryn.eu/presentations/accelerate-your-kubernetes-clusters-with-varnish-caching-k8sug-singapore-28-2024 for more details.
Elevating Tactical DDD Patterns Through Object CalisthenicsDorra BARTAGUIZ
After immersing yourself in the blue book and its red counterpart, attending DDD-focused conferences, and applying tactical patterns, you're left with a crucial question: How do I ensure my design is effective? Tactical patterns within Domain-Driven Design (DDD) serve as guiding principles for creating clear and manageable domain models. However, achieving success with these patterns requires additional guidance. Interestingly, we've observed that a set of constraints initially designed for training purposes remarkably aligns with effective pattern implementation, offering a more ‘mechanical’ approach. Let's explore together how Object Calisthenics can elevate the design of your tactical DDD patterns, offering concrete help for those venturing into DDD for the first time!
UiPath Test Automation using UiPath Test Suite series, part 3DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 3. In this session, we will cover desktop automation along with UI automation.
Topics covered:
UI automation Introduction,
UI automation Sample
Desktop automation flow
Pradeep Chinnala, Senior Consultant Automation Developer @WonderBotz and UiPath MVP
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered Quality
Invokedynamic in 45 Minutes
1. invokedynamic
IN 45 MINUTES!!!
Wednesday, February 6, 13
2. Me
• Charles Oliver Nutter
• headius@headius.com, @headius
• blog.headius.com
• JRuby Guy at Sun, Engine Yard, Red Hat
• JVM enthusiast, educator, contributor
• Earliest adopter of invokedynamic
Wednesday, February 6, 13
4. History
• JVM authors mentioned non-Java languages
• Language authors have targeted JVM
• Hundreds of JVM languages now
• But JVM was a mismatch for many of them
• Usually required tricks that defeated JVM
optimizations
• Or required features JDK could not provide
Wednesday, February 6, 13
5. JVM Languages
Through the Years
• Early impls of Python (JPython), JS (Rhino)
and many others
• No official backing by Sun until 2006
• JRuby team hired
• JSR-292 “invokedynamic” rebooted in 2007
• Java 7 shipped invokedynamic in 2011
Wednesday, February 6, 13
6. What is
invokedynamic
Wednesday, February 6, 13
7. New Bytecode?
Well, yes...but what does that mean?
And is that all?
Wednesday, February 6, 13
13. A User-definable
Bytecode
You decide how the JVM implements it
Wednesday, February 6, 13
14. A User-definable
Bytecode
You decide how the JVM implements it
+
Method Pointers
and Adapters
Faster than reflection, with user-defined
argument, flow, and exception handling
Wednesday, February 6, 13
22. Method Handles
• Function/field/array pointers
• Argument manipulation
• Flow control
• Optimizable by the JVM
• This is very important
Wednesday, February 6, 13
23. java.lang.invoke
• MethodHandle
• An invokable target + adaptations
• MethodType
• Representation of args + return type
• MethodHandles
• Utilities for acquiring, adapting handles
Wednesday, February 6, 13
25. Why Casting?
value1 = (String)mh1.invoke("java.home");
mh2.invoke((Object)"Hello, world");
• invoke() is “signature polymorphic”
• Call-side types define signature
• At compile time
• Signature must match MethodHandle type
• Or use invokeWithArguments
Wednesday, February 6, 13
26. Adapters
• Methods on j.l.i.MethodHandles
• Argument manipulation, modification
• Flow control and exception handling
• Similar to writing your own command-
pattern utility objects
Wednesday, February 6, 13
31. Goals of JSR 292
• A user-definable bytecode
• Full freedom to define VM behavior
• Fast method pointers + adapters
• Optimizable like normal Java code
• Avoid future modifications
Wednesday, February 6, 13
34. JVM 101
200 opcodes
Ten (or 16) “endpoints”
Wednesday, February 6, 13
35. JVM 101
200 opcodes
Ten (or 16) “endpoints”
Invocation
invokevirtual
invokeinterface
invokestatic
invokespecial
Wednesday, February 6, 13
36. JVM 101
200 opcodes
Ten (or 16) “endpoints”
Invocation Field Access
invokevirtual getfield
invokeinterface setfield
invokestatic getstatic
invokespecial setstatic
Wednesday, February 6, 13
37. JVM 101
200 opcodes
Ten (or 16) “endpoints”
Invocation Field Access Array Access
invokevirtual getfield *aload
invokeinterface setfield *astore
invokestatic getstatic b,s,c,i,l,d,f,a
invokespecial setstatic
Wednesday, February 6, 13
38. JVM 101
200 opcodes
Ten (or 16) “endpoints”
Invocation Field Access Array Access
invokevirtual getfield *aload
invokeinterface setfield *astore
invokestatic getstatic b,s,c,i,l,d,f,a
invokespecial setstatic
All Java code revolves around these endpoints
Remaining ops are stack, local vars, flow control,
allocation, and math/boolean/bit operations
Wednesday, February 6, 13
39. The Problem
• JVM spec (pre-7) defined 200 opcodes
• All bytecode lives within these 200
• What if your use case does not fit?
• Dynamic language/dispatch
• Lazy initialization
• Non-Java features
Wednesday, February 6, 13
40. // Static
System.currentTimeMillis()
Math.log(1.0)
// Virtual
"hello".toUpperCase()
System.out.println()
// Interface
myList.add("happy happy")
myRunnable.run()
// Special
new ArrayList()
super.equals(other)
Wednesday, February 6, 13
43. invokevirtual invokestatic
1. Confirm object is of correct type 1. Confirm arguments are of correct type
2. Confirm arguments are of correct type 2. Look up method on Java class
3. Look up method on Java class 3. Cache method
4. Cache method 4. Invoke method
5. Invoke method
invokeinterface invokespecial
1. Confirm object’s type implements interface 1. Confirm object is of correct type
2. Confirm arguments are of correct type 2. Confirm arguments are of correct type
3. Look up method on Java class 3. Confirm target method is visible
4. Cache method 4. Look up method on Java class
5. Invoke method 5. Cache method
6. Invoke method
Wednesday, February 6, 13
44. invokevirtual invokestatic
1. Confirm object is of correct type 1. Confirm arguments are of correct type
2. Confirm arguments are of correct type 2. Look up method on Java class
3. Look up method on Java class 3. Cache method
4. Cache method 4. Invoke method
5. Invoke method
invokeinterface invokespecial
1. Confirm object’s type implements interface 1. Confirm object is of correct type
2. Confirm arguments are of correct type 2. Confirm arguments are of correct type
3. Look up method on Java class 3. Confirm target method is visible
4. Cache method 4. Look up method on Java class
5. Invoke method 5. Cache method
6. Invoke method
invokedynamic
1. Call bootstrap handle (your code)
2. Bootstrap prepares CallSite + MethodHandle
3. MethodHandle invoked now and future (until CallSite changes)
Wednesday, February 6, 13
53. Tools
• ObjectWeb's ASM library
• De facto standard bytecode library
• Jitescript
• DSL/fluent wrapper around ASM
• InvokeBinder
• DSL/fluent API for building MH chains
Wednesday, February 6, 13
54. #1: Trivial Binding
• Simple binding of a method
• j.l.i.ConstantCallSite
• Method returns String
• Print out String
Wednesday, February 6, 13
55. #2: Modifying the Site
• Toggle between two targets each call
• j.l.i.MutableCallSite
• Call site sent into methods
• ...so they can modify it
• Trivial example of late binding
• InvokeBinder usage
Wednesday, February 6, 13
56. #3: Dynamic Dispatch
• Target method not known at compile time
• Dynamically look up after bootstrap
• Rebind call site to proper method
Wednesday, February 6, 13
57. StupidScript
• push <string>: push string on stack
• send <number>: call function with n args
• One arg call: ["print", "Hello, world"]
• def <name> 'n' <op1> [ 'n' <op2> ...] 'n' end
• define function with given ops
• One builtin: print (System.out.println)
Wednesday, February 6, 13
58. StupidScript
• push <string>: push string on stack
• send <number>: call function with n args
• def <name> 'n' <op1> [ 'n' <op2> ...] 'n' end
• One builtin: print (System.out.println)
Wednesday, February 6, 13
59. Implementation
• Simple parser generates AST
• Compiler walks AST, emits .class
• Top level code goes into run() method
• defs create additional methods
Wednesday, February 6, 13
61. Define Function
def hello
push print
push Hello, world!
send 1
end
Wednesday, February 6, 13
62. Call Function
push hello
send 0
Wednesday, February 6, 13
63. More Information
• My blog: http://blog.headius.com
• Follow me: @headius
• Code on Github
• https://github.com/headius/indy_deep_dive
• Slides posted online
Wednesday, February 6, 13