How the Google source code is made

Shanpav12

Disciple
Hello,
I have asked this question earlier but forgotten to ask this,I know it is not fully known, But I have seen in this site http://www.lextrait.com/vincent/implementations.html,It says Google SEarch engine is written in ASm then C++, But as I know If you write assemble it should be X86 weither NASM ,YASM etc, and also if now wriiten in C++,which paltform it is like Visual C++ for windows,GCC for linux ,but how to write so it the application can run on any server like Google search engine application which is installed in millions of Servers of Google .

Thanks, a
 
I have no idea what you mean man.

Why worry about all this?

you cannot see the code for Google Search Engine and mostly that list of it is speculative but I will guess it might be correct to some extent.
 
ASM need not be x86. Every platform has its own ASM language. So, Google might be using the ASM for the server platform it uses (x86-amd64/SPARC/anything else).

And a big project like Google's search engine is bound to have lot of modules at different levels, for the performance ASM offers, Google might use it for optimized execution of processing-intensive tasks, whereas the higher level code, the inter-server communication and distribution of tasks could be in C++.

Google search engine doesn't run on "any server". Google would have a farm of servers which are chosen by their design mostly with same architecture and running same OS. And the processing is probably distributed among all the servers to speed up the results.

Also, the tools you mention are just language tools to compile/assemble code. It doesn't differ much whether you are using one assembler/another - one compiler / another.
 
The main *official* languages at Google in which googlers are allowed to deploy production stage products are:

  • C/C++
  • Java & Javascript
  • Python

For example, youtube is is mainly based on Highly Optimized python with some C code.

PS: Your question does not make much of what sense on what are you trying to know. Hence, if my reply is not clear than don't blame me:p
 
Perhaps, OP thinks c++ isn't portable. C++ is highly portable and the code written using standard C++ could be compiled with any c++ compiler, whether that's visual C++, g++ or something else. Of course you need to write some platform specific code too, but that generally would be minimal. Most c/c++ projects are portable, work on different operating systems, hardware platforms given c/c++ compilers exist. Oracle DBMS is one another example.
 
Gaurish said:
The main *official* languages at Google in which googlers are allowed to deploy production stage products are:

  • C/C++
  • Java & Javascript
  • Python

For example, youtube is is mainly based on Highly Optimized python with some C code.

PS: Your question does not make much of what sense on what are you trying to know. Hence, if my reply is not clear than don't blame me:p

Thanks for your information,but As a clear question I wanted to know which Programming Languages is used and how it is compiled from server side & executed , not really the other apps of the company.

Thanks ,all of you

haraakiri said:
Perhaps, OP thinks c++ isn't portable. C++ is highly portable and the code written using standard C++ could be compiled with any c++ compiler, whether that's visual C++, g++ or something else. Of course you need to write some platform specific code too, but that generally would be minimal. Most c/c++ projects are portable, work on different operating systems, hardware platforms given c/c++ compilers exist. Oracle DBMS is one another example.

sorry,but I dont understand is Oracle DBMS wriiten in C++(You saying) or Programs written for Oracle DBMS,what do you mean ,please tell I want to know.
thanks
 
on c/c++ you can Define sections for differens os types also

its just like

#ifdef windows

#endif

#ifdef LINUX

linux code

#endif

etc

so by typing or configuring

linux (hardcoded #define Linux)

you can pretty much make your source cood platform independend and can compile it with them compilers for the diferend platforms

also, as i know google uses javascript and calculates parts of its search clientside
 
Arrangemonk said:
on c/c++ you can Define sections for differens os types also
its just like
#ifdef windows
#endif
#ifdef LINUX
linux code
#endif
etc

so by typing or configuring
linux (hardcoded #define Linux)
you can pretty much make your source cood platform independend and can compile it with them compilers for the diferend platforms

also, as i know google uses javascript and calculates parts of its search clientside

Thanks, and is it like only one line directive and the code is made for that platform, no API to interfere between for OS calling.Becoz that means I haveto program some more line of code so it can talk with say Windows APi, or MACOSX Cocoa Framework, Or Linux API,so it becomes much more task.
 
>>sorry,but I dont understand is Oracle DBMS wriiten in C++(You saying) or Programs written for Oracle DBMS,what do you mean ,please tell I want to know.

thanks

Let me answer this :),

A DB is again an application. Having some files on disk contains data in specific format and the algorithms to getch it as quickly as possible.

Now In case of Oracle the programming language used to create exes and dlls is C++. Now I assume you know about exes and dlls.
 
The front end of Google uses HTML and Javascript which are both platform independent and can run on any OS and any Browser that supports them. Once the server gets the request, the back end processing can be implemented in any language like in case of google its C++ and in most probability they also rely on Perl as well.

The Server's themselves all run a heavily customized version of Linux even if there are many different kinds of servers. The back end modules do not need to be multi platform.

As for use of Assembly code, you don't actually need to write entire assembly programs separately. C++ compilers allow you to write in line assembly code in C++ programs and such assembly blocks are ignored by the C++ compiler and handed to an assembler. So basically you can write a large C++ program and for optimizing performance you can write a couple of functions/part of functions in assembly in the same source C++ source file.

The product I work on at office has a massive C/C++ code base and we too have in line assembly code in several places to optimize performance. When you hear about something being implemented in C/C++ and Assembly in almost all cases it means that it was coded in C/C++ with in line assembly where required.
 
^^ An addition to what already said is that inline assembly is not supported for 64 bit MS compiler. You can still create a binary by feeding assembler files separately to the assembler and program files to compiler but no inline assembly in 64 bit.
 
Thanks all of you for replying, and I do know about exe files, dlls,not only I but people who mainly play PC games also know about them as it is moist obvious Files in any Software or Programs. Thanks for the inline assembly thing knowlwedge as I previously never knewed,

again very thanks to all of you,
 
Back
Top