Redis

JAVA面试题

放肆的年华 提交于 2021-02-11 18:06:14
1.HashMap和Hashtable的区别 2.StringBuilder内部实现机制 3.SpringMVC和Struts2的区别 4.Spring事务的管理 5.Hibernate与MyBatis的比较 6.GC算法有哪些 7.垃圾回收器有哪些 8.如何调优JVM 9.Java 中堆和栈有什么区别? 10.缓存命中率的计算 11.Memcache与Redis的区别 12.如何实现Redis的分片 13.zookeeper的用途 14.dubbo的用途以及优点 15.HashMap和HashTable存储原理 16.说说堆的年轻代和老年代 17.HTTP协议,GET和POST 的区别 18.栈溢出的原因有哪些 17.String、StringBuffer与StringBuilder之间区别 20.堆内存和栈内存的区别 21.讲讲分布式唯一ID 22.对象克隆和实现方式 23.集群环境中,session如何实现共享 24.short s1 = 1; s1 = s1 + 1;有错吗?short s1 = 1; s1 += 1;有错吗? 25.如何实现对象克隆? 26.唤醒一个阻塞的线程 27.说说NIO和IO的区别 28.Java中的NIO,BIO,AIO分别是什么? 29.什么是幂等性 30.终止线程有几种方式?终止线程标记变量为什么是 valotile 类型? 31

Redis: Using one mset operation with bunch of expire operations in pipeline or bunch of set operation with expiration in pipeline

两盒软妹~` 提交于 2021-02-11 15:19:22
问题 In terms of performace which is better?, A: set 500 keys with mset and then 500 expires in a pipeline B: 500 set with expiration in a pipeline too. Thank you! 回答1: MSET is a atomic operation, use them when you want atomicity for those keys, else use SETEX in pipeline. For performance you have to test them. 来源: https://stackoverflow.com/questions/61626398/redis-using-one-mset-operation-with-bunch-of-expire-operations-in-pipeline-or-b

Java开发企业级权限管理系统

时间秒杀一切 提交于 2021-02-11 14:50:32
Java开发企业级权限管理系统 download: 百度云盘 全程手把手带你运用Java技术栈,打造一套基于最流行的RBAC拓展模型的,分布式的,有界面的,高灵活性,高拓展性的企业级权限管理系统。学完本课程你将可以轻松应对绝大多数企业开发中与权限管理及后台系统相关的需求。 技术储备要求 后端技术要求:有SSM、Maven、Redis基础 前端技术要求:有jQuery、Bootstrap、Mustache、zTree、Duallistbox基础 课程目錄 : 第1章 课程整體概述(購置套餐更劃算) 本章首先引見爲什麼大公司都有權限管理係統,然後會對權限管理中盛行的RBAC模型及拓展做重點阐明,並給出理想中的權限管理係統應該是什麼樣子的。之後會對這門课程做總體内容引見與课程佈置,最後會引見這門课程會觸及到的技術,讓大家明白理解到這門课程到底能收獲些什麼(课程提供QQ交流群)。... 1-1 课前必讀(不看會錯過一個億) 1-2 课程導學試看 1-3 爲什麼企業級項目需求權限管理試看 1-4 權限管理的中心是什麼? 1-5 理想中的權限管理應該是什麼樣的?試看 1-6 主流開源權限管理框架有哪些? 1-7 课程佈置與學問點引見 第2章 Spring Security權限框架理論與實戰演練 本章首先讓大家學習到Spring Security權限框架的架構,之後大家能夠學習到Spring

Spring data rest application not getting data from database after implementing redis caching

橙三吉。 提交于 2021-02-11 14:44:08
问题 I am working on implementing Redis caching for my spring data rest (hal) api. Requirement: cache all data to redis after first call to database and perform operations on redis. like Add record should first happen in cache and then inserted in database in a transaction. I implemented caching for one of the JpaRepository, but when I do implicit findAll by calling the /states endpoint, I get no records, even when I have 10k records in database. Please help guys!! Below is my config:

Celery doesn't process the task request in single hit?

◇◆丶佛笑我妖孽 提交于 2021-02-11 14:17:58
问题 I have set up a Django project with Celery and Redis. I am trying to send an OTP to a mobile number. The problem is whenever I try to execute the task by running sms_queue_processor.delay(phone, message) the celery worker doesn't receive the task. I tried the same executing from the shell but it doesn't receive at all. I tried to execute the statement from the shell at a rapid speed twice then the celery worker receives and I can able to receive the SMS. This is something weird and can't be

how to have full control over a process (start/terminate) which runs in parallel with flask application?

我的未来我决定 提交于 2021-02-11 14:15:23
问题 This is my application architecture: In my code there is a pedestrian.py file which uses a while loop to read frames from rtsp link and after doing pedestrian detection process (available in this link), it caches the frame in Redis. (please note that in the loop each time the output frame is replaced with the previous output from loop. it means that there exists only one frame in redis in any moment.) Then in flask application, I read processed frame from redis and send it for the clients.

Java工程师必备书单

会有一股神秘感。 提交于 2021-02-11 13:54:45
本文出自我的公众号:程序员江湖。 江湖路险,你我同行。 Java开发工程师一般负责后端开发,当然也有专门做Java Web的工程师,但是随着前后端的分离,越来越多的Java工程师需要往大后端方向发展。 今天我们就来介绍一下Java后端开发者的书单。 首先要感谢一下江南白衣大大的后端书架,让我在初学阶段读到了很多好书,直到现在都印象深刻。 我在两年的学习历程中看了很多的书,其中不乏XXX入门到精通,XXX王者归来,XXX指南什么的。 虽然这类书确实毛病很多,但是作为非科班的我来说,当时还是看的津津有味。直到后来我看到一些优秀的书籍,以及白衣哥的书架,我才逐渐认识到看一些精品书籍的好处。 所以我们今天就从这些精品书籍中挑选一些优秀书籍来推荐给大家,当然其中有一些书我自己也没有时间看完。 接下来我们按照后端技术栈各个部分的内容来推荐书籍。 网络 1 TCP/IP卷一 这本其实我刚开始没看太懂,可能是当时太水的原因,但是一般是大牛力荐的书。 2 计算机网络:自顶向下 这本从应用层讲到物理层,感觉这种方式学起来更轻松,我比较推荐小白看这本。 3 图解HTTP和图解TCP/IP 相较于前两本大厚书,这两本书更加亲民,小白可以买来看看,还是很适合入门的。 4 计算机网络 没错,就是这本教材,作为非科班选手自己看这本书,那叫一个欲仙欲死啊,看完就忘记了。 操作系统 1 深入理解计算机系统

How to run django's “python manage.py runserver” , celery's “celery -A app_name worker -l info” and redis-server in one command

老子叫甜甜 提交于 2021-02-11 13:42:10
问题 I have recently started with django. And I started doing a small project. I've been using celery with redis worker. And every to use celery and redis I have to run the celery and redis server and then django server. Which is a bit lengthy process. I have two questions. 1. Am I doing the right thing by running the servers everytime or are there any other right method to this process? 2. If I'm in the right direction, is there any method to do this? I tried circus.ini , but it did not work. 回答1

How to reconnect redis client after redis server reboot/scale

别来无恙 提交于 2021-02-11 12:55:52
问题 I have an azure app service (based on Docker) that uses Redis as a cache memory. When I reboot/scale redis server, redis client inside azure app service lose connection with server and throws the following exception: Timeout awaiting response (outbound=0KiB, inbound=0KiB, 2852ms elapsed, timeout is 2000ms), command=SETEX, next: GET test, inst: 0, qu: 0, qs: 45, aw: False, rs: ReadAsync, ws: Idle, in: 0, serverEndpoint: Unspecified/redis-server-com:6380, mgr: 10 of 10 available, clientName:

TimeoutError: [Errno 110] Connect call failed when trying to connect to redis service in docker

醉酒当歌 提交于 2021-02-11 12:26:04
问题 I'm dockerizing a web application that uses Django Channels for websocket functionality. It depends on redis. I'm having trouble getting the redis portion of the application to work correctly. I've tried to stick to this redis/compose guide. docker-compose.yml version: "3" services: db: image: mysql:latest volumes: - "./.mysql-data/db:/var/lib/mysql" restart: always ports: - 3306:3306 environment: MYSQL_ROOT_PASSWORD: rootpassword MYSQL_DATABASE: database MYSQL_USER: user MYSQL_PASSWORD: