Skip to content

Commit 84fe89b

Browse files
authored
Updating docs (#27)
1 parent 211fda0 commit 84fe89b

File tree

9 files changed

+249
-53
lines changed

9 files changed

+249
-53
lines changed

docs/about/contributing.md

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,4 @@ Bullet is hosted under the [Bullet Github Organization](https://github.com/bulle
88

99
## Future plans
1010

11-
Here is a selected list of features we are currently considering/working on. Feel free to [contact us](contact.md) with any ideas/suggestions/PRs for features mentioned here or anything else you think about!
12-
13-
This list is neither comprehensive nor in any particular order.
14-
15-
| Feature | Components | Description | Status |
16-
|-------------------- | ----------- | ------------------------- | ------------- |
17-
| Bullet on X | BE | With the pub/sub feature, Bullet can be implemented on other Stream Processors like Flink, Kafka Streaming, Samza etc | Open |
18-
| SQL API | BE, WS | WS supports an endpoint that converts a SQL-like query into Bullet queries | In Progress |
19-
| More Windows | BE | We have implemented a few of the windows we wanted to support initially but there are still more we can add | Open |
20-
| More Aggregations | BE, UI | We can add more aggregations like Group By Count Distinct etc | Open |
21-
| Post Aggregations | BE, UI | Post aggregations once the aggregations are done is useful | Open |
22-
| Bullet on Beam | BE | Bullet can be implemented on [Apache Beam](https://beam.apache.org) as an alternative to implementing it on various Stream Processors | Open |
23-
| Security | WS, UI | The obvious enterprise security for locking down access to the data and the instance of Bullet. Considering SSL, Kerberos, LDAP etc. Ideally, without a database | Planning |
24-
| Packaging | UI, BE, WS | Github releases and building from source are the only two options for the UI. Docker images or the like for quick setup and to mix and match various pluggable components would be really useful | Open |
11+
Our issues are tracked through GitHub on the appropriate repo issues pages. You are welcome to take a look and contribute. Also, feel free to [contact us](contact.md) with any ideas/suggestions/PRs for features mentioned here or anything else you think about!
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace me with the real documentation.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace me with the real documentation.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace me with the real documentation.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Replace me with the real documentation.

docs/releases.md

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ This sections gathers all the relevant releases of the components of Bullet that
44

55
Bullet is still in active development. We welcome all contributions. Feel free to raise any issues/questions/bugs and whatever else on the relevant issues section for each component. Please include as many details as you can.
66

7+
## API Documentation
8+
9+
API (Java and Scala) docs can also be found for the releases below.
10+
711
## Download
812

913
For downloading any artifact listed below manually, you should preferably use the [**JCenter mirror here**](https://jcenter.bintray.com/com/yahoo/bullet/). For resolving artifacts in your build tool, follow the directions in each of the components' Package Manager Setup sections.
@@ -26,6 +30,7 @@ The core Bullet logic (a library) that can be used to implement Bullet on differ
2630

2731
| Date | Release | Highlights | APIDocs |
2832
| ------------ | ------------------------------------------------------------------------------------- | ---------- | ------- |
33+
| 2018-09-05 | [**0.4.3**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.4.3) | Sliding Windows, SIZEIS, CONTAINSKEY, CONTAINSVALUE, filtering against other fields | [JavaDocs](apidocs/bullet-core/0.4.3/index.html) |
2934
| 2018-06-26 | [**0.4.2**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.4.2) | Fixes a bug with unclosed connections in the RESTPubSub | [JavaDocs](apidocs/bullet-core/0.4.2/index.html) |
3035
| 2018-06-22 | [**0.4.1**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.4.1) | Added RESTPublisher HTTP Timeout Setting | |
3136
| 2018-06-18 | [**0.4.0**](https://github.com/bullet-db/bullet-core/releases/tag/bullet-core-0.4.0) | Added support for Integer and Float data types, and configurable BulletRecordProvider class used to instantiate BulletRecords in bullet-core | |
@@ -66,8 +71,8 @@ The implementation of Bullet on Storm. Due to major API changes between Storm <=
6671

6772
### Releases
6873

69-
| Date | Storm 1.0 | Storm 0.10 | Highlights | APIDocs |
70-
| ------------ | ---------------------------------------------------------------------------------- | --------------------------------------------------------------------------------------- | ---------- | ------- |
74+
| Date | Storm 1.0 | Storm 0.10 | Highlights | APIDocs |
75+
| ------------ | --------------------------------------------------------------------------- | --------------------------------------------------------------------------- | ---------- | ------- |
7176
| 2018-06-18 | [**0.8.3**](https://github.com/bullet-db/bullet-storm/releases/tag/bullet-storm-0.8.3) | [**0.8.3**](https://github.com/bullet-db/bullet-storm/releases/tag/bullet-storm-0.10-0.8.3) | Using new bullet-record and bullet-core supporting Integer and Float data types | [JavaDocs](apidocs/bullet-storm/0.8.3/index.html) |
7277
| 2018-04-12 | [**0.8.2**](https://github.com/bullet-db/bullet-storm/releases/tag/bullet-storm-0.8.2) | [**0.8.2**](https://github.com/bullet-db/bullet-storm/releases/tag/bullet-storm-0.10-0.8.2) | Delaying query start in Join Bolt | |
7378
| 2018-04-04 | [**0.8.1**](https://github.com/bullet-db/bullet-storm/releases/tag/bullet-storm-0.8.1) | [**0.8.1**](https://github.com/bullet-db/bullet-storm/releases/tag/bullet-storm-0.10-0.8.1) | Fixed bug in JoinBolt | |
@@ -127,6 +132,7 @@ The Web Service implementation that can serve a static schema from a file and ta
127132

128133
| Date | Release | Highlights | APIDocs |
129134
| ------------ | -------------------------------------------------------------------------------------- | ---------- | ------- |
135+
| 2018-09-06 | [**0.4.1**](https://github.com/bullet-db/bullet-service/releases/tag/bullet-service-0.4.1) | Max Queries limit and bullet-bql 0.1.2 | [JavaDocs](apidocs/bullet-service/0.4.1/index.html) |
130136
| 2018-07-17 | [**0.4.0**](https://github.com/bullet-db/bullet-service/releases/tag/bullet-service-0.4.0) | Enhanced Web Service to support BQL queries | [JavaDocs](apidocs/bullet-service/0.4.0/index.html) |
131137
| 2018-06-25 | [**0.3.0**](https://github.com/bullet-db/bullet-service/releases/tag/bullet-service-0.3.0) | Upgrades to Netty-less Bullet Core for the RESTPubsub | |
132138
| 2018-06-14 | [**0.2.2**](https://github.com/bullet-db/bullet-service/releases/tag/bullet-service-0.2.2) | Adding settings to configure Websocket | |
@@ -181,6 +187,7 @@ The AVRO container that you need to convert your data into to be consumed by Bul
181187

182188
| Date | Release | Highlights | APIDocs |
183189
| ------------ | ------------------------------------------------------------------------------------ | ---------- | ------- |
190+
| 2018-08-14 | [**0.2.1**](https://github.com/bullet-db/bullet-record/releases/tag/bullet-record-0.2.1) | Supports List of Primitive types | [JavaDocs](apidocs/bullet-record/0.2.1/index.html) |
184191
| 2018-06-14 | [**0.2.0**](https://github.com/bullet-db/bullet-record/releases/tag/bullet-record-0.2.0) | Makes BulletRecord pluggable, adds simple record and avro record implementations | [JavaDocs](apidocs/bullet-record/0.2.0/index.html) |
185192
| 2017-05-19 | [**0.1.2**](https://github.com/bullet-db/bullet-record/releases/tag/bullet-record-0.1.2) | Reduces the memory footprint needed to serialize itself by a factor of 128 for small records | |
186193
| 2017-04-17 | [**0.1.1**](https://github.com/bullet-db/bullet-record/releases/tag/bullet-record-0.1.1) | Helper methods to remove, rename, check presence and count fields in the Record | |
@@ -223,5 +230,6 @@ A library facilitating the conversion from Bullet BQL queries to Bullet JSON que
223230

224231
| Date | Release | Highlights | APIDocs |
225232
| ------------ | ------------------------------------------------------------------------------------ | ---------- | ------- |
233+
| 2018-09-06 | [**0.1.2**](https://github.com/bullet-db/bullet-bql/releases/tag/bullet-bql-0.1.2) | Supports CONTAINSKEY, CONTAINSVALUE, SIZEOF, comparing to other fields. Fixes some bugs | [JavaDocs](apidocs/bullet-bql/0.1.2/index.html) |
226234
| 2018-07-17 | [**0.1.1**](https://github.com/bullet-db/bullet-bql/releases/tag/bullet-bql-0.1.1) | Stops publishing fat jar and marks slf4j dependency provided | [JavaDocs](apidocs/bullet-bql/0.1.1/index.html) |
227235
| 2018-07-05 | [**0.1.0**](https://github.com/bullet-db/bullet-bql/releases/tag/bullet-bql-0.1.0) | First release | |

docs/ws/api-bql.md

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,11 @@ This section gives a comprehensive overview of the Web Service API for launching
44

55
For examples of BQL queries, see the [examples page](examples.md).
66

7-
BQL queries that are received by the Web Service will be detenced and automatically converted to
8-
[the JSON format](api-json.md) before being sent to the backend (which requires the basic JSON format). This converstion
9-
is done in the web service using [the bullet-bql library](../releases/#bullet-bql).
7+
BQL queries that are received by the Web Service will be detenced and automatically converted to [the JSON format](api-json.md) before being sent to the backend (which requires the basic JSON format). This conversion is done in the web service using [the bullet-bql library](../releases/#bullet-bql).
108

119
## Overview
1210

13-
Bullet-BQL provides users with a friendly SQL-like API to submit queries to the Web Service instead of using the more
14-
cumbersome [JSON API](api-json.md).
11+
Bullet-BQL provides users with a friendly SQL-like API to submit queries to the Web Service instead of using the more cumbersome [JSON API](api-json.md).
1512

1613
## Statement Syntax
1714

@@ -34,7 +31,9 @@ where `select_clause` is one of
3431
TOP ( ( Integer | Long ) ( , Integer | Long ) )? , reference_expr ( , reference_expr )? ) ( AS? ColumnReference )?
3532

3633

37-
`group_function` is one of `SUM(reference_expr)`, `MIN(reference_expr)`, `MAX(reference_expr)`, `AVG(reference_expr)` and `COUNT(*)`. `reference_expr` is one of ColumnReference and Dereference. `distribution_type` is one of `QUANTILE`, `FREQ` and `CUMFREQ`. The 1st number in `TOP` is K, and the 2nd number is an optional threshold. The `input_mode` is one of
34+
`reference_expr` is one of `ColumnReference` or `Dereference`.
35+
36+
and `group_function` is one of `SUM(reference_expr)`, `MIN(reference_expr)`, `MAX(reference_expr)`, `AVG(reference_expr)` and `COUNT(*)`. `reference_expr` is one of ColumnReference and Dereference. `distribution_type` is one of `QUANTILE`, `FREQ` and `CUMFREQ`. The 1st number in `TOP` is K, and the 2nd number is an optional threshold. The `input_mode` is one of
3837

3938
LINEAR, ( Integer | Long ) evenly spaced
4039
REGION, ( Integer | Long ), ( Integer | Long ), ( Integer | Long ) evenly spaced in a region
@@ -59,9 +58,14 @@ and `where_clause` is one of
5958
reference_expr NOT? BETWEEN value_expr AND value_expr
6059
reference_expr NOT? IN ( value_expr ( , value_expr )* )
6160
reference_expr NOT? LIKE ( value_expr ( , value_expr )* )
61+
reference_expr NOT? CONTAINSKEY ( value_expr ( , value_expr )* )
62+
reference_expr NOT? CONTAINSVALUE ( value_expr ( , value_expr )* )
6263
reference_expr ( = | <> | != | < | > | <= | >= ) value_expr
64+
SIZEOF(reference_expr) ( = | <> | != ) value_expr
65+
SIZEOF(reference_expr) NOT? IN ( value_expr ( , value_expr )* )
66+
SIZEOF(reference_expr) NOT? DISTINCT FROM value_expr
6367

64-
`value_expr` is one of Null, Boolean, Integer, Long, Double, Decimal and String.
68+
`value_expr` is one of Null, Boolean, Integer, Long, Double, Decimal, String or `reference_expr`.
6569

6670
and `groupBy_clause` is one of
6771

@@ -109,16 +113,14 @@ and `limit_clause` is one of
109113

110114
* **String**: character string which can have escapes. Example: `'this is a string'`, `'this is ''another'' string'`.
111115

112-
* **ColumnReference**: representation of a single column. Unquoted ColumnReference must start with a letter or `_`. Quoted ColumnReference can have escape. Example: `column_name`, `"#column""with""escape"`.
116+
* **ColumnReference**: representation of a single column. Unquoted ColumnReference must start with a letter or `_`. Example: `column_name`.
113117

114118
* **Dereference**: representation of a column field. Example: `column_name.field_name`.
115119

116120
* **All**: representation of all columns. Example: `*`. `column_name.*` is interpreted as `column_name`.
117121

118122
## Reserved Keywords
119123

120-
Reserved keywords must be double quoted in order to be used as ColumnReference or Dereference.
121-
122124
| Keyword | SQL:2016 | SQL-92 |
123125
| --------------------- | :-------------: | :-----------: |
124126
| `ALTER` | reserved | reserved |

docs/ws/api-json.md

Lines changed: 35 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ Fields inside maps can be accessed using the '.' notation in queries. For exampl
2121

2222
`myMap.key`
2323

24-
will access the "key" field inside the "myMap" map. There is no support for accessing fields inside Lists or inside nested Maps as of yet. Only the entire object can be operated on for now.
24+
will access the "key" field inside the "myMap" map. There is no support for accessing fields inside Lists yet. Only the entire object can be operated on for now.
2525

2626
The main constituents of a Bullet query listed above create the top level fields of the Bullet query:
2727
```javascript
@@ -75,19 +75,22 @@ Note that the "filter" field in the query is a __list__ of as many filters as yo
7575

7676
### Relational Filters
7777

78-
Relational filters allow you to specify conditions on a field, using a comparison operator and a list of values.
78+
Relational filters allow you to specify conditions on a field, using a comparison operator and a list of constant values or other fields.
7979

8080
The current comparisons allowed in filters are:
8181

82-
| Comparison | Meaning |
83-
| ---------- | ------- |
84-
| == | Equal to any value in values |
85-
| != | Not equal to any value in values |
86-
| <= | Less than or equal to any value in values |
87-
| >= | Greater than or equal to any value in values |
88-
| < | Less than any value in values |
89-
| > | Greater than any value in values |
90-
| RLIKE | Matches using [Java Regex notation](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html), any Regex value in values |
82+
| Comparison | Meaning |
83+
| ------------- | ------- |
84+
| == | Equal to any value in values |
85+
| != | Not equal to any value in values |
86+
| <= | Less than or equal to any value in values |
87+
| >= | Greater than or equal to any value in values |
88+
| < | Less than any value in values |
89+
| > | Greater than any value in values |
90+
| RLIKE | Matches using [Java Regex notation](http://docs.oracle.com/javase/7/docs/api/java/util/regex/Pattern.html), any Regex value in values |
91+
| SIZEIS | If a map, list, or string has a given size |
92+
| CONTAINSKEY | If a map field contains the given key. This map field can be a top level map field or a map field inside a list of maps |
93+
| CONTAINSVALUE | If a map field or a list field contains the given value. If the list contains maps instead of primitives, the values in the maps are used |
9194

9295
Note: These operators are all typed based on the type of the __left hand side__ from the Bullet record. If the elements on the right hand side cannot be
9396
casted to the types on the LHS, those items will be ignored for the comparison.
@@ -96,7 +99,20 @@ The format for a Relational filter is:
9699

97100
```javascript
98101
{
99-
"operation": "== | != | <= | >= | < | > | RLIKE"
102+
"operation": "== | != | <= | >= | < | > | RLIKE | SIZEIS | CONTAINSKEY | CONTAINSVALUE"
103+
"field": "record_field_name | map_field.subfield",
104+
"values": [
105+
{ "kind": "VALUE", "value": "foo"},
106+
{ "kind": "FIELD", "value": "another_record_field_name"}
107+
]
108+
}
109+
```
110+
111+
Note that you may specify ```VALUE``` or ```KIND``` currently for the ```kind``` key in the entries in the ```values``` field above, denoting the type of value this is. As a shortcut, you can also specify the following format for ```VALUE``` kind.
112+
113+
```javascript
114+
{
115+
"operation": "== | != | <= | >= | < | > | RLIKE | SIZEIS | CONTAINSKEY | CONTAINSVALUE"
100116
"field": "record_field_name | map_field.subfield",
101117
"values": [
102118
"string values",
@@ -107,6 +123,9 @@ The format for a Relational filter is:
107123
]
108124
}
109125
```
126+
127+
You may __not__ mix and match both styles in the same filter.
128+
110129
*Multiple top level relational filters behave as if they are ANDed together.* This is supported as a convenience to do a bunch of ```AND```ed relational filters without having to nest them in a logical clause.
111130

112131
## Projections
@@ -286,7 +305,7 @@ Note that the ```K``` in ```TOP K``` is specified using the ```size``` field in
286305

287306
## Window
288307

289-
The "window" field is **optional** and allows you to instruct Bullet to return incremental results. For example you might want to return the COUNT of a field and return that count every 2 seconds.
308+
The "window" field is **optional** and allows you to instruct Bullet to return incremental results. For example you might want to return the COUNT of a field and return that count every 2 seconds.
290309

291310
If "window" is omitted Bullet will emit only a single result at the very end of the query.
292311

@@ -351,15 +370,13 @@ The above example would be specified with the window:
351370

352371
In this example the first window would include 3 records, the second would include 7 records, the third would include 10 records and the fourth would include 12 records.
353372

354-
#### **Sliding "Reactive" Windows**
373+
#### **Sliding Windows**
355374

356-
Sliding windows emit based on the arrival of an event, rather than after a certain period of time. In general sliding windows often do some aggregation on the previous X records, or on all records that arrived in the last X seconds.
357-
Bullet will support this functionality in the future, at this time Bullet only supports **Sliding Windows of size 1**, often referred to as "reactive" windows. It does not support sliding windows with an aggregation at this time.
358-
Effectively this query will simply return every event that matches the filters instantly to the user.
375+
Sliding windows emit based on the arrival of an event, rather than after a certain period of time. In general sliding windows often do some aggregation on the previous X records, or on all records that arrived in the last X seconds. At this time, Bullet only supports sliding windows on the previous X records. It does not support sliding windows with any aggregation but ```RAW``` at this time. If you set X to 1, the query will effectively return each record as they arrive to the user.
359376

360377
![Reactive Windows](../img/reactive.png)
361378

362-
The above example would be specified with the window:
379+
The above example would be specified with the window (you may replace every and last with higher values):
363380

364381
```javascript
365382
"window": { "emit": { "type": "RECORD", "every": 1 },

0 commit comments

Comments
 (0)