gpt4 book ai didi

redis - Redis-Java项目结构

转载 作者:可可西里 更新时间:2023-11-01 11:13:52 25 4
gpt4 key购买 nike

我刚刚了解了 Redis,并且发现键值数据库的概念很有趣。我想开始使用 Redis,但我不太明白我将如何构建我的项目。

当我使用 mysql 时,它更像是我有一个用 Java/Python 编写的后端,客户端向我的 Web 应用程序发出请求,我的 Java/Python 代码从数据库获取信息并将其发送给客户端,或者它也写入信息从客户端到数据库。

我想知道 Redis 的结构,以便我可以开始使用它构建应用程序。我也很感激任何示例项目/模板(特别是服务器端)谢谢

最佳答案

I want to start using Redis but i don't quite understand how i would structure my project.

您应该首先从定义项目的功能开始,以确定对数据库结构的要求。

When i use mysql, its more like i have a backend written with Java/Python, clients make request to my web application and my Java/Python code gets information from the database and sends it to the clients or it also writes information from clients into the database.

数据库(尤其是具有非常简单的身份验证系统的 redis)不应直接暴露给客户端,因此它是负责处理数据的后端部分 - 在您的情况下是 Java 或 Python。我认为这使它与您习惯使用 MySQL 的内容相同或相似。

I would like to know how Redis is structured so i can start building applications with it.

我建议先阅读 fifteen minute introduction to redis data types和一些一般的overview .但请注意,redis 不支持查询语言,例如您可能从关系数据库系统中使用的 SQL,这可能会根据您的项目需要限制它的用处。

关于redis - Redis-Java项目结构,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17043364/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com