Topic: General Level: All
In this post, we shall catch up on the multi-faceted technological updates that happened over the past week as well as a few that seized my attention,
Type annotation and receiver parameter from JDK 8, offer a compilation validation guideline. In combination, template design can be attained by formalizing the client implementation to follow.
https://www.objectos.com.br/blog/objectos-weekly-008-the-java-receiver-parameter.html
https://www.objectos.com.br/blog/objectos-weekly-008-the-java-receiver-parameter.html
With flapMap on the streams API, operations can be performed on the inner collection, ie list within a list
Jakarta MVC on top of Jakarta REST presents decoupled web-based requests handling architecture
JDK 20 Project Loom's ScopedValue vs. ThreadLocal
ThreadLocal enables sharing data across multiple members of the application, however, they are,
1. Globally Mutable with the set method
2. Memory intensive as newly created threadlocals copy from the previous threadlocal data causing duplicates in threads
3. Map data structure is utilized for handling the threads as keys and values as the values that are set, unremoval of map entries might cause memory leaks
4. ExecutorServices pool the threads and kept alive as long as the application is alive, making the threadlocal variable alive as well
Virtual threads ScopedValues are,
1. Immutable and share memory references
2. Bounded by callables
3. Restricted to the execution of the callable
4. Valid only within the call method of callable else default can be specified
5. Can be created via a platform, virtual threads, executor service, structured concurrency types
6. Rebinding for several ScopedValue is possible on the identical thread
https://youtu.be/fjvGzBFmyhM
ThreadLocal enables sharing data across multiple members of the application, however, they are,
1. Globally Mutable with the set method
2. Memory intensive as newly created threadlocals copy from the previous threadlocal data causing duplicates in threads
3. Map data structure is utilized for handling the threads as keys and values as the values that are set, unremoval of map entries might cause memory leaks
4. ExecutorServices pool the threads and kept alive as long as the application is alive, making the threadlocal variable alive as well
Virtual threads ScopedValues are,
1. Immutable and share memory references
2. Bounded by callables
3. Restricted to the execution of the callable
4. Valid only within the call method of callable else default can be specified
5. Can be created via a platform, virtual threads, executor service, structured concurrency types
6. Rebinding for several ScopedValue is possible on the identical thread
https://youtu.be/fjvGzBFmyhM
Understanding SQL helps in building an efficient and to-the-point implementation of JPA/Hibernate ORM domain models, with appropriate abstract queries eliminating the DB vendor lock-in.
jOOQ and BlazePersistence let's build queries programmatically in API style.
Combining SQL, JPA, and jOOQ reasonably for the business specifications without hard focus on a single implementation is a promising pattern for building flexible, compatible, and maintainable applications, that are easy to evolve as business requires.
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.
Comments
Post a Comment