Prabakar Kalivaradan

Greenhorn
+ Follow
since Dec 12, 2011
Prabakar likes ...
Google Web Toolkit Eclipse IDE Chrome
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
1
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Prabakar Kalivaradan

Company: http://trimble.com

Location: Tidel Park, Chennai, India

Product: Web hosted solution that interacts with various Trimble products, android, iphone and blackberry devices.

Positions Open:

Developers:

3-6 yrs - 1 open position
7-10+ yrs - 1 open position(java architect)

Testing:

3-6 yrs - 2 open positions
7-10 yrs - 1 open position

Dev Skills:

Strong Core java, multi threading, Collections, OOPS, OOAD, ExtJs, Object Oriented or advanced javascript development experience, Server side frameworks such as Spring, RESTful services, Hibernate, struts, Junit, MySQL, Groovy.

Test Eng Skills:

Excellent experience required to own up a vast product from QA side. Automation scripting experience is added advantage to create and manage test servers. Experience in web/java based application testing with quality control experience for production code running in public internet domain.

Send your resumes to: prabakar.prabakar@gmail.com

PS: Those who can join in a month are preferred.
PS1: Developers will be asked to write a program to demonstrate thread communication and core java 'language fundamentals' is absolute necessity(even if you are an experienced developer).
11 years ago
Hi Himanshu,

Perm Gen is non heap area alright, but is used to store class definitions. So, may be you could introduce intelligence in the system to periodically and explicitly unload unwanted class definitions from JVM if you can't stop using reflections. Also, try replacing string manipulations with StringBuffer/StringBuilder. Even such trivial changes might give you surprising results.

But then you can tell whether this is gc settings problem or it is actually a genuine memory issue for the current design right? Even if GC works at its best it may not help your problem. If that is the case you have to start tweaking reflection/string-manipulation code areas and parallelly pushing your higher-ups for design change, eh?

As Winston says, it makes sense to put your efforts in the right area.
12 years ago
Hi,

Read the GC white paper - it would help you a great deal.

http://java.sun.com/j2se/reference/whitepapers/memorymanagement_whitepaper.pdf

Now here is my thought process with the problem at hand.

1. Lot of reflection usage means lots of class definitions are being loaded
2. Perm Gen is associated with storage of class/method definitions in old generation
3. Golden rule - let the JVM automatically set/change gc related params and algorithms than we specifying it. To do this give JVM the expected performance goals rather than configuring the algorithms by yourself
4. NewRatio=2 is suggested for client JVMs. For severs the recommended value is 8. Makes sense because your perm gen needs more space than new generations.
5. Give as much memory as possible, and specify performance(in terms of memory or throughput) goals using XX switch and let JVM roll. Such goal params are -XX:MaxGCPauseMillis and -XX:GCTimeRatio

12 years ago
Client side java code is going to be translated into pure http/javascript code, so it cannot read property files. However, one can use GWT-RPC mechanism to let a servlet read a properties file and send it to client as HashMap/Hashtable object to client side.
12 years ago
GWT
Well, if you want the second tab to fetch the text from the first tab (instead of getting it from the server), send the text to the second tab composite while you upload the text from first tab to server. That way it is cleaner. Define certain interface for second tab composite to take text inputs. You can easily get the component sitting in each tab as well. So sending data from one tab to another tab, shouldn't be a problem.
12 years ago
GWT
Hello,

What it means to implement GWT RPC?

Write a servlet on server side. Everything works like a magic. This is what a GWT RPC gives you. All your client UI code does is get java objects from the GWT Servlet and work with java objects. You wouldn't need to handle HTTP requests, parsing the data or json format or anything else. Your client code remains a pure java code working with java objects alone.

GWT Servlet takes care of translating java objects which are transported to client side, as http requests automatically. So, you need not bother.

Now then, to plugin into spring; yes it is like as you mentioned. For certain views(url patterns), redirect the requests in spring to gwt guy. If you look at how to implement your gwt servlet for RPC, you will know that, the servlet is configured to serve a paritular url pattern.

Good luck!
12 years ago
GWT
Hi shouib mohammed,

Your program is not utilizing thread synchronization properly. Otherwise, it would work properly even for infinite number of iterations....

Say Threads A and B want to communicate with each other. They have a common data to share. They communicate through the common data. In your case, Pipe. A puts a number in the pipe and B reads it. So, you need to synchronize any code that tries to read the pipe or that tries to modify/write the pipe. And you need to use the data object(pipe) as the lock which would control access to the pipe. It is general practice to use shared data itself as lock and any read/write methods would be put in the data object class itself so that those methods can be synchronized.

Now, then, the waiting part, A should write a number into the pipe and call lock.notifyAll() to alert thread B. Here lock is your pipe object. Thread B in the meantime, was waiting by checking the pipe. While the pipe is empty, B should wait by calling lock.wait(). Something like " while(pipe.isEmpty()) pipe.wait(); " in an infinite loop. When pipe is not empty, it can read the pipe and then signal A to write next item by calling pipe.notifyAll(). Thread A also waits for pipe to become empty in a similar while loop as mentioned above, and when the pipe becomes empty it writes a new number into the pipe and signals B again.

Now, even after reading the above you wouldn't be able to code your program properly because, the above logic consists of certain code block that comes inside synchronized(pipe){} block. You should know which code lines have to be synchronized and which should be outside synchronized block. That is, basically the run methods of your two threads I'm talking about.

So, learn them first and then fix your problem. Good luck!
The exception says index 0 is not accessible. That can occur in the following scenario.



Start looking from osProject.DesignInterface.addJobSpecs(DesignInterface.java:153) method...
12 years ago
Hi,

I noticed the trail marks disappear, after the mouse movement. Also the JComponent.setBounds() method API says "This method changes layout-related information, and therefore,
invalidates the component hierarchy." which doesn't happen as soon as the sliding panel moves to the new location. Though I don't understand why there is a delay in invalidating the component hierarchy, it made easy to get a workaround. Calling repaint() manually as shown below, fixes the problem. Hope this helps.

12 years ago
core pool size - size of the thread pool(no.of worker threads working in parallel) in normal situation
max pool size - pool size can go up to this point if thread pool is busy(means all workers are busy and more jobs are there waiting and in this situation, new workers will be created); but it always attempts to stay at core size whenever idle threads present
queue size - is the no.of jobs waiting to be processed by the worker threads; when the queue is full and all worker threads are busy, no additional jobs can be submitted to the pool

worker threads - threads that are waiting for the jobs; they keep executing the available jobs in the queue, and when there are no more jobs to be done, they sit idle, but jump to work at the first sight of any new job

Have Fun.
Have you tried Kathy Sierra's SCJP book?
Hi,

Some Serialization basics:

1. Every serialized class should implement either Serializable or Externalizable
2. All non-static non-transient objects members reachable from saved object should be serializable
3. If a class doesn't implement Serializable or Externalizable directly (though its super class implements), any data member that is not serializable will result in NotSerializableException
4. Thread objects are not serializable and any reference by the saved object will cause NotSerializableException
5. Marking a non-serializable field as 'transient' for sure skips it during serialization and should not cause any issues
6. A class should not depend on super classes or subclasses for it's serialization to work properly. It has to take care of everything itself

So, unless you give us the complete source code of the class in question, we can't debug your issue.
12 years ago
I think GWT gives best performance for large scale projects. Google uses GWT heavily in it's web interfaces as far as I know (Gmail uses GWT as I hear).
12 years ago
GWT
So, whatever is the condition of the thread, it has to honor the regular lock acquisition rules. I got it.

Thank you very much Mike