devxlogo

upload

How to Use FetchMode.JOIN to Fetch Collection

By annotating an associated collection with FetchMode.JOIN we force it to be loaded EAGER: @OneToMany(fetch = FetchType.LAZY)@Fetch(FetchMode.JOIN)private List = new ArrayList(); Or: @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = “foo_id”) @Fetch(FetchMode.JOIN) private

How is HeapHero different?

 There are excellent Heap dump analysis tools like Eclipse MAT, Jprofiler, … These tools are handy when you want to debug/troubleshoot OutOfMemoryError. However, we HeapHero as following unique capabilities which aren’t available in those tools:  1. How much memory wasted?    HeapHero tells you how much memory your application is wasting because of inefficient programming practices by the developers. Today memory is wasted because of reasons like: a. Duplication of stringsb. overallocation, and underutilization of data structuresc. Boxed numbersd. Several more reasons.  You can see HeapHereo reporting how much memory is wasted even in a vanilla pet clinic spring boot application. Other tools don’t provide this vital metric.  2. First cloud application for heap dump analysis  Today’s memory profiling tools need to be installed on your Desktop/Laptops. They can’t run on the cloud. HeapHero can run on  a. Public cloud (AWS, Azure,..)b. Your private data centerc. Local machine Your entire organization can install one instance of HeapHero in a central server, and everyone in the organization can upload and analyze the heap dump from this one server.  3. CI/CD pipeline Integration   As part of CI/CD pipeline, several organizations do static code analysis using tools like coverity, vera code… . Using HeapHero, you can do runtime code analysis. HeapHeroprovides REST API. This API returns JSON response, which contains key metrics related to your application’s memory utilization. You can invoke this API from CI/CD pipeline and see whether your code quality is improving or regressing between each code commit.  4. Instant RCA in production  Debugging OutOfMemoryError in production is a tedious/challenging exercise. You can automate the end-end analysis of OutOfMemoryError using HeapHero. Say if your application’s memory consumption goes beyond certain limits or experience OutOfMemoryError, you can capture heap dumps and do heap dump analysis instantly using our REST API and generate instant root cause analysis report. Production troubleshooting tools like ycrash leverages HeapHero REST API to do this analysis for you.  5. Analyzing heap dumps from remote location  Heap dump files are large in size (several GB). To troubleshoot the heap dump, you have to transmit the heap dump file from your production server to your local machine. From your local machine, you have to upload the heap dump file to your tool. Sometimes heap dump might be stored/archived in remote server, AWS S3 storage,… In those circumstances, you will have to download the heap dump from that remote location and then once again upload it to the tool. HeapHero simplifies this process for you. You can pass the heap dump’s remote location URL as input to the HeapHero API or to web interface  directly. HeapHero will download the heap dump from this remote location to analyze for you.  6. Report Sharing & Team collaboration  Sharing Heap Dumps amongst team is a cumbersome process. Finding a proper location to store the heap dump file is the first challenge. The team member with whom you are sharing this report should have the heap dump analysis tool installed on his local machine. So that he can open the heap dump file with the tool you are sharing to see the analysis report. HeapHero simplifies this process. HeapHero gives you a hyperlink like this. This hyperlink can be embedded in your emails, JIRA, and circulated amongst your team. When your team member clicks on this hyperlink, he can see the entire heap dump analysis report on his browser.  HeapHero also lets you export you heap dump as PDF file. This PDF file can also be circulated amongst your team members. 7. Analyze large size heap dumps  Several memory profilers are good at analyzing heap dumps of smaller size. But they struggle to analyze large size heap dumps. HeapHero is geared to analyze heap dumps easily.  Author bioEvery single day, millions & millions of people in North America???bank, travel, and commerce???use the applications that Ram Lakshmanan has architected. Ram is an acclaimed speaker in major conferences on scalability, availability, and performance topics. Recently, he has founded a startup, which specializes in troubleshooting performance problems.

Passing a function instead of a function???s result to an another function in Python

Dear Editors,I sent an email to [email protected] on December 1 with an attached tip ???Passing a function instead of a function???s result to an another function in Python???.I used to use her email address a number of years ago. I would like to know if the tip was received and what is its status.My email is [email protected]. Thanks,Boris Eligulashvili

Convert number to string in Python

To convert, e.g., the number 144 to the string ???144???, use the built-in type constructor??str()

Memory wasted by Spring Boot application

One of the widely wasted resources in the world today is: Memory. Due to inefficient programming, surprising (sometimes ???shocking???) amount of memory is wasted. We see this pattern repeated in several enterprise applications. To prove this case, we conducted a small study. We analyzed the famous spring boot pet clinic application to see how much memory it is wasting. This application has been designed by the community to show how the spring application framework can be used to build simple but powerful database-oriented applications. 

Write A Guest Post to the DevX

 Hello Editor, I am Rooney Reeves working as a Business Development Executive at eTatvaSoft. I’m writing to become more actively involved with your publication and I’d love to contribute a guest post on your website. For my writing skill, You can check out some of my published article links as listed below:     https://readwrite.com/2019/03/20/iot-and-ar-are-found-revolutionizing-the-world-of-mobile-apps/     https://blogs.sap.com/2019/01/21/combining-iot-with-custom-mobile-apps-is-it-an-opportunity-or-a-roadblock/     https://codepen.io/lisadawson/post/why-is-angularjs-going-to-be-the-hot-favorite-among-web-developers     https://www.devsaran.com/blog/react-development-framework-taking-over-front-end-development     https://www.getelastic.com/6-digital-payment-trends-to-keep-an-eye-on I’ve been brainstorming some topics that I think your readers would get a ton of value. I’d like to pitch that topics which I think would be of interest to your readers. Here are the details: Topic 1: Angular 2 ??? Learn The Role Of Different Zones Topic 2: Laravel 5: Repositories and Services- How To Use Them? Topic 3: Angular 2- How To Protect Routes Using Guards If you don’t like the topics, we can always switch to something more suitable. I’ll make sure the piece overflows with information that can’t be found. What do you think? Would that be of interest?

CompTIA Certifications Exam – What You Should Do For Preparation

Just passing the CompTIA Certification Exams can seem like a huge and daunting obstacle. The good news is there are lots of steps you can take to make sure you???re as prepared as possible. As with any exam, preparation is the key to success. Here are some of the top tips for getting ready for the CompTIA certification exams.???   Read it, Read it, Read it All!Even if you???re more of a hands-on learner, it pays to read up on material that???ll be on the exam. Because text books are often prohibitively expensive, it pays to reach out to your local library to see what kind of books they have on the subject. Cruising the thrift shops is another way to find helpful material. Many people pass their books off to one of these shops once they???re done studying for their own exam.???   Write It DownWhether studying on your own, or taking a series of classes, one of the most effective ways to commit something to memory is to write it down. Once you have a good variety of notes, comb through them carefully for the most relevant information and use it to make your own study guide.???   Get Hands-On ExperienceWhile it doesn???t make sense to go out and buy ten of the latest, greatest pieces of hardware so that you can practice your skills, you can cruise yard sales, classified ads, and thrift shops for older pieces of hardware. The older technology isn???t going to be on the exam, most likely, but if you can get an ancient hard drive networked, you???ll probably have a much better chance at figuring out what???s wrong in a newer setup.???   Practice, Practice, PracticeThere are lots of great resources on the internet, including CompTIA practice tests. Take advantage of them! Practice tests can help familiarize you with the style of the test, as well as give you some insight as to what kinds of questions you???ll be answering on the real thing.You also have a good opportunity to better understand networking through your own in-home devices. Look at how your computers link up on your home network. Take apart an old modem and get a better understanding of connections and routing issues, or use these exercises as a refresher before taking the exams. The technology that you use every day can help give you a better practical understanding of networking and security issues and how to deal with them.???   Use Your HeadSome of the questions you???ll encounter on the CompTIA Exams will be multiple choice. Even if you don???t know the right answer, you might be able to use logic and common sense to eliminate some of the incorrect answers. This will give you a better chance of picking the right answer from the remaining options.

TCP: out of memory — consider tuning tcp_mem

Recently we experienced an interesting production problem. This application was running on multiple AWS EC2 instances behind Elastic Load Balancer. Application was running on GNU/Linux OS, Java 8, Tomcat 8 application server. All of sudden one of the application instances became unresponsive. All other application instances were handling the traffic properly. Whenever HTTP request was sent to this application instance from the browser, we were getting following response to be printed on the browser.