101 Flashcards
JRE
Acronym for Java Runtime Environment. All you need to run Java programs, but nothing else–notably, no compiler, so you cannot writeJava programs with only a JRE.
A reduced Java bundle that originally had easy redistribution rights. It was intended to be a shippable component for applications and provides a full JVM but no compilation and no utilities. For a long time it was not as commonly used as the JDK, but containerization is changing that as more and more people move toward using lean containers.
JDK
Acronym for Java Development Kit. A JRE plus other tools, most notably a compiler.
A full Java bundle, including compilation (javac) and some useful utilities (tools.jar). It was originally intended for developers but lately more people use a JDK than a JRE because of the utilities.
JVM
a running instance of Java or JRE process; in all of the major operating systems, a JVM is a running process
Native code
code running in a JVM that is not Java code (typically it is written in a C variant). This code typically implements functionality that requires knowledge of underlying operating system capabilities, and therefore is not portable from (for example) Windows to Linux.
Class loader
a Java class with specific native code capabilities that allow code to be loaded into a JVM.
A class loader is also an implied namespace: although there is no human-readable “name” associated with a class loader, a class with the same fully-qualified name in one class loader is different from a class with the same fully-qualified name in a different class loader. Those two classes would have different hashCodes, and they would not be “equals()” to each other.
Classpath
similar to a PATH in Unix variants, a classpath is a concatenated set of file paths that form a precedence rule for loading Java code.
In Unix variants, if your PATH environment variable includes two entries where a command will be found, the command in the first entry in the PATH is the one used. The same is true for a classpath: if your classpath includes multiple entries containing the same fully-qualified class name, the one that appears first will be used. A lack of understanding of what code exists in each path entry can lead to confusion and also to using unexpected code.
Fully-qualified name
a concatenation of package name, the “.” character, and classname. Also called fully-qualified class name and sometimes abbreviated fqcn.
Hashcode
a Java hashcode is fundamentally no different than a hashcode in other languages –i.e. it describes an integer value calculated from attributes of a language construct (in Java, that’s an Objectas in java.lang.Object), and that value is typically used as a quick way to determine inequality.
In Java, if equals() == truefor any two objects, then it also MUST be true that the hashCode()values from the two objects are equal. The reverse is NOT NECESSARILY true: if two objects have the same hashCode()values, it is still possible (but unlikely, for a reasonably good hashing function) that the equals()is not true.NOTE: in Java code, the method name is always hashCode()(i.e. camel-case)
Class
a Java object description.
In Java, there is a base java.lang.Object class from which every other class is extended. A class is represented on disk in a file format described inThe Java Virtual Machine Specification(Java 8 PDF version link). Classes have a simple name and a fully-qualified name. A class can be exactly one of abstract, concrete, or an interface. A class may also be an inner class or an anonymous inner class, those are orthogonal to whether the class is abstract, concrete or an interface. Finally, a class may also be an Enum class.
Superclass
also called a parent class, a superclass has code that is implicitly present in subclasses and is there fore a building block for more complex functionality.
Since superclasses and subclasses form the foundation of object-oriented programming, it is absolutely critical that the concept of class hierarchies is understood. Understanding at least the basics of a class hierarchy directly affects your ability to configure BT detection and backend rules in AppD
Subclass
also called a child class, a subclass has a functionality from the superclass plus additional functionality specified in the subclass itself
Concrete class
a class where all declared methods have implementation code contained within the class. This means a concrete class can be instantiated
Abstract class
a class with declared methods that have no implementations in the class. Instead the class depends on (REQUIRES actually) concrete subclasses to implement the specific methods. An abstract class cannot be directly instantiated.
Enum
a specialised class that can only have very specific values. Enums are often used to describe known things like colour, gender - things th can be (duh!) enumerated
Inner Class
a class whose definition lives in another class.
This is typically a code style choice done when the developer wants to separate some functionality, but that functionality is only related to a single other class–sort of a helper scenario. By using the inner class construct, the developer signals to others reading the code that the scope of the usefulness of the inner class is limited, so nobody needs to go off reading all sorts of other code to understand how the inner class is used. Inner class names have a “$” character separating the containing class name from the inner class name, so inner class FileParser in containing class Book would have the full name of Book$FileParser–you would need to know that in order to create any type of rule (BT, backend, MIDC, info point) rule using the inner class.
Anonymous Class
a class with no name.
This is done in source code by specifying the code directly inline, with no containing class definition. This is a programming convention often used for callback-type functionality. An anonymous class is always inner, since there is no way to create one without some containing code structure. Anonymous inner class names are generated using an increasing numeric counter, so the first anonymous inner class (reading down from the top in source code) in class Book would be Book$1, then Book$2, etc.
It is perfectly legal to use anonymous inner classes in AppDynamics rules, but doing so is inherently fragile: if you declared a rule on inner class Book$3, and then some code was updated so that the Book source code added an anonymous inner class above (reading down from the top) the one you instrumented, then your instrumentation would break when the new code is compiled and deployed. Because of that, it is best to avoid using anonymous inner classes in rules if at all possible
Interface
a class method description with no implementations at all. Interfaces are useful in specifications where the actual implementation is left to others.
Package
a namespace for classes. Classes in the same package are compiled from source code in the same source directory structure on disk, and the package name is typically created from the last few segments of the directory path. This means that it is possible for classes in the same package to come from source code in different directories, as long as the directory names match from the sources root on downward
Garbage Collection
a JVM capability for reclaiming memory that is no longer being used.
OSGi
originally formed from the Open Services Gateway initiative, the expansion of the acronym has fallen out of favour, so now it really doesn’t stand for anything, it’s just the short name of the OSGi Alliance.
At a technical level, OSGi isa specification for bundling Java code that creates an alternative scheme to the standard classloading capabilities. OSGi was created out of frustration with the default Java classloading functionality and changes some default behaviour for what code is visible to other code.
For AppDynamics purposes, awareness of OSGi is important because it puts additional requirements on how our Java agent must be configured, and sometimes for what we can do in getter chains. Remember, the very purpose of OSGi was to create an alternate scheme for class bundling and loading; what this means in practice is that the standard rules of classpath resolution and classloader are being changed. OSGi was never bundled into standard JDK functionality, but a similar capability is going into Java 9 in the form of what is being called Modules
JAR
“Java archive” –a specification for bundling Java code based on the Zip file format. A Jar file minimally contains Java classes and a Manifest.mf file containing meta-information. It may optionally contain other resources such as flat files, images, etc.
War
“Web archive” –a specification for bundling Java code based on the Zip file format. A War file typically contains one or more Jar files, plus other descriptive information. A War file is the unit of deployment for a servlet container. In addition to Jar file contents, a War file contains a web deployment descriptor called web.xml, which maps Java servlet code to URL paths in the servlet container
Ear
Enterprise archive” –a specification for bundling Java code based on the Zip file format. An Ear file typically contains one or more War and/or Jar files, plus other descriptive information. An Ear file is the unit of deployment for a J2EE-compliant application server. In addition to War file components, an Ear file may contain descriptors for EJB deployment
Servlet container
a program whose primary functionality is to run Java servlets, but typically has less bundled features than a fully-compliant J2EE application server. A servlet container supports war files, but not ear files
Application server
a program with all the functionality of a servlet container, plus support for ear files,EJBs, database connection pools, and (often, but not required) Java messaging
J2EE
Java 2, Enterprise Edition. This refers to all of the functionality and code that exists in J2SE, plus some extension specifications that are typically in the javax package namespace.
The entire J2EE ecosystem is roughly comparable to the entire .NET ecosystem, whereas J2SEis more comparable to the core C# platform, without ASP, WCF, WPF, etc
J2SE
Java 2, Standard Edition. This refers to all of the functionality and code that exists in a JDK download bundle
Servlet
an early specification for standard web functionality. Servlets still dominate as the standard of choice for existing Java web functionality, but that is mostly a reflection of how long they have been around. Modern implementations bypass the servlet specification in favour of more efficient web implementations, which gives rise to the current explosion of alternate Java web platforms.
Servlets are detected OOTB by AppDynamics with default naming rules and a lot of flexibility for configuring custom naming schemes.
EJB
Enterprise Java Beans, a specification for creating components that have common capabilities for deployment and interoperability. EJB was the first specification for distributed Java computing, but has fallen out of favour to more modern, efficient implementations.
Reflection
the ability to invoke Java operations (i.e. methods) using information gained from introspection.
This capability is fundamental to the ability in AppDynamics to use getter chains. An AppDynamics getter chain is simply a text string that is used to find the corresponding Java class/method information (introspection) and then to use that information to invoke operations (reflection). In turn, getter chains are the fundamental building block used to create real-time business metrics, method invocation data collectors, BT and backend split rules, and ultimately Analytics information. Thus is the use of reflection that is behind all of the most powerful features in AppDynamics
thread (smaller t)
thread is also a hardware construct (processors can support threads), an operating system construct (all modern operating systems support threads at the operating system level) and even a JVM construct (especially true in earlier JVMs, which appeared at a time when operating system support for threads was lack luster). In practice you will probably never have to differentiate between hardware, OS or Java threads, so it is safe to simplify and view threads as two different things: Threads (the Java object) and threads (the hardware/OS/Java capability).
thread (smaller t)
thread is also a hardware construct (processors can support threads), an operating system construct (all modern operating systems support threads at the operating system level) and even a JVM construct (especially true in earlier JVMs, which appeared at a time when operating system support for threads was lack-luster). In practice you will probably never have to differentiate between hardware, OS or Java threads, so it is safe to simplify and view threads as two different things: Threads (the Java object) and threads (the hardware/OS/Java capability).
thread (smaller t)
thread is also a hardware construct (processors can support threads), an operating system construct (all modern operating systems support threads at the operating system level) and even a JVM construct (especially true in earlier JVMs, which appeared at a time when operating system support for threads was lack-luster). In practice you will probably never have to differentiate between hardware, OS or Java threads, so it is safe to simplify and view threads as two different things: Threads (the Java object) and threads (the hardware/OS/Java capability).
Executor
A specific Java implementation of asynchronous behaviour in the JDK. In the JDK an ExecutorService provides Executors, which are different implementations of thread pools.
Publish/Subscribe (Pub/Sub)
A loose coupling of two or more components whereby one “publishes” events or messages to some named service, and other components “subscribe” to the service, which means they receive events as they are published. Publishers and subscribers need not (and typically don’t) know anything about each other.
Producer/consumer (blocking queue)
describes a tighter coupling than Pub/Sub, whereby the provider (“producer”) of some resource feeds instances of the resource into some queue, whose size is typically capped. Consumers pull resources out of the queue. In the event of a full queue producers wait until one or more consumers creates space by consuming the resource. In the event of an empty queue consumers wait until one or more producers supply more resources needed.
Semaphore/Mutex
A construct in a code runtime that enables waiting and notification in asynchronous environments. In Java, any Object can act as the semaphore
Blocking
Suspension of code execution that happens when a thread of execution needs to acquire a semaphore, but cannot because other threads are doing the same thing. Blocking is distinct from waiting: when blocking occurs it is typically because there are too many threads trying to acquire the same semaphore. This may be an issue with code architecture, but it can also be a configuration problem if a threadpool size is configurable and set to a high value.
Waiting
Suspension of code execution that happens when a thread of execution needs to acquire a resource that is limited and currently not available. Waiting is distinct from blocking: when waiting occurs it is typically because too few critical resources are available. A very common cause of waiting is an undersized JDBC connection pool, or any other type of resource pool.
Reactive Programming
A style of asynchronous programming described in The Reactive Manifesto
Reactive programming is a programming paradigm that deals with asynchronous data streams (sequences of events) and the specific propagation of change, which means it implements modifications to the execution environment (context) in a certain order.
Fire and forget
A style of asynchronous programming whereby the instigator of an action “fires” (i.e. initiates the action) and then does not track execution or completion of the action (“forgets”).
Fork/join
A style of asynchronous programming whereby the instigator of an action fires the action (“forks”), then does some other activity while the action is also completing independently, then waits for notification that the action is complete (“joins”).
Thread profiler
A dynamic service in the Java agent that is useful for understanding the behaviour of individual threads in an asynchronous environment.
Using the Thread Profiler Dynamic Service early in a POV with asynchronous functionality can greatly shorten the POV time.
Term related to using AppDynamics in asynchronous environments
BCT log
the ByteCodeTransformer log, this log shows every class loaded into the JVM and what (if any) instrumentation was applied. Understanding this log is crucial to diagnosing and fixing problems with over-instrumentation of asynchronous behaviour.
Term related to using AppDynamics in asynchronous environments
Async interceptor
The AppDynamics instrumentor for Runnable and Callable classes in Java. The BCT log has entries for async interceptors.
Term related to using AppDynamics in asynchronous environments
Activity Interceptor
Similar to the Async interceptor, but more general-case: the AppDynamics instrumentor for general asynchronous or cross-process behaviour. The BCT log has entries for activity interceptors.
Term related to using AppDynamics in asynchronous environments
fork-config
The section of app-agent-config.xml where adjustments to async interceptor config may be done – for example, in a situation where the goal is to exclude some classes from being instrumented with async interceptors.
Term related to using AppDynamics in asynchronous environments
fork-config
The section of app-agent-config.xml where adjustments to async interceptor config may be done – for example, in a situation where the goal is to exclude some classes from being instrumented with async interceptors.
Term related to using AppDynamics in asynchronous environments
Scala
A JVM language of choice for reactive programming. It is next to impossible to write any Scala code that is not asynchronous
Akka
A package in Scala (also Java) that supports reactive programming semantics using components called Actors
Spray
An asynchronous REST/HTTP framework for Akka actors
Play
An asynchronous web framework with Java and Scala APIs
Scala
A JVM language of choice for reactive programming, with distinct syntaxes that compile down to Java bytecode. It is next to impossible to write any Scala code that is not asynchronous
Akka
A package, component framework, in Scala and Java that encourages reactive programming style. Supports semantics using components called Actors
Netty
a low-level communications framework that supports some ESB semantics, plus web and messaging. Often other frameworks build on top of Netty, using it for the underlying networking functionality (both Play and Vert.x do this)
Play
An asynchronous, rapid- development, web framework with Java and Scala APIs
Groovy
A JVM language popularised by SpringSource (now Pivotal), , with distinct syntaxes that compile down to Java bytecode, that is more natural for async functionality than Java (but less so than Scala).
dequeue
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
offer
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
put
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
take
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
receive
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
send
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
publish
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
subscribe
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
poll
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
onXXXEvent (where “XXX” can be almost any descriptive word describing the event)
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
onXXXEvent (where “XXX” can be almost any descriptive word describing the event)
Commonly-used name for methods in asynchronous environments.
“Hint” word that often indicate asynchronous functionality.
True or False: BT response times only measure the response time for a single thread, not an entire asynchronous BT
true (use E2E latency for the entire async BT)
Why are some lines between Tiers solid and some dashed on the app flow map?
the dashed lines indicate asynchronous behaviour, whereas the solid ones indicate synchronous behaviour.
Do you support Spray with Scala?
Yes, but Spray is not supported as a first-class Web framework by AppD, meaning that BT detection will not be automatic, E2E detection will have to be configured, and there is a good chance some custom correlation might be needed. IOW, this is a complicated environment.
Do you support Spray with Scala?
Yes, but Spray is not supported as a first-class Web framework by AppD, meaning that BT detection will not be automatic, E2E detection will have to be configured, and there is a good chance some custom correlation might be needed. IOW, this is a complicated environment.
Hadoop
an Apache project, also available as a commercially-supported product of Cloudera
Spark
An Apache project
Apache Spark is an open-source unified analytics engine for large-scale data processing. Spark provides an interface for programming entire clusters with implicit data parallelism and fault tolerance.
Storm
An Apache project, also available as a commercially-supported product from Hortonworks
Kafka
An Apache project, also available as a commercially-supported product from Hortonworks
Zookeeper
ZooKeeper is an open source Apache project that provides a centralized service for providing configuration information, naming, synchronization and group services over large clusters in distributed systems.
The goal is to make these systems easier to manage with improved, more reliable propagation of changes.
Cassandra
A database technology popular in Big Data platforms
HBase
default databse in Hadoop
Mesos
A resource negotiator, used by Zookeeper to ensure high availability in a big data platform
Apache Tarn
(not to be confused with Node.js Yarn packaging tool)
A resource negotiator, an alternate technology to Mesos
What kind of metrics can we see with Storm?
Storm exposes many JMX metrics, which we can configure for capture in AppDynamics and show on dashboards.
The customer informs you that their application is using some fancy classloader logic, and they want to detect BTs from classes in one specific class loader, even though the same class name is used in other class loaders. Is this possible?
Not without further information
You have discovered that the customer’s environment uses an OSGi container. What is your next step?
OSGi configuration is well-documented in the docs site.
As of October, 2016, what must you do to configure the Java agent to work with modules?
Modules have not appeared in any JDK shipping as of 2016, so there is nothing to do – you won’t see them until at least Java 9.
True or False: Java supports more than one type of classloading scheme
True
Relational Databases
row-oriented databases.
Strictly speaking, relational databases do not have to support SQL, but in practice all of them do
The common relational databases all have full OOTB support in AppDynamics, which gives metrics for connection pool usage and query times, as well as “sanitized” query text in snapshots. “Sanitized” refers to having the specific bind variable information hidden in the query text. Specific database products with full OOTB support include
Oracle
DB2
Sybase
PostgreSQL (aka “Postgres”)
SQL
Structured query language, the language of all of the relevant relational databases
NoSQL
Non-relational databases, which come in many forms:
Column-oriented (Cassandra)
Document (CouchDB - apache, CouchBase- commercial, MongoDB)
Key/Value (Voldemort, Memcached, Gemfire, Ehcache)
Bigtable (Apache Hbase)
Graph (Neo, Orient DB)
Key/Value
Non-relational database, really just fancy distributed caches