Please log in to watch this conference skillscast.
Troy is an open source macro-based Cassandra driver, similar to Slick and Quill, provides type-safe & compile-time checking for database queries. Nevertheless, it doesn't impose a DSL to express the queries in Scala. Instead, it allows developers to write plain Cassandra-query-language (CQL) queries within Scala code, complete with schema validation. In addition, it provides cross-validation against the previous versions, ensuring safe and smooth schema migrations.
It is worth noting that Troy doesn't connect to Cassandra during compilation. Instead, the schema is provided as CQL scripts, checked-in within same code base, consisting of plain
CREATE TABLE CQL statements. That get's loaded at compile-time into a light-weight Schema engine capable of analysing queries and providing information about column types.
Those CQL scripts can be written as increments, by adding new scripts containing
ALTER TABLE statement, instead of editing existing scripts. This allows Troy to check backwards and forward compatibility of queries against different versions of the schema. As well as providing tools to write migration scripts.
Currently, Troy uses reflection-based black-box macros. But also has a working proof-of-concept using the new style inline/meta as well.
There will be slides and code, along with live coding examples.
The Call for Papers is now open for Scala eXchange 2017! Submit your talk for the chance to join a stellar line-up of experts on stage. Find out more.
YOU MAY ALSO LIKE:
- Scala eXchange London 2019 (in London on 12th - 13th December 2019)
- Factor Recursion Out of Your Codebase (SkillsCast recorded in December 2018)
- Lightbend Akka for Scala - Professional (in London on 11th - 12th November 2019)
- Advanced Scala with Dick Wall (in London on 9th - 11th December 2019)
- Scalax2gether Community Day 2019 (in London on 14th December 2019)
- Code Kata: Yilin Wei - Optics with Monocle (in London on 22nd October 2019)
- Don’t keep it to yourself - openness and honesty in the workplace (in London on 30th October 2019)
- RedisTimeSeries = A Time Series Database using Redis (SkillsCast recorded in October 2019)
- Abstract Data Types In The Region Of Abysmal Pain, And How To Navigate Them (SkillsCast recorded in September 2019)
Introducing Troy: The schema-safe Cassandra toolkit - Advanced
Tamer is a Senior Software Engineer at Disney Streaming Services, building and maintaining distributed systems armed with nothing but Scala, types and the power of functional programming.