SlideShare une entreprise Scribd logo
1  sur  44
#JSS2015
Les journées
SQL Server 2015
Un événement organisé par GUSS
@GUSS_FRANCE
#JSS2015
Les journées
SQL Server 2015
Un événement organisé par GUSS
Architecture Lambda -Stream Analytics
Michel Hubert
Georges Damien
#JSS2015
Merci à nos sponsors
#JSS2015
About me
• Directeur Technique chez Cellenza
• MVP Azure
• Microsoft P-Seller
#JSS2015
About me
#JSS2015
Démonstrateur
http://tinyurl.com/cellenza
#JSS2015
• « La meilleure façon de prédire le futur
est de regarder le passé et le présent ! »
Introduction
• Pourquoi les architectures lambda ?
#JSS2015
• Historiquement, le BigData est une suite logique de la
B.I.
• Donc on a appliqué les techniques de la B.I. : Le Batch
• Ce n’est pas plus suffisant !
• Des flux de données à prendre en compte en temps-réel
• Des historiques très volumineux qui recèlent de la valeur
Introduction
Pourquoi les architectures lambda ?
#JSS2015
• Architecture lambda ?
De quoi parle-t-on ?
#JSS2015
• La base de données classique :
• Ex d’une action utilisateur (changement d’adresse) :
• Chaque update écrase des données précédentes !
Principe de base
Architecture basée sur des données immuables
UPDATE
#JSS2015
• Stockage immuable :
• La mort de l’update, vive l’insert !
• Toute autre information peut être dérivée/reconstruite à partir de
ces données brutes
Principe de base
• Architecture basée sur des données immuables
#JSS2015
• Quels cas d’usage ?
Big Data + Temps réel
#JSS2015
• Prenons un scénario Exemple :
– Site eCommerce / Retail
• Quels gains ?
• Analyse temps réel des comportements,
• Calcul du Taux d’abandon de panier,
• Prévision de stock
• Détection de Fraude
• Analyse d’une campagne marketing
• Quels produits ne déclenchent pas d’achat ? Problème de stock ? De
prix ?
Scénario
Architecture Lambda
#JSS2015
Réponse Microsoft
#JSS2015
EVENT HUB
La « Master Data »
#JSS2015
Azure Service Bus
Azure Service Bus
Relay
Queue
Topic
Notification Hub
Event Hub
NAT and Firewall Traversal Service
Request/Response Services
Unbuffered with TCP Throttling
Many publishers and many consumers to
communicate over a FIFO like channel.
(Competing consumers and Queue-based
Load leveling scenarios)
Pub / Sub communication channel. Each
Consumer subscribes to a copy of message
High-scale notification distribution
Most mobile push notification services
Millions of notification targets
#JSS2015
EventHub
Event Hub vs Topics / Queues
• Bus de messages
Topics / Queues Event Hub
#JSS2015
Event Hub : Principe général
Architecture Lambda
Event
Producers
Azure Event Hub
> 1M Producers
> 1GB/sec
Aggregate
Throughput
Up to 32 partitions via
portal, more on
request
Partitions
Direct
PartitionKey
Hash
Consumer
Group(s)
Receivers
AMQP 1.0
Credit-based flow control
Client-side cursors
Offset by Id or Timestamp
#JSS2015
Event Hub : Envoi de données
Partition 1
Partition 2
Partition “n”
Event 1
PartitionKey=A
Event 1
PartitionKey=B
#JSS2015
Publication de message .Net / AMQP
#JSS2015
Publication de message via HTTP
<protocol>://<namespace>.servicebus.windows.net/<eventhubname>/publisher/<partitionkey>/messages
#JSS2015
Event Hub : Consommation de données
Partition 1
Partition 2
Partition “n”
Event 1
Pkey = A
Event 2
Pkey = B Receiver 6
Receiver 2
Worker “n”
Receiver 1
Receiver “n”
Worker 1
#JSS2015
Event Hub : Consommation multiple
Partition 1
Partition 2
Partition “n”
Consumer Group C
Callback for prtn. 6
Callback for prtn. 2
Worker “n”
Callback for prtn. 1
Callback “n”
Worker 1Consumer Group B
Callback for prtn. 6
Callback for prtn. 2
Worker “n”
Callback for prtn. 1
Callback “n”
Worker 1Consumer Group A
Worker “n”
Callback for prtn. 6
Callback for prtn. 2
Callback for prtn. 1
Callback “n”
Worker 1
#JSS2015
IEventProcessor
Architecture Lambda
#JSS2015
IEventProcessor
Architecture Lambda
#JSS2015
EVENT HUB
#JSS2015
STREAM ANALYTICS
Complex Event Processing
#JSS2015
Données au repos
SELECT count(*) FROM ParkingLot
WHERE type = 'Auto'
AND color = 'Red'
Question
“Combien de voitures rouges dans le parking?”
Répondre avec une base de donnée relationnelle
Marcher jusqu’au parking
Compter les véhicules qui sont: Rouge, Voiture
#JSS2015
Données en mouvement
La question est différente
“Combien de voitures rouges sont passées au marqueur 18A sur l’A-10 dans
la dernière heure?”
Répondre avec une base de donnée relationnelle
S’arrêter, faire se garer toutes les voitures qui arrivent pendant l’heure dans
un parking, les compter
Pas la meilleure des solutions…
#JSS2015
L’avantage définitif
SELECT count(*) FROM A-10
WHERE Type = ‘Voiture’ and Color = ‘Rouge’
GROUP BY TumblingWindow(hour, 1)
La question est différente
“Combien de voitures rouges sont passées au marqueur 18A sur l’A-10 dans
la dernière heure?”
#JSS2015
Agrégation temporelle – SQL Like
TumblingWindow(minute,5) HoppingWindow(minute, 10 , 5)
SlidingWindow(minute, 3)
https://msdn.microsoft.com/fr-fr/library/azure/dn834998.aspx
#JSS2015
Stream Analytics
#JSS2015
Stream Analytics
#JSS2015
• Agrégation simple :
– SELECT sensorId, MIN(temp) as temp
FROM SensorReadings
TIMESTAMP BY time
GROUP BY sensorId, SlidingWindow(second, 5)
HAVING MIN(temp) > 75
Exemples de requêtes
#JSS2015
• Agréagation plusieurs flux :
– SELECT s1.time, s1.dspl, s1.hmdt as previousHmdt, s2.hmdt as newHmdt, datediff(ss,
s1.time, s2.time) as secondsApart
FROM SensorData s1 timestamp by time
JOIN SensorData s2 timestamp by time
ON s1.dspl = s2.dspl
AND DATEDIFF(s, s1, s2) BETWEEN 0 AND 5
WHERE (s2.hmdt - s1.hmdt >= .1) or (s1.hmdt - s2.hmdt >= .1)
Exemples de requêtes
#JSS2015
• Jointure avec table de référence :
– SELECT SensorReadings.sensorID, SensorReadings.temp
FROM SensorReadings
JOIN thresholdRefData
ON SensorReadings.sensorID = thresholdRefData.sensorID
WHERE SensorReadings.temp > thresholdRefData.value
Exemples de requêtes
#JSS2015
• Plusieurs sorties :
– SELECT *
INTO outputLog
FROM SensorReadings
– SELECT *
INTO outputTempAlert
FROM SensorReadings
WHERE temp > 75
Exemples de requêtes
#JSS2015
ANALYSE DE LOGS
Stream Analytics
#JSS2015
DÉTECTION DE FRAUDES
Stream Analytics
#JSS2015
ANALYSE DE TWEETS
Stream Analytics
#JSS2015
Des questions ?
Michel.hubert@Cellenza.com
Georges.damien@Cellenza.com
#JSS2015#JSS2015
Les évaluations des sessions,
c’est important !!
http://GUSS.Pro/jss
#JSS2015
Merci à nos volontaires…
#JSS2015#JSS2015

Contenu connexe

En vedette

Intro to unit 2 Media
Intro to unit 2 MediaIntro to unit 2 Media
Intro to unit 2 MediaAmy Gallacher
 
А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...
А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...
А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...ЗПШ СПбГУ
 
Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"
Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"
Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"ЗПШ СПбГУ
 
А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...
А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...
А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...ЗПШ СПбГУ
 
A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...
A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...
A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...Designage Solutions
 
Essays and techniques transferable skills
Essays and techniques transferable skillsEssays and techniques transferable skills
Essays and techniques transferable skillsjminter
 
Os aplicativos na área da saúde vieram para ficar
Os aplicativos na área da saúde vieram para ficarOs aplicativos na área da saúde vieram para ficar
Os aplicativos na área da saúde vieram para ficarAlexandre Naime Barbosa
 

En vedette (13)

Exam overview
Exam overviewExam overview
Exam overview
 
Intro to unit 2 Media
Intro to unit 2 MediaIntro to unit 2 Media
Intro to unit 2 Media
 
А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...
А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...
А.Четвериков "Эпичные провалы предсказаний у вас в голове, или Почему не стои...
 
Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"
Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"
Л.В.Марарица, О.В.Оконешникова "Модель в психологическом исследовании"
 
Energy consumption of house
Energy consumption of houseEnergy consumption of house
Energy consumption of house
 
А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...
А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...
А.Краснова, Ю.Мигунова «"Развод" с проблемой, или техника экстернализации в н...
 
Genitics of cancer
Genitics of cancerGenitics of cancer
Genitics of cancer
 
A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...
A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...
A Review of Flight Dynamics and Numerical Analysis of an Unmanned Aerial Vehi...
 
Essays and techniques transferable skills
Essays and techniques transferable skillsEssays and techniques transferable skills
Essays and techniques transferable skills
 
Sejarah mesir kuno.
Sejarah mesir kuno.Sejarah mesir kuno.
Sejarah mesir kuno.
 
RESEARCH TOPIC
RESEARCH TOPICRESEARCH TOPIC
RESEARCH TOPIC
 
Missao Piaui Diario da Serra 2016
Missao Piaui Diario da Serra 2016Missao Piaui Diario da Serra 2016
Missao Piaui Diario da Serra 2016
 
Os aplicativos na área da saúde vieram para ficar
Os aplicativos na área da saúde vieram para ficarOs aplicativos na área da saúde vieram para ficar
Os aplicativos na área da saúde vieram para ficar
 

Similaire à Jss 2015 - Microsoft Stream analytics

Azure Stream analytics / Event Hub
Azure Stream analytics / Event HubAzure Stream analytics / Event Hub
Azure Stream analytics / Event HubMichel HUBERT
 
Architectures lambda - Microsoft
Architectures lambda - MicrosoftArchitectures lambda - Microsoft
Architectures lambda - MicrosoftMichel HUBERT
 
Architectures lambda - Techdays camps 2015
Architectures lambda - Techdays camps 2015 Architectures lambda - Techdays camps 2015
Architectures lambda - Techdays camps 2015 Georges Damien
 
JSS2014 - StreamInsight
JSS2014 - StreamInsightJSS2014 - StreamInsight
JSS2014 - StreamInsightGUSS
 
Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics
Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics
Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics Marius Zaharia
 
Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"Microsoft Décideurs IT
 
Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"Microsoft Technet France
 
Monitoring applicatif : Pourquoi et comment ?
Monitoring applicatif : Pourquoi et comment ?Monitoring applicatif : Pourquoi et comment ?
Monitoring applicatif : Pourquoi et comment ?Kenny Dits
 
Comment l’architecture événementielle révolutionne la communication dans le S...
Comment l’architecture événementielle révolutionne la communication dans le S...Comment l’architecture événementielle révolutionne la communication dans le S...
Comment l’architecture événementielle révolutionne la communication dans le S...Vincent Lepot
 
Microsoft experiences azure et asp.net core
Microsoft experiences   azure et asp.net coreMicrosoft experiences   azure et asp.net core
Microsoft experiences azure et asp.net coreSébastien Ollivier
 
Big Data & Real Time #JSS2014
Big Data & Real Time #JSS2014Big Data & Real Time #JSS2014
Big Data & Real Time #JSS2014Romain Casteres
 
[JSS2015] 3 DMV's pour evaluer les indexs
[JSS2015] 3 DMV's pour evaluer les indexs[JSS2015] 3 DMV's pour evaluer les indexs
[JSS2015] 3 DMV's pour evaluer les indexsGUSS
 
JSS2014 - Big Data et Real Time
JSS2014 - Big Data et Real TimeJSS2014 - Big Data et Real Time
JSS2014 - Big Data et Real TimeGUSS
 
Développer ou debugger ?
Développer ou debugger ? Développer ou debugger ?
Développer ou debugger ? Microsoft
 
[JSS2015] Power BI Dev
[JSS2015] Power BI Dev[JSS2015] Power BI Dev
[JSS2015] Power BI DevGUSS
 
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020SEO CAMP
 
Denodo, pilier central de votre stratégie API
Denodo, pilier central de votre stratégie APIDenodo, pilier central de votre stratégie API
Denodo, pilier central de votre stratégie APIDenodo
 
Présentation schneider+edifi xio summit 2015
Présentation schneider+edifi xio summit 2015Présentation schneider+edifi xio summit 2015
Présentation schneider+edifi xio summit 2015biswajit44
 
J1 T1 1 - Azure Data Platform, quelle solution pour quel usage - Charles-Hen...
J1 T1 1 - Azure Data Platform, quelle solution pour quel usage  - Charles-Hen...J1 T1 1 - Azure Data Platform, quelle solution pour quel usage  - Charles-Hen...
J1 T1 1 - Azure Data Platform, quelle solution pour quel usage - Charles-Hen...MS Cloud Summit
 
Big Data by Soft Computing - Lille
Big Data by Soft Computing - LilleBig Data by Soft Computing - Lille
Big Data by Soft Computing - LilleSoft Computing
 

Similaire à Jss 2015 - Microsoft Stream analytics (20)

Azure Stream analytics / Event Hub
Azure Stream analytics / Event HubAzure Stream analytics / Event Hub
Azure Stream analytics / Event Hub
 
Architectures lambda - Microsoft
Architectures lambda - MicrosoftArchitectures lambda - Microsoft
Architectures lambda - Microsoft
 
Architectures lambda - Techdays camps 2015
Architectures lambda - Techdays camps 2015 Architectures lambda - Techdays camps 2015
Architectures lambda - Techdays camps 2015
 
JSS2014 - StreamInsight
JSS2014 - StreamInsightJSS2014 - StreamInsight
JSS2014 - StreamInsight
 
Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics
Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics
Sql Saturday Paris 2016 - De StreamInsight à Azure Stream Analytics
 
Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"
 
Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"Rendez vos objets connectés intelligents avec la "Lambda architecture"
Rendez vos objets connectés intelligents avec la "Lambda architecture"
 
Monitoring applicatif : Pourquoi et comment ?
Monitoring applicatif : Pourquoi et comment ?Monitoring applicatif : Pourquoi et comment ?
Monitoring applicatif : Pourquoi et comment ?
 
Comment l’architecture événementielle révolutionne la communication dans le S...
Comment l’architecture événementielle révolutionne la communication dans le S...Comment l’architecture événementielle révolutionne la communication dans le S...
Comment l’architecture événementielle révolutionne la communication dans le S...
 
Microsoft experiences azure et asp.net core
Microsoft experiences   azure et asp.net coreMicrosoft experiences   azure et asp.net core
Microsoft experiences azure et asp.net core
 
Big Data & Real Time #JSS2014
Big Data & Real Time #JSS2014Big Data & Real Time #JSS2014
Big Data & Real Time #JSS2014
 
[JSS2015] 3 DMV's pour evaluer les indexs
[JSS2015] 3 DMV's pour evaluer les indexs[JSS2015] 3 DMV's pour evaluer les indexs
[JSS2015] 3 DMV's pour evaluer les indexs
 
JSS2014 - Big Data et Real Time
JSS2014 - Big Data et Real TimeJSS2014 - Big Data et Real Time
JSS2014 - Big Data et Real Time
 
Développer ou debugger ?
Développer ou debugger ? Développer ou debugger ?
Développer ou debugger ?
 
[JSS2015] Power BI Dev
[JSS2015] Power BI Dev[JSS2015] Power BI Dev
[JSS2015] Power BI Dev
 
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
Core web vitals pour unifier UX et SEO - Stephane Rios - SEO Camp'us paris 2020
 
Denodo, pilier central de votre stratégie API
Denodo, pilier central de votre stratégie APIDenodo, pilier central de votre stratégie API
Denodo, pilier central de votre stratégie API
 
Présentation schneider+edifi xio summit 2015
Présentation schneider+edifi xio summit 2015Présentation schneider+edifi xio summit 2015
Présentation schneider+edifi xio summit 2015
 
J1 T1 1 - Azure Data Platform, quelle solution pour quel usage - Charles-Hen...
J1 T1 1 - Azure Data Platform, quelle solution pour quel usage  - Charles-Hen...J1 T1 1 - Azure Data Platform, quelle solution pour quel usage  - Charles-Hen...
J1 T1 1 - Azure Data Platform, quelle solution pour quel usage - Charles-Hen...
 
Big Data by Soft Computing - Lille
Big Data by Soft Computing - LilleBig Data by Soft Computing - Lille
Big Data by Soft Computing - Lille
 

Jss 2015 - Microsoft Stream analytics

Notes de l'éditeur

  1. Performance du stockage APPEND-only est très performant, ex. Hadoop/HDFS Pensez-y, au cœur d’une base SQL, il y a un append-log, qui est le maître en cas de crash… Robustesse aux erreurs humaines Un bug ne viendra jamais détruire de la donnée, seulement ajouter des enregistrements erronés (ou doublonnés, ou…) Facile à corriger : Soit on vient supprimer les lignes erronées, Soit on ajoute des lignes correctrices
  2. La clé plus de différence entre les deux est balance. Un service de messagerie peut ramasser une sélection de forfaits et s'assurer qu'ils sont livrés. Mais si vous devez déplacer des centaines de milliers de paquets, vous pouvez le faire avec beaucoup de courriers, ou vous pourriez construire un centre de distribution capable de gérer ce genre de volume plus rapidement. Événement Hub est ce centre de distribution. Mais il est été construit comme un service géré, donc vous n'avez pas à construire votre propre installation coûteuse. Vous pouvez exploiter juste celui que nous avons créé pour vous
  3. Here we have a simple sample implementation of the ProcessEventsAsync method. We have a try/catch block to handle errors, but within it a processing loop for the events. Inside this loop, we look at the event properties to help determine what type of event it is so we can deserialize the event and operate on it. I’m just writing it to the console, but in the real world, we may use this to notify an Orleans grain or save the data so that we can process it via an HDInsight cluster. For more about both of these options, be certain to check out the two sister sessions to this one tomorrow. Lastly, note this block of code(1) where ever minute, we do a checkpoint operation. This tells the event hub that we’ve processed everything up to this point. Hence saving where we’re at in the event stream. This allows us to start and stop the processor and pick up near where we left off. This also really highlights the difference between event hubs and topics/queues. With topics/queues, the focus is more on ACID type operations again specific messages… put/get/delete… but in Event Hub, we have this buffered stream of events and we need to keep track of where we are in it. We can easily rewind to reprocess messages. So we need to account for this “at least once” possibility.
  4. On parlait des speakers, il y a une chose qui leur tient à cœur !