1 / 42

Projet “Velocity” le cache mémoire distribué

Projet “Velocity” le cache mémoire distribué. Yves Chtepenko Architecte de solution Cambridge Technology Partners. Premium Partner. Budapest 40 Consultants. India 4000+ Consultants. Zurich 40 Employees. Nyon 170 Employees. Mission

josh
Télécharger la présentation

Projet “Velocity” le cache mémoire distribué

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Projet “Velocity” le cache mémoiredistribué Yves Chtepenko Architecte de solution Cambridge Technology Partners

  2. Premium Partner

  3. Budapest 40 Consultants India 4000+ Consultants Zurich 40 Employees Nyon 170 Employees Mission To deliver high Business value through Innovative IT and Management Consulting solutions and services. Customer-Centric Built on a unique combination of client partnerships, leadership, technology expertise, partnership, and people to lead today's companies. Strong local presence Established in Switzerland since 1996 with more than 210 employees in Geneva and Zurich with a Global Delivery Center in Budapest and a strategic partnership in India. Microsoft Gold Partner One of the oldest and most active Microsoft Partners in Switzerland. Visit our Multi-touch Mobile Collaboration Platform !!!

  4. Agenda • Etat des lieux • Présentation du projet « Velocity » • Velocity en action • Démo • Futures évolutions • Questions & Réponses

  5. Le projet «Velocity» Etat des lieux

  6. Le cache dans les applications • Accès rapide aux données de références • Local à chaque instance de l’application • Evolution des architectures • Software as Service, multi-tiers • Sources de données multiples: db, web service • Agrégation des données • Amélioration des performances

  7. Le projet «Velocity» Présentation

  8. Qu’est ce que Velocity? • C’est un cache mémoire distribué pour les applications, pour tout type d’objet: objet de la CLR, XML ou objets binaires. • Velocity permet de «fusionner» la mémoire des machines et d’en proposer une vue unifiée pour les clients du service. Vueunifiée du cache

  9. Scenarios d’utilisation • Données de référence • Accès en lecture seule par un grand nombre • Données d’activité • Lecture et écriture par un seul processus • Ressources • Accès en lecture partagé, écriture exclusive

  10. Caractéristiques principales • Performance • Haute disponibilité • Adaptation à la charge • Répartition de charge automatique • Intégration avec ASP.NET • Installé en tant que service ou embarqué. • Outils d’administration et de surveillance

  11. Quelle est sa place? Clients Application / Web Tier … Application Application Velocity ClientLocal Cache Velocity ClientLocal Cache Application Velocity ClientLocal Cache Cache Tier Velocity Service Velocity Service Velocity Service Server 2 Server 1 Server 3 Server Side Callbacks Data Tier Database Cloud

  12. Déploiement Utilisateurs Assemblies Application / Web Tier … Client Velocity Client Velocity Client Velocity Setup Cache Server Tier Server 3 Server 2 Server 1 Monitoring Velocity Service Velocity Service Velocity Service K1, v1 Routing table Le premier installé devient le nœud maître paramètres de Configuration polices de cache Globales informations de partions (Base de données, fichier xml)

  13. Structure logique Velocity Service Velocity Service Velocity Service Velocity Service Cache nommé: Catalogue de produits Cache nommé:Inventaire Régions Clef Objet Tags Région A 121 xxxx “Toy” “Child” 123 yyyy “Toy” “Chair”.. • Host • Processus qui héberge l’instance de Velocity. • Caches nommés • Peuvent s’étendre au travers des machines • Définis dans le fichier de configuration • Régions • Conteneurs de d’éléments du cache • Peuvent être créées explicitement ou implicitement • Eléments du cache • Clef , Objet, Tags, TTL, Timestamps, Version

  14. La table de routage • Un sous-ensemble des informations globales de partition et de connexions aux différents nœuds • Construite et maintenue de façon incrémentale • Comme les tables DNS • Les serveurs ont une table de routage • Optionnel du côté client, elle permet d’effectuer les opérations (e.g., GET, PUT) directement sur les bons nœuds.

  15. Le Cache Partitionné Application PUT Get(K2) Velocity Client1 Velocity Client2 Cache2 Cache3 Cache1 Routing Table Routing Table Routing Table Primaire pour K1 Primaire pour K2 Primaire pour K3 K2, V1 K2, V1 K1, V1 K3, V3

  16. Table de routage côté client Application PUT Get(K2) Velocity Client1 Velocity Client2 Routing Table Routing Table Cache2 Cache3 Cache1 Routing Table Routing Table Routing Table Primaire pour K1 Primaire pour K2 Primaire pour K3 K2, V1 K2, V1 K1, V1 K3, V3

  17. Le Cache distribué Application PUT Get(K2) Velocity Client1 Velocity Client2 Cache2 Cache3 Cache1 K2, V1 K2, V1 K2, V1 K2, V1

  18. Local Cache • Le cache local accélère l’accès au cache. • Il utilise le mécanisme de notification pour se rafraichir lorsque les éléments du cache changent. Get(K2) Put(K2, V1) Get(K2) Velocity Client Velocity Client Cache Local Cache Local Routing Table Routing Table Routing Table Cache2 Cache3 Cache1 Routing Table Routing Table Routing Table K2, V1 K2, V1 Primaire pour K1 Primaire pour K3 Primaire pour K2 K1, V1 K3, V3

  19. Adaptation à la charge Serveur Maître Velocity Service Velocity Service Velocity Service Velocity Service Velocity Service Velocity Service Velocity Service Velocity Service • Limité à 10 si fichier de configuration XML • Nombre de nœuds quasiment illimité si configuration dans une base de donnée

  20. Haute Disponibilité Application PUT Get(K2) • Mets l’opération dans la file d’exécution • Exécute l’opération localement • Propage l’opération sur les nœuds secondaires • Attends pour obtenir le quorum • rends le contrôle Velocity Client1 Velocity Client Routing Table Routing Table Cache1 Cache2 Cache3 Primaire pour (K1,V1) Primaire pour (K3,V3) Primaire pour(K2,V2) Replication Agent K3, V3 K1, V1 K2, V2 (K2, V2) K2, V2 K2, V2 Secondaire pour(K1,V1), (K2,V2) Secondaire pour(K1,V1), (K3,V3) Secondaire pour(K2,V2), (K3,V3) K2, V2 K1, V1 K3, V3 K1, V1 K3, V3

  21. Failover Cache4 Le PM analyse les infos des partitions de Cache2 pour élire le primaire pour k2 Partition Manager Primaire pour (K4,V4) Choisis Cache1 comme primaire pour K2 Envoie des messages à Cache1 and Cache3 pour la reconfiguration. Met à jour le GPM Global Partition Map K4, V4 Secondary for K1, V1 Détecte le défaut de Cache 2. Notifies PM (sur Cache4) Cache1 interroge Cache2 pour savoir si il a une version plus à jour que la sienne. Cache1 se reconfigure comme cache primaire pour K2 Cache1 Cache2 Cache3 Routing Table Routing Table Routing Table Reconfiguration Agent K1, V1 Primaire pour (K2,V2) Primaire pour(K3,V3) Reconfiguration Agent K2, V2 Replication Agent Replication Agent K2, V2 Local Partition Map Local Partition Map K2, V2 Secondaire pour Secondaire pour Secondaire pour K1, V1

  22. Le projet «Velocity» démo

  23. Client 1 • Client 2 Accès concurrent • Mise à jour optimiste • Mise à jour pessimiste     Velocity Cache K1,V1 K1,V1 K1,V2 K1,V2     Velocity Cache K1,V1 K1,V1 K1,V1 K1,V2

  24. Le mécanisme d’éviction • Eviction sur expiration seulement • Libère les éléments expiré. • Périodique par partition • Eviction forcée • Libère les éléments expirés et non expirés en fonction de leur fréquence d’accès • Par requête • Peut être désactivé. • Eviction en fonction de la disponibilité de la mémoire • Un processus est chargé de surveillé la disponibilité de la mémoire (polling per second) et évite l’écriture sur disque • Déclenche l’éviction forcée à 85% d’utilisation de la mémoire système pour en libérer 5%.

  25. Notification d'événement (v1) • Abonnement aux changements de données dans le cache • Appel d’un délégué sur le client quand un changement survient • Notifications au niveau objet, région et cache nommé

  26. Sécurité (V1) • Option de désactivation de la sécurité • Option de sécurité par jeton • On assigne un jeton au niveau du cache nommé • Les applications doivent utiliser GetCache() avec ce jeton. • Option de sécurité par compte de service • Authentification d’un compte de service • Assignation d’un compte de service au niveau du cache nommé. • Sécurité au niveau du transport • Options de sécurité de WCF • E.g., Encryptions

  27. Administration & Monitoring • Logging • Provider model; par défault ETW, dans des fichiers log. • Administration • Commandes Powershell • Démarrage and et arrêt du cluster ou service, configure caches nommées. • Statistiques du cache • Intégration à Perfmon

  28. Déploiement – pré requis • Versions de Windows supportées • XP sp3 • Vista SP1 • Serveur 2003 • Serveur 2008 • Framework 3.5 (utilise WCF) • Windows PowerShell

  29. Le projet «Velocity» démo

  30. Le projet «Velocity» Post V1

  31. Persistance • Callback for read-through, write-behind • Specified at Named Cache Level • Read-Through • Called when item not present in cache • Callback returns the object/serialized bytes • Write-Behind • Writes to cache are queued • Callback called asynchronously in batches • Re-tries upon failure

  32. Cache embarqué • Les composants client et serveur s’execute dans le processus de l’application • Evite la sérialisation et transport • Très bonne performance, latence faible • Répartition de charge difficile • Parfait pour le cache répliqué Application Application Application PUT k2,v2 Velocity Components Velocity Components Velocity Components K2, V2 K2, V2 K2, V2 K3, V3 K3, V3 K3, V3 K1, V1 K1, V1 K1, V1

  33. Exécution de requête LINQ from toy in catalog<Toy>() where toy.ToyPrice > 300 select toy; Velocity Client Object Manager Object Manager Object Manager Cache API Query Processor Query Processor Query Processor Federated Query Processor In-memory Data Manager In-memory Data Manager In-memory Data Manager Dispatch Manager Local Cache from toy in catalog<Toy>() where toy.ToyPrice > 300 select toy; Cache1 Cache2 Cache3 Primary Regions Primary Regions Primary Regions ToyRegion Toy3, 400 Toy2, 350 Toy4, 100 Toy1, 500

  34. On-Premises Applications Application Application ASP.NET Application Velocity Client Velocity Client Velocity Client Velocity Cache Storage/SSDS

  35. Velocity V1 Roadmap • CTP1 • TechEd 2008 • CTP2 • PDC 2008 • CTP3 • Mix 2009 • RTM • Mid 2009

  36. Velocity Vision

  37. Le projet «Velocity» Ressources

  38. Le projet «Velocity» • Le blog de l’équipe • http://blogs.msdn.com/velocity • Des vidéos: • http://channel9.msdn.com/tags/Velocity/ • MSDN • http://msdn.microsoft.com/en-us/data/cc655792.aspx • http://msdn.microsoft.com/fr-fr/library/cc645013(en-us).aspx

  39. Le projet «Velocity» Des Questions? Yves.Chtepenko@CTP-CONSULTING.COM

  40. Save the date for tech·days nextyear! 14 – 15 avril 2010, CICG

  41. Premium Sponsoring Partners Classic Sponsoring Partners

More Related