nosql

CouchDB Map/Reduce view query from Ektorp

亡梦爱人 提交于 2019-12-13 18:01:57
问题 I'm trying to execute a query from java against a Map/Reduce view I have created on the CouchDB. My map function looks like the following: function(doc) { if(doc.type == 'SPECIFIC_DOC_TYPE_NAME' && doc.userID){ for(var g in doc.groupList){ emit([doc.userID,doc.groupList[g].name],1); } } } and Reduce function: function (key, values, rereduce) { return sum(values); } The view seems to be working when executed from the Futon interface (without keys specified though). What I'm trying to do is to

How NoSQL databases perform on aggregate functions (AVG, SUM, etc)

孤街浪徒 提交于 2019-12-13 16:48:52
问题 We need to work periodically with a pretty big dataset (30-40GB). It has a lot of values ordered by time (and more information) but we basically need to perform some mathematical operations by month. Our first approach was to use a MySQL database to back the data, as we have a reasonable experience with the engine and with the relational approach. However, the process takes too long and we were wondering if a NoSQL approach can do it better. Basically the data that we need to express is:

大型网站技术架构:核心原理与案例分析-李智慧

两盒软妹~` 提交于 2019-12-13 15:09:31
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 大型网站架构演化 大型网站软件系统的特点 高并发,大流量 高可用 海量数据 用户分布广泛,网络情况复杂 安全环境恶劣 需求快速变更,发布频繁 渐进式发展 大型网站架构模式 网站架构模式 分层(横向) 在大型网站架构中采用分层结构,将网站软件系统分为应用层、服务层、数据层 分割(纵向) 网站常用的分布式方案 分布式应用和服务 分布式静态资源 分布式数据和存储 分布式计算 异步 冗余 服务器冗余运行,数据冗余备份。大型网站对整个数据中心进行备份,在全球范围内部署灾备数据中心。 自动化 安全 大型网站核心架构要素 性能 可用性 伸缩性 扩展性 安全性 瞬时响应:网站的高性能架构 网站性能测试 性能测试标准 性能测试方法 性能测试 负载测试 压力测试 稳定性测试 性能测试报告 性能优化策略 性能分析 检查请求处理的各个环节的日志,分析哪个环节响应时间不合理、超过预期;然后检查监控数据,分析影响性能的主要因素是内存、磁盘、网络还是CPU,是代码问题还是架构设计不合理,或者系统资源确实不足 性能优化 web前端性能优化 减少http请求 使用浏览器缓存 启用压缩 对于html、css、javascript文件启用GZip压缩,但压缩会对服务器和浏览器产生一定的压力,在通信带宽良好,而服务器资源不足的情况下要权衡考虑

Cassandra - alternate way for clustering key with ORDER BY and UPDATE

一曲冷凌霜 提交于 2019-12-13 13:42:38
问题 My schema is : CREATE TABLE friends ( userId timeuuid, friendId timeuuid, status varchar, ts timeuuid, PRIMARY KEY (userId,friendId) ); CREATE TABLE friends_by_status ( userId timeuuid, friendId timeuuid, status varchar, ts timeuuid, PRIMARY KEY ((userId,status), ts) )with clustering order by (ts desc); Here, whenever a friend-request is made, I'll insert record in both tables. When I want to check one to one status of users, i'll use this query: SELECT status FROM friends WHERE userId=xxx

Mongodb - Multiple text index: Index key pattern too large error code 67

半城伤御伤魂 提交于 2019-12-13 13:22:14
问题 I have the following Mongodb database structure: { "_id" : "519817e508a16b447c00020e", "keyword" : "Just an example query", "rankings" : { results: { "1" : { "domain" : "example1.com", "href" : "http://www.example1.com/"}, "2" : { "domain" : "example2.com", "href" : "http://www.example2.com/"}, "3" : { "domain" : "example3.com", "href" : "http://www.example3.com/"}, "4" : { "domain" : "example4.com", "href" : "http://www.example4.com/"}, "5" : { "domain" : "example5.com", "href" : "http://www

json data storage with versioning

瘦欲@ 提交于 2019-12-13 12:33:51
问题 Problem definition: There is a Java server which stores JSON data that can be mapped to a Java Class. The Java Class is subject to changes. The goal is to be able to update the Java Class and still be able to decode the JSON data of an older version to a Java Object of a newer version. There should be a good versioning system in place. For example the ability to add a new field to the Java Class with a default value. In the case the old JSON data doesn't have this field, the Java object can

Why are RDBMS considered Available (CA) for CAP Theorem

非 Y 不嫁゛ 提交于 2019-12-13 11:53:56
问题 If I understand the CAP Theorem correctly, availability means that the cluster continues to operate even if a node goes down. I've seen a lot of people (http://blog.nahurst.com/tag/guide) list RDBMS as CA, but I do not understand how RBDMS is available, as if a node goes down, the cluster must go down to maintain consistency. My only possible answer to this has been that most RDBMS are a single node, so there is no "non-failing" node. But, this seems to be a technicality, not true

揭秘天猫双11背后:20万商家600万张海报,背后只有一个鹿班

一世执手 提交于 2019-12-13 11:15:31
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 还记得去年双11,秋裤厂商带着“五彩斑斓的黑”需求找设计师的故事吗? 现在,已经有超过20万客户把这个AI设计师鹿班带回家。 今年,鹿班除了为天猫淘宝平台提供服务之外,还通过阿里云全面为各行业客户输出AI设计能力。2018天猫双11期间,已累计为20万企业、商家设计近600万张图片,你打开天猫看到的各种海报和活动商品图片几乎都出自鹿班。 某淘宝商家表示,“我们有400多个产品,仅靠自己无法完成这么多图片,所以过去在双11这样的重要活动节点,图片设计环节基本都是放弃的。但今年双11,鹿班完成了所有图片的设计。” 据了解,鹿班已经达到了高级设计师的水准,每秒可以提供几十种方案,每秒设计8000张不同的海报……当然,这些能力都要归功于背后的人工智能技术。 设计知识图谱:鹿班的知识图谱是图片效果的数据底座 鹿班将各类成图设计,通过内容、视觉、结构几大维度进行标注和分析,建立对于构图、配色、搭配和文案几个方面在设计元素级别的认知。通过对千万套营销设计图片的全方位分析,建立了国内最大的营销类图片的知识图谱库。 在知识图谱的底层构建过程中,利用无向图进行建模,利用关系型数据库和NoSQL数据库混合搭建存储设施。通过数据同步,将经过后处理的数据,同步到算法依赖的ES索引上。 智能设计深度学习算法

揭秘天猫双11背后:AI设计师鹿班为20万客户设计600万张海报

假装没事ソ 提交于 2019-12-13 11:15:13
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 还记得去年双11,秋裤厂商带着“五彩斑斓的黑”需求找设计师的故事吗? 现在,已经有超过20万客户把这个AI设计师鹿班带回家。 今年,鹿班除了为天猫淘宝平台提供服务之外,还通过阿里云全面为各行业客户输出AI设计能力。2018天猫双11期间,已累计为20万企业、商家设计近600万张图片,你打开天猫看到的各种海报和活动商品图片几乎都出自鹿班。 某淘宝商家表示,“我们有400多个产品,仅靠自己无法完成这么多图片,所以过去在双11这样的重要活动节点,图片设计环节基本都是放弃的。但今年双11,鹿班完成了所有图片的设计。” 据了解,鹿班已经达到了高级设计师的水准,每秒可以提供几十种方案,每秒设计8000张不同的海报……当然,这些能力都要归功于背后的人工智能技术。 ● 设计 知识图谱:鹿班的知识图谱是图片效果的数据底座 鹿班将各类成图设计,通过内容、视觉、结构几大维度进行标注和分析,建立对于构图、配色、搭配和文案几个方面在设计元素级别的认知。通过对千万套营销设计图片的全方位分析,建立了国内最大的营销类图片的知识图谱库。 在知识图谱的底层构建过程中,利用无向图进行建模,利用关系型数据库和NoSQL数据库混合搭建存储设施。通过数据同步,将经过后处理的数据,同步到算法依赖的ES索引上。 ● 智能设计深度学习算法

Not able to retrieve data from firestore

北战南征 提交于 2019-12-13 10:52:44
问题 I have a collection 'posts' which has documents as uid of the particular users, under each document I have array 'posts' which contains a string 'likes' and a map 'post' which again contain a string 'userpost'. I need to show data of the 'userpost' as a list in my homepage. Can someone suggest me a query for this. I tried this: return Firestore.instance.collection('posts').where('posts', arrayContains: 'post').snapshot(); And in my home page under listview.builder I'm retrieving data like