class: center, middle
- Introduction
- Deep-dive
'use strict'; | |
var Number = require("./index"); | |
var DBS = require('@aftership/postmen-datastorage').dbs; | |
var RedisCache = require('@aftership/postmen-datastorage').adaptor.redis; | |
var Dynamodb = require('@aftership/postmen-datastorage').adaptor.dynamodb; | |
DBS.configStore("number", { | |
db: new Dynamodb({ | |
region: 'ap-northeast-1', |
{ | |
"id": "55bab768822e034a7945a3ee", | |
"created_at": "2015-07-30T23:46:48+00:00", | |
"updated_at": "2015-07-30T23:46:55+00:00", | |
"last_updated_at": "2015-07-30T23:46:55+00:00", | |
"tracking_number": "9505510977185211034638", | |
"slug": "usps", | |
"active": true, | |
"android": [ | |
"APA91bGpwXA4hCvKy0qghtSIVF9V5OgwXkDGK-Ds0ClZIeqUS2BVWhdk5HIsue9gMXucDd2RM3ltmTDoVzxKVX5j-bspnldkr3IG-V0Je2OB5xpGyM81t6XyYEQjLQ_3luLrRyq7uS4Z" |
/** | |
* New Relic agent configuration. | |
* | |
* See lib/config.defaults.js in the agent distribution for a more complete | |
* description of configuration variables and their potential values. | |
*/ | |
exports.config = { | |
/** | |
* Array of application names. | |
*/ |
//npm install ioredis | |
//npm install bluebird | |
//change endpoint to any two of your clusters | |
var Redis = require('ioredis'); | |
var Promise = require('bluebird'); | |
var cluster = new Redis.Cluster([{ | |
port: 30001, | |
host: '127.0.0.1' | |
}, { |
#!/usr/bin/env ruby | |
# TODO (temporary here, we'll move this into the Github issues once | |
# redis-trib initial implementation is completed). | |
# | |
# - Make sure that if the rehashing fails in the middle redis-trib will try | |
# to recover. | |
# - When redis-trib performs a cluster check, if it detects a slot move in | |
# progress it should prompt the user to continue the move from where it | |
# stopped. |
var search = module.exports.search = function search(object, path, acc_path) { | |
if (typeof path === "string") { | |
path = path.split("."); | |
} | |
if (!(path instanceof Array) || path.length === 0) { | |
return; | |
} | |
path = path.slice(); |
{ | |
"id": "UUID_Version 5", | |
"user_id":"USER_ID", | |
"created_at":"2015-04-09T07:36:05+00:00", | |
"updated_at":"2015-04-09T07:49:05+00:00", | |
"attribute1":"", | |
"attribute2":"", | |
"attribute3":"" | |
} |