13
Texte Internet without Internet (almost) Elao Talk - 2015 - 04 - 23

Internet without internet

Embed Size (px)

Citation preview

Page 1: Internet without internet

Texte

Internet without Internet(almost)

ElaoTalk - 2015-04-23

Page 2: Internet without internet

$(`whoami`)

PHP developper for 12 years

Engineer @takeatea for a year

@xavismeh

http://www.takeatea.com

Page 3: Internet without internet

Project overview

"e-commerce like" website

Categories are nested but allow a single parent only

Products are defined using 2 levels : "abstract" and

"concrete"

Relation between categories and products are

performed thanks to "abstract" ones

Page 4: Internet without internet

Customer needs

Website data updated from internal network

Real time (almost)

Least painful process

Page 5: Internet without internet

Customer constraints

Internal network is not reachable from the outside

Infrastructure relays on Microsoft products only

(SQLServer as main storage engine)

Validation rules are not always (well) known

Page 6: Internet without internet

Possible solutions

Install a VM onsite to serve an API

Install a VM onsite to push notifications to website

Page 7: Internet without internet

Way to go — onsite

SQL Trigger

Crontab

RabbitMQ publish to local server

Page 8: Internet without internet

Onsite workflow overview

Page 9: Internet without internet

Onsite storage table

Page 10: Internet without internet

Website sync

Consumer fetch RabbitMQ onsite instance messages

Perform operation

Send a message to a local RabbitMQ instance

Page 11: Internet without internet

Acknowledge (almost)

Onsite PHP code fetch website RabbitMQ messages

Delete related database row

Page 12: Internet without internet

Pros and cons

TEST, TEST, TEST

LOG, LOG, LOG

Think FIFO

Be fault tolerant

Page 13: Internet without internet

KTHXBYE