Skip to main content

Tech Conversant Weekly Feb 13 - Feb 18

Topic: General                                                                                                                Level: All

Welcome to the world of cutting-edge technology! Every week, we bring you the latest and greatest advancements in the tech industry that are sure to leave you feeling inspired and empowered.

Stay ahead of the game and be the first to know about the newest innovations shaping our world. Discover new ways to improve your daily life, become more efficient, and enjoy new experiences.

This week, we've got some exciting news to share with you!

Junit 5 provides Nested annotation on test classes that are nested within a parent test, facilitating a place for prescribing for generic setup and tear-down methods. Modularizing the test hierarchically within the same test class.

GraalVM Native Image spawns platform-native executables that are the libraries reachable during the analysis stage of the build process, containing the classes that are directly compiled into executables, and statically initialized or inline by the compiler directly.
As the GraalVM generates executables, the libraries and their artifact version usage are abstracted making it difficult to analyze the scope and vulnerabilities associated if any.
This can be sidestepped by building the native executables with SBOM metadata embedded and holding the artifact information which could be parsed by tools like syft, gripe, or even by the GraalVM Native Image Inspection tool, which is in CycloneDX format, on Linux, Mac OS, and Windows and even in the containers.
Add native maven plugin in pom XML at the build phase with build args enabling the bom format and metadata information 

The default base repositories offered by Spring Data are the CrudRepository and the JpaRepository. Usually, we create entity-specific repositories by implementing these standard base repositories and defining the entity methods for which the Spring Data provides an implementation.
Alternatively, we can define our custom base repository by using the interface Repository and annotating the class with NoRepositoryBean and providing entity methods from the JpaRepository and CrudRepository with which we can enforce the developers not to use any of the base entity methods like flush and saveAndFlush and encapsulate any entity-specific method calls. 
We can also fragment the business JPA methods and entity JPA methods in separate interfaces and extend them to our base repository.
After defining a custom base repository it can be employed similarly to the Spring Data base repository and any method definitions will be implemented automatically by the Spring JPA-derived query feature.

Project Panama offers interoperability between the Java programming language and native libraries via foreign functions and memory APIs. Accesses memory resources in the off-heap memory or native memory and find execute native functions using method handles.
MemorySegment - allocateNative method - a continuous region of 64-bit memory that is spatially fixed length, temporal scoped, and thread confinement.
MemorySegment - FileChannel mapped memory, allocating memory only on use/writes and predefining space block during creation.
Arena - a slice of MemorySegment, openConfined and allocate offering isolated access and closing when the scope ends.
openShared allocateNative threads can share memory.
The above enables accessing and allocating memory in confined and shared models safely.
MemoryLayout - structLayout specifying the memory allocating layout in Arena of memorySegment. 
Invoking native C function - MethodHandle specifying the method to lookup with name and arguments, defining the Arena with allocate MemorySegment (similar to C struct)

Interoperability between primitive types and object types deviates from passing-by-value, autoboxing and unboxing, generics and streams often taking performance hits on conversions.
Due to the underlying distinction on Objects having an identity whereas the Primitives like boolean, char, byte, short, int, long, float, and double are directly allocated on the memory as any data resolves to these primitives, and Objects hold reference graphs to its member variables and to cut down on the hops of references we have to have the Obejcts and its associates without pointers this introduces a couple of problem statements similar to the deviations specified above, i.e., primitives are pass-by-value and objects are pass-by-reference.
Enter value classes (defaulting to null) without identity submitting to immutability and non-polymorphic behaviour and primitive classes (defaulting to primitive type and cannot be null) wrapping around primitive variables addressing the above shortcomings. 
IdentityObject and ValueObject allow us to determine runtime values on the kind classes that are worked upon. With the introduction of the .ref member enforces a standard way to get the reference type regardless

Disclaimer: 
This is a personal blog. Any views or opinions represented in this blog are personal and belong solely to the blog owner and do not represent those of people, institutions or organizations that the owner may or may not be associated with in a professional or personal capacity, unless explicitly stated. Any views or opinions are not intended to malign any religion, ethnic group, club, organization, company, or individual. All content provided on this blog is for informational purposes only. The owner of this blog makes no representations as to the accuracy or completeness of any information on this site or found by following any link on this site. The owner will not be liable for any errors or omissions in this information nor for the availability of this information. The owner will not be liable for any losses, injuries, or damages from the display or use of this information.
Downloadable Files and ImagesAny downloadable file, including but not limited to pdfs, docs, jpegs, pngs, is provided at the user’s own risk. The owner will not be liable for any losses, injuries, or damages resulting from a corrupted or damaged file.
  • Comments are welcome. However, the blog owner reserves the right to edit or delete any comments submitted to this blog without notice due to :
  • Comments deemed to be spam or questionable spam.
  • Comments including profanity.
  • Comments containing language or concepts that could be deemed offensive.
  • Comments containing hate speech, credible threats, or direct attacks on an individual or group.
The blog owner is not responsible for the content in the comments. This blog disclaimer is subject to change at any time.

Comments

Popular posts from this blog

Tech Conversant Weekly Jul 03 - Jul 15

Topic: General                                                                                                                                              Level: All Welcome to the world of cutting-edge technology! Every bi-week, we bring you the latest and most incredible advancements in the tech industry that are sure to leave you feeling inspired and empowered. Stay ahead of the game and be the first to know about the newest innovations shaping our world. Discover new ways to improve your daily life, become more efficient, and enjoy new experiences. This time, we've got some exciting news to share with you! Boosting Java startup with Class Data Sharing (CDS) https://www.youtube.com/watch?v=vvlQv1Dh-HU JDK21 LTS Maintenance and Support https://www.youtube.com/watch?v=3bfR22iv8Pc Health checking of multiple cloud applications with Spring Cloud Gateway https://spring.io/blog/2023/07/05/active-health-check-strategies-with-spring-cloud-gateway Functional Style Non-reactive HTTP clie

Tech Conversant Weekly Jun 19 - Jul 01

Topic: General                                                                                                                                              Level: All Welcome to the world of cutting-edge technology! Every bi-week, we bring you the latest and most incredible advancements in the tech industry that are sure to leave you feeling inspired and empowered. Stay ahead of the game and be the first to know about the newest innovations shaping our world. Discover new ways to improve your daily life, become more efficient, and enjoy new experiences. This time, we've got some exciting news to share with you! Modelling common behaviors between the List and the Set interface has been partially provided by LinkedHashSet. Now from JDK21 with the new interface SequencedCollection extending the Collection interface and is also extended by the List, SortedSet via SequencedSet (for reversal operation), Deque. The SequencedMap interface extends the Map interface by providing the below me

Microservices - Design Patterns

Topic: Software Design                                                                                                        Level: Intermediate Microservices - What? Microservice is a software design methodology, delegated to perform an isolated decoupled single functionality (following the Single-Responsibility Principle from object-oriented SOLID design principles).  Moreover, microservices by design, are decoupled making it easy to develop, test, maintain, deploy, configure, monitor and scale modules independently. Microservices - Why? Having one microservice would not be helpful without it being able to interact with other microservices, to aid in bringing an end-to-end business solution. So arises a question, how can I design a software system that is resilient, decentralized, fault-tolerant, scalable, maintainable, and extensible that complies with the microservice architecture? Design Patterns - What? Design patterns are solutions for commonly occurring problems within a given