Object oriented programming
1
An object oriented programming environment can be thought of as consisting of an empty shell which obeys instructions to fill the shell space with objects of the programmer's imagination.
The objects filling the shell space can be anything which the programmer dreams up and these objects are activated by messages. The message paths, that these messages take, make up an infra structure which join all the objects together into an interacting system which also includes communication links to the environment outside of the programming shell.
Object oriented thougths
Object oriented thinking
As you will no doubt appreciate, the process of thinking is no simple matter; thinking about thinking is especially complicated.
Normally we do not have to think about the way we think; the brain seems quite capable of working out its own strategy. However, for many purposes in life it is quite beneficial to work out before hand the best way to think about a situation or solve a problem.
To over simplify, we can consider the brain to choose between two possible strategies when a problem presents itself - an object oriented strategy or a structured strategy. Which strategy the brain chooses is not necessarily a conscious decision process as the brain seems to be able to make the appropriate choice between the two automatically (in fact it is highly likely that the brain is capable of using both strategies simultaneously).
In essence, the brain chooses to use an object oriented thinking strategy when it is dealing with uncertainties or being creative and a structured strategy when it is dealing with known facts or organising a situation which has no important unknown variables.
The difference between structured thinking and object oriented thinking can be examined by considering how one might design and plan a project.
With structured thinking you would start by forming a skeleton framework of an overall plan and, from that plan, work downwards to sort out all the structural elements at an ever increasing level of detail.
With object oriented thinking, you need have no fixed or definite plan of the final structure, but, might start anywhere, building up a structure from small self contained subsections which are fitted together as you go along.
This difference between structured thinking and object oriented thinking can be illustrated by considering the two writing strategies of a historian and a creative novelist.
A historian would probably have full knowledge of all the subject matter which will form the basis of the total content of the writing. The historian might sub divide this available material into categories such as date periods, economics, politics, war, social conditions, etc.
Probably, the historian will use some form of outliner to divide and sub divide all the available information into suitable hierarchically structured sections; into these the historian can enter further relevant facts and observations. This would be a sensible and efficient method to proceed when writing an account of the history of a particular period, with the structure and organization being predetermined from the outset.
A creative novelist on the other hand would be unlikely to work out the full details and structure of a novel before starting to write the story; the novelist may have only the vaguest of ideas as to what the content or even the outline is going to be when the writing commences.
It is more likely that the novelist will begin by creating a character and then imagining that character in a situation. As the novelist visualizes how the character might react in the situation, the character will be developed and fleshed out. New characters will be introduced into the situation, who will react with the first character in the novelist's imagination to trigger and initiate new directions and events.
As the story proceeds, new situations, characters and developments will be introduced and the resulting interactions within the novelist's mind will be written down to produce the content of the novel (many novelists have talked about this phenomenon of characters in their novels seeming to develop a life of their own and for the novel to take its own directions).
You will readily see that the historian is limited to the structure and organization decided upon at the start of the project. The novelist, by contrast, can develop the content in any conceivable direction and build in all kinds and levels of complexity.
Object-oriented thinking is not technically difficult to understand, it is just a matter of getting the conceptual framework to click into place. As was mentioned at the beginning of "Lingo Sorcery", creativity can be conceptualized as an OOPS process because you start off with a few small constructs and progressively add to them as inspiration and opportunity allow.
With structured thinking, the results are predictable. Using an object oriented approach, the resulting creations can often be as much of a surprise to the creator as to the people who admire the creator's creativity.
Of course, thinking need not be (and seldom is) confined to a single strategy. Object oriented thinking could lead to bizarre results if left unrestrained. Usually an object oriented process will be constrained, either by a limiting outline or from continual feedback, which hold the wanderings of an object oriented design to within a sensible but flexible envelope.
In its very general sense, object oriented thinking is about objects reacting with each other and their environment. Interaction between objects is facilitated by message paths which provide hierarchies and precedence; allowing objects to communicate and send messages to one another. The power of this modular system is that it can be continually changed and extended to any degree of complexity and the final complexity does not have to be visualized from the beginning: it can just grow or evolve.
Also, unlike structural thinking, the complexity of the resultant outcome of an object oriented structure need not have to be understandable in its final stage; this allows the design of a structure to become so complex that it can exceed the capacity of even the designer to comprehend the final outcome.
The Internet and the World Wide Web are typical of the structures which can evolve in an unrestrained object oriented environment. Perhaps you can see how totally inappropriate it would be to design products to exist in such an environment using a structured design technique?
This is why object oriented techniques are essential to the design of intelligent Web agents and Intranets. Their final form cannot be visualized at an initial stage. They will have to evolve in a changing and evolving environment to achieve a degree of complexity which would be beyond the capabilities of any single designer to foresee from the outset.
As was illustrated in "How God Makes God", biological structures evolve in an object oriented fashion to adapt to their environments. They grow and adapt by adding and mixing communicating modules at all levels of complexity.
To see the power of object oriented design in action one has to look no further than the examples of meiosis and metamorphosis in nature.
Meiosis is the processes whereby two cells recombine their genetic material to produce a genotype which is a mixture of the genes of the two cells. This is how humans are formed at the time of conception, when some of the genetic components of the father's sperm is mixed with some of the genetic components of the mother's egg to produce an unique individual from the resultant reconfiguration of the genetic modules.
More dramatically, the results of re configuring organic modules can be observed in the metamorphosis of invertebrates. An example of which is the caterpillar, which re configures its component parts to turn into a butterfly.
Cleverly designed object oriented programs can exhibit similar powers of metamorphosis simply by re configuring message paths between objects.
The ubiquitous nature of object oriented strategies and design is only fully realized when you take into consideration that objects can also be abstract concepts.
The [heuristic] strategy for creating wealth in HGMG can be considered as a virtual object. This virtual object is made up from a combination and hierarchy of other objects which consist of rules. Reconfiguring the rule objects will change the nature of the virtual strategy object.
In a sense, writing is a form of OOPS - with the words representing objects. One message path links the objects together in their sequential arrangement on the page and another meta path is reconfigured by the brain to connect the words together in a different arrangement for comprehension. Recombining words in different ways along different message paths create new meanings.
The magic comes from realizing that a system of virtual objects need not be rigid - objects can be re configured into completely new configurations resulting in totally different sets of virtual objects (simply by changing the pattern of the information paths and links).
Object oriented thinking is about polymorphing structures, whose shapes you can change at will - is a weird thing, both to describe and to imagine.
[Index]
[Next - Object-oriented programming]
[Back - Objects in nature]
Peter Small August 1996
Email: peter@genps.demon.co.uk
Version 1.00
© Copyright 1996 Peter Small
No reproduction in whole or part without prior permission
Resume - Action words
Free Resume Builders - Sources, Links and Blunders
- achieved- added - broadened - consolidated - coordinated created - developed - designed - eliminated - established - evaluated - expanded - generated - identified - increased - initiated - invented - maintained - managed - negotiated - organized - performed - planned - purchased - reduced - saved - simplified - streamlined - strengthened - supervised - trained - transferred - utilized - verified - worked - wrote
Load Balancing for web sites
Loadbalancing: Load balance techniques
SSC result publishing site overhit. Some suggestions.
On 26th July People were eagerly waiting to know SSC results from internet. Education board a month back announced that they would publish SSC result in their portal http://www.educationboard.org.bd. Although the site would start working in evenning at 4.00 pm, guardians welcomed that initiative. Everyone liked internet as that might save crowd, noise, schorching heat and transport cost. Another interesting reason why people liked it was they wanted to know result of candidates of neighbours and relatives. Well, may people did not had computers let alone internet in their house. They found rushing to nearby cybercafes.
At 3.50 am, I visited the educationboard site. It was a pleasant looking site designed by BUET Compute center. But I had doubt that such a heavy site would not be able to sustain in huge hits.
My afraid became true, traffic increased to half a lac in few minutes after its operation, site drastically slowed, eventually crashed and left dead whole night long . This is not the first case in Bangladesh. It happened previously many times. For example,during Parliament election, all election result publishing sites went dead although numbers of hits were not unexpected. To tell in better way all new paper portals: ittefaq, prothom-alo, jugantor etc went to comma.
Another example is Gonophone Quiz competition. This renowned ISP declared a online quiz competion with huge prize money. Such a big company, who had lots of technical experts, did not either consider how to handle good amount of hits, or ignored the pitfalls.
But Loadbalancing is not difficult and often could be done in affordable cost. If we implement some loadbalancing features in our next sites we could avoid shamefull notices like “site is temporarily unavialable due to more than 1 lac hit in last hour”.
All load balancing distributes a common workload among multiple machines, but the term is difficult to define more specifically in a Web context. The definition of load varies among load-balancing products for Web servers: One product defines load as the retrieval of static HTML pages, and another defines load as the back-end processing that dynamic Web content requires. Vendors don't use a common definition of balance, either. Web-based load-balancing products differ significantly in their methods for distributing servers' loads.
1. Load-Balancing Techniques
We can achieve load balancing on a Web server using the Domain Name System. DNS's round-robin function spreads incoming TCP/IP requests evenly among several servers. This load-balancing technique is easy to implement. But DNS doesn't keep track of which servers are active and which are down, so it sends TCP/IP requests to servers whether they are online or offline. To distribute your Web site's load without interrupting its performance, we need to implement a load-balancing solution that works seamlessly when a server fails.
2. Virtual IP addressing.
Virtual IP addressing lets multiple servers respond to requests for one IP address. For example, suppose you have three servers with the IP addresses 222.222.231.1, 222.222.231.2, and 222.222.231.3. You can use virtual IP addressing software to configure all three servers to use IP address 222.222.231.10. You designate one server as the routing, or scheduling, server. The scheduling server receives all inbound traffic and routes requests for Web content to other servers based on load-balancing parameters you set. If the scheduling server fails, virtual IP addressing software assigns routing responsibilities to another server.
Because the Web interface uses one IP address, virtual IP addressing achieves uninterrupted service unless all your Web servers fail. The disadvantage of virtual IP addressing is that you can't easily watch the flow of Web traffic from an external network monitor because all the servers use one IP address.
3. HTTP redirecting.
HTTP redirecting distributes a Web site's load among multiple servers by connecting users' browsers directly to the servers. When you select a Web site's URL, you usually connect directly to the computer servicing that URL. For example, type http://www.winntmag.com, and the server designated to respond to requests for that HTTP address will provide the desird Web site. However, if this site has a replica on a server with the URL http://www.linux.com, an HTTP-redirecting program can redirect users' browsers to http:// www.linux.com to balance the Web site's load. HTTP-redirecting software automatically directs browsers to a Web site replica if the primary URL's server fails. HTTP redirecting's main disadvantage is that it doesn't work with all Web browsers.
4. Application load balancing.
Application load-balancing software distributes a Web site's workload among servers according to the content browsers request. A primary Web server accepts all incoming Web traffic and performs tasks such as static HTML file transmissions. The primary server redirects back- end applications, such as Active Server Pages (ASP) and Common Gateway Interface (CGI) programs, to other computers. Servers process back-end applications more efficiently when those ap- plications aren't intermingled with HTML file processing, so application load balancing reduces response time for back-end applications.
5. Testing sites Load tolerance
There are few good tools availble to check how much load a site can handle. Windows 200 has a tool called WCAT. Linux has similar one tool called PagePoker available to download from http://node.to/hacks/
Some suggestion for SSC result processing portal
1. The SSC result portal will be implemented in numbers of servers each having a real IP. It may be a matter of cost.
I have an Innovativ idea. Education board may contact ISP Association and ask each ISPs to upload a copy of database. I talked to Mr. Sumon Ahmed Sabir. He told that ISP Association will consider such case, since this is a national interest.
2. DNS servers of current portal will have list of all servers Ips.
3. Site home page should be HTML files. Dynamic PHP/ASP sites are generally not stored in Cache since their size is unknown to proxy servers.
4. Site will be only with TEXT content. Images multiplied by numbers of hits may choke down the web server.
5. Instead of database, LDAP technology should be used. LDAP is much faster than database.
Google
Tribune india, mar 29,2002
http://www.tribuneindia.com/2002/20020329/world.htm
3 more graft cases against Hasina
Dhaka, March 28
The Bureau of Anti-Corruption (BAC) has filed three more graft cases against former Prime Minister and Awami League chief Sheikh Hasina, six ex-ministers of her Cabinet and five government officials.
The ministers charged with corruption are former Finance Minister Shah A.M.S. Kibria, former Industries Minister Tofail Ahmed, former Agriculture Minister Motia Chowdhury, former Education Minister A.H.S.K Sadique, former State Minister for Science and Technology Nooruddin Khan and former State Minister for Planning Dr Mohiuddin Khan Alamgir.
In the latest corruption cases, Sheikh Hasina and the former ministers have been accused of embezzling Tk 21,57, 050 by appointing consultants for the Bangabandhu Novo Theatre, a planetarium, without inviting bids.
They have also been accused of embezzling Tk 4,52,65,646 in the purchase of equipment for the theatre by giving the contract to the second lowest bidder, Goto Optical Manufacturer of Japan, ignoring the lowest bidder.
The BAC filed the cases with the Tejgaon police station in Dhaka after getting approval from the Prime Minister’s Office. With these three cases, the number of graft cases filed against Sheikh Hasina stands at five. UNI
Creating the list of contacts
Every year i wanted to make a plan to send all a greeting card.
But it does not work.
Yellow buttons in silk cuff
Doors opened by chicky pelican stumbled me that day. Pythons or pyramids both are same in different view. Nobody glazed at themselves. Why?
I dont know. Does he picks ticks of wrist watches? who knows.
The day is grey. As if the brisk butterfly speading its pink wing in bethelhem basket. Chirping whisper is another private sound they could not at last made. I hover and tumble down. Who know the globe. Paws and claws that left me in white sand.
The brown fox could not kill the enemy. They all shove. Cool and quietly.