Brief Introduction to the role of Server Load balancer

Source: Internet
Author: User

It is a platform-independent language. Regardless of any language that supports. net, the relevant compiler generates the pencil command. For example, the following C #CodeA simple calculator

// *. CS

Using system;
Namespace cilexample
{
// ApplicationProgramPortal
Public class cilapp
{
Static void main ()
{
Calc calc = new calc ();
Int result = Calc. Add (10, 84 );
Console. writeline ("10 + 84 = {0}", result );

// Press enter to end the program
Console. Readline ();
}
}

// C # Calculator
Public class calc
{
Public int add (int x, int y)
{
Return X + Y;
}
}
}
When you compile this code, you will get a single file *. EXE assembly. This program contains a list of assembly, a pencil command, and a description of calc.
And cilapp data. For example, if you use ildasm.exe to open the assembly, you will find that the add () method is expressed:

. Method public hidebysig instance int32 add (int32 X, int32 y) di-managed
{

. Maxstack 2
. Locals int ([0] int32 CS $1 $0000)
Il_0000: ldarg.1
Il_0001: ldarg.2
Il_0002: add
Il_0003: stloc: 0
Il_0004: Br. s il_0006
Il_0006: ldarg.0
Il_0007: Ret
}

Now we use VB. NET to create the same program as above.
// *. VB
Imports system

Namespace cilexample
Module cilapp
Sub main ()
Dim C as new calc
Result = C. Add (10, 84)
Console. writeline ("10 + 84 = {0}", result)
Console. Readline ()
End sub
End Module

Class calc
Public Function add (byval X as integer, byval y as integer) as integer
Return x + y
End Function
End Class

End namespace

 

If you look at his or her pencil code, you will find very similar, with only a few differences.

. Method public hidebysig instance int32 add (int32 X, int32 y) di-managed
{

. Maxstack 2
. Locals int ([0] int32 add)
Il_0000: NOP
Il_0001: ldarg.1
Il_0002: ldarg.2
Il_0003: Add. ovf
Il_0004: stloc.0
Il_0005: Br. s il_0007
Il_0007: ldarg.0
Il_0008: Ret
}

From this, we can see that the obvious benefit of the pencil is the integration of language.
Each. Net-supported compiler generates almost identical pencil commands. Therefore, all languages can define clear binary files to interact with each other.
In addition, the Server Load balancer is platform independent.
Here, we will give you a more detailed description later.

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.