Skip to main content

wait / notify in Object not Thread

Within object oriented, an object behaves as if a human behaving
so assume you want to sleep and you don't want to trigger an alarm as it annoys you, so you ask your brother to awake you.
simple its you are a thread, when telling your brother that you will get asleep "brother.wait( )", an when he awakes you "brother.notify( )".

Comments

Popular posts from this blog

Not all Ps sting

  If someone meant to say Ps and pronounce it Bees. would this confuse you :). Ps is for the P that is the start of Properties and Practice Each application should have some properties and follow certain practices. Properties: Below are 5 properties we should try to have in our application with a small description of how to include them Scalable, Scale => Increase workload (horizontally scaling) Statless, no state should be shared among different application instances,  Concurrency, concurrent processing = Threads. Loosely coupled, decompose the system into modules, each has minimal dependencies on each other "modularization", encapsulating code that changes together "High cohesion".  API first, Interfaces, implementation can be changed without affecting other application. favor distribution of work across different teams.  Backing Services, "DB, SMTP, FTP ..." , treating them as attached resources, meaning they can easily be changed. Manageable, changi...

Micro-Service with mind-map

  If we were to give a definition to micro service, what will it be? A simple one is an architectural style, that functionally decomposes an application into a set of services, each service has a focused, cohesive set of responsibilities. Similar to most, it has to have some properties & practices, which we can categorize to a general ones and detailed ones “12-factors”.  Away from the 12 factor, Some general practice that be considered while decomposing a services:  Loosely coupled: minimum communication between Services. Cohesion: elements that are tightly related to each other and change together should stay together "Common Closure Principle (CCP)". Single responsibility principal (SRP): every micro-service should do one thing and do it exceptionally. When constructing an application or defining its architecture, we follow below three-step process: Identifying the system operations, functional requirement, which are the user stories and their associated user scena...

digging

Open SVG image in a browser, use arrows to navigate When you say digging, 1 st thought, most would think that you would plant a tree. How about digging in DATA 1 st Hadoop is a framework for processing large chunks of data, consisting of 2 modules HDFS: Hadoop Distributed File System "for managing files". Map-Reduce: hadoop methodology for processing data, where big chunks of data is divided into smaller chunks, each directed to the map f n to extract the needed data from, then the reduce f n where the actual processing we need takes place. Hadoop work on the whole data, in one time,  so it is considered Batch processing. 2 nd Hadoop eco-system It would be annoying, that each time you wish to do a task, you write a java code for each of the map function, then the reduce function, compile the code.. etc. yet Hadoop eco-system provide us with tools that could do so for us PIG: a scripting language "that is translated in the background to a ...