Parameters in RMI

Posted on Updated on

Parameters in RMI

 RMI supports method calls to remote objects.

  1. When these calls involve passing parameters or accepting a return value, it depends on whether the parameters are :

I.            Primitive data types.

II.            Objects.

III.            Remote objects.

  1. When the parameter is passed to a method the JVM makes a copy of the value places the copy on the stack and then executes the method.

I.            PRIMITIVE PARAMETERS:

a)      When a primitive data type is passed as a parameter to a remote method, the RMI system passes it by value.

b)     RMI will make a copy of a primitive data type and send it to the remote method. If a method returns a primitive data type, it is also returned to the calling JVM by value.

c)      Values are passed between JVMs in a standard, machine-independent format.

d)     This allows JVMs running on different platforms to communicate with each other reliably.

II.            OBJECT PARAMETERS:

a)   When an object is passed to a remote method, the semantics change from the case of the single JVM.

b)  RMI sends the object itself, not its reference, between JVMs.

c)   It is the object that is passed by value, not the reference to the object.

d)  Similarly, when a remote method returns an object, a copy of the whole object is returned to the calling program.

e)   Because different JVMs do not share heap memory, RMI must send the referenced object and all objects it references.

f)    RMI uses a technology called Object Serialization to transform an object into a linear format that can then be sent over the network wire.

g)  Object serialization essentially flattens an object and any objects it references.

h)  Serialized objects can be de-serialized in the memory of the remote JVM and made ready for use by a Java program.

III.            REMOTE OBJECT PARAMETERS:

 

Parameters in RMI
Parameters in RMI

a)   A client program can obtain a remote reference to a remote object, through the RMI registry program.

b)  When a method returns a local reference to an exported remote object, RMI does not return that object.

c)   It substitutes another object (remote proxy for that service), in the return stream.

d)  When a reference is returned to the server, it is not converted into a local reference.

e)   When the object from the server is returned, to the client the proxy object is substituted.

Posted by Vissicomp Technology Pvt Ltd

For more http://www.vissicomp.com

Advertisements

Java Database Connectivity

Posted on

How to create Data Source Name (DSN) In Window

Create a System DSN in Windows

  1. Click on Start button , Select Control Panel, point to Administrative Tools, and then double-click Data Sources  (ODBC).
    1.  Click the System DSN tab
    1. Click Add.
    2. Click the database driver that corresponds with the database type to which you are connecting, and then click Finish.

    Type the data source name. Make sure to you a name that you will remember. You will need to use this name later.

  1. Select server name from server dropdown list.
  2. Click on next button.
  1. Click the correct database, and then click on next Button
  2. Click finish button.
Java Database Connectivity
Java Database Connectivity

JDBC1 JDBC2 JDBC3 JDBC4 JDBC5

RMI (Remote Method Invocation)

Posted on Updated on

Firewall Issue in RMI

Firewall issues

  1. Firewalls are inevitably encountered in any network, that has to operate beyond the sheltering confines of an Intranet.
  2. They block all the network traffic with certain exceptions defined in the rule-set.
  3. Since RMI opens a dynamic socket connection, between client and server to facilitate communication, the JRMP traffic is blocked by most protocols.
  4. On top of TCP/IP RMI uses a wire level protocol – Java Remote Method Protocol (JRMP).
  5. To get across a firewall, RMI makes use of HTTP tunneling by encapsulating RMI calls, within an HTTP post.

CLIENT BEHIND FIREWALL

  1. In the above scenario, when the transport layer tries to establish a connection with the server, it is blocked by the firewall.
  2. When this happens, the RMI transport layer automatically retries by encapsulating the JRMP call data within an HTTP POST request. The HTTP POST header for the call is in the form:
  3. http://hostname:port
  4. If a client is behind a firewall, it is important that you also set the system property http.proxyHost appropriately.
  5. Since almost all firewalls recognize the HTTP protocol, the specified proxy server should be able to forward the call directly to the port on which the remote server is listening on the outside.
  6. Once the HTTP-encapsulated JRMP data is received at the server, it is automatically decoded and dispatched by the RMI transport layer.
  7. The reply is then sent back to client as HTTP-encapsulated data.

CLIENT & SERVER BEHIND FIREWALL

  1. In this case, the RMI transport layer uses one additional level of indirection. This is because the client can no longer send the HTTP-encapsulated JRMP calls to arbitrary ports as the server is also behind a firewall. Instead, the RMI transport layer places JRMP call inside the HTTP packets and send those packets to port 80 of the server. The HTTP POST header is now in the form
  2. http://hostname:80/cgi-bin/java-rmi?forward=<port&gt;
  3. This causes the execution of the CGI script, java-rmi.cgi, which in turn invokes a local JVM, unbundles the HTTP packet, and forwards the call to the server process on the designated port.
  4. RMI JRMP-based replies from the server are sent back as HTTP REPLY packets to the originating client port where RMI again unbundles the information and sends it to the appropriate RMI stub.
  5. Of course, for this to work, the java-rmi.cgi script, which is included within the standard JDK 1.1 or Java 2 platform distribution, must be preconfigured with the path of the Java interpreter and located within the web server’s cgi-bin directory.
  6. It is also equally important for the RMI server to specify the host’s fully-qualified domain name via a system property upon startup to avoid any DNS resolution problems, as:
  7.  java.rmi.server.hostname=host.domain.com.

Posted by Vissicomp Technology Pvt Ltd

For more http://www.visscomp.com

Linux

Posted on Updated on

1.    What is Linux?

Linux is, in simplest terms, an operating system. It is the software on a computer that enables applications and the computer operator to access the devices on the computer to perform desired functions. The operating system (OS) relays instructions from an application to, for instance, the computer’s processor. The processor performs the instructed task, then sends the results back to the application via the operating system.

But something sets Linux apart from these operating systems. The Linux operating system represented a $25 billion ecosystem in 2008. Since its inception in 1991, Linux has grown to become a force in computing, powering everything from the New York Stock Exchange to mobile phones to supercomputers to consumer devices.

As an open operating system, Linux is developed collaboratively, meaning no one company is solely responsible for its development or ongoing support. Companies participating in the Linux economy share research and development costs with their partners and competitors. This spreading of development burden amongst individuals and companies has resulted in a large and efficient ecosystem and unheralded software innovation.

Over 1,000 developers, from at least 100 different companies, contribute to every kernel release. In the past two years alone, over 3,200 developers from 200 companies have contributed to the kernel–which is just one small piece of a Linux distribution.

This article will explore the various components of the Linux operating system, how they are created and work together, the communities of Linux, and Linux’s incredible impact on the IT ecosystem.

  1. Where is Linux?

One of the most noted properties of Linux is where it can be used. Windows and OS X are predominantly found on personal computing devices such as desktop and laptop computers. Other operating systems, such as Symbian, are found on small devices such as phones and PDAs, while mainframes and supercomputers found in major academic and corporate labs use specialized operating systems such as AS/400 and the Cray OS.

Linux, which began its existence as a server OS and Has become useful as a desktop OS, can also be used on all of these devices. ‚ÄúFrom wristwatches to supercomputers,‚Äù is the popular description of Linux’ capabilities.

An abbreviated list of some of the popular electronic devices Linux is used on today includes:

These are just the most recent examples of Linux-based devices available to consumers worldwide. This actual number of items that use Linux numbers in the thousands. The Linux Foundation is building a centralized database that will list all currently offered Linux-based products, as well as archive those devices that pioneered Linux-based electronics.

Linux_1
Linux_1

Posted by Vissicomp Technology Pvt Ltd

ww.vissicomp.com

Maths formula

Posted on Updated on

  1. COMPOUND INTEREST

M = P( 1 + i )n

M is the final amount including the principal.

P is the principal amount.

i is the rate of interest per year.

n is the number of years invested.

Applying the Formula

Let’s say that I have $1000.00 to invest for 3 years at rate of 5% compound interest.

M = 1000 (1 + 0.05)3 = $1157.62.

You can see that my $1000.00 is worth $1157.62.

Area and Perimeter of a Triangle, Rectangle, Parallelogram, Trapezoid and Circle

Area and Perimeter of a Triangle, Rectangle, Parallelogram, Trapezoid and Circle
Area and Perimeter of a Triangle, Rectangle, Parallelogram, Trapezoid and Circle
Area and Perimeter of a Triangle, Rectangle, Parallelogram, Trapezoid and Circle
Area and Perimeter of a Triangle, Rectangle, Parallelogram, Trapezoid and Circle

Surface Area and Perimeter of a Triangle

  Surface Area and Perimeter of a Triangle

Surface Area and Perimeter of a Triangle

Career in Embedded System

Posted on

Career in Embedded System

Embedded Systems are becoming more and more pervasive, touching virtually all aspects of daily life. From mobile phones to automobiles, industrial equipment, to high end medical devices, home appliances etc. Embedded software today sits at the intersection of all the technologies. The growth of different industry sectors like automotive, telecommunications, aerospace, energy, industrial units, biomedical equipment, consumer goods is highly contributed by the development in the field of Embedded Systems. According to a survey by Frost and Sullivan, an analyst firm, the embedded systems opportunity is expected to touch $360 billion ( in terms of the devices) and $36 billion in terms of the semiconductors by 2015. Another survey by NASSCOM and McKinsey predicts that the jobs in embedded space will increase ten-fold from the current 60,000 professionals to over 6 lakh people by 2015. Companies like TCS, Wipro, L&T, TATA Elexsi, Infosys, Zensar, Tech Mahindra, Patni, VOLVO, NIIT Tech, KPIT Cummins, Airbus etc. are investing heavily in their embedded systems operations in India. With that expectation, in the near future embedded computing will overtake traditional computing and that there may be more engineers working on embedded systems and related services , then on traditional IT. Experts say what IT was in 90’s is where embedded systems stands now and is ready to explode. The future is bright for India with it being pegged to be the next embedded systems hub in the world. A recent study by NASSCOM talks about the Indian Embedded Ecosystem. This ecosystem consists of all the stakeholders in embedded domain namely, the education institutions, end user industries and entrepreneurial organizations. NASSCOM suggests that there is a need to nurture this ecosystem that would catalyze innovation in the Indian embedded industry.

Posted by Vissicomp Technology Pvt Ltd

http://www.vissicomp.com

Embedded systems and technologies

Posted on Updated on

The future is bright for embedded systems and technologies!!

The tech world is going through unprecedented changes in the last few quarters. Apple and Samsung have taken the mobile phone market leadership to a different level where both of them have surged forward from their nearest rivals, in terms of innovation, technology and the revenue/profits earned in this business. We now see that Software, Operating System players like Microsoft and Google have entered the HW market through their own branded products. The message is loud and clear—the companies are looking at increased business from the consumer and the actions that the consumer carries out in the internet; they are out to influence the consumer side devices as well as the server/network side applications in order to maximise the business. All of these changes are having a huge impact on the traditional eco systems in the mobile, handheld, consumer markets. Only time will tell if the integrated strategies played out by Apple is the way to go for the consumer electronics leaders of the world, though there is an apparent shift in that direction. All of these changes are fuelling tremendous growth in the embedded markets. Some of the trends that we see in the embedded system design markets are as follows:

Increased use of multi-core processor platforms: Traditional embedded systems design principles ensured processor and design simplicity in order to meet the stringent needs of cost, reliability, thermal performance, etc. So the use of multi-core processors was not very common. Of late new process and power conservation technologies are driving the use of multi-core processors in embedded system design without impacting the traditional principles. Enhancements in processor design is looking not only at the increased clock speed, but considers increased efficiency, lower power consumptions and integrated graphic performance.

Connectivity is driving security needs in the devices:

The convergence of devices features and technologies are happening faster than anyone’s imagination these days and the need for connectivity is driving the device designs. All this is adding a security nightmare to preserve personal and professional information from hostile attacks. The embedded system components (processor, operating system, applications) need to have better security features in them in order to tackle these challenges.

Demand for Video processing:

The enhanced processing power in the devices are driving the need to have better video processing for personal and professional data transfers and there is an increasing trend in devices that have video capability being designed. Innovative application use cases are built in to take advantage of the social networking and other converged platforms to share video across devices. Irrespective of the global economic turbulence, there would be continued investments in providing more innovative and efficient solutions coming up in the embedded domain to cater to these trends. In order to be a winner in the embedded market, the companies and individuals need to constantly develop and innovate on new ideas, approaches that can provide efficient, fast, low power, cost effective solutions to the consumers. The above trends of increased video data, security needs and use of complex processors would demand a new level of expertise in providing these solutions.

Posted by Vissicomp Technology Pvt Ltd

For more http://www.vissicomp.com