Both tools are used to analyze network related problem. tcpdump captures the header information. iptrace captures the whole packets from interface. Unlike tcpdump, iptrace copies the packet from kernel to user space for further filtering unless -B option is used. iptrace can monitor more than 1 interfaces. If the number of interfaces to be monitored are high, it may result in packet drops. The interfaces can be specified by -i option.
The iptrace command uses either the network trace kernel extension (net_xmit_trace kernel service), which is the default method, or the Berkeley Packet Filter (BPF) packet capture library to capture packets (-u flag). The iptrace command can either run as a daemon or under the System Resource Controller (SRC).
Sunday, March 23, 2014
Tuesday, March 4, 2014
OSGi Service
A service in OSGi is a java object in a bundle. The service is listed in the OSGi service registry for other services to use. The service registry allow search for service and send notification to services when a dependent service state changed.
The recommended practice for OSGi service is to comprise a Java interface and its accompanied implementing class.
When a bundle enters ACTIVE state, the service is activated by RegiesterService() call in the start() method of the activator . It will also search for services that it depends on. Services can rely on the OSGi framework's listener method to obtain notification when the dependent service undergo state changes.
The strength of OSGi is that service can be upgraded without the need to restarting the JVM or other services that it interacts with. The trick is the use of Interface and the implementing classes are packaged as 2 separate bundle. The interacting class work with the interface bundle that never changes. OSGi registry will ensure all consuming bundle to get a reference to the updated service the next time it is accessed.
If the interface and the implementing classes are packaged in the same bundle, update to the bundle would requires uninstalling and reinstalling the bundle and all other bundles in the dependency hierarchy.
The recommended practice for OSGi service is to comprise a Java interface and its accompanied implementing class.
When a bundle enters ACTIVE state, the service is activated by RegiesterService() call in the start() method of the activator . It will also search for services that it depends on. Services can rely on the OSGi framework's listener method to obtain notification when the dependent service undergo state changes.
The strength of OSGi is that service can be upgraded without the need to restarting the JVM or other services that it interacts with. The trick is the use of Interface and the implementing classes are packaged as 2 separate bundle. The interacting class work with the interface bundle that never changes. OSGi registry will ensure all consuming bundle to get a reference to the updated service the next time it is accessed.
If the interface and the implementing classes are packaged in the same bundle, update to the bundle would requires uninstalling and reinstalling the bundle and all other bundles in the dependency hierarchy.
Monday, March 3, 2014
OSGi Bundles
A bundle is a group of Java classes and a manifest file packaged in JAR format. The MANIFAST.MF file is a text file that describe the bundle such as the version, the external packages that the bundle depends on, the package that the bundle exposed for other bundle to use and the activator class that will work with OSGi framework's life-cycle layer to manage the bundle. OSGi run time assigns a class loader to each bundle.
A bundle has 6 states in its life cycle:
(1) Install - the bundle is validated
(2) Resolved - the bundle dependencies are resolved
(3) Starting - the bundle is in transition to the active state
(4) Active - the bundle is loaded and running
(5) Stopping - the bundle is being stopped
(6) Uninstall - the bundle is removed from the registry
Events are generated when a bundle moves from state to state. Events can be caught by other bundles so that they can react (e.g. stop when the dependent bundle is stopped).
The strength of OSGi bundle is that it can be updated (replaced with a new version) dynamically without the need to stop the other bundles that depends on it.
A bundle has 6 states in its life cycle:
(1) Install - the bundle is validated
(2) Resolved - the bundle dependencies are resolved
(3) Starting - the bundle is in transition to the active state
(4) Active - the bundle is loaded and running
(5) Stopping - the bundle is being stopped
(6) Uninstall - the bundle is removed from the registry
Events are generated when a bundle moves from state to state. Events can be caught by other bundles so that they can react (e.g. stop when the dependent bundle is stopped).
The strength of OSGi bundle is that it can be updated (replaced with a new version) dynamically without the need to stop the other bundles that depends on it.
Particles
In an atom, electrons are attracted to the nucleus by the electromagnetic force. The electromagnetic force is 10^39 times stronger than the gravitational attraction between them. The electromagnetic repulsion between proton in the nucleus is overcome by the strong nucleus force. But when the nucleus becomes too big, the electromagnetic repulsion will have the upper hand and the nucleus will split up to smaller nuclei.
Nucleus of an atom is composed on particles called nucleons - protons and neutrons. Nucleon is a type of hadrons (Greek word for large). Hadrons are particles that feel the strong nuclear force. There are 2 subgroups. The first group called baryons which comprises proton, neutron, Lambda, Sigma, Xi and Omega. The other group called mesons comprises pion and other more massive particles such as eta and kaon. Hadrons are built from quarks.
There are 6 types of quarks, each with a different mass. Three of the quarks (down/strange/bottom) carry negative charge which is 1/3 of an electron. The other 3 (up/charm/top) carry positive charge which is 2/3 of a proton. Each quark actually made up of 3 particles called - red, green and blue.
Proton is made up of 3 quarks - 2 up (2/3 positive charge) and 1 down (1/3 negative charge). Neutron is made up of 2 down and 1 up quarks.
The other 4 flavor of quarks are "strange", "charm", "top" and "bottom".
The quarks have quantum properties - mass, electrical charge and spin. Quarks also carry a color charges that is used to explain the formation of nucleons, pion and the relative masons. Color changes is related to the strong nuclear force.
Spin property is not actual motion. It means that the particles react to others as if it is rotating in certain way. Particles that have an integer value of spin (0, 1, 2 etc) are called bosons. Particles with half spin value (1/2, 3/2 etc) are called fermions
Bosons are carriers of forces. There are 5 fundamental bosons:
Leptons are classified into 3 generations (based on the sequence of discovery?). Electron and the electron neutrino are called the first generation (family). The muon and the muon neutrino are called second generation. Tau and tau neutino are called the third generation
When a neutron decays to a proton and electron, the resulting mass is smaller than the original neutron. The remaining mass forms into a neutrino (Italian word means the smaller neutral one).
Tachyons are particles that travels faster than the speed of light.
Nucleus of an atom is composed on particles called nucleons - protons and neutrons. Nucleon is a type of hadrons (Greek word for large). Hadrons are particles that feel the strong nuclear force. There are 2 subgroups. The first group called baryons which comprises proton, neutron, Lambda, Sigma, Xi and Omega. The other group called mesons comprises pion and other more massive particles such as eta and kaon. Hadrons are built from quarks.
Proton is made up of 3 quarks - 2 up (2/3 positive charge) and 1 down (1/3 negative charge). Neutron is made up of 2 down and 1 up quarks.
The other 4 flavor of quarks are "strange", "charm", "top" and "bottom".
The quarks have quantum properties - mass, electrical charge and spin. Quarks also carry a color charges that is used to explain the formation of nucleons, pion and the relative masons. Color changes is related to the strong nuclear force.
Spin property is not actual motion. It means that the particles react to others as if it is rotating in certain way. Particles that have an integer value of spin (0, 1, 2 etc) are called bosons. Particles with half spin value (1/2, 3/2 etc) are called fermions
Bosons are carriers of forces. There are 5 fundamental bosons:
- photon (electromagnetism), spin = 1
- gluon (strong nuclear force), spin = -1
- Z boson (weak nuclear force), spin = -1
- W boson (weak nuclear force), spin = -1
- Higgs boson, spin = 0
- graviton, spin = 2
Leptons are classified into 3 generations (based on the sequence of discovery?). Electron and the electron neutrino are called the first generation (family). The muon and the muon neutrino are called second generation. Tau and tau neutino are called the third generation
When a neutron decays to a proton and electron, the resulting mass is smaller than the original neutron. The remaining mass forms into a neutrino (Italian word means the smaller neutral one).
Tachyons are particles that travels faster than the speed of light.
Subscribe to:
Posts (Atom)