Truth about Booking.com
Jobs
xml.booking
Reviews
Syte Analytics
The Company
Room Key threat to Expedia and Priceline
What does KISS stand for?
How DNS Works
Disaster Recovery for SQL Server Databases
Setting Up Replication Servers
Data Mirroring Vs. Log Shipping Vs. Replication
8 queens
 
Booking.com
compiled from the internet


Booking.com
Interviewed Aug 2011 in Amsterdam (Netherlands) (took a day)

1. How would you display the top 5 repeating error messages in a log file without timestamps

2. How would you provision 100 Linux Web Servers, what considerations should you make

3. What tools do you know for debugging network issues

4. What considerations would you give when monitoring a replicated chain of databases


The UK techie did give some time to explaining their environment which consists of 12 sys admins working with approx 100 developers in Amsterdam.

---------------------------------------------------------------------------------------------------------------
1. How would you display the top 5 repeating error messages in a log file without timestamps
---------------------------------------------------------------------------------------------------------------

Perl program should do the following:
a. from Apache error.log file strip time-stamp in all error records
b. built error_hash where KEY is Error_description, and VALUE is the repeated occurence of that record with the same Error_description
c. sort the error_hash by occurence of that Error_description
d. display top five occuring errors

------------------------------------------------------------------------------------------------------------
2. How would you provision 100 Linux Web Servers, what considerations should you make?
------------------------------------------------------------------------------------------------------------
Provisioning policies
a. provisioning is internal or external?
b. static webpages or database-driven site?

1: -upper layer comprised of reverse-proxies (nginx, varnish, squid)
2: -webserver layer: (nginx webserver + FastCGI, apache, lighttpd, etc.)
3: -database layer: (mysql in clustering active-active or master/slave replication? or Amazon EC2 RDB)
4: -storage layer: shared-storage done via NFS, or DRBD, or cloud-technologies with amazon

x: on all systems, you can employ virtualization & advanced networking techniques (NAT) in order to avoid 100 physical servers for 100 web services (daemon)
y: for the management I would use "puppet" or RPM or a similar software
z: for the server monitoring i would use Cacti or Zabbix, and for bandwidth monitoring MRTG.
A provisioning policy grants access to many types of managed resources, such as Linux LAMP Servers, Windows NT� servers, and Solaris servers.

Each provisioning policy consists of the following components:
General Information
Membership
Entitlements

A provisioning policy must target one or more service instances, service types, or a service selection policy. System administrators can use provisioning policy parameters to define attribute values that are required and values that are optional.

A provisioning policy defines the accounts and access that are authorized to users or automatically provisioned for users by the user's role. When account and access have been authorized to a user by a provisioning policy, they can be requested by the user. A provisioning policy can be used to support role-based provisioning, in which accounts and access are automatically provisioned to a user, based on the user's roles.

Provisioning policies are important to support security compliance. IBM Tivoli Identity Manager evaluates all account and access requests based on the provisioning policy to identify accounts and access that are not authorized and take appropriate actions to handle noncompliant account and access. Based on the enforcement configuration on the service, Tivoli Identity Manager can either mark the account or access as noncompliant; suspend the account; alert administrator to revoke disallowed privilege; or automatically correct the account or access and make it compliant. A provisioning policy provides a key part of the framework for the automation of identity life cycle management.

Tivoli Identity Manager provides APIs that interface to information about provisioning policies defined in Tivoli Identity Manager, and interface to the access granted to an individual task. These APIs can be used effectively to generate audit data.

When two or more provisioning policies are applied to the same user, a join directive defines how to handle attribute values from different policies. To work with policy joins or customize them, go to the navigation tree and select Configure System > Configure Policy Join Behaviors.

Provisioning policies can be mapped to services of a distinct portion or level of the organizational hierarchy. The business unit to which the provisioning policy belongs determines the services the policy governs. The scope of the provisioning policy indicates whether to cover services in the same level of the business unit or the subtree of the business unit. An entitlement in the provisioning policy support different types of service targets, including all services, services of same type, services defined by service selection policy; or specific service instance. In all cases, the services must be within the specified scope of the business unit where the policy is defined. A service selection policy enables service selection base on person attributes.

Seamless Provisioning and Deployment
The Web Farm Framework 2.2 is designed to enable you to create group of servers and setup provisioning for them with a one step process that is automated and keeps the web farm up to date. You can customize what gets provisioned, and include additional platform components. You can configure provisioning policy and add additional content to the farm. In addition, you can use the Web Farm Framework to view up-to-date status of provisioning and health of the servers in the farm.
----------------------------------------------------------------------------------------------------------
What's the difference between a class method and an instance method?

by Byron Tymvios
Class methods are methods which are declared as static. The method can be called without creating an instance of the class. Class methods can only operate on class members and not on instance members as class methods are unaware of instance members. Instance methods of the class can also not be called from within a class method unless they are being called on an instance of that class.
Instance methods on the other hand require an instance of the class to exist before they can be called, so an instance of a class needs to be created by using the new keyword. Instance methods operate on specific instances of classes. Instance methods are not declared as static.


* An instance method applies to an instance of the class (i.e. an object)
whereas a class method applies to the class itself.
In C# a class method is marked static.
Methods and properties not marked static are instance methods.

*
Simply, a class method (aka "static method") is a property for the WHOLE class, so its's called as className.methodName().
a class method can be used with just the class name.

BUT for instance methods, then each object have their own copy of them, so they r called as objectName.instanceMethodName().

Second difference :
-class ("static") methods can access ONLY static fields
-but instance methods can access ANY fields of the class.

A third a bit advanced difference is that class (Static) methods are bound to the class at compile time, while instance methods are bound to their objects at run time...
I would add that a class method is called a "static" method in many other languages. And to answer the original question, accessors are instance methods because they are setting and getting the state of a specific instance. In the above example, NSArray count returns the number of objects in a specific instance.

Answer:
Instance methods can be called by the object of a Class whereas static method are called by the Class.
When objects of a Class are created, they have their own copy of instance methods and variables, stored in different memory locations.
Static Methods and variables are shared among all the objects of the Class, stored in one fixed location in memory.Static methods cannot access instance variables or instance methods directly-they must use an object reference. Also, class methods cannot use the this keyword as there is no instance for this to refer to.
Read more: http://wiki.answers.com/Q/Difference_between_instance_method_and_static_method_in_java#ixzz1vIQWuLiu


Are instance methods the accessors (getters & setters) while class methods are pretty much everything else?
-----------------------------------------------------------------------------------------------------------
Is Expedia, with 150,000 hotels in the fold around the world, finally giving up in its race to outpace Priceline�s brands, which count more than 210,000 hotels in their portfolio?
==============================================
Why are transactions ACID?
ACID (Atomicity, Consistency, Isolation, Durability) is a set of properties that guarantee that database transactions are processed reliably.
==============================================
Setting Up Replication Servers
One form of database "replication" involves copying a database to another server. But then you have to repeat the operation later if the original changes and you want to keep the copy up to date. To achieve continual updating of a secondary database as changes are made to the contents of a master database, use MySQL's live replication capabilities. This gives you a means of keeping a copy of a database and making sure that changes to the original database propagate on a timely basis to the copy automatically.
Replication Concepts
Database replication in MySQL is based on the following principles:
In a replication relationship, one server acts as the master and another server acts as the slave. Each server must be assigned a unique replication ID.
The master and the slave must begin in a synchronized state with identical copies of the databases to be replicated. After that, updates are made on the master server and propagate to the slave. Updates are not made directly to the replicated databases on the slave.
The means of communication of updates is based on the master server's binary update logs, which is where updates that are to be sent to the slave are recorded. Consequently, binary logging must be enabled on the master server.
The slave server must have permission to connect to the master and request updates. The slave's progress is tracked based on replication coordinates, which consist of the name of the binary log file from which the slave currently is reading and its position within the file.
You can have multiple slaves per master, but not multiple masters per slave. However, a slave can serve as a master to another slave, thus creating a chain of replication servers.
---------------------------------------------------------------------------------------------------
What are database indexes?
What is data base transaction?
How would you store/copy an object in perl?
What is stringify function, what it does?
Mem and Grep function in perl, how to interchange them, and what is better and when?
What is the data normalization?
Open filehandle has 2 and sometimes 3 arguments, can it be dangerous and when?
Simon
--------------------------------------------------------------------------------------
Differences between POST and GET?
--------------------------------------------------------------------------------------
Logical difference:
(1) GET is a resource/information fetch; POST propagates a change in state.
Implementation differences:
(2) GET sends all parameters as a part of URL (so, URL length limitations apply); POST sends the parameters as HTTP headers
(3) GET cannot encrypt parameters; POST can
(4) GET requests can be cached; POST requests cannot be
(5) GET doesn't allow binary data; POST does.
---------------------------------------------------------------------------------------
avoiding the escalation of an accident into a disaster
===============================================
- Finding the path for knight on a chessboard
- 8 queens problem