kiss.ts - the keep it simple software stack for 2017++
TRANSCRIPT
![Page 1: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/1.jpg)
kiss.tsThe Keep It Simple Software Stack
Ethan Ram | 18-Nov-17
kiss.ts | sbtech.com | ista-20171
![Page 2: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/2.jpg)
kiss.ts - The Keep It Simple Software Stack
kiss.ts | sbtech.com | ista-20172
![Page 3: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/3.jpg)
20172012
ASP (VB)
ASP.NET (C#)
JSP (Java)
LAMP Stack (PHP)
Django (Python)
Ruby on Rails (Ruby)
Node.js (JavaScript)
What is the most popular SW Stacks?
kiss.ts | sbtech.com | ista-20173
![Page 4: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/4.jpg)
kiss.ts | sbtech.com | ista-20174
KISS SW Stack 2017Wishlist
Ops Flow
QA
Dev
![Page 5: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/5.jpg)
KISS SW Stack 2017 - Wishlist
kiss.ts | sbtech.com | ista-20175
Dev Infra.•Few simple technologies
•Mature & corporate ready
•Easy componentization
•Open standards
•Open-source (free)
•Package manager
•Cloud and on-prem.
•Scalable and performant
One Language!•Scripted and typed
•Backend, frontend and build
•Excellent dev tools
•Opinionated and low-level
•Dev, Unit test
•Integration Test, Stress Test
•DevOPs
![Page 6: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/6.jpg)
kiss.ts | sbtech.com | ista-20176
kiss.ts
•NodeJS
•TypeScript
•ReactJS
•Koa Server
•PostgreSQL
•Docker
NodeJS
![Page 7: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/7.jpg)
kiss.ts | sbtech.com | ista-20177
Why NodeJS?“… enabling both the browser and server applications to be written in JavaScript. It
unifies our engineering specialties into one team…”
(Jeff Harrel @ PayPal)
“… servers were cut from 30 to 3. The development itself was unusually fast…”
(Kiran Prasad @ LinkedIn)
“… You can make it scale, and it’s very performant…”
(Eric Ferraiuolo @ Yahoo)
“… lightweight, modular and fast application… startup time of the new app
has been reduced by 70%” (Kristofer Baxter @ Netflix)
“… we are moving every product & every site within PayPal to Node... We are seeing
big scale gains, performance boosts and big developer productivity…”
(Justin Lowery @ PayPal)
“… each major feature became a thin, independent web app.
Now teams are able to launch new features quickly and independently…”
(Adam Geitgey @ Groupon)
![Page 8: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/8.jpg)
• Open-source, cross-platform
• Google's V8 JavaScript engine
• Event loop
• Low-level async I/O API
• Node Package Manager
• Large and active community
• Supported by all major cloud providers
• Followers: Vert.x (Java/Groovy), EventMachine (RoR), libuv (C, PHP), Twisted (Python), TPL (.NET Core) etc.
Node.JS - JavaScript Run-time Environment
kiss.ts | sbtech.com | ista-20178
![Page 9: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/9.jpg)
code is messy runtime errors on
invalid types callbacks everywhere functional programming seems inconsistent
IntelliSense is #@%!@ hard to master
kiss.ts | sbtech.com | ista-20179
But I hate JavaScript
![Page 10: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/10.jpg)
kiss.ts | sbtech.com | ista-201710
kiss.ts
•NodeJS
•TypeScript
•ReactJS
•Koa Server
•PostgreSQL
•Docker
![Page 11: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/11.jpg)
• Code is nice and tidy!• Types, interfaces, classes, inheritance• Object oriented programming• Generics, promises await/async
• Real-time developer support• Type checking in coding time• Excellent IntelliSense in IDE• Linter forces devs write to standards
• Easy to learn from C# or Java
• Transpile to any JS version.
• Built by Microsoft
TypeScript – JavaScript Supercharged!
kiss.ts | sbtech.com | ista-201711[Transpile it]
![Page 12: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/12.jpg)
TypeScript – JavaScript Supercharged!
kiss.ts | sbtech.com | ista-201712
Transpile to ES6
![Page 13: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/13.jpg)
TypeScript on VSCodekiss.ts | sbtech.com | ista-201713
![Page 14: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/14.jpg)
Stack Overflow Developer Survey 2017
kiss.ts | sbtech.com | ista-201714
![Page 15: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/15.jpg)
kiss.ts | sbtech.com | ista-201715
kiss.ts
•NodeJS
•TypeScript
•ReactJS
•Koa Server
•PostgreSQL
•Docker
![Page 16: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/16.jpg)
kiss.ts | sbtech.com | ista-201716
ReactJS JSX Example
![Page 17: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/17.jpg)
• Stateful Components• Declarative code• SASS styling• Webpack bundle delivery• Tool-set using NodeJS• Debugging tools
• React Native• Open Source & Free• React Bootstrap, Ant Design, React
Router, React SPA, Redux…• Built by Facebook
ReactJS Ecosystem
kiss.ts | sbtech.com | ista-201717
![Page 18: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/18.jpg)
kiss.ts | sbtech.com | ista-201718
kiss.ts
•NodeJS
•TypeScript
•ReactJS
•Koa Server
•PostgreSQL
•Docker
![Page 19: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/19.jpg)
• Designed by the team behind Express
• Web applications and APIs
• No callbacks and simple error-handling
• Official Middleware libs• Basic-auth, JWT
• Router, URL rewriting
• REST, params validation
• Socket.io
• Parsers, range, etag, fav-icon,
• gzip, minify, static-cache
• Static/S3 file-server, CDN
• Logger (Bunyan), statsD
• Sessions in memory / Redis / cookies
• Templating engines
• Locales, i18n
• Mocks and server-rendering
• …
KOA Web Server
kiss.ts | sbtech.com | ista-201719
![Page 20: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/20.jpg)
kiss.ts | sbtech.com | ista-201720
kiss.ts
•NodeJS
•TypeScript
•ReactJS
•Koa Server
•PostgreSQL
•Docker
![Page 21: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/21.jpg)
Not Only SQLRDBMS
PostgreSQL: RDBMS, Web Ready and Open/Free
kiss.ts | sbtech.com | ista-201721
• JSON/JSONB/XML types (indexed)
• HStore type (indexed key-value)• Listen-Notify • Queues• Text stemming, searching and
Regex• Columnar store, Tables in RAM• Object Store / Large binaries• Graphs, RTF, Geospatial• Time series, ranges• Unlogged tables
• ACID compliant
• Structured, Normalized data
• Triggers, Materialized views
• Transactions, Nested transactions
• SQL:2011, Stored procedures
• Query planners, Advisory locks
• Row level security
• HA: Clustering, Log-shipping etc.
• Sharding
• Performance analysis tools
Oracle
MSSQL
MySQL
PostgreSQL
DB2
SQLite
Redis
MemchacheD
Resque
Lucene
InfluxDB
S3 Object Store
Celery
Cassandra
Hadoop
MongoDB
Neo4J
RethinkDB
RabbitMQ
hBase
Hive
KDB
LogStash
Kafka
Aerospike
![Page 22: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/22.jpg)
kiss.ts | sbtech.com | ista-201722
PostgreSQL ORM: Sequelize-Typescript Example
Annotations describe model:
Schema Types relation
Model creates the DB schema
CROD built-in
Expressive search returns typed
objects
Add validations, translations, hooks,
indexes, foreign keys etc.
![Page 23: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/23.jpg)
kiss.ts | sbtech.com | ista-201723
kiss.ts
•NodeJS
•TypeScript
•ReactJS
•Koa Server
•PostgreSQL
•Docker
![Page 24: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/24.jpg)
kiss.ts | sbtech.com | ista-201724
Docker is a Shipping Container System for Code
![Page 25: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/25.jpg)
• Build once - run anywhere• Run locally, in QA, in PROD or in the cloud• All dependencies are in• OS independent
• Cheap• Fast to boot• Revert back to image• Low runtime overhead• Open source & free
• Quality• Clean environment to run on• Every dev can run full system on her machine.• Less hardware and VMs across DEV/QA/STG.
kiss.ts | sbtech.com | ista-201725
Containerize It!
![Page 26: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/26.jpg)
kiss.ts | sbtech.com | ista-201726
SDLC With Docker: Dev, QA and DevOPs
Ops Flow
QA
Dev
Create a Feature Branch
Dev: Test-first code it
Pull Request to Master
Build; Run unit-tests;
Coverage %
Pull Request Ready
Code Review
Merge to Master
Build a Dockerpackage
Save Dockerin ‘Snapshot Repository’
Deploy Docker to CI
env.
CI: Run Test
automation
Green Master
Deploy Docker to QA env.
Manual QAPromote
Docker to ‘Release’
Deploy Docker to
STG
STG: Run test
automationStress Test
Deploy Docker to
PROD
PROD: Run test
automationMonitor App
![Page 27: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/27.jpg)
kiss.ts | sbtech.com | ista-201727
kiss.ts - demo
•NodeJS
•TypeScript
•ReactJS
•Koa Server
•PostgreSQL
•Docker
![Page 28: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/28.jpg)
Corporate KISS.TSkiss.ts | sbtech.com | ista-201728
SDLC Process
Ops Flow
• PostgreSQL
• Docker
• PM2 / PMX
• VS Code
• Jenkins
• Ngnix
• Ansible
• Kafka Q
• ELK
• Core OS
DevQA
• Agile scrum framework
• Multi-functional team
• Full stack devs
• Test automation devs
• DevOps
• Each dev has the full stack locally
• Test first coding
• Master branch coverage >80%
• Component APIs are contracts
• Test integration first
• DB is the main infrastructure
• Minimize MVP release scope
• Team delivers feature to PROD
• NodeJS
• TypeScript
• ReactJS
• Koa Server
• Jest
• Cucumber
• Selenium WDIO
• Artillery
![Page 29: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/29.jpg)
kiss.ts - Q&A
kiss.ts | sbtech.com | ista-201729
Ethan Ram
e-mail|GitHub|Linkedin
![Page 30: Kiss.ts - The Keep It Simple Software Stack for 2017++](https://reader034.vdocuments.us/reader034/viewer/2022051404/5a65a96b7f8b9a0a5f8b4877/html5/thumbnails/30.jpg)
• Tutorial: Building a RESTful API with Koa, PostgreSQL in TDD
• Turning PostgreSQL into a queue serving 10,000 jobs per second
• Non-relational PostgreSQL
• TypeScript at Slack
• http://docs.sequelizejs.com/manual/installation/getting-started
• https://github.com/RobinBuschmann/sequelize-typescript/blob/master/README.md
Links
kiss.ts | sbtech.com | ista-201730