internet without internet
Post on 19-Jul-2015
143 Views
Preview:
TRANSCRIPT
Texte
Internet without Internet(almost)
ElaoTalk - 2015-04-23
$(`whoami`)
PHP developper for 12 years
Engineer @takeatea for a year
@xavismeh
http://www.takeatea.com
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
Customer needs
Website data updated from internal network
Real time (almost)
Least painful process
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
Possible solutions
Install a VM onsite to serve an API
Install a VM onsite to push notifications to website
Way to go — onsite
SQL Trigger
Crontab
RabbitMQ publish to local server
Onsite workflow overview
Onsite storage table
Website sync
Consumer fetch RabbitMQ onsite instance messages
Perform operation
Send a message to a local RabbitMQ instance
Acknowledge (almost)
Onsite PHP code fetch website RabbitMQ messages
Delete related database row
Pros and cons
TEST, TEST, TEST
LOG, LOG, LOG
Think FIFO
Be fault tolerant
KTHXBYE
top related