数据密集型应用程序的 Java+Redis 与普通 Java 效率? [英] Java+Redis vs plain Java efficiency for data intensive applications?

查看:38
本文介绍了数据密集型应用程序的 Java+Redis 与普通 Java 效率?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在 Java 中使用 Redis 和 Java 开发数据密集型应用程序(例如数据挖掘)是否有帮助?

Does it help to use Redis with Java to develop data intensive applications (e.g. data-mining) in Java?

对于大量数据的类似操作,与普通 Java 相比,它运行速度更快还是消耗更少的内存?

Does it work faster or consume less memory comparing to plain Java for similar operation on high volume of data?

我的问题主要是关于在单台机器上运行.例如用于处理大量列表/集合/地图并对它们进行查询和排序.

My question is mostly about running on single machine. For example for working with a large number of list/set/maps and query and sort them.

推荐答案

Redis 在单台机器上绝对不会比原生 Java 快.它允许您分配处理,但如果数据块真的很大,它们无论如何都不太可能适合内存.在不了解您在做什么的情况下,我建议将数据存储在磁盘上.当您拥有多台机器时,您可以通过网络挂载分区并以这种方式共享数据.或者,带有 MapReduce 的 Hadoop 听起来适合您正在做的事情.

Redis will definitely not be faster that native Java on a single machine. It would allow you to distribute processing, but if the chunks of data really are large, they're not likely to fit into memory anyway. Without knowing more about what you're doing, I would suggest storing the data on disk. When you get multiple machines, you can network mount the partition and share the data that way. Alternatively, Hadoop with MapReduce sounds like the right sort of thing for what you're doing.

这篇关于数据密集型应用程序的 Java+Redis 与普通 Java 效率?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆