Wednesday, December 31, 2008

After getting the feel of basic programming model of Java RMI, i tried to dig further into the model to see more practical tricks used in RMI architecture which makes it more practical.
few things to look into:
1. RMI Threading
2. RMI Callback
3. RMI (Blocking or Non-blocking)
4. RMI Serialization
5. RMI Classloader
6. RMI Synchronization

This are the four key issues i should raise today.
1. RMI threading.
each client request is initiated in a separate thread but server is just a single object.
It means whenever client makes a remote call, a new thread will be created on server which will be representing that client but only a single instance of server module would be running.
*****Problem Here*******
How to resolve this: Make your server multithreaded or launch the application using web services which will automatically make it multithreaded.

2. RMI serialization
stub and skeleton will automatically serialize the results back to caller.
Object are serialized and send back as pass by value mode.

Tuesday, December 30, 2008

http://www.onjava.com/pub/a/onjava/2003/06/25/tomcat_tips.html

read it some time...
also read about ho to host multiple sites using tomcat apache

Wednesday, December 24, 2008

3 things to do: Tomorrow morning

1. java world article for SOAP
2. http://www.tutorialspoint.com/xml-rpc/xml_rpc_examples.htm
3. serialization and deserialization in java RMI
Struggling with LomBoz installation.
LomBoz is J2EE plugin of eclipse.
After LomBoz, i need to install or put Xdoclet in place so that i can configure tomcat to run with eclipse.

This will help me in many ways.

Thanks
Saurabh

Article on runtime.exec() function

Excellent article. Much better understanding and concepts now.
Will keep reading it time to time..

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4

Monday, December 22, 2008

http://www.javapractices.com/topic/TopicAction.do?Id=42

java file reading and writing different different ways....
http://www.developerfusion.com/code/2064/a-simple-way-to-read-an-xml-file-in-java/

reading Xml file using java

Sunday, December 21, 2008

good one for installign virtual box on ubuntu


http://www.howtoforge.com/installing-virtualbox-2.0.0-on-ubuntu-8.04-desktop-p2

Saturday, December 20, 2008

Wonderful explanation of java runtime.exec()

http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html?page=4

Gud gud gud

Thursday, December 18, 2008

Importatn links

http://www-users.cs.umn.edu/~aagovic/docs.html

Wednesday, December 17, 2008

http://www.grid-appliance.org/index.php?option=com_content&view=article&id=79&Itemid=76

grid on planetlab... try this...
This is the problem i am facing in apache-tomcat-juddi setup....
http://marc.info/?l=juddi-user&m=107773453518241&w=2

This can solve it.

Monday, December 15, 2008

multithreading

http://www.ajug.org/archive/ajug-members/10310/msg00045.html

servlet multithreading....

Thursday, December 11, 2008

how to undo changes commited in svn repo

http://markphip.blogspot.com/2007/01/how-to-undo-commit-in-subversion.html

commands used by me in last few mins
svn update -r version no
svn log -r version no -v
svn list
svn merge -r latest:rollback version head of repo head of local
java common error and common causes...

http://blogs.sun.com/sundararajan/entry/java_class_ic_errors


my postgresql errors...
fixes:
put \encoding latin-1 at the start of create_databse.sql file of juddi distro
put pg_set_client_encoding($connection_resource, "Latin1")

remove ${prefix} from all the lines.

changes client_encoding value from /etc/postgresql-8.3/

Thanks
Saurabh

Tuesday, December 9, 2008

Remember for the life time...
never do a project with a guy with whom you are not comfortable in real life.....
and if that guy's name is Siddharth Ramakrishnan.....

Worst that can happen to a team is Siddharth Ramakrishnan

Cheers
Saurabh

Sunday, December 7, 2008

679 cd /var/lib/tomcat5.5/
680 ls
681 cd webapps/
682 ls
683 cd Jerboa/
684 ls
685 cd WEB-INF/
686 ls
687 cd lib/
688 ls
689 cd ..
690 ls
691 cd classes/
692 ls
693 cd ../lib/
694 ls
695 sudo su
696 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
697 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libawt.so
698 ls /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
699 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
700 ls
701 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
702 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
703 ls -al
704 who
705 whoami
706 sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so /usr/lib
707 sudo ldconfig
708 history | tail -n 130


679 cd /var/lib/tomcat5.5/
680 ls
681 cd webapps/
682 ls
683 cd Jerboa/
684 ls
685 cd WEB-INF/
686 ls
687 cd lib/
688 ls
689 cd ..
690 ls
691 cd classes/
692 ls
693 cd ../lib/
694 ls
695 sudo su
696 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
697 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libawt.so
698 ls /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
699 ldd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
700 ls
701 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so
702 cd /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/
703 ls -al
704 who
705 whoami
706 sudo ln -s /usr/lib/jvm/java-1.5.0-sun-1.5.0.15/jre/lib/i386/libmlib_image.so /usr/lib
707 sudo ldconfig
708 history | tail -n 130


unsatisfied link error .... this commands are snapshot of my history of some terminals.
sudo ln -s one was the main command to resolve unsatisfied link error in tomcat....
http://montage.ipac.caltech.edu/publications.html
Montage list

Friday, December 5, 2008

Thursday, December 4, 2008

315 cd ../../cache/tomcat5.5/
316 ls
317 cd Catalina/
318 ls
319 cd localhost/wo
320 cd localhost/
321 ls
322 rm -rf Jerboa
323 ls
324 /etc/init.d/tomcat5.5 stat
325 /etc/init.d/tomcat5.5 start
326 ls
327 cd
328 exit
329 clear
330 ls /var/lib/tomcat5.5/
331 ls /var/lib/tomcat5.5/conf
332 cd /var/lib/tomcat5.5/conf
333 /etc/init.d/tomcat5.5 stop
334 ls
335 nano catalina.policy
336 nano catalina.properties
337 nano context.xml
338 nano policy.d/04webapps.policy
339 nano server-minimal.xml
340 nano tomcat-users.xml
341 nano web.xml
342 /etc/init.d/tomcat5.5 stop
343 /etc/init.d/tomcat5.5 start
344 find / -name "catalina.out"
345 less /var/log/tomcat5.5/catalina.2008-12-04.log
346 tail -f /var/log/tomcat5.5/catalina.2008-12-04.log
347 less /var/log/tomcat5.5/catalina.2008-12-04.log
348 history


look at these commands
http://java.sun.com/developer/technicalArticles/RMI/rmi/

RMi servlets read it now....

Wednesday, December 3, 2008

read in details sometime... related to tomcat..

http://www.onjava.com/pub/a/onjava/2001/04/19/tomcat.html?page=4

Monday, December 1, 2008

UnicastRemoteobject is used to provide functionality so that objects are made available remotely.

programs for load tuning.

PlanetLab java installation

http://www.ece.ubc.ca/~samera/TA/411/project/jre-installation.html

This is script which can be used to install basic utilities and s/w modules on PlanetLab.
#!/bin/bash
sudo yum clean all

sudo yum update

sudo yum -y install less
sudo yum -y install flex
sudo yum -y install bison
sudo yum -y install bc
sudo yum -y install rpm-build
sudo yum -y install ftp
sudo yum -y install cvs
sudo yum -y install gcc
sudo yum -y install automake
sudo yum -y install autoconf
sudo yum -y install libpcap
sudo yum -y install make
sudo yum -y install wget
exit 0

# Download the jre.tar.gz(http://www.ece.ubc.ca/~samera/TA/411/project/jre.tar.gz) file.
# Copy the file to the remote machine using scp command.
# Unzip and extract the file to your home directory.
# Add the following lines to you .bash_profile file, where
# PATH=/home/SLICE_NAME/jre1.6.0_07/bin:$PATH
# export PATH
# Where:
# SLICE_NAME is your slice name (for example usf_scatter)

Saturday, November 29, 2008

doubts:

1. What is seriaVersionUID?
2. Why do we need serializable interface?
3. What is point of using servlets?
4. what does singleton class means?

Thursday, November 27, 2008

http://forums.sun.com/thread.jspa?threadID=489302

helped me a lot in fixing port issue of RMI on different node

Wednesday, November 26, 2008

after port in use error ... a new error has come..
this is the one

Remote Exception: java.rmi.ConnectException: Connection refused to host: 127.0.1.1; nested exception is:
java.net.ConnectException: Connection refused

for port one still not fixed.
but tcpdump or netstat -lnp or ps -eaf can be used to see the various results...

anyways lets fix this error ...
automatic fix... when changed port back to 1099
read it sometime..
To see every process on the system using standard syntax:
ps -e
ps -ef
ps -eF
ps -ely

To see every process on the system using BSD syntax:
ps ax
ps axu

To print a process tree:
ps -ejH
ps axjf

To get info about threads:
ps -eLf
ps axms

To get security info:
ps -eo euser,ruser,suser,fuser,f,comm,label
ps axZ
ps -eM

To see every process running as root (real & effective ID) in user format:
ps -U root -u root u

To see every process with a user-defined format:
ps -eo pid,tid,class,rtprio,ni,pri,psr,pcpu,stat,wchan:14,comm
ps axo stat,euid,ruid,tty,tpgid,sess,pgrp,ppid,pid,pcpu,comm
ps -eopid,tt,user,fname,tmout,f,wchan

Print only the process IDs of syslogd:
ps -C syslogd -o pid=

Print only the name of PID 42:
ps -p 42 -o comm=
http://forums.sun.com/forum.jspa?forumID=58&start=30

follow this.. it will help
Collection class on hashmap with serializable can cause problem...
just keep track and make sure of this thing...


1. locateRegistry.createRegistry(port no)
man... saurabh jain you need to look at bigger picture always...
be methodological in fixing issues.
be concentrative


This fixed my RMI unmarshalling error...

Tuesday, November 25, 2008

Copied from somewhere.. Not mine

Success is not a destination, it's a journey. If you want to be a winner, you need dedication and the will to put in your best efforts. You can't ever give up. But while aiming for success, you should never underestimate the value of failure. Failure teaches many more things that success ever can.

Success depends a lot on academic achievements. And to excel in studies, just being intelligent or brilliant won't do; you must also know how to manage studies and extra-curricular activities.

The 'super student' studies for knowledge. Marks are a byproduct. Besides studies, allocate some time in the day for playing, meditation, hobbies and exercise too.

The most powerful tool that a 'super student' has is his questions. He who asks many questions may appear a fool, but he does not remain a fool for life.

Man had always seen apples falling from trees. But had Sir Isaac Newton not questioned the phenomenon, we would not have known gravity.

Each day has 86,400 seconds that you can use them as you like. All things you do in the day can be divided into categories, depending on their importance. You need to study for shorter and smaller durations, varying between 30 and 35 minutes. Take a five-minute break and continue.

Eat lots of fruit and green vegetables. They boost your immunity system and give energy. Have breakfast like a king, lunch like a prince and dinner like a beggar.

Another important asset a successful person should have is a good vocabulary.

It gives you the ability to express yourself effortlessly. To enhance your vocabulary, you can subscribe to websites that mail you a word with all its details every day. Once you know the meaning of the word, you can use it in your day-to-day conversations.

And to succeed in examinations, it is very important that your presentation is good. Keep your handwriting legible and structure your answers properly, underlining and proper spacing.

One of the important traits of a 'super student' is that he believes in himself. Enthusiasm is a must.

An ambition motivates you to study harder. Do not let any day pass without doing something towards making your dreams come true. Keep learning and do not forget to expect miracles. May you achieve the greatest heights of success!
Few things i have learned in past...
just like that summarizing.. this is life time experience and telling you this is serious. follow it and success will fall upon you though i am still waiting as success is journey not destination.

1. dont be hasty or desperate for any thing. Chillax type keep working and you'll accomplish what you wish.
2. Always enjoy what you do. Dont think it as a struggle or pain. Just enjoy it.
3. Give your best and expect nothing.
4. Honesty is best policy. Life is sinusoidal so chill madi. Just keep working.
5. Dont let other expectation heap/burden upon you. That is when one start loosing and stop enjoying.

Thanks

Monday, November 24, 2008

EnsemBlue

Paper: EnsemBlue: Integrating Distributed Storage and Consumer Electronics

Liked:
• Idea of using cache consistency based persistence queries as an event notification mechanism because it reuses existing file system protocols. This fall in synchronization with Lampson’s hints of “Using a good idea again”. Also EnsemBlue customizes behavior of every client which helps it in dealing with heterogeneity.
• Concept of EnsemBlue makes computing pervasive by pushing computation to distributed system and making computers disappear in background.
• Use of general purpose computers to provide extensibility to closed-platform CED’s and avoiding kernel modification helps in usability of this system. Use of common distributed namespace and receipt based mapping of this to local name space helps in making communication mechanism between various devices generic.
• Continued operations in state of disconnection and idempotent event processing makes EnsemBlue robust to crash scenarios.

Disliked:
• Making queries persistent may lead to accumulation of long unused query in the system. Also updating persistence queries can lead to serialization delays.
• Though case study shows the programmatic feasibility of this system but cost is no where mentioned.

Comments:
• As system is targeted for small number of users only hence scalability is not a issue but upto what extent this idea can reduce computational burden from end-device?


details will be provided later...

Result Verification and Trust-based scheduling in Open Peer-to-peer Cycle Sharing Systems.

Paper: Result Verification and Trust-based scheduling in Open Peer-to-peer Cycle Sharing Systems.

Summary + Liked:
Paper presents interesting trade-offs like overhead in turnaround time (Quiz) vs. overhead of compute resources (duplication in replication) vs. desired level of accuracy.
Paper extends the verification schemes to P2P model. If one can certain honest task execution in such environment then same solution can be used in client-server kind of models as well.
Paper also characterizes different kinds of reputation system aggregation. These different approaches of aggregation present trade off between reputation system performance and cost of increased network traffic and communication overhead.
Notion of accuracy on demand follows Lampson’s hint of “leave it to client” where client have freedom to the various result verification parameters to match desired level of accuracy or overhead.
With the advent of BOTNETS in P2P systems, chances of cheating by collusion increases in P2P system hence quiz based verification scheme can play an important role there.
Quiz based approach can also be used to keep reputation mechanism more reliable as results returned by quiz is more certain then replication and can be used to feed into statistical model used in calculating reputation of nodes.


Disliked:
One improvement to the paper can be “Use of hybrid approach of quiz and replication” in conjunction of adaptive reputation system to achieve desired level of accuracy at minimum overhead possible. As we can see Quiz based verification leads to extra compute time while replication does not ensures 100% accuracy hence using a hybrid approach can lead to reduction in quiz ratio as well as replication factor which enables faster results and less overhead in terms of compute time. The decision of quiz ratio and replication factor can be function of resource availability, compute nodes reputation, desired level of accuracy and time of execution.
It seems no actual implementation has been done and work is more theoretical. For instance “Accuracy on demand” and “Embedding quiz in the task” has not been implemented in the practice by the time paper was published.
The scenarios where required number of quizzes exceeds the configured package size should be dealt in a more intelligent way rather than sending the whole package full of quizzes. Use of replication in conjunction to quiz can play an important role here.

details will be provided later.. right now i dont have any time

Energy-aware server provisioning and load dispatching for connection-intensive internet services

Paper: Energy-aware server provisioning and load dispatching for connection-intensive internet services

Summary + Liked:
• The idea of using a hybrid approach of load balancing and load skewing would lead to better results as we can see the load patterns are sinusoidal. Hence in inclination time frame, load balancing approach would be useful in distributing load while turning on new servers. In decline time frame load skewing would be preferred such that SID would be less and servers can be turned off.
• Selecting turnoff server on basis of current number of connection hosted by that server help in loosing minimum connection at maximum energy savings. Also approach of rotation in selecting which server to turn off can ensure reliability of hardware.
• Paper presents a trade-offs between Energy savings and Quality of service. Also it analyzes various parameter which plays significant role in determining connection load. It uses login rate, number of connection, upper bound of these parameters and some heuristic parameters to dynamically determine server-provisioning value.
• Preference to hysteresis based provisioning over forecast based approach in case of lack of data is justified by better results. Paper also presents comparison between skewing vs. load balancing approach and forecasting vs. hysteresis approach.
• Results shows that skewing and forecasting based approach leads to 30% approx energy savings.

Disliked:
• Paper presents a loose bound (not a tight bound) on server provisioning. Also interdependence of various tuning parameter is not clearly specified.
• Why can’t server do migration of all the connections using live migration approaches in ongoing research?
• Though paper presents a new approach for short term forecasting but this model assumes that values in functions are highly correlated. How this model takes care of burst scenario is not clear?
• Approach, heuristic and data presented in paper are specific to Windows live only.


details will be provided later.. right now i dont have any time

Ceph and RADOS file storage architecture

Paper: Ceph: A scalable, high-performance distributed file system
Authors: Sage A. Weil

Liked:
• This file storage architecture presents a trade off between performance and consistency. For applications which frequently does small read and write on data, strict consistency and synchronous I/O can impose high latency penalty which can have adverse effect on performance.
• Use of CRUSH simplifies problem of “data location and data distribution.” It also helps in keeping load of system balanced.
• This architecture is scalable as elimination of allocation list makes metadata simple. Also I/O operations are performed separately.

Disliked:
• Theoretically performance of system will go down as load on system will increase. As number of replicas increases in high load scenarios, more consistency overhead will occur. Due to this large internal resources will also be consumed.
• Failure conditions are assumed to be a norm rather than exception which is against Lampson’s hint of “Treating exception and worst case scenarios differently”.
• The separation of data in Metadata and data can cause two-round trip for a data access. Here one request fetches the capability ticket to file object and subsequent trip can lead to data read/ write. This may cause overhead though caching of capability ticket can reduce that a little. Also no method is defined to recover MDS though failure is rare event.
• CRUSH seems to be a deterministic function though it is called pseudo random. Paper has not clearly mentioned how CRUSH function takes care of dynamic replication? How new replicated objects will be accessed by client. It seems all read will be directed to primary replica only. In this how architecture is leveraging replication? Scalability is limited by choice of degree of coherence.

details will be provided later.. right now i dont have any time

palimpsest soft storage capacity file system

Paper: Palimpsest: soft capacity storage for planetary-scale services.

Summary:
This paper presents an ephemeral storage system Palimpsest which provides secure shared soft-storage capacity for wide area model with a congestion based pricing scheme.
This model targets storage requirement of shared planetary scale computational infrastructure like Planet Lab and Denali.

Liked:
• Model can be used for storing data with short life time like checkpoint states and intermediate output of some computation.
• Model provides a number of trades off like storage capacity and persistence. Also trade off between resilience to the loss of fragments versus storage cost and network bandwidth.
• Use of erasure code for storing data provides high durability and reliability to data provided time constant not changes.

Disliked:
• Dynamic time constant values cause refreshing of block stores at timings based on state of Palimpsest. This effect can destabilize the user application/service as it’ll disrupt normal flow of execution for a service.
• Use of erasure code, secure hashing can lead to high cost of data store which can be undesirable. Also for check pointing or intermediate storage requirement purpose, this can cause delays.
• On one hand system making data durable by fragmenting data but on the other hand it is discarding data immediately if time constant goes low due to some other application doing heavy write operations. This is contradictory to model’s functionality.
• No mechanism to modify data. Every time we need to over write data. This is undesirable in cases where data generated between consecutive stages is related and only difference of data needs to be stored.
• Paper is very superficial and not enough detail is provided on how things will work in actual implementation.

Details will be provided later.. right now i dont have any time

Log structured file system..

Paper: Design and Implementation of a log-structured file system.
Author: Mendel Rosenblum and John K. Ousterhout.

Liked:
• Structure of LFS simplifies crash recovery process as no complex data structure like trees and free-block lists are used.
• Concept of buffering file system changes in memory and then writing sequentially into disk removes the seek time and hence improve bandwidth usage of file system.
• Concept of using bimodal distribution and treating hot and cold segments according to age of data is justified because data is high disk utilization also implies probability of more live data movement which results in high write cost. The desired behavior is low write cost and high disk utilization so if we should clean cold segment at high utilization and hot segment at low utilization which would result in less overhead corresponding to live data.


Disliked:
• Log-structured system assumes large amount of resource availability. For example large memory size so that all writes can be cached and read can be served from memory itself. This is not cost-effective and also performance is questionable in cases of large number of read requests. Also approach requires use of NVRAM for better crash recovery. Also if read requests are not sequential them impact on performance would be visible. It can not be used in magnetic media as most of the requests are read only.
• Functioning of this approach requires large amount of free space as well. What if we have a storage system where data keeps on increasing? A possible scenario is that even if we have fragmented free space, segmentation cleaning would become a problem.
• Performance can be limited by memory cache replacement and optimization algorithm which decides what to keep in memory and what not at any point of time?

• Function of write cost is not clearly defined. At one place author claim that if write cost is 1.0 that means new data can be written at full bandwidth and there is no cleaning overhead whereas by the formula write cost = 2/ (1-u), value of 1.0 is never possible. Here only if u=0 then write cost have minimum value equal to 2. This implies that if all data is newly written and later moved to other segment then at the best 50% of bandwidth can be utilized for writing into segment which is about to be cleaned. Paper also mentions (at end of 6th page) that if u=0 then write cost is 1.0.

details will be provided later.. right now i dont have any time

MeshOS

Paper: Protection and Communication abstractions for web browsers in MashupOS

Summary:
This paper addresses the protection and communication deficiency of multi-principle browser. It identifies and design the missing abstraction in a backward compatible and adoptable manner needed for such platforms. Author identifies that present trust model does not allow any cross-domain interactions which cause a trade-off between security and functionality. This paper presents design of a multi-domain browser based operating system where domain can interact in a secure and controlled manner.

Liked:
• Sandboxing mechanism restricts access to only pages/ objects which are referenced inside the sandbox. It also allows hosting of untrusted third-party content as unauthorized.
• Idea of keeping the interfaces stable and providing backward compatibility while building “MashupOS”, fall in synchronization with Lampson’s hint of keeping interfaces stable.
• Extension of VOP to enable cross-domain browser-to-server communication and cross-domain browse-side communication.
• Concept of Friv which provide abstraction for flexible cross-domain display.

Disliked:
• Possibility of information leak in use of Friv where malicious user can learn information about child document.


details will be provided later.. right now i dont have time
http://www.comp.hkbu.edu.hk/~jng/comp3320/rmi.html
A botnet C&C channel is relatively stable and unlikely to change among bots and their variants.
Essential mechanism that allows a Botmaster who control the botnet to direct the actions f bots in a botnet.
C&c channel the weakest link.
detection of C&C channel.

Botmaster interact with the bots by issuing commands and receiving responses in real-time by using IRC PRIVMSG messages.
HTTP based approach which is pull based approach.

Question: Way of communications?
1. IRC
2. HTTP
3. P2P

paper: Study the problems of detecting centralized botnet C&C channels using network anomaly detection techniques.
Main focus: IRC and HTTP based C&C channels.


detection approach that does not require prior knowledge of botnet.
difficulty:
follows normal protocol usage and is similar to normal traffic
traffic volume is low.
very few bot sin the monitored network
encrypted communication

advantage:
demonstrate spatial-temporal correlation and similarities due to nature of their pre-programmed response activities to control commands.
key is synchronized and correlated behavior in the network. Use of sequential hypothesis algorithm for testing.

evaluation: Using real-world network traces. open-source snort

Thursday, November 20, 2008

http://www.javaworld.com/javaworld/javaqa/2000-05/03-qa-0526-pass.html

confusing man ... confusing
problem i faced due to hanging...
1st my laptop got hanged ... i pressed the hard reboot button...
it could not do file system check for repair my disk (fsck failure) so i was directed to command prompt with whole file system accessible in read only mode.
I thought there is some problem with x servers or ubuntu-desktop package
so i tries to install ubuntu-desktop
1. initx
2. startx
3. sudo apt-get install ubuntu-desktop

then i read error message carrefully so i did shutdown -r now. which restarted my lappie in correct required GUI mode.

Thanks

problems faced today...

I was trying to invoke java program from a shell script.
Problem was with quotes so be careful "Saurabh Jain" next time....

To run two process simultaneously using shell script
1. ./p1 &
2. ./p2 &

or p1 & p2

dont use p1 && p2 as operator priority comes into picture.

2nd problem is trying to fork multiple java program from prel script.
http://hell.jedicoder.net/?p=82

Wednesday, November 19, 2008

paper critique

Paper: Result Verification and Trust-based scheduling in Open Peer-to-peer Cycle Sharing Systems.

Summary + Liked:
Paper presents interesting trade-offs like overhead in turnaround time (Quiz) vs. overhead of compute resources (duplication in replication) vs. desired level of accuracy.
Paper extends the verification schemes to P2P model. If one can certain honest task execution in such environment then same solution can be used in client-server kind of models as well.
Paper also characterizes different kinds of reputation system aggregation. These different approaches of aggregation present trade off between reputation system performance and cost of increased network traffic and communication overhead.
Notion of accuracy on demand follows Lampson’s hint of “leave it to client” where client have freedom to the various result verification parameters to match desired level of accuracy or overhead.
With the advent of BOTNETS in P2P systems, chances of cheating by collusion increases in P2P system hence quiz based verification scheme can play an important role there.
Quiz based approach can also be used to keep reputation mechanism more reliable as results returned by quiz is more certain then replication and can be used to feed into statistical model used in calculating reputation of nodes.


Disliked:
One improvement to the paper can be “Use of hybrid approach of quiz and replication” in conjunction of adaptive reputation system to achieve desired level of accuracy at minimum overhead possible. As we can see Quiz based verification leads to extra compute time while replication does not ensures 100% accuracy hence using a hybrid approach can lead to reduction in quiz ratio as well as replication factor which enables faster results and less overhead in terms of compute time. The decision of quiz ratio and replication factor can be function of resource availability, compute nodes reputation, desired level of accuracy and time of execution.
It seems no actual implementation has been done and work is more theoretical. For instance “Accuracy on demand” and “Embedding quiz in the task” has not been implemented in the practice by the time paper was published.
The scenarios where required number of quizzes exceeds the configured package size should be dealt in a more intelligent way rather than sending the whole package full of quizzes. Use of replication in conjunction to quiz can play an important role here.

Tuesday, November 18, 2008

Facing problem with java type casting right now...
two types
upcasting and downcasting

one good link on understanding multithreading in 5 min
http://www.ccs.neu.edu/home/donghui/teaching/multithread_socket/

Monday, November 17, 2008

Critique of energy-aware paper NSDI-08

Paper: Energy-aware server provisioning and load dispatching for connection-intensive internet services

ftp://ftp.research.microsoft.com/pub/tr/TR-2007-130.pdf


Summary + Liked:

  • The idea of using a hybrid approach of load balancing and load skewing would lead to better results as we can see the load patterns are sinusoidal. Hence in inclination time frame, load balancing approach would be useful in distributing load while turning on new servers. In decline time frame load skewing would be preferred such that SID would be less and servers can be turned off.
  • Selecting turnoff server on basis of current number of connection hosted by that server help in loosing minimum connection at maximum energy savings. Also approach of rotation in selecting which server to turn off can ensure reliability of hardware.
  • Paper presents a trade-offs between Energy savings and Quality of service. Also it analyzes various parameter which plays significant role in determining connection load. It uses login rate, number of connection, upper bound of these parameters and some heuristic parameters to dynamically determine server-provisioning value.
  • Preference to hysteresis based provisioning over forecast based approach in case of lack of data is justified by better results. Paper also presents comparison between skewing vs. load balancing approach and forecasting vs. hysteresis approach.
  • Results shows that skewing and forecasting based approach leads to 30% approx energy savings.

Disliked:

  • Paper presents a loose bound (not a tight bound) on server provisioning. Also interdependence of various tuning parameter is not clearly specified.
  • Why can’t server do migration of all the connections using live migration approaches in ongoing research?
  • Though paper presents a new approach for short term forecasting but this model assumes that values in functions are highly correlated. How this model takes care of burst scenario is not clear?
  • Approach, heuristic and data presented in paper are specific to Windows live only.
More will come later
java -d option used for setting destination directory for class files. if destination directory already exist no new directory will be set.
If it not exist then it'll be created relative to current path.

-D option used for setting some variable like security policy and extension directory

-g used for debugging information

-classpath option for overriding the classpath setting.
if nothing specified then current directory
How to see top like output of n/w usage of different processes.
copied from http://sourceware.org/ml/systemtap/2006-q4/msg00022.html. just in case this machine goes down then i can look here.

also liked this blog.. will be reading content in future when have time
http://akudump.blogspot.com/


global ifxmit_p, ifrecv_p, ifxmit_b, ifrecv_b, ifdevs, ifpid, execname, user

probe netdev.transmit
{
execname[pid()] = execname()
user[pid()] = uid()
ifdevs[pid(), dev_name] = dev_name
ifxmit_p[pid(), dev_name] ++
ifxmit_b[pid(), dev_name] += length
ifpid[pid(), dev_name] ++
}

probe netdev.receive
{
execname[pid()] = execname()
user[pid()] = uid()
ifdevs[pid(), dev_name] = dev_name
ifrecv_p[pid(), dev_name] ++
ifrecv_b[pid(), dev_name] += length
ifpid[pid(), dev_name] ++
}


function print_activity()
{
printf("%5s %5s %-7s %7s %7s %7s %7s %-15s\n",
"PID", "UID", "DEV", "XMIT_PK", "RECV_PK", "XMIT_KB",
"RECV_KB", "COMMAND")

foreach ([pid,dev] in ifpid-) {
printf("%5d %5d %-7s %7d %7d %7d %7d %-15s\n",
pid, user[pid], dev,
ifxmit_p[pid, dev], ifrecv_p[pid, dev], ifxmit_b[pid, dev]/1024,
ifrecv_b[pid, dev]/1024,
execname[pid])
}


print("\n")

        delete execname
delete user
delete ifdevs
delete ifxmit_p
delete ifrecv_p
delete ifxmit_b
delete ifrecv_b
delete ifpid
}

probe timer.ms(5000)
{
print_activity()
}


Now i am again working on RMI system

Problems:
I am facing this classpath setting problem.
Somehow everytime i face this problem but never digged deeper to understand it better.
Now is the time:
Oh man what a bullshit error i was doing and every time in hurry, i was able to fix it somehow without doing actual fix.
Fix: import package of other classes in my java file. then only class files of other package will be recognised.
"You just see but you dont observe. Distinction is clear..... "
--Sherlok Holmes

still unsolved... will c next time now moving to parse file

VIRO debugging issues

I am trying to debug some project in eclipse.
I am summarizing the problems i faced in eclipse.
1. debug perspective showing that unable to create view: arguemnts not valid in variable values section.
Not able to fix.
https://bugs.eclipse.org/bugs/show_bug.cgi?id=154025
reported as a bug in eclipse itself

2. Some problem in rdvId .. lets see it later

Sunday, November 16, 2008

Porblems i faced in JAVA RMI

First i thought why skeleton file is not getting generated then i came to know then skeleton file is no more needed.
http://www.ddj.com/java/212001090?pgno=3

Second problem i faced had to do with classpath so i specified classpath with commad line compilation option of java.
javac -classpath .

Third problem was java security exception or something so i created a policy.all file and granted all the permission in that file.
on command prompt i gave this option
java -Djava.security.policy=policy.all

fourth problem was some Remoteexception in server thread: nested exception is:
java.rmi.UnmarshalException: error unmarshalling arguments
something to do with java.rmi.server.codebase parameter but i am not able to resolve as of now.
Lets see if it gets fixed
Somehow it got fixed ...
I simply just tried first to run client side class then server side binding..
Apart from that i was suspecting some code sharing concept as well where both VMs using the same codebase so we need to put this codebase in some webserver from where it can be downloaded on the fly. For this i moved client code and classes to different location then server code and classes.

Links i followed for learning this simple exercise were:
http://www.comp.hkbu.edu.hk/~jng/comp3320/rmi.html
http://www.javacoffeebreak.com/articles/javarmi/javarmi.html
and few more google results for RMI search...

now i am moving onto next exercise ... let see how it goes...