micro services workshop

31
Topic Title: Micro Services Workshop Name of the Speaker : Rajith Raveendranath Company Name : SunTec Business Solutions Private Ltd. http://www.unicomlearning.com/2016/World_Devops_Summit_Bangalore/

Upload: rajith-raveendranath

Post on 12-Apr-2017

144 views

Category:

Software


1 download

TRANSCRIPT

Topic Title: Micro Services Workshop

Name of the Speaker : Rajith Raveendranath

Company Name : SunTec Business Solutions Private Ltd.

http://www.unicomlearning.com/2016/World_Devops_Summit_Bangalore/

Why Micro Services?

Apache HDFS

1. Master/Slave architecture2. Name Node manages meta data3. Single Name node simplifies the

architecture4. Name Node takes care of allocation,

replication, backup5. User data flows through data nodes

only

Componentize ..

backup

cache

checkpoint

FSImage : persistence of metadata

INode: In memory metadata

Is this good enough?

.. Using Services

Fault Tolerance

Fault Detection

Replication

Recovery

Big Data Operations

Coherency

Allocation

Persistence

Componentize Using Services

Dependencies

100+ external dependencies

20+ users

Segregate Data

Segregate Data

INode: In memory meta-data

Loosely couple

FSImage NNStorage

setRestoreFailedStorage

format

getImageDirectories

getLayoutVersion

processStartupOptionsForUpgrade

dirIterator

Tightly coupled

Facade NNStorage

setRestoreFailedStorage

format

getLayoutVersion

processStartupOptionsForUpgrade

dirIterator

Session Facade

FSImage

apply

getImageDirectories

1. Componentize using Services2. Segregate data3. Loosely couple

Functional Programming

Functional Composition

Composition

apply

restore

getIterator

getImageDirectories

getLayoutVersion

set

format process

get

Structured Composition

Result apply(Object obj, Action act) {…if(act.equals(GET)) get(obj,act);else if(act.equals(SET)) set(obj,act)}

Result set(Object obj, Action act) {…switch(act) {case FORMAT:…case PROCESS:…}…

Combinatorial Logic

Bertrand Russell Haskell Curry

Functional Composition (Currying)

def format(obj : Object) = {…}

def set(setter:Result=>Object)(obj:Object) = {…setter(obj)}

def apply(obj : Object, action : Action) = {…case FORMAT:set(format)(obj)…}

Which one is the better expression?

def format(obj : Object) = {…}

def set(setter:Result=>Object)(obj:Object) = {…setter(obj)}

def apply(obj : Object, action : Action) = {…case FORMAT:set(format)(obj)…}

Result apply(Object obj, Action act) {…if(act.equals(GET)) get(obj,act);else if(act.equals(SET)) set(obj,act)}

Result set(Object obj, Action act) {…switch(act) {case FORMAT:…case PROCESS:…}…

Incidental Complexity

Memory Management

Result * getResult(Data data) {…}

int process(Data data) {…Result *pResult = getResult(data);…//was pResult allocated in the heap??//should I free it after use or not??}…

No man ever steps in the same river twice~ Heraclitus

Result getResult(Data data) {…}

void process(Data data) {…Result result = getResult(data);

…//Is result mutable??}…

Mutability

Memoize

def getResult(data : Data) = {…}

def process(data : Data) {…val result = getResult(data);

…//For the same input, getResult will always return the same output}…

Memoize

Concurrency

def getResult(data : Data) = {…}

def process(data : Data) = {…val result = getResult(data);…doSomethingElse();…}…

Arbitrary Order of execution

def getResult(data : Data) {…}

def process(data : Data) {…doSomethingElse();…val result = getResult(data);…

}…

Why Micro Services?

World Conference Next Generation Testing 2015

THANK YOU

Speaker Name: Rajith Raveendranath

Blogging @ agileiq.blogspot.com (AgileIQ)

Organized byUNICOM Trainings & Seminars Pvt. [email protected]

World DevOps Summit 2016

http://www.unicomlearning.com/2016/World_Devops_Summit_Bangalore/