Feature | Status |
---|---|
Connection identifiers | ✅* |
Connection request data (cookies, params) | ✅ |
Disconnect handling | ✅ |
Subscribe to channels | ✅ |
Parameterized subscriptions | ✅ |
Unsubscribe from channels | ✅ |
Subscription Instance Variables | ✅ ** |
Performing Channel Actions | ✅ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
operation | base configuration | +uuid index | +text index | uuid trigger | text trigger | |
---|---|---|---|---|---|---|
INSERT | 3.5ms | 4.7ms | 5.5ms | 7.9ms | 8.4ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
operation | base HOT | base non-HOT | non-HOT+uuid index | non-HOT+text index | |
---|---|---|---|---|---|
UPDATE | 11ms | 22ms | 45ms | 64ms |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#cards_api_test.rb | |
require 'test_helper' | |
require 'mini_apivore_helper' | |
class CardsApiTest < MiniApivoreTest | |
#------- DEFINE CLASS SPECIFIC NAMED ROUTE HELPERS ---------------- | |
def __get_cards(expectation) | |
check_route( :get, '/cards.json', expectation ) | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AutocompleteControllerDoc | |
include Swagger::Blocks | |
swagger_path '/autocomplete.json' do | |
operation :get, | |
summary: 'Fetches autocompletes on Cards titles and tags', | |
description: 'Returns nearest completions for words in card titles and tags,'\ | |
' respects card restrictions and privacy rules', | |
tags: ['autocomple'] do |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Rails style guided+ | |
#-------------------- 1. includes and extend -------------- | |
#-------------------- 2. default scope -------------------- | |
#-------------------- 3. inner classes -------------------- | |
#-------------------- 4. constants ------------------------ | |
#-------------------- 5. attr related macros -------------- | |
#-------------------- 6. enums ---------------------------- | |
#-------------------- 7. scopes --------------------------- | |
#-------------------- 8. has and belongs ------------------ | |
#-------------------- 9. accept nested macros ------------ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% module_namespacing do -%> | |
class <%= class_name %> < <%= parent_class_name.classify %> | |
# Rails style guided+ | |
#-------------------- 1. includes and extend -------------- | |
#-------------------- 2. default scope -------------------- | |
#-------------------- 3. inner classes -------------------- | |
#-------------------- 5. attr related macros -------------- | |
#-------------------- 6. enums ---------------------------- | |
#-------------------- 7. scopes --------------------------- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CommentsController < ApplicationController | |
# I assumed the usual naming for models and foreign columns | |
def users_comments | |
# I don't like where( post_id: Post.all ) but if table comments | |
# contains deleted posts comments or even NULLs than we need to keep it this way | |
@user_comments = Comment.where( post_id: Post.all ) | |
.where(author_id: Author.where( username: params[:username]) ) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Columns: | |
# redis - clear memory usage of 100K values in Mb, | |
# gz - gz compressed value, smaz = smaz compressed value, | |
# key zip = zipping key crumbs to cingle char, | |
# me_ - memory_efficient_ hash optimization | |
#integers, html pieces, plain english text pieces | |
+----------+--------+--------+--------+---------+--------+----------+------------+ | |
| type | redis | gz | smaz | key zip | me_* | kz+me+gz | kz+me+smaz | | |
+----------+--------+--------+--------+---------+--------+----------+------------+ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def calc_me_redis_perfomance_hash_zipping( zip_max = 128, sample_size = 10000 ) | |
Redis.include(MeRedis) | |
redis = Redis.new | |
Redis.configure do |c| | |
c.zip_crumbs = :user | |
c.integers_to_base62 = true | |
c.hash_max_ziplist_entries = zip_max | |
end | |
NewerOlder