Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Multi-Tenant (SaaS) Uygulama Geliştirme

Multi-Tenant (SaaS) Uygulama Geliştirme

Kayseri Coders Haziran Buluşması

Konumuz: Multi-Tenant (SaaS) Uygulama Geliştirme

Bu ayki buluşmamızda, yazılım geliştirirken ürünümüzü bir çok müşteri için nasıl konumlandırabiliriz, Software as a Service (SaaS) bir ürün nasıl oluşturulur, bunu ön yüzden veritabanına kadar nasıl bir mimari ile çözebiliriz sorularına cevap bulmaya çalışıcaz.

Buluşmamız 22 Haziran Cumartesi saat 13.00'te Erciyes Teknopark Tekno-4 Oksijen Salonu'nda olacak.

Konuşmacımız Ahmet Pirimoğlu, Abis Teknoloji firmasında Yazılım Geliştirici olarak görev alıyor.

Ahmet Pirimoğlu

June 22, 2019

Transcript

41 slides
  1. Bana web sitesi lazım Elimdeki arabaları siteye gireyim Kime satmışım

    ne zaman satmışım siteye gireyim Borçlarımı alacaklarımı tutayım Girilen arabalar siteye girenlere caf caflı gösterilsin
  2. Ek İstekler Galerici Mesut Abi Araç sattığım kişilere yeni gelen

    ilgilenebilecekleri araçları e-posta ve sms atayım Galerici Niyazi Abi Müşterilerimi e- posta ve sms atarak rahatsız etmek istemem Sahibinden.com ile işim olmaz çok komisyon alıyor Sahibinden.com ile entegrasyon kuralım, araçları oraya aktarsın
  3. Farkları Neler Geleneksel  Müşteriye özel kurulum  Müştenin sağladığı

    ortamda çalışır, müşteriye özeldir  Kod yönetimi ve kod güncellemek sorundur  Bakım ve donanım maliyetleri Software as a Service (SaaS)  İnternet üzerinden erişilen merkezi uygulamadır  Bir çok müşterinin uygulamaya erişirken tek kod kaynağı üzerinden çalışması sağlanır  Bir müşteri için çözdüğün sorun tüm müşterilerde çözülmüş olur  Cloud hizmetler kullanılarak maliyet kazancı
  4. Veritabanı Tasarımı  Single Database  Single Database, Multiple Scheme

     Single Master DB, Multiple Tenant Database  Multiple Database
  5. Veritabanı Tasarımı - Single Database (all tenants in one database)

    Faydaları  Ease of implementation  Fast deployment Zararları  Isolation  You have to actively do filtering all the time.  Security  You have to let all tenants access the data, security is in the app logic level.  Customizability – Extensibility  In a shared environment it is hard to do a lot of extensibility in the data, because each client is stepping on each other toes.  Backup / Maintainability  Scalability  Database Pooling  Partitional Table / Seperate Schema  Billing & Costs  Versioning
  6. Veritabanı Tasarımı - Isolated Databases (Single Database /Scheme Per Tenant)

    Faydaları  Scalability  Security  Custom schema for tenant  Ease of migration old applications to multitenant approach Zararları  Uneven distribution of data  Reporting  Increased required resources  Maintenance  Difficult deployment and maintenance  Database Migrations
  7. Veritabanı Tasarımı - Single Master DB, Multiple Tenant Database Host

    Database Tenants Users Subscriptions Tenant Database Products ProductCategories Separate Host and Tenant Application
  8. EF Sample - Shared Database, Shared Schema  EF Core

    – Query Filter  Entity Framework Plus  https://entityframework-plus.net/query-filter
  9. EF Sample - Shared Database, Shared Schema  AspNetBoilerplate –

    Multi Tenancy  Automatic Data Filtering  https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy
  10. SaaSKit  SaasKit is a .NET toolkit for building SaaS

    (Software As A Service) applications.  https://github.com/saaskit/saaskit/wiki/SaasKit-Multitenancy
  11. Cache  Tek uygulama varsa cache tekil olacak  Tüm

    tenant lar için ortak cache olacak  Çözüm olarak cache key ine tenantId yi de vermek gerekiyor  Key: "Products.134"  Values: ....
  12. Geliştirme Ortamı - Tenant Based Branch Faydaları  Dedicated changes

    for tenants  Handling common changes  Code security Zararları  Deployment process  Maintenance  Changes management
  13. Geliştirme Ortamı - Single Codebase Faydaları  Easier deployment 

    Possibility of custom changes Zararları  All of the code in single repository  Difficult to implement custom feature
  14. Özelleştirme İhtiyacı Configuration Values  Şirket logosu  Özelleştirilmiş yazılar

     Özelliklerin açıp kapatılması  Feature Flags Customize Business Process  Plug-in architecture (Dependency Injection)  Versioning  Single instance -> Container  Rules Engine
  15. Teşekkürler  Multi-Tenant Data Architecture http://msdn.microsoft.com/en- us/library/aa479086.aspx  Developing Multi-tenant

    Applications for the Cloud, 3rd Edition http://msdn.microsoft.com/en-us/library/ff966499.aspx  Berkeley University SaaS presentation http://bit.ly/1qlSQ56  Database design in SaaS platform http://labs.octivi.com/database-design-in- saas-platforms/  Multi Tenancy -The Physical Data Model http://ayende.com/blog/3497/multi- tenancy-the-physical-data-model  Development strategies for multitenant platforms http://labs.octivi.com/development-strategies-for-multitenant-platforms/  Multi Tenancy - Approaches and Applicability http://ayende.com/blog/3530/multi-tenancy-approaches-and-applicability  Devnot TV - Multi-tenant (SaaS) Uygulama Geliştirme https://www.youtube.com/watch?v=i4EsP1cN64g  Multi-tenancy - single database vs multiple database https://softwareengineering.stackexchange.com/questions/141261/multi- tenancy-single-database-vs-multiple-database  Entity Framework Multitenancy https://weblogs.asp.net/ricardoperes/entity- framework-multitenancy

More Decks by Ahmet Pirimoğlu

Other Decks in Programming