SlideShare a Scribd company logo
1 of 18
Sterowniki .NET i C++ dla
Apache Cassandra
www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
dr inż. Paweł Kapłański
Cognitum
p.kaplanski@cognitum.eu
Cognitum
Autoryzowany dystrybutor DataStax Enterprise w Polsce
Dostarczamy:

Big Data

Cloud



Wysoce skalowalne aplikacje w chmurze



Rozwiązania Big Data



Systemy zarządzania wiedzą



Aplikacje dedykowane



Rozwój oprogramowania i testowanie aplikacji



Konsulting IT

Semantics
strong partnerships:

Customers from: US, CH, FL, DE
www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Spis treści (Agenda)
1.
2.
3.
4.
5.
6.
7.

Cassandra
Jak działają stare sterowniki oparte o Thrift
Asynchroniczność
Binarny protokół klient-serwer w Cassandrze
Przykład (driver .Net)
Plany na przyszłość
Driver C++

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Cassandra
1. noSql – BigTable (Google 2005)
2. Stworzona w FB – obecnie Apache
3. Rozproszona
4. Skalowalna - Duże (100PB) dane
5. Obecnie już istnieją instalacje po 1000 nodów
6. Symetryczna (odporna na awarie)

7. Klaster (możliwość instalacji „multidatacenter”)
8. Elastyczna – duże możliwości konfiguracji
9. CQL – Cassandra Query Language
– podobny do SQL
www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Multidatacenter

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Typowa aplikacja (serwis www .Net)

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Ważne!
1. Driver to nie tyko „smart socket” - posiada
rozbudowaną logikę działania
2. Driver zarządza połączeniami do klastra
– load balancer
3. Użytkownik nie musi martwić się o
połączenie i strategię – wystarczy ze użyje
jednej z dostaraczanych np. RoundRobin
4. Driver potrafi automatycznie powtórzyć
zapytanie w razie potrzeby
5. Można tworzyć własne strategie
6. Lock-free (wysoka wydajność)
www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Interfejsy C*: Thrift
1. IDL (interface definition language)
2. Pozwala na automatyczne generowanie
kodu w różnych językach

3. Sam Thrift to nie wszystko – trzeba
obsłużyć zapytania do klastra
4. Zapytanie blokuje połączenie
(podobnie jak zapytanie http)
w oczekiwaniu na odpowiedź

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Interfejsy C*: Protokół binarny
1.

Operacje asynchroniczne

2.

Pojedyncze polaczenie do 128
jednoczesnych zapytan

3.

Lepsze wykorzystanie zasobów (połączenia
są kosztowne)

4.

Cassandra może lepiej optymizować

5.

Wsparcie dla programowania
asynchronicznego – powszechne obecnie w
podejsciu client-server

6.

Zdarzenia z Cassandy są „pushowane”
•

zmiana schematu bazy

•

zmiana w topologii klastra

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Wspierane języki
1.

Native Protocol Drivers (Datastax)
•

Java driver (with ORM)

•

.Net driver (Cql2Linq, ORM)

•

Python

•

C++ Driver – early stage of development

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Przykład – połączenie (driver .Net)
1. public class NerdMovie {
[PartitionKey] public string Movie;
[ClusteringKey(1)] public string Director;
public string MainActor;
public int Year;
}
2. var cluster = Cluster.Builder().AddContactPoints("192.168.13.1", "192.168.13.1").Build();
3. using (var session = cluster.Connect("test")){
var nerdMovieTable = session.GetTable<NerdMovie>();
nerdMovieTable.CreateIfNotExists();

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Zapytania
var batch = session.CreateBatch();
batch.Append(nerdMovieTable.Insert(
new NerdMovie() { Movie = "Serenity", Director = "Joss Whedon", MainActor = "Nathan Fillion", Year = 2005 }));
batch.Append(nerdMovieTable.Insert(
new NerdMovie() { Movie = "Pulp Fiction", Director = "Quentin Tarantino", MainActor = "John Travolta", Year
= 1994 }));
batch.Append(nerdMovieTable.Insert(
new NerdMovie() { Movie = "Zero Charisma", Director = "Katie Graham", MainActor = "Nathan Fillion", Year = 2013
}));

var query = from m in nerdMovieTable select m;

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Wywołanie synchroniczne
batch.Execute();
var result = query.Execute();
foreach (var e in result)
Console.WriteLine("Movie " + e.Movie + "[" + e.Director + "]");

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Wywołanie asynchroniczne
ManualResetEventSlim ev = new ManualResetEventSlim();
batch.BeginExecute((ar1) => {
batch.EndExecute(ar1);
query.BeginExecute((ar2) => {
var result = query.EndExecute(ar2);
foreach (var e in result)
Console.WriteLine("Movie " + e.Movie + "[" + e.Director + "]");

ev.Set();
}, null);
}, null);
ev.Wait();

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Co dalej? (driver .Net)
Protokół binarny: wersja 2 (Cassandra 2.x)
-

Batch

-

Autentykacja poprzez SASL

-

Lekkie transakcje – implementacja protokołu
Paxos
IINSER … IF NOT EXISTS,
UPDATE … IF <column>=<value>

-

Strumieniowanie wyników

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Driver C++ (w drodze)
1. Wieloplatformowość (np. embedded)
2. Oparty o boost::asio
3. Mała liczba zależności od innych
bibliotek

www.cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.
Kontakt

Cognitum | PL, Warszawa
office@cognitum.eu
+48 22 250 2541
www.cognitum.eu/semantics

abroad sales representatives:

Cognitum | CH, St. Gallen
swiss-office@cognitum.eu

www.cognitum.eu

Cognitum | UK, Bristol
uk-office@cognitum.eu

The company, product and service names used in this web site are for identification purposes only.
All trademarks and registered trademarks are the property of their respective owners.

More Related Content

Similar to Sterowniki .NET i C++ dla Apache Cassandra

DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet IntroductionWei Sun
 
How to lock a Python in a cage? Managing Python environment inside an R project
How to lock a Python in a cage?  Managing Python environment inside an R projectHow to lock a Python in a cage?  Managing Python environment inside an R project
How to lock a Python in a cage? Managing Python environment inside an R projectWLOG Solutions
 
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...Docker, Inc.
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersJavan Rasokat
 
HPC DAY 2017 | FlyElephant Solutions for Data Science and HPC
HPC DAY 2017 | FlyElephant Solutions for Data Science and HPCHPC DAY 2017 | FlyElephant Solutions for Data Science and HPC
HPC DAY 2017 | FlyElephant Solutions for Data Science and HPCHPC DAY
 
Easy way to learn Core java full material
Easy way to learn Core java full materialEasy way to learn Core java full material
Easy way to learn Core java full materialSivannarayana Chimata
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsGraham Dumpleton
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made EasyAlon Fliess
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnelukdpe
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code維佋 唐
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEBenjamin Cabé
 
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded DayC:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded DayArik Weinstein
 
Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )Андрей Вандакуров
 
Skiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in DSkiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in DMithun Hunsur
 

Similar to Sterowniki .NET i C++ dla Apache Cassandra (20)

DotNet Introduction
DotNet IntroductionDotNet Introduction
DotNet Introduction
 
How to lock a Python in a cage? Managing Python environment inside an R project
How to lock a Python in a cage?  Managing Python environment inside an R projectHow to lock a Python in a cage?  Managing Python environment inside an R project
How to lock a Python in a cage? Managing Python environment inside an R project
 
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...
DCEU 18: From Legacy Mainframe to the Cloud: The Finnish Railways Evolution w...
 
OWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA TestersOWASP ZAP Workshop for QA Testers
OWASP ZAP Workshop for QA Testers
 
HPC DAY 2017 | FlyElephant Solutions for Data Science and HPC
HPC DAY 2017 | FlyElephant Solutions for Data Science and HPCHPC DAY 2017 | FlyElephant Solutions for Data Science and HPC
HPC DAY 2017 | FlyElephant Solutions for Data Science and HPC
 
Easy way to learn Core java full material
Easy way to learn Core java full materialEasy way to learn Core java full material
Easy way to learn Core java full material
 
Corejava ratan
Corejava ratanCorejava ratan
Corejava ratan
 
PyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web ApplicationsPyCon AU 2012 - Debugging Live Python Web Applications
PyCon AU 2012 - Debugging Live Python Web Applications
 
C# Production Debugging Made Easy
 C# Production Debugging Made Easy C# Production Debugging Made Easy
C# Production Debugging Made Easy
 
Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros Windows azure overview for SharePoint Pros
Windows azure overview for SharePoint Pros
 
R sharing 101
R sharing 101R sharing 101
R sharing 101
 
Overview Of Parallel Development - Ericnel
Overview Of Parallel Development -  EricnelOverview Of Parallel Development -  Ericnel
Overview Of Parallel Development - Ericnel
 
Parse cloud code
Parse cloud codeParse cloud code
Parse cloud code
 
Docker practical solutions
Docker practical solutionsDocker practical solutions
Docker practical solutions
 
Use Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDEUse Eclipse technologies to build a modern embedded IDE
Use Eclipse technologies to build a modern embedded IDE
 
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded DayC:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
C:\Alon Tech\New Tech\Embedded Conf Tlv\Prez\Sightsys Embedded Day
 
Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )Opensourceman ( url for slides with animations https://goo.gl/R638tW )
Opensourceman ( url for slides with animations https://goo.gl/R638tW )
 
RAGHUNATH_GORLA_RESUME
RAGHUNATH_GORLA_RESUMERAGHUNATH_GORLA_RESUME
RAGHUNATH_GORLA_RESUME
 
Skiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in DSkiron - Experiments in CPU Design in D
Skiron - Experiments in CPU Design in D
 
John f kiser
John f kiserJohn f kiser
John f kiser
 

More from Cognitum

Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014Cognitum
 
Cognitum Ontorion: Knowledge Representation and Reasoning System
Cognitum Ontorion: Knowledge Representation and Reasoning SystemCognitum Ontorion: Knowledge Representation and Reasoning System
Cognitum Ontorion: Knowledge Representation and Reasoning SystemCognitum
 
Modeling Ontologies with Natural Language
Modeling Ontologies with Natural LanguageModeling Ontologies with Natural Language
Modeling Ontologies with Natural LanguageCognitum
 
Zarzadzanie wiedza dla zarządzania kryzysowego
Zarzadzanie wiedza dla zarządzania kryzysowegoZarzadzanie wiedza dla zarządzania kryzysowego
Zarzadzanie wiedza dla zarządzania kryzysowegoCognitum
 
Technologie Semantyczne - Wykłady
Technologie Semantyczne - WykładyTechnologie Semantyczne - Wykłady
Technologie Semantyczne - WykładyCognitum
 
Semantic Rules Representation in Controlled Natural Language in FluentEditor
Semantic Rules Representation in Controlled Natural Language in FluentEditorSemantic Rules Representation in Controlled Natural Language in FluentEditor
Semantic Rules Representation in Controlled Natural Language in FluentEditorCognitum
 
Nowoczesne technologie w naukach społecznych
Nowoczesne technologie w naukach społecznychNowoczesne technologie w naukach społecznych
Nowoczesne technologie w naukach społecznychCognitum
 
Application of Semantic Knowledge Management System in Selected Areas of Poli...
Application of Semantic Knowledge Management System in Selected Areas of Poli...Application of Semantic Knowledge Management System in Selected Areas of Poli...
Application of Semantic Knowledge Management System in Selected Areas of Poli...Cognitum
 
Application of Semantic Knowledge Management System in Selected Areas of Pol...
Application of Semantic Knowledge Management System  in Selected Areas of Pol...Application of Semantic Knowledge Management System  in Selected Areas of Pol...
Application of Semantic Knowledge Management System in Selected Areas of Pol...Cognitum
 
Cognitum dusseldorf 03_2012
Cognitum dusseldorf 03_2012Cognitum dusseldorf 03_2012
Cognitum dusseldorf 03_2012Cognitum
 
Practical applications of controlled natural language with description logics...
Practical applications of controlled natural language with description logics...Practical applications of controlled natural language with description logics...
Practical applications of controlled natural language with description logics...Cognitum
 

More from Cognitum (11)

Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014Introduction to Ontology Engineering with Fluent Editor 2014
Introduction to Ontology Engineering with Fluent Editor 2014
 
Cognitum Ontorion: Knowledge Representation and Reasoning System
Cognitum Ontorion: Knowledge Representation and Reasoning SystemCognitum Ontorion: Knowledge Representation and Reasoning System
Cognitum Ontorion: Knowledge Representation and Reasoning System
 
Modeling Ontologies with Natural Language
Modeling Ontologies with Natural LanguageModeling Ontologies with Natural Language
Modeling Ontologies with Natural Language
 
Zarzadzanie wiedza dla zarządzania kryzysowego
Zarzadzanie wiedza dla zarządzania kryzysowegoZarzadzanie wiedza dla zarządzania kryzysowego
Zarzadzanie wiedza dla zarządzania kryzysowego
 
Technologie Semantyczne - Wykłady
Technologie Semantyczne - WykładyTechnologie Semantyczne - Wykłady
Technologie Semantyczne - Wykłady
 
Semantic Rules Representation in Controlled Natural Language in FluentEditor
Semantic Rules Representation in Controlled Natural Language in FluentEditorSemantic Rules Representation in Controlled Natural Language in FluentEditor
Semantic Rules Representation in Controlled Natural Language in FluentEditor
 
Nowoczesne technologie w naukach społecznych
Nowoczesne technologie w naukach społecznychNowoczesne technologie w naukach społecznych
Nowoczesne technologie w naukach społecznych
 
Application of Semantic Knowledge Management System in Selected Areas of Poli...
Application of Semantic Knowledge Management System in Selected Areas of Poli...Application of Semantic Knowledge Management System in Selected Areas of Poli...
Application of Semantic Knowledge Management System in Selected Areas of Poli...
 
Application of Semantic Knowledge Management System in Selected Areas of Pol...
Application of Semantic Knowledge Management System  in Selected Areas of Pol...Application of Semantic Knowledge Management System  in Selected Areas of Pol...
Application of Semantic Knowledge Management System in Selected Areas of Pol...
 
Cognitum dusseldorf 03_2012
Cognitum dusseldorf 03_2012Cognitum dusseldorf 03_2012
Cognitum dusseldorf 03_2012
 
Practical applications of controlled natural language with description logics...
Practical applications of controlled natural language with description logics...Practical applications of controlled natural language with description logics...
Practical applications of controlled natural language with description logics...
 

Recently uploaded

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Hyundai Motor Group
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksSoftradix Technologies
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):comworks
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsHyundai Motor Group
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Scott Keck-Warren
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersThousandEyes
 

Recently uploaded (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2Next-generation AAM aircraft unveiled by Supernal, S-A2
Next-generation AAM aircraft unveiled by Supernal, S-A2
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Benefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other FrameworksBenefits Of Flutter Compared To Other Frameworks
Benefits Of Flutter Compared To Other Frameworks
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
 
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter RoadsSnow Chain-Integrated Tire for a Safe Drive on Winter Roads
Snow Chain-Integrated Tire for a Safe Drive on Winter Roads
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
 
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for PartnersEnhancing Worker Digital Experience: A Hands-on Workshop for Partners
Enhancing Worker Digital Experience: A Hands-on Workshop for Partners
 

Sterowniki .NET i C++ dla Apache Cassandra

  • 1. Sterowniki .NET i C++ dla Apache Cassandra www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 2. dr inż. Paweł Kapłański Cognitum p.kaplanski@cognitum.eu
  • 3. Cognitum Autoryzowany dystrybutor DataStax Enterprise w Polsce Dostarczamy: Big Data Cloud  Wysoce skalowalne aplikacje w chmurze  Rozwiązania Big Data  Systemy zarządzania wiedzą  Aplikacje dedykowane  Rozwój oprogramowania i testowanie aplikacji  Konsulting IT Semantics strong partnerships: Customers from: US, CH, FL, DE www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 4. Spis treści (Agenda) 1. 2. 3. 4. 5. 6. 7. Cassandra Jak działają stare sterowniki oparte o Thrift Asynchroniczność Binarny protokół klient-serwer w Cassandrze Przykład (driver .Net) Plany na przyszłość Driver C++ www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 5. Cassandra 1. noSql – BigTable (Google 2005) 2. Stworzona w FB – obecnie Apache 3. Rozproszona 4. Skalowalna - Duże (100PB) dane 5. Obecnie już istnieją instalacje po 1000 nodów 6. Symetryczna (odporna na awarie) 7. Klaster (możliwość instalacji „multidatacenter”) 8. Elastyczna – duże możliwości konfiguracji 9. CQL – Cassandra Query Language – podobny do SQL www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 6. Multidatacenter www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 7. Typowa aplikacja (serwis www .Net) www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 8. Ważne! 1. Driver to nie tyko „smart socket” - posiada rozbudowaną logikę działania 2. Driver zarządza połączeniami do klastra – load balancer 3. Użytkownik nie musi martwić się o połączenie i strategię – wystarczy ze użyje jednej z dostaraczanych np. RoundRobin 4. Driver potrafi automatycznie powtórzyć zapytanie w razie potrzeby 5. Można tworzyć własne strategie 6. Lock-free (wysoka wydajność) www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 9. Interfejsy C*: Thrift 1. IDL (interface definition language) 2. Pozwala na automatyczne generowanie kodu w różnych językach 3. Sam Thrift to nie wszystko – trzeba obsłużyć zapytania do klastra 4. Zapytanie blokuje połączenie (podobnie jak zapytanie http) w oczekiwaniu na odpowiedź www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 10. Interfejsy C*: Protokół binarny 1. Operacje asynchroniczne 2. Pojedyncze polaczenie do 128 jednoczesnych zapytan 3. Lepsze wykorzystanie zasobów (połączenia są kosztowne) 4. Cassandra może lepiej optymizować 5. Wsparcie dla programowania asynchronicznego – powszechne obecnie w podejsciu client-server 6. Zdarzenia z Cassandy są „pushowane” • zmiana schematu bazy • zmiana w topologii klastra www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 11. Wspierane języki 1. Native Protocol Drivers (Datastax) • Java driver (with ORM) • .Net driver (Cql2Linq, ORM) • Python • C++ Driver – early stage of development www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 12. Przykład – połączenie (driver .Net) 1. public class NerdMovie { [PartitionKey] public string Movie; [ClusteringKey(1)] public string Director; public string MainActor; public int Year; } 2. var cluster = Cluster.Builder().AddContactPoints("192.168.13.1", "192.168.13.1").Build(); 3. using (var session = cluster.Connect("test")){ var nerdMovieTable = session.GetTable<NerdMovie>(); nerdMovieTable.CreateIfNotExists(); www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 13. Zapytania var batch = session.CreateBatch(); batch.Append(nerdMovieTable.Insert( new NerdMovie() { Movie = "Serenity", Director = "Joss Whedon", MainActor = "Nathan Fillion", Year = 2005 })); batch.Append(nerdMovieTable.Insert( new NerdMovie() { Movie = "Pulp Fiction", Director = "Quentin Tarantino", MainActor = "John Travolta", Year = 1994 })); batch.Append(nerdMovieTable.Insert( new NerdMovie() { Movie = "Zero Charisma", Director = "Katie Graham", MainActor = "Nathan Fillion", Year = 2013 })); var query = from m in nerdMovieTable select m; www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 14. Wywołanie synchroniczne batch.Execute(); var result = query.Execute(); foreach (var e in result) Console.WriteLine("Movie " + e.Movie + "[" + e.Director + "]"); www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 15. Wywołanie asynchroniczne ManualResetEventSlim ev = new ManualResetEventSlim(); batch.BeginExecute((ar1) => { batch.EndExecute(ar1); query.BeginExecute((ar2) => { var result = query.EndExecute(ar2); foreach (var e in result) Console.WriteLine("Movie " + e.Movie + "[" + e.Director + "]"); ev.Set(); }, null); }, null); ev.Wait(); www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 16. Co dalej? (driver .Net) Protokół binarny: wersja 2 (Cassandra 2.x) - Batch - Autentykacja poprzez SASL - Lekkie transakcje – implementacja protokołu Paxos IINSER … IF NOT EXISTS, UPDATE … IF <column>=<value> - Strumieniowanie wyników www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 17. Driver C++ (w drodze) 1. Wieloplatformowość (np. embedded) 2. Oparty o boost::asio 3. Mała liczba zależności od innych bibliotek www.cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.
  • 18. Kontakt Cognitum | PL, Warszawa office@cognitum.eu +48 22 250 2541 www.cognitum.eu/semantics abroad sales representatives: Cognitum | CH, St. Gallen swiss-office@cognitum.eu www.cognitum.eu Cognitum | UK, Bristol uk-office@cognitum.eu The company, product and service names used in this web site are for identification purposes only. All trademarks and registered trademarks are the property of their respective owners.