Graph database is a great tool for mapping and traversing data with relationships. But doesn’t RDBMS have relationships – one-to-one, many-to-one etc? Why should we go for graphs?
Its simple! Graph databases are best suited for those cases in which a graph comes to our mind instead of a table!
I finished the online course on Neo4J two days back. Its a really simple graph database, and a great starting point to experiment graph databases.
Now the NoSql databases I am familiar with are HBase(tried it about a year back), Redis and Neo4J.
Read and explore stuffs outside your domain. Happy coding :)
FasterXML Jackson is a great tool for converting objects to/from POJOs.
Its a great tool when we know the structure of JSON beforehand. But what if we don’t know that? In that case we can use a Map<String, Object> to store the unknown objects. Below two links provide useful info:
Happy Coding :)
Some times there might arise situations where you want to create a number of Spring Beans, but you don’t know how many beans are there at coding time.
Usually, you create a Spring bean as follows:
But what if you want to create 50 such beans which differ only in the argument supplied to the constructor? Or a similar case arise where the number of beans to be created cannot be determined at coding time?
In such cases, we can create the bean definitions and add the beans to Spring container at runtime using BeanFactoryPostProcessor.
Implement BeanFactoryPostProcessor in either a @Configuration file or a @Component bean(make sure this bean gets scanned and created).
If there are more than one constructor arguments, the call can be chained as follows:
All this works fine when you have to create a bean using constructor. But :( I haven’t figured out how to do this when we use a chain of factory methods to create a bean as follows:
Happy Coding! :)
There is a very good documentation in Jersey website: https://jersey.java.net/documentation/latest/jaxrs-resources.html and https://jersey.java.net/documentation/latest/filters-and-interceptors.html
Here is a small flowchart that I made showing how the JAX-RS flow works:
Happy coding :)
About two months back, me and a friend of mine went for trekking at Skandagiri Hills. Its about 75km from Bangalore near to Nandi Hills.
We started on my Yamaha Fz at about 2:30AM and reached there by 4.30AM. The place has got a few locals who are waiting there to get hold of your money in the form of parking and acting as guide! We parked (gave the guy Rs20/30 just to make sure he don’t destroy my bike) and dismissed the idea of having a guide. The trek started and we reached the top by 5.15 in the morning. The view was awesome!
Here is a map of the area and route to be taken. It’ll save you the cost of having a guide and give you a sense of adventure as you are finding way through pitch dark (if there is no moonlight ;)). Remember to take a good torchlight and a jacket. It’ll be very cold at the top. Its an easy trek. Once you find the muddy lane you can easily reach the top – you don’t require any guide! There is a small catch though – there is a route which you shouldn’t take – its marked in red colour. This red route is considerably wider and it reaches a dead-end! But what’s the fun if there is no thrill in finding the right way!
We started back by 10 in the morning. On the way back we stopped at a small Fort near Nandi hills – Fort Devanahalli. Took some pictures and then headed back to Bengaluru!
Now I should watch the remaining of the series.
Happy Coding and Keep smiling :)
And now, the previous blog post made me thinking… Why didn’t I learn .NET, C#, DirectX or other Microsoft technologies?
Maybe, because I am a fan of opensource platforms (excuse, I know there is Mono), languages and tools.
And maybe, there is a little Leftist hidden in me. (I would like to call myself opportunistic Leftist though :), and by the way I believe most of the Keralites have a soft corner for Communist beliefs – that’s why Kerala is one of the few states where Communists are still strong). And the words opensource and free software bring the thoughts of Freedom, independence and revolution to the mind.
Using Microsoft technologies, means tied to Microsoft platform and tools. I guess the leftist in me doesn’t want to get tied up.
PS: I switched back to using Windows a couple of years ago though. Was a hardcore Linux fan before. If I hadn’t I would have turned into a mad FOSS fanatic! Phew.. that didn’t happen, and am glad it didn’t!