ποΈ Hugging Face models with Ollama and Testcontainers - DevTips Weekly #6
Web Applications Deployment, Region Pinning in Java 22, Backend for Frontend (BFF), and Data-Oriented Programming
Welcome to another issue of DevTips Weekly (#6)! π° This week, I have handpicked articles and resources to keep you at the forefront of technology.
The most interesting one for me was the official π³ Docker team blog article: βHow to Run Hugging Face Models Programmatically Using Ollama and Testcontainersβ. We will also see two great πΊ videos about βDifferent Approach to Deploy a π Web Appsβ and βData-Oriented Programming in β Java 21β. Stay with me to review these articles from last week.
How to Run Hugging Face Models Programmatically Using Ollama and Testcontainers
This blog post on π³ Docker's website explains how to run π€ Hugging Face models using πͺ Ollama and π Testcontainers, making AI integration simpler for developers. It covers setting up Ollama containers, downloading models, and handling container persistence. Additionally, it introduces custom containers for using Hugging Face models in various applications, emphasizing ease of use, programmatic access, and reproducibility. This approach leverages Dockerβs containerization to streamline AI/ML model deployment.
JEP 423: Introducing Region Pinning to G1 Garbage Collector in OpenJDK
The InfoQ article discusses JEP 423, which introduces region pinning to the G1 garbage collector in OpenJDK and has been integrated into β Java 22, aiming to reduce GC latency. This enhancement allows specific memory regions to be pinned during garbage collection operations, preventing critical objects from being moved and thus avoiding the need to disable GC. This development significantly reduces latency and improves Java's interoperability with unmanaged languages like C and C++ by handling Java Native Interface (JNI) critical regions more efficiently.
Best Architecture for Your Next Project, Framework Doesnβt Matter!
This article emphasizes that πchoosing the right architecture is more crucial than the frameworkπ for project success. It introduces the "Backend for Frontend" (BFF) pattern, which customizes backend services for different client needs, enhancing performance and user experience. By handling backend calls and data transformations, BFF simplifies complex frontend demands, promoting scalable and maintainable project development.
How to Deploy a Web App Using Multiple Methods (Azure, Render, MongoDB Atlas, Koyeb, and more)
This video provides a comprehensive guide on deploying π web applications using various platforms and technologies. The instructor demonstrates step-by-step processes for deploying applications on platforms like Render, MongoDB Atlas, Koyeb, and Azure.
Spring Tips: Data Oriented Programming in Java 21+
This video explores data-oriented programming in β Java 21 and later versions. It highlights the shift from monolithic codebases to smaller, service-oriented architectures that respond to data and messages. The video introduces four ποΈ key features in Java 21 that support this paradigm: sealed types, records, pattern matching, and smart switch expressions. These features enhance the languageβs ability to handle new workloads and service styles, making code more efficient, elegant, and type-safe. The video includes practical examples, such as handling financial instruments like loans, to demonstrate the benefits of these features.
ποΈ Previous issues of the DevTips Weekly
You can also support me in buying a latte βοΈ !(one time or monthly):