http://highperformancecoredata.com/
Learn how to analyze, debug, and squeeze every last bit of performance out of Core Data. The standard Core Data implementation is very powerful and flexible but lacks performance. In this advanced session we will cover various performance analysis tools, model optimization, and various high performance concurrency models. This is an advanced discussion that assumes you have used Core Data before.
Core Data with multiple managed object contextsMatthew Morey
When using Core Data for persisting app data multiple managed object contexts (MOC) are often required to avoid blocking UI. Typically you would create a background MOC and listen for changes on the main MOC, merging changes as necessary. With iOS 5, MOCs now have parent context and the ability to set concurrency types. These new features greatly simplify dealing with Core Data on background queues. During this presentation Matt will cover the pros and cons of this new method of dealing with Core Data.
Mobile devices are so useful because they can get on the net with their built-in wi-fi or cellular data radios. But how does this work? In iOS, we have a slew of networking APIs, each appropriate in different situations. From decades-old BSD sockets to the new-in-iOS-5 iCloud, there are a wide range of networking calls available to your app, and an equally wide range of semantics in how to use them. In this talk, we'll start with high-level abstractions like iCloud and other objects that can either load from or save to a URL, then progress down through the stack, grabbing arbitrary content from URLs, self-networking with Bonjour and Game Kit, and finally accessing the socket layer with CFNetwork and BSD sockets.
iCloud sample code at: http://dl.dropbox.com/u/12216224/conferences/codemash12/bonjour-icloud/CloudNotes.zip
http://highperformancecoredata.com/
Learn how to analyze, debug, and squeeze every last bit of performance out of Core Data. The standard Core Data implementation is very powerful and flexible but lacks performance. In this advanced session we will cover various performance analysis tools, model optimization, and various high performance concurrency models. This is an advanced discussion that assumes you have used Core Data before.
Core Data with multiple managed object contextsMatthew Morey
When using Core Data for persisting app data multiple managed object contexts (MOC) are often required to avoid blocking UI. Typically you would create a background MOC and listen for changes on the main MOC, merging changes as necessary. With iOS 5, MOCs now have parent context and the ability to set concurrency types. These new features greatly simplify dealing with Core Data on background queues. During this presentation Matt will cover the pros and cons of this new method of dealing with Core Data.
Mobile devices are so useful because they can get on the net with their built-in wi-fi or cellular data radios. But how does this work? In iOS, we have a slew of networking APIs, each appropriate in different situations. From decades-old BSD sockets to the new-in-iOS-5 iCloud, there are a wide range of networking calls available to your app, and an equally wide range of semantics in how to use them. In this talk, we'll start with high-level abstractions like iCloud and other objects that can either load from or save to a URL, then progress down through the stack, grabbing arbitrary content from URLs, self-networking with Bonjour and Game Kit, and finally accessing the socket layer with CFNetwork and BSD sockets.
iCloud sample code at: http://dl.dropbox.com/u/12216224/conferences/codemash12/bonjour-icloud/CloudNotes.zip
JS Fest 2019/Autumn. Maciej Treder. Angular Schematics - Develop for developersJSFestUA
Say hello to the Angular CLI from new perspective. Get to know what schematics are and how you can use them for your purpose. Make use of ng add, ng update, ng new command and much more. Learn how to create read update and delete files automatically in your project, and how to execute npm tasks such as installing dependencies.
You may all know that JSON is a subset of JavaScript, but… Did you know that HTML5 implements NoSQL databases? Did you know that JavaScript was recommended for REST by HTTP co-creator Roy T. Fielding himself? Did you know that map & reduce are part of the native JavaScript API? Did you know that most NoSQL solutions integrate a JavaScript engine? CouchDB, MongoDB, WakandaDB, ArangoDB, OrientDB, Riak…. And when they don’t, they have a shell client which does. The story of NoSQL and JavaScript goes beyond your expectations and opens more opportunities than you might imagine… What better match could you find than a flexible and dynamic language for schemaless databases? Isn’t an event-driven language what you’ve been waiting for to manage consistency? When NoSQL doesn’t come to JavaScript, JavaScript comes to NoSQL. And does it very well.
Building data flows with Celery and SQLAlchemyRoger Barnes
Reporting and analysis systems rely on coherent and reliable data, often from disparate sources. To that end, a series of well established data warehousing practices have emerged to extract data and produce a consistent data store.
This talk will look at some options for composing workflows using Python. In particular, we'll explore beyond Celery's asynchronous task processing functionality into its workflow (aka Canvas) system and how it can be used in conjunction with SQLAlchemy's architecture to provide the building blocks for data stream processing.
This information is outdated now. For an up to date look at using Cassandra from Python see this presentation: https://speakerdeck.com/tylerhobbs/intro-to-cassandra-and-the-python-driver
Using Apache Cassandra from Python. Given at PyCon 2012.
Cassandra Day NY 2014: Getting Started with the DataStax C# DriverDataStax Academy
So you’ve grabbed the latest 2.0 beta of DataStax C# driver from NuGet. Now what? In this talk, Luke will walk you through some of the basics of the C# driver--how to bootstrap the driver and connect to a cluster, execute statements, and retrieve result sets. Wondering what the difference between a PreparedStatement and a SimpleStatement is? Not sure what the appropriate lifetime for a Cluster or a Session object is and whether you should reuse one (from multiple threads)? What about ADO.NET and LINQ support? We’ll cover this and more, so that you can get on with building applications on top of Cassandra and .NET.
.NET developers have a lot of options when it comes to databases these days. Apache Cassandra is a scalable, fault-tolerant database that has already found its way into more than 25% of the Fortune 100 and continues to grow in popularity. But what makes it different from the myriad of other options available? In this talk, we’ll take a deep dive into Cassandra and learn about:
- Cassandra’s internals and how it works
- CQL (the SQL-like query language for Cassandra)
- Data Modeling like a pro
- Tools available for developers
- Writing .NET code that talks to Cassandra
If there’s time and interest, we’ll finish up with how some companies are already using Cassandra to power services you probably interact with in your daily life. You’ll leave with all the tools you need to start build highly available .NET applications and services on top of Cassandra.
JS Fest 2019/Autumn. Maciej Treder. Angular Schematics - Develop for developersJSFestUA
Say hello to the Angular CLI from new perspective. Get to know what schematics are and how you can use them for your purpose. Make use of ng add, ng update, ng new command and much more. Learn how to create read update and delete files automatically in your project, and how to execute npm tasks such as installing dependencies.
You may all know that JSON is a subset of JavaScript, but… Did you know that HTML5 implements NoSQL databases? Did you know that JavaScript was recommended for REST by HTTP co-creator Roy T. Fielding himself? Did you know that map & reduce are part of the native JavaScript API? Did you know that most NoSQL solutions integrate a JavaScript engine? CouchDB, MongoDB, WakandaDB, ArangoDB, OrientDB, Riak…. And when they don’t, they have a shell client which does. The story of NoSQL and JavaScript goes beyond your expectations and opens more opportunities than you might imagine… What better match could you find than a flexible and dynamic language for schemaless databases? Isn’t an event-driven language what you’ve been waiting for to manage consistency? When NoSQL doesn’t come to JavaScript, JavaScript comes to NoSQL. And does it very well.
Building data flows with Celery and SQLAlchemyRoger Barnes
Reporting and analysis systems rely on coherent and reliable data, often from disparate sources. To that end, a series of well established data warehousing practices have emerged to extract data and produce a consistent data store.
This talk will look at some options for composing workflows using Python. In particular, we'll explore beyond Celery's asynchronous task processing functionality into its workflow (aka Canvas) system and how it can be used in conjunction with SQLAlchemy's architecture to provide the building blocks for data stream processing.
This information is outdated now. For an up to date look at using Cassandra from Python see this presentation: https://speakerdeck.com/tylerhobbs/intro-to-cassandra-and-the-python-driver
Using Apache Cassandra from Python. Given at PyCon 2012.
Cassandra Day NY 2014: Getting Started with the DataStax C# DriverDataStax Academy
So you’ve grabbed the latest 2.0 beta of DataStax C# driver from NuGet. Now what? In this talk, Luke will walk you through some of the basics of the C# driver--how to bootstrap the driver and connect to a cluster, execute statements, and retrieve result sets. Wondering what the difference between a PreparedStatement and a SimpleStatement is? Not sure what the appropriate lifetime for a Cluster or a Session object is and whether you should reuse one (from multiple threads)? What about ADO.NET and LINQ support? We’ll cover this and more, so that you can get on with building applications on top of Cassandra and .NET.
.NET developers have a lot of options when it comes to databases these days. Apache Cassandra is a scalable, fault-tolerant database that has already found its way into more than 25% of the Fortune 100 and continues to grow in popularity. But what makes it different from the myriad of other options available? In this talk, we’ll take a deep dive into Cassandra and learn about:
- Cassandra’s internals and how it works
- CQL (the SQL-like query language for Cassandra)
- Data Modeling like a pro
- Tools available for developers
- Writing .NET code that talks to Cassandra
If there’s time and interest, we’ll finish up with how some companies are already using Cassandra to power services you probably interact with in your daily life. You’ll leave with all the tools you need to start build highly available .NET applications and services on top of Cassandra.
Cassandra Summit 2014: Highly Scalable Web Application in the Cloud with Cass...DataStax Academy
Presenters, L
Putting together a cloud based web application that allows end users to upload, encode, manage and distribute video media files is not a difficult task these days. Especially with the number of related frameworks and services available, ready to be used or consumed. The situation gets more complex when the expected traffic is in the millions-of-users range, globally distributed, and requiring detailed monitoring for usage. Using this scenario, in this session you will learn how to use the recently updated Datastax C# Cassandra driver, how to deploy a multi-datacenter Cassandra cluster using the Microsoft Azure platform that can be accessed from different programming languages, and how to leverage existing cloud services to perform some of the tasks associated with this use case.
Main instruments used for Web UI test automation.
Drivers: Selenium WebDriver, Sikuli X.
Frameworks: PageFactory, TestNG.
Other tools: Apache Ant, Jenkins CI.
Quality assurance and testing are very important in a life cycle of any application. Although, by far not all developers understand the significance of tests.
In this presentation, we cover the basic testing practices for developers. The following tools are discussed: JUnit, Mockito, Hamcrest, JsTestDriver, DBUnit, Arquillian, SoapUI, Selenium.
[Srijan Wednesday Webinars] Ruling Drupal 8 with #d8rulesSrijan Technologies
Speaker: Josef Dabernig a.k.a Dasjo
This webinar takes a look at how to automate some powerful backend capabilities for your Drupal site, using the Drupal 8 Rules. Take a look at how D8 Rules can change the way we build sites. Also, learn how you can contribute to getting Rules closer to a stable release.
Spring Data Requery is alternatives of Spring Data JPA
Requery is lightweight ORM for DBMS (MySQL, PostgreSQL, H2, SQLite, Oracle, SQL Server)
Spring Data Requery provide Query By Native Query, Query By Example and Query By Property like Spring Data JPA
Spring Data Requery is better performance than JPA
OSCON 2014 - API Ecosystem with Scala, Scalatra, and Swagger at NetflixManish Pandit
In this talk I’d like to introduce the Scala-based API stack at Partner Innovation Group at Netflix. After seeing a massive growth in the business model and the device ecosystem, we needed a system that could scale and be flexible at the same time. Scala provided the answer and we started with a basic set of APIs which, since then, has evolved towards complex but flexible business flows. Supporting metadata for over hundreds of brands and thousands of devices, the API development has followed a well thought-out, test-driven approach, git-flow, and what most API developers dread – documentation. I will talk about the architecture of the RESTful APIs, and the development + deployment process. We use Netflix-OSS components heavily in the architecture and cloud deployment, so I will cover them as well.
Swagger is what we used for type-safe documentation, which is really easy to use and integrate. I will briefly talk about customizations we’ve done to Swagger in order to make it far more usable at Netflix.
Throughout this effort there were lessons to be learnt, and plenty of best practices and recommendations for anyone starting out to build RESTful APIs, regardless of the platform or stack of choice. It’d be a great opportunity for me to walk through the architecture, and talk about the various components, technologies, and practices that are seeing increasing adoption in the modern, API driven landscape.
Forrester CXNYC 2017 - Delivering great real-time cx is a true craftDataStax Academy
Companies today are innovating with real-time data to deliver truly amazing customer experiences in the moment. Real-time data management for real-time customer experience is core to staying ahead of competition and driving revenue growth. Join Trays to learn how Comcast is differentiating itself from it's own historical reputation with Customer Experience strategies.
Introduction to DataStax Enterprise Graph DatabaseDataStax Academy
DataStax Enterprise (DSE) Graph is a built to manage, analyze, and search highly connected data. DSE Graph, built on NoSQL Apache Cassandra delivers continuous uptime along with predictable performance and scales for modern systems dealing with complex and constantly changing data.
Download DataStax Enterprise: Academy.DataStax.com/Download
Start free training for DataStax Enterprise Graph: Academy.DataStax.com/courses/ds332-datastax-enterprise-graph
Introduction to DataStax Enterprise Advanced Replication with Apache CassandraDataStax Academy
DataStax Enterprise Advanced Replication supports one-way distributed data replication from remote database clusters that might experience periods of network or internet downtime. Benefiting use cases that require a 'hub and spoke' architecture.
Learn more at http://www.datastax.com/2016/07/stay-100-connected-with-dse-advanced-replication
Advanced Replication docs – https://docs.datastax.com/en/latest-dse/datastax_enterprise/advRep/advRepTOC.html
Data Modeling is the one of the first things to sink your teeth into when trying out a new database. That's why we are going to cover this foundational topic in enough detail for you to get dangerous. Data Modeling for relational databases is more than a touch different than the way it's approached with Cassandra. We will address the quintessential query-driven methodology through a couple of different use cases, including working with time series data for IoT. We will also demo a new tool to get you bootstrapped quickly with MovieLens sample data. This talk should give you the basics you need to get serious with Apache Cassandra.
Hear about how Coursera uses Cassandra as the core of its scalable online education platform. I'll discuss the strengths of Cassandra that we leverage, as well as some limitations that you might run into as well in practice.
In the second part of this talk, we'll dive into how best to effectively use the Datastax Java drivers. We'll dig into how the driver is architected, and use this understanding to develop best practices to follow. I'll also share a couple of interesting bug we've run into at Coursera.
Cassandra @ Sony: The good, the bad, and the ugly part 1DataStax Academy
This talk covers scaling Cassandra to a fast growing user base. Alex and Isaias will cover new best practices and how to work with the strengths and weaknesses of Cassandra at large scale. They will discuss how to adapt to bottlenecks while providing a rich feature set to the playstation community.
Cassandra @ Sony: The good, the bad, and the ugly part 2DataStax Academy
This talk covers scaling Cassandra to a fast growing user base. Alex and Isaias will cover new best practices and how to work with the strengths and weaknesses of Cassandra at large scale. They will discuss how to adapt to bottlenecks while providing a rich feature set to the playstation community.
5. Cluster
• Singleton - one per application
• Use the Builder
Cluster cluster = Cluster.Builder()
.AddContactPoint("127.0.0.1")
.Build();
6. Cluster
• Fluent Interface with Lots of Options
var authProvider = new PlainTextAuthProvider("username", "password");
var queryOptions = new QueryOptions()
.SetConsistencyLevel(ConsistencyLevel.LocalQuorum)
.SetPageSize(1000);
Cluster cluster = Cluster.Builder().AddContactPoint("127.0.0.1")
.WithSSL()
.WithQueryOptions(queryOptions)
.WithAuthProvider(authProvider)
.Build();
7. Session
• Singleton per keyspace
• Inspired by the (N)Hibernate session object
• Get it from your Cluster object
ISession session = cluster.Connect("killrvideo");
8. Sample IoC Container Registration
// Use the Cluster builder to create a cluster
Cluster cluster = Cluster.Builder().AddContactPoint("127.0.0.1").Build();
// Use the cluster to connect a session to the appropriate keyspace
ISession session = cluster.Connect("killrvideo");
// Register both Cluster and ISession instances with Windsor (as
// Singletons since it will reuse the instance)
container.Register(
Component.For<Cluster>().Instance(cluster),
Component.For<ISession>().Instance(session)
);
11. SimpleStatement
• It’s… simple?
• Can use bind parameters
• Useful for one-off statements or dynamic CQL where
you can’t prepare it
var statement =
new SimpleStatement("SELECT * FROM users WHERE userid = ?");
statement = statement.Bind(145);
12. PreparedStatement / BoundStatement
• Pay the cost of Prepare once (server roundtrip)
• Save the PreparedStatement instance and reuse
PreparedStatement prepared = session.Prepare(
"SELECT * FROM user_credentials WHERE email = ?");
13. PreparedStatement / BoundStatement
• Bind variable values to get BoundStatement for
execution
• Execution only has to send variable values
• You will use these all the time
BoundStatement bound =
prepared.Bind("luke.tillman@datastax.com");
14. BatchStatement
• Add Simple/Bound statements to a batch
BoundStatement bound = prepared.Bind(video.VideoId, video.Name);
var simple = new SimpleStatement(
"UPDATE videos SET name = ? WHERE videoid = ?"
).Bind(video.Name, video.VideoId);
// Use an atomic batch to send over all the mutations
var batchStatement = new BatchStatement();
batchStatement.Add(bound);
batchStatement.Add(simple);
15. BatchStatement
• Batches are Logged, atomic (by default) and this is
the most common use case
• Set the batch type to use a different type of batch
• Counters have their own batch type (can’t mix)
var batch =
new BatchStatement().SetBatchType(BatchType.Unlogged);
16. Statements – You’ve Got Options
• Simple and Bound statements have options that can
be set at the Statement level
• Consistency Level
• Retry Policy
• Paging Size (for automatic paging, we’ll come back to this)
• Tracing
• If not set at the statement level, defaults set when
configuring/building the Cluster are used
17. Statements – You’ve Got Options
• Example of binding a PreparedStatement and setting
available options:
IStatement bound =
prepared.Bind("luke.tillman@datastax.com")
.SetPageSize(100)
.SetConsistencyLevel(ConsistencyLevel.LocalOne)
.SetRetryPolicy(new DefaultRetryPolicy())
.EnableTracing();
19. Executing Statements
• Use your Session object to execute statements
• You can execute statements synchronously or
asynchronously
• Synchronous
• Asynchronous
• Execute methods return a RowSet
RowSet rows = await _session.ExecuteAsync(boundStatement);
RowSet rows = _session.Execute(boundStatement);
20. RowSet
• RowSet implements IEnumerable<Row>
• Use GetValue<T> method on a Row to get a
column’s value
• By column name
• By ordinal (position)
21. RowSet
• Because RowSet implements IEnumerable<Row>:
• Iterate with foreach
RowSet rows = await _session.ExecuteAsync(boundStatement);
foreach (Row row in rows)
{
returnList.Add(new VideoPreview
{
VideoId = row.GetValue<Guid>("videoid"),
AddedDate = row.GetValue<DateTimeOffset>("added_date"),
Name = row.GetValue<string>("name")
});
}
22. RowSet
• Because RowSet implements IEnumerable<Row>:
• Project Rows with LINQ to Objects Select()
RowSet rows = await _session.ExecuteAsync(boundStatement);
var returnList = rows.Select(row => new VideoPreview
{
VideoId = row.GetValue<Guid>(0),
AddedDate = row.GetValue<DateTimeOffset>(1),
Name = row.GetValue<string>(2)
}).ToList();
23. RowSet
• Because RowSet implements IEnumerable<Row>:
• Get a single row with LINQ to Objects Single() or
SingleOrDefault()
RowSet rows = await _session.ExecuteAsync(boundStatement);
Row row = rows.SingleOrDefault();
24. CQL 3 Data Types to .NET Types
Full listing available in driver docs
CQL 3 Data Type .NET Type
bigint, counter long
boolean bool
decimal, float float
double double
int int
uuid, timeuuid System.Guid
text, varchar string (Encoding.UTF8)
timestamp System.DateTimeOffset
varint System.Numerics.BigIntege
r
26. Lightweight Transactions (LWT)
• Use when you don’t want writes to step on each
other
• AKA Linearizable Consistency
• Serial Isolation Level
• Be sure to read the fine print: has a latency cost
associated with using it, so use only where needed
• The canonical example: unique user accounts
27. Lightweight Transactions (LWT)
• Returns a column called [applied] indicating
success/failure
• Different from the relational world where you might
expect an Exception (i.e.
var statement = new SimpleStatement("INSERT INTO user_credentials (email,
password) VALUES (?, ?) IF NOT EXISTS");
statement = statement.Bind("user1@killrvideo.com", "Password1!");
RowSet rows = await _session.ExecuteAsync(statement);
var userInserted = rows.Single().GetValue<bool>("[applied]");
28. Automatic Paging
• The Problem: Loading big result sets into memory is
a recipe for disaster (OutOfMemoryExceptions, etc.)
• Better to load and process a large result set in pages
(chunks)
• Doing this manually with Cassandra prior to 2.0 was
a pain
29. Automatic Paging
• Set a page size on a statement (or will use default from
Cluster)
• Iterate over the resulting RowSet
• As you iterate, new pages are fetched transparently when
the Rows in the current page are exhausted
• Will allow you to iterate until all pages are exhausted
boundStatement = boundStatement.SetPageSize(100);
RowSet rows = await _session.ExecuteAsync(boundStatement);
foreach (Row row in rows)
{
}
30. Typical Pager UI in a Web Application
• Show page of records in UI and allow user to
navigate
31. Typical Pager UI in a Web Application
• Automatic Paging – this is not the feature you are
looking for
33. LINQ to CQL
• Comes in the NuGet package as
Cassandra.Data.Linq
• Has support for all CRUD operations
• Start by decorating the objects you’ll be querying
with Table, Column, and PartitionKey attributes
34. LINQ to CQL
[Table("user_credentials")]
public class UserCredentials
{
[Column("email")]
[PartitionKey]
public string EmailAddress { get; set; }
[Column("password")]
public string Password { get; set; }
[Column("userid")]
public Guid UserId { get; set; }
}
35. LINQ to CQL
• Then query with LINQ using the Session’s
GetTable<T> method as your starting point
public UserCredentials GetCredentials(string emailAddress)
{
IEnumerable<UserCredentials> results =
_session.GetTable<UserCredentials>()
.Where(uc => uc.EmailAddress == emailAddress)
.Execute();
return results.SingleOrDefault();
}
36. ADO.NET Support
• Available in the NuGet package as Cassandra.Data
• Allows you to use your “favorite” ADO.NET objects
like DbConnection, DbCommand, etc. to query
Cassandra
• My recommendation? Avoid it.
• Cassandra concepts don’t always map well to
37. The KillrVideo Sample Application
• Many of this presentation’s samples are taken from
here
• https://github.com/luketillman/killrvideo-csharp
38. What Next?
• Data Modeling, Data Modeling, Data Modeling
• Planet Cassandra (http://www.planetcassandra.org)
• Links to videos, drivers, documentation, tutorials, etc.
• 2.1 Beta Available (support for User Defined Types)
Follow me on Twitter for updates: @LukeTillman