Development and deployment of polyglot systems
-
Upload
david-pichsenmeister -
Category
Technology
-
view
627 -
download
1
description
Transcript of Development and deployment of polyglot systems
![Page 1: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/1.jpg)
@3x14159265
development and deployment of polyglot
systemsby
david pichsenmeister
![Page 2: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/2.jpg)
@3x14159265
charging systems@3x14159265
startup-founder & tech lead:
![Page 3: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/3.jpg)
@3x14159265
the
system
![Page 4: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/4.jpg)
@3x14159265
![Page 5: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/5.jpg)
@3x14159265
why polyglot?
![Page 6: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/6.jpg)
@3x14159265
reasons for polyglot
● system is already live
● technologies/skills evolved
● current stack is already a “technical
debt”
● get rid of legacy code
![Page 7: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/7.jpg)
@3x14159265
service oriented architecture
● backend only
● choose what service to decouple
● design to use from any
language/platform
![Page 8: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/8.jpg)
@3x14159265
possible pitfalls
● use only one(!) message format (e.g.
json, xml, soap,...)
● make use of different HTTP request
and status codes
● document your internal API
![Page 9: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/9.jpg)
@3x14159265
“app oriented architecture”
● thin layer on top of SOA
● form set of features to standalone
app
![Page 10: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/10.jpg)
@3x14159265
orat.io appsplatformwidget
moderation
analytics
login
![Page 11: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/11.jpg)
@3x14159265
pros
● easier to maintain/test
● don’t effect your existing codebase
● seperation of business logic
![Page 12: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/12.jpg)
@3x14159265
cons
● over-fragmentation
● repeatedly functionality
● achieve model consistency through
all apps
![Page 13: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/13.jpg)
@3x14159265
model consistency
![Page 14: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/14.jpg)
@3x14159265
code generators
● define MDL
● use/write codegenerators to
distribute models to other languages
● compiler hook
![Page 15: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/15.jpg)
@3x14159265
code generators
● doctrine (php ORM) = MDL
● slick (scala ORM) = generates
classes from SQL
● custom code generator: Scala
classes → TypeScript classes
![Page 16: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/16.jpg)
@3x14159265
continuous deployment
![Page 17: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/17.jpg)
@3x14159265
deployment strategies
● always have working branch
● staging environment
● immutable infrastructure
![Page 18: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/18.jpg)
@3x14159265
automation
● automate everything that’s possible
● make use of cloud provider features
● shell scripts are your friend
![Page 19: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/19.jpg)
@3x14159265
![Page 20: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/20.jpg)
@3x14159265
deployment tools
SaaS:
![Page 21: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/21.jpg)
@3x14159265
database migrations
● some application changes require
changes in db schema
● simple and/or risky
● always a pain
![Page 22: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/22.jpg)
@3x14159265
simple changes
● add table
● add index
● add column
● ...
![Page 23: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/23.jpg)
@3x14159265
risky changes● rename/add column
● change foreign key
● migrate data from one table/column
to another
● ...
![Page 24: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/24.jpg)
@3x14159265
how we’ve done it
● migrate “on-the-fly”
● create new table for entity to be
changed
● “transfer” entity to new table when
queried
![Page 25: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/25.jpg)
@3x14159265
how we’ve done it
● delete entity on “old” table
● additionally run this procedure as
background job
![Page 26: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/26.jpg)
@3x14159265
must haves
● tool, which keeps track of db
evolutions
● simple integration into existing
project
![Page 27: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/27.jpg)
@3x14159265
must haves
● changelog
● up/down db evolutions
● intense testing
● backups
![Page 28: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/28.jpg)
@3x14159265
resourceshttp://blog.codeship.io/2013/09/06/the-codeship-workflow-part-4-immutable-
infrastructure.html
http://www.slideshare.net/b0ris_1/btrofimov-dbmigrationodjug
http://www.w3.org/Protocols/rfc2616/rfc2616-sec9.html
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
https://www.getchef.com/chef/
https://codeship.io/
http://jenkins-ci.org/
http://capistranorb.com/
![Page 29: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/29.jpg)
@3x14159265
resourceshttps://circleci.com/
http://git-scm.com/
http://blog.codeship.io/2013/08/30/the-codeship-workflow-part-3-deployment-
pipelines.html
http://www.pichsenmeister.com/
![Page 30: Development and deployment of polyglot systems](https://reader034.fdocuments.us/reader034/viewer/2022051817/547e85bfb379595e2b8b54ff/html5/thumbnails/30.jpg)
@3x14159265
thanks!feel free to add me on:
.../3x14159265