Skip to main content

Architectural view of comparing framework Internals

Architectural view of comparing frameworks Internals of Java and .NET. In this article i would compare code loading process in java and .Net. I would also highlight few of the differences.


Code Loading in Java

The Java platform is based on a virtual machine that abstracts the underlying operating system and makes it possible to safely run programs across heterogeneous computing platforms. The Java virtual machine interprets portable byte code delivered in the form of class files. Class files are dynamically loaded into the virtual machine following an explicit search order. The actual run-time mechanism used to load classes in the virtual machine  is an instance of the ClassLoader class, which is a special class used by the Java platform to load  other classes. All class loaders have a parent class loader, except for the bootstrap class loader. By default, child class loaders delegate class load requests to their parent class loader and only if the parent does not find the class will the child search for the class itself. When a Java application is started, the application's main class is loaded with a default application class loader instance, which ultimately delegates to the boot class loader. It is possible for applications to provide custom subclasses of ClassLoader to perform specialized searches for classes, such as searching remote repositories. It is through class loaders and class loader customization that Java popularized or, at the very least, brought dynamic code loading to the masses.


Code Loading in .NET


Microsoft's .NET platform is similar to the Java platform in many respects, but some significant differences do exist. First, the .NET virtual machine was designed to supports multiple programming languages (e.g., C#, J#, VB.NET, and Visual C++ .NET), whereas the Java virtual machine was only designed to support Java, although other languages for it do exist (e.g., SmalltalkJVM, Groovy, Jython, JRuby, and Nice). In .NET, all languages run on the Common Language Runtime (CLR). The CLR uses a portable language format, called the Microsoft Intermediate Language (MSIL), which is analogous to Java's byte code. High-level languages are compiled into MSIL, which is then compiled into the native code of the underlying computing platform at load time, similar to how Just-In-Time (JIT) compiling works in Java. Unlike anything in Java, the CLR is able to retain assemblies in a Global Assembly Cache (GAC) for later reuse and version management. The official .NET platform is from Microsoft. Microsoft also provides a “shared source” implementation, called Rotor.
In .NET, applications and their components are packaged into assemblies. An assembly is .NET's unit of reuse, versioning, security, and deployment. An assembly is one or more files representing types and resources and is described by a manifest. An assembly manifest is represented in XML and contains information such as version number, natural language, and content hashes. Hashes come into play when calculating an assembly's signature using public key cryptography, which is also referred to as the strong name of the assembly and it is used for identification and security purposes. Assemblies can be dynamically loaded,
but, unlike Java class packages contained in JAR files, it is not possible to load individual types or classes
from an assembly.


  • In Java, the unit of code loading is a class; in .NET, the assembly is the unit of code loading, which may contain many types.
  • In Java, the compiler does not record explicit dependencies among classes, which can be arbitrarily resolved at run time; in .NET, assembly dependencies are explicitly recorded at compile time, making them difficult to resolve differently at run time
  • In Java, the class search order is nearly completely customizable via  class loaders; in .NET, class/assembly searched order controlled by more sophisticated policies that complicate implementing custom search orders.
  • In Java, the deployment unit does not form part of the class name; in .NET, the assembly name forms part of the contained type names, ultimately reducing provider substitutability.

Comments

Popular posts from this blog

Cybersecurity Threats in Connected and Automated Vehicles based Federated Learning Systems

  Ranwa Al Mallah , Godwin Badu-Marfo , Bilal Farooq image Courtesy: Comparitech Abstract Federated learning (FL) is a machine learning technique that aims at training an algorithm across decentralized entities holding their local data private. Wireless mobile networks allow users to communicate with other fixed or mobile users. The road traffic network represents an infrastructure-based configuration of a wireless mobile network where the Connected and Automated Vehicles (CAV) represent the communicating entities. Applying FL in a wireless mobile network setting gives rise to a new threat in the mobile environment that is very different from the traditional fixed networks. The threat is due to the intrinsic characteristics of the wireless medium and is caused by the characteristics of the vehicular networks such as high node-mobility and rapidly changing topology. Most cyber defense techniques depend on highly reliable and connected networks. This paper explores falsified informat...

MLOps Drivenby Data Quality using ease.ml techniques

 Cedric Renggli, Luka Rimanic, Nezihe Merve Gurel, Bojan Karlas, Wentao Wu, Ce Zhang ETH Zurich Microsoft Research Paper Link ease.ml reference paper link Image courtesy 99designes Developing machine learning models can be seen as a process similar to the one established for traditional software development. A key difference between the two lies in the strong dependency between the quality of a machine learning model and the quality of the data used to train or perform evaluations. In this work, we demonstrate how different aspects of data quality propagate through various stages of machine learning development. By performing joint analysis of the impact of well-known data quality dimensions and the downstream machine learning process, we show that different components of a typical MLOps pipeline can be efficiently designed, providing both a technical and theoretical perspective. Courtesy: google The term “MLOps” is used when this DevOps process is specifically applied to ML. Diffe...

An Efficient Algorithm for Cleaning Robots Using Vision Sensors

 Abhijeet Ravankar , Ankit A. Ravankar , Michiko Watanabe and Yohei Hoshino Paper Link image Courtesy: the Verge Public places like hospitals and industries are required to maintain standards of hygiene and cleanliness. Traditionally, the cleaning task has been performed by people. However, due to various factors like shortage of workers, unavailability of 24-h service, or health concerns related to working with toxic chemicals used for cleaning, autonomous robots have been seen as alternatives. In recent years, cleaning robots like Roomba have gained popularity. These cleaning robots have limited battery power, and therefore, efficient cleaning is important. Efforts are being undertaken to improve the efficiency of cleaning robots.  The most rudimentary type of cleaning robot is the one with bump sensors and encoders, which simply keeps cleaning the room while the battery has charge. Other approaches use dirt sensors attached to the robot to clean only the untidy portions of ...