2. By now you should...
● Understand Satori basic concepts
(Publishing/Subscription/etc.)
● Be familiar with SDKs, OpenData, Projects, etc.
Let’s dive deeper!
3. Problem...
● I want to load an initial state and then receive
updates...
Solution
● Subscription with history
https://www.satori.com/docs/using-satori/subscribing#wi
th-history
Make sure your channel is configured to retain
messages
4. Problem
● How do I get the relevant data only?
Solution
● Subscription with the View
https://www.satori.com/docs/using-satori/subscribing#
with-view
5. About Views
● Uses Streaming SQL - very similar to a normal SQL
○ table->`channel`, column->`field1.field2.field3`
○ Cannot: LIMIT, TOP, SORT, ORDER BY
○ No Joins!
● Simple Views:
https://www.satori.com/docs/using-satori/views#simple
-view
○ >,<,=,<>, IN, BETWEEN, LIKE
○ Nested selects
○ Pseudo fields
○ Selecting nested fields
○ Array indexing
6. Using Views to Transform
the Data
● Problem: How many messages does Twitter have at
any given time:
○ select created_at, count(*) from `world` GROUP BY
created_at
● Problem: Tweets per location?
○ select count(*) as 'Count',user.location as 'Location'
from `Twitter-statuses-sample` group by
user.location
● Aggregate Views + Functions
○ https://www.satori.com/docs/using-satori/views#fun
ctions
○ https://www.satori.com/docs/using-satori/views#agg
regate-filter
7. A few thoughts… What if you need
to...
● Substantially transform the data
● Combine/correlate the data from the different sources
● Separate the data between multiple clients based on
certain conditions
● Send the request out and receive replies from different
providers
● Enhance the data when it becomes possible
That is where you need bots!
13. Bot Development
● Quickstarts
○ https://www.satori.com/docs/streambots/quickstart/j
ava-streambot-quickstart
○ https://www.satori.com/docs/streambots/quickstart/j
avascript-streambot-quickstart
● Sample projects - clone and modify
○ https://github.com/satori-com/satori-bot-example
14. Getting the data...
● In most cases the data sources are REST services
● Composer Framework was developed to simplify the
process of loading the data from the REST API to the
channel
https://github.com/satori-com/satori-composer
○ Composer project consists of one or more Mods
that are wired together as specified in the config file
○ 8 prebuilt Mods for the common tasks
○ Totally asynchronous - built on the Eclipse Vert.x
framework (http://vertx.io/)
○ APIs for the custom Mod development - assumes
advanced Java skills
15. Persistency
● It is possible to use the channels as the KV storage
○ Key is the name of the channel
○ Store the data with ‘write’ command
https://www.satori.com/docs/using-satori/rtm-api#write-pdu
○ Retrieve the data with ‘read’ command
https://www.satori.com/docs/using-satori/rtm-api#read-pdu
● Channels are to be configured to retain the data (up to 24 hours)
17. Other good stuff in the views
● Partitioning
https://www.satori.com/docs/using-satori/views#aggreg
ate-filter
● Subscribing with multiple views
https://www.satori.com/docs/using-satori/subscribing#
with-multiple-views