Andy Zhu

Ranch Hand
+ Follow
since May 26, 2004
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
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 Andy Zhu

I am not quite sure understanding your question. I guess different clients act as different "threads" throw networking. If you use socket, you may have to programming threading explicitly. However, if you use RMI, I don't think you need to. There should be some way to queue clients in RMI, if you prefer to.
Hey, I passed my scjd and received my certificate document in mail days ago. But when I looked it, it doesn't bear any stamp on it. In my scjp certificate, it has a silver steel stamp. but my scjd doesn't. Is this the way it should? or there is something wrong with my document?

Thanks very much
Hey, Kashif Riaz:

thanks for paying attention to my posting and commenting on it.

I have a different view about the issue: I agree experience is valuable. However, experience != # of years of paid commercial work. My classmate got into a leading IT consulting firm after graduation, working with colleagues of several working years. However, he has been a major tech person in their division after 3 months of work because of the rigorous and formal training in our program. He doesn't even have a scjp and he actually discouraged me when I was preparing. But the point here is experience is not the time of working. In practice, there is dilema: a couple of hours of interview is not sufficient to evaluate experience; thus it is just down to the point to measure the working time. And I have more supporting stories from my friends and myself.

However, as a straight tech person, there are some drawbacks: many may not have business training, may not have a good training to express themselve well (worse has to do it in a pressing time limit of a couple of hours), may not have some soft skills, ... I think some of these traits are what those companies look for. This is part of reasons we see more "less teches" do heavier tech work in those companies.

However, I believe for those straight techers who survived rigorous training of "hard skill" are capable to learn the "soft skill" given a chance. Part of hard training can be certificate, if you have a scjd you know what I mean.
15 years ago
IMO, even this idea is disgusting. This is an ethical issue. I don't know if Sun clearly states it or not. Just like taking exam in school, the super doesn't always state cheating is illegal before the test. But look this biggest scjd forum policy: you can't even post a lengthy code segment here for the question you ask. How could you expose your whole code source to get a full review, no matter whether it is free or charged.
Please, don't undermine yourself, don't undermine this forum, don't undermine this community, and don't undermine the reputation of scjd.
I think Joe talks about the cookie used in locking mechanism not the very first bytes on the data file.

It doesn't matter how the mechanism you use to get this cookie value, it got to be some value to uniquely identify a client which is doing the critical process on the server. Some mechanism is easier than others. Search the forum you will find one. I have a specific posting on this issue and get 80 over locking using the mechanism I proposed and proved it correct.

When getting a specific RecordLock, the code is synchronized on both the LockCollection and the specific RecordLock object.



But this is to eliminate your effort of record locking. See:
lock LockCollection -> lock RecordLock -> do something -> unlock RecordLock -> unlock LockCollection

is equivalent to:
lock LockCollection -> do something -> unlock LockCollection.

Although looking back at my code now, I don't think the synchronization on the LockCollection is even required in that situation, because the only change to the collection can be the creation of new records.



How about deleteRecord? It should modify the LockCollection.

... with same order, there is no risk of a deadlock there.


This is true. Only case I think of is the simultaneous call of update from thread A and delete from thread B. This won't cause deadlock given the above 2 locking processes existing in data access layer.
I used multiton in my data implementation and used static object to generate a common lock object for the multiton objects to synchronize.

For create I indeed had to make an exception, because locking on a record that does not yet exist is of course impossible. In that case I synchronized on my LockCollection class (which is the singleton collection of all the RecordLock objects).



In my implementation, I used one locker object, which allows minimum worry for dead lock. More than one locker objects imposes the potential danger. It is still doable, but be careful. In particular, for a non create, do you need to lock on 2 objects in your record-level locking?
[ February 20, 2005: Message edited by: Andy Zhu ]
I used actually a couple of data structures: cachedRecords and deletedRecords which mapped to the nature of the data file. Here we use term, cache, because these data structures are persistent in memory through the life of application. In some other application, the cache may means a temp physical file. But the characteristic is the same: persistent existance of the data structure (not the data per se) in term of the life of the application.

What's even sadder is that many of those people get hired by companies to write software



Even much sadder is that not as many people with scjp/scjd/... as those people are hired by those companies, because ....
15 years ago
Speed is one case. In additional, you don't need to have db file open all the time (if file level lock is mandatory in the multiple access to the physical file, then this is crucial). In my passed implementation, a cache provides a meaningful locker object.

Stale data may not be a concern in this comparison. In this particular project requirement, modifiable operations must implement locking mechansim so no stale data should be (otherwise your lock fails). In nonmodifiable operations, dirty read/stale data is the same in both cache and non-cache mechanisms, because there is no sync to guarrantee it.
Hey, Frans:

an awesome idea on record-level locking. I am interested in this case: what object do you lock on when you createRecord if you have one record lock object per record (hope I don't understand you wrong)? Mainly, client a and b try to create same record; since that record has not been created/is creating, what will be the locker object for this case?

I used cachedRecords as a locker object and don't have the hassel over create. I got 80/80 over locking. But interested in record-level locking.
I waited for 5 weeks to get my result. About 4 weeks, I started to contact suncert. If you have waited 4 weeks, go ahead and write to them.
Hey, Eclipse is an IDE (integrated development environment) for Java programming. One usually edits java source code in eclipse. You have choice to run debug/execute program, and the choice to run junit to test your program. But you need to configure Eclipse to do so (I think it is called preference in the drop-down menu). Also, it is not necessary to debug/execute/junit test in eclipse. You can simply do it from command-line console such as cmd.exe in win.
Hey, Anton: I sent you note in your mail box. Best luck for your application in CS (I thought you were from cs background).
Hey, All:

I wish my waiting 5 week didn't claim my photography time. Anyway, I need to decide what to do next.

More interesting question is how people in the forum decided to take the scjd. For my story, I started for finding a job. But when I just finished scjp and registered for scjd, I got a job offer. That is why it took me 7-8 months to finish this project (I have 3-hour commuter). Since that time I have paid Sun, I think I should finish it. But how about your story? How many benefits except your programming knowledge have been brought to you?

Thanks for any of your reply.
15 years ago