Why does spring batch's MongoItemWriter not use org.springframework.data.mongodb.core.BulkOperations? - spring-batch

I would think it would perform much better. Is there some guarantee I'd lose using that?

I see no reason why it could not use bulk operations. Feel free to open an issue and contribute the improvement if you want.
Is there some guarantee I'd lose using that?
No, you should have the same results.

Related

Replacing top-head.jsp Liferay with a custom one

In portal-normal.ftl I use top-head.jsp is it possible to replace it and use the custom page?
Yes, it is. In general, you can customize everything in Liferay.
However, this and your other question make me believe that you are going for the wrong solution to whatever problem you have. If you look at top_head.jsp, there is a lot of functionality made available on every page. Unless you're prepared to lose it all, you'll have to replace it with your own implementation.
In order to add something to top_head.jsp, you should use one of the two offered dynamic includes.
While a simple "yes" fully answers your question, it might be more productive to let us know about the underlying problem that you're intending to solve with this technique. I bet that there's a better solution for it, and especially one that is a lot easier to maintain.

Difference between Lock and synchronize

In an interview I was asked about the difference between Lock and synchronize.
Which will I should prefer.
Logically I find both as same. We can achieve all the task using any of them. But not able to answer what he wants to listen.
Locking and Synchronize achieve the same thing, but synchronize is less efficient. You can read more about why synchronize is expensive in java from this answer here: Why are synchronize expensive in Java?

unhappy with MySQL workbench 5.2

Is there a better option for windows out there?
I come froma MS SQL-Server environment so something that's similar to their editor would probably be most preferable.
What capabilities are you looking for.
MySQL Workbench evolves really quick and the 5.3 should be out fairly soon.
I don't think there's anything comparatively good unless you simply use phpmyadmin...
The 5.3 should be out soon with its load of fixed bugs.
What don't you like with it. Maybe I can help if I understand.
I don't think there's a better option for you if you have to work with MySQL.
I agree with you: MySQL Workbench generally could behave much better; some operations simply produce no output leaving you wondering what happened. If you're used to Microsoft SQL Server, you'll likely miss the capability to run several queries in one code editor window, producing several outputs at the same time. This is the biggest usability drawback, in my opinion.
There are some things MySQL does better though, so it's a mixed bag.

How do you evaluate a framework, library, or tool before adding it to your project?

There's so many cool ideas out there (ninject, automapper, specflow, etc) that look like they would help but I don't want to add something, tell others about it, and try using it just for it to be added to the growing heap of ideas that didn't quite work out. How can I determine if the promised benefits will happen and that it won't end up as something to be ignored or worked around?
Have a problem
Identify the cost of having the problem, or the value to solving it
Prioritize it against other problems
When it's the top priority, look for a solution that solves the problem with a proportional cost
Do you have the problem that ninject solves? Is it an important problem to solve? Is it the most important? What value will you get from solving it?
I don't think that you can tell whether any framework will deliver your expectations until you try it, and try it in anger and in context. This is usually time consuming and inevitably you'll have a few misses before you get any hits. Don't commit yourself by working through a simple sample from the authors website or howto files; these will always work and may impress but until you try to use the framework in the context of your billion user, multi-lingual, real-time on- and off- line application you're not going to find it's shortcomings.

Choosing noSQL - availability priorited

We have thought a bit about running a noSQL database for our next project. However, we're not sure about which platform that will give us the best possible availability and has the best built-in replication features/functions to provide this - with the least headache.
Right now, Cassandra appears as the best candidate, but we would like to hear more about this from someone that have more experience in this area, then we do.
Thanks a lot!
High availablity will most likely be achieved with a Dynamo clone.
Cassandra is a good option although it has been bashed recently by several early adapters.
Project Voldemort is also Dynamo-based and therefore easily optimized for high-availability, it's what LinkedIn are using.
Another interesting noSQL option might be membase, I myself didn't use it but their notion of virtual buckets for rebalancing as opposed to just consistent hashing makes a lot of sense and would appear to provide more robust high-availability.