19
PRESENTED BY AZHAR K MUSTAPHA NERVESIS SDN BHD HOW TO BUILD AN ARTIFICIAL INTELLIGENCE WEB SYSTEM that can support more than 5000 request per second Platform: http://www.zygy.com Company: http://www.nervesis.com

How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

Embed Size (px)

Citation preview

Page 1: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

PRESENTED BY AZHAR K MUSTAPHANERVESIS SDN BHD

HOW TO BUILD AN ARTIFICIAL INTELLIGENCEWEB SYSTEM that can support more

than 5000 request per second

Platform: http://www.zygy.com Company: http://www.nervesis.com

Page 2: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

WITH ARTIFICIAL INTELLIGENCE

NERVESIS SDN BHD

Zygy gatekeeperPersonalAssistantPlatform,Identitymanagement&SingleSignonsystem

midasTypo-based“pagenotfound”advertisingtargetingTelcosubscribers

Zygy smart streamingAsolutionforVideoonDemand(VOD)andlivewebcastingforVideoandAudio(AV).

PROPHECYPublicConversationIntelligence

Page 3: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

PERSONAL ASSISTAnT PLATFORMRELATE WHAT MATTERS WITHOUT EFFORT

SSO | COLLATE | JOURNALIZE | RELATE

NERVESIS SDN BHD

Page 4: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

What is midas?

Turn URL typos into your

goldminesNow, “page not found” can be converted into a relevant advertising page for your business, noticed by millions of unique viewers.

www.lazadah.com.my/

Page 5: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

WebServer

DatabaseServer

Handle PresentationHandle AI LogicHandle Other Logic

Web Server

1-Webserver-1-Database with HIGH LOAD?

Store DataData CRUD (Create, RetrieveUpdate, Delete)

DATABASE Server NO RESPONSE

NERVESIS SDN BHD

Page 6: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

SCALING with COMPUTATIONAL THINKING

* http://www.cs.cmu.edu/~CompThink/* http://www.bbc.co.uk/education/guides/zp92mp3/revision

Divide & ConquerBootstrapping

Generalization /

SimilaritiesRules

NERVESIS SDN BHD

Page 7: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

Decomposition StEPS INTO LAYERS

Web RequestHTML PresentationAI and Logic LayerDatabase Layer

Request Routed by Session

Routed By Capacity

Static Content Dynamic HTML Boxes (Pagelet)

Probability Calculation | Edit Distance | Score |Feature Classification | More …Cache | Database Read | Write

NERVESIS SDN BHD

Page 8: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

PATTERNS OR SIMILARITIESWeb Request Can be routed by session

and capacityStatic HTML Characterized by file,

images, videos Pagelet Pagelets are independent if

content are independentProbability Calculation & Edit Distance

Some values are almost static

Cache Almost static values can be cached

Database Read Read cannot catch up with 4 million rows although with indexCertain group of tables are independent

Database Write Data update is not frequent

NERVESIS SDN BHD

Page 9: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

ALGORITHMS / RULES

Page 10: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

ROUTInG DISTRIBUTION

NERVESIS SDN BHD

Page 11: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

PAGELETS DISTRIBUTION

$("#shop“).load(“/pageletA“)

$("#shop“).load(“/pageletB“)

NERVESIS SDN BHD

Page 12: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

AI POST-TRAINING: PRECALCULATION & ANTICIPATION

Cache INPUTS ( xi )

PRECALCULATED PARAMETERS

MATRIX PRUNING (RE)

Naïve Bayes Classifier

Cost function for Deep Neural Network

CACHE OUTPUTS ( fi )

PRECALCULATED PROBABILITIES

ANTICIPATED CALCULATION

cMAP = argmaxc∈C

P(x1, x2,…, xn | c)P(c)

Feature-based Linear Classifier

NERVESIS SDN BHD

Page 13: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

Anticipatecalculationfor

nextiteration

ANTICIPATE

CacheInputs thatarealmost

staticwithcachestrategy

basedonsize.

OUTPUT

Precalculatecertain

probabilitiesand

parameters,

PRECALCULATION

CacheInputs thatarealmoststatic

withcachestrategybasedonsize

INPUT

ANTICIPATE

OUTPUTINPUT

PRECALCULATIO

N

DISTRIBUTED SMART CACHING

DATABASE

Persistent layer (part of Logic Layer) will update data thru cache instead directly to database

NERVESIS SDN BHD

Page 14: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

DISTRIBUTED DATABASES

NERVESIS SDN BHD

Database divided into several independent segmentsCache layer will update data only thru Master DB

Page 15: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

APPLICATION ARCHITECTURE

Distribution by weight or capacity (CPU, Memory, Disk IO, Network IO)

NERVESIS SDN BHD

Page 16: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

ABSTRACTION / GENERALIZATION

Page 17: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

INDEPENDENT DISTRIBUTED LAYERING Static Content

Routing

Static Content Clusters

AI Logic 1

Precalc Cache

Slave DB 1

PageletRouting

PageletClusters

AI Logic 2

Anticipate Cache

Master DB 1

Routing By Session

Static Content Clusters

AI Logic 3

Input Cache

Master DB 2

Routing By Capacity

PageletClusters

AI Logic 4

Output Cache

Slave DB 2

NERVESIS SDN BHD

Page 18: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

AZHAR K. MUSTAPHA CONTACT

Nervesis Sdn Bhd

Lot 5.50, Wisma Central, JalanAmpang 50450 Kuala Lumpur,Malaysia

www.nervesis.comwww.zygy.commidas.nervesis.com

[email protected]

www.facebook.com/azhar.k.mustapha

my.linkedin.com/in/azharkm

ADDRESS:

WEBSITE:

EMAIL:

Nervesis Sdn BhdCOMPaNY:

Page 19: How to Build An Artificial Intelligence Web System that can support more than 5000 request per second

THANKS FOR YOUR TIMEPlatform: http://www.zygy.comCompany: http://www.nervesis.com