【51CTO.com original article】 Activity description : Aiti Tribe is a service community that provides core developers with in-depth technical exchanges, solutions to development needs, and resource sharing. Based on this community, we invite industry technology experts to provide one-on-one breakthroughs on development needs and remove stumbling blocks in the development process. We help developers solve development problems with the most professional and efficient answers. Message Queues Topic keywords : message queue, index, App, routing, interface Tribe lineup : 51CTO management team; Target audience : mobile developers, IT operations, data analysts How to participate : Join the 51CTO developer QQ exchange group (group number 370892523 (full), please add 312724475). If you have any technical questions, ask in the group or send it to the group owner. Event Details : Chongqing-Xiaobao-Android : This error message appears as soon as I run the program and wait for the program to connect. What is the problem? Chengdu-Enwei-Cloud Computing : Check if the firewall or security rules are blocking it? Open the AndroidManifest.xml code file and comment out or delete this line:
Jilin-Chujian-SE : The created index does make the query faster, but the 1.6G data has increased by more than 1G, "to 2.6G! Is this increase by half correct? I added the index after inserting the data, which is very slow. The table has only two columns, and only one column is indexed. Next time, try to add an index when creating the table to see if there is any difference. Guangzhou - Big Data - Yida : Definitely different. When you build a table and add an index, the structure is fixed. For example, when using B-tree, the index is added to the index tree when the data arrives. You build the index after importing the entire data. The larger the amount of data, the longer it takes to build the B-tree. It just takes time to build, and the timing of index construction is different. Generally, the design is to build the index when the table is built. If the design is reasonable, the index itself will increase the space. It can be understood as a way of exchanging space for time. Unreasonable index design will lead to increased index costs. You only have 2 columns. The index is mainly for the query in the where condition, that's it. Shenzhen-Shenzhen-Java : I would like to ask a question to the experts. What scenarios are Java message queues mainly used for? What role does it play in the program? 1> Beijing-Yangyang-Android : Obviously, the queue length is limited, so it is not suitable for large amounts of data. If the message is always in the queue and cannot be processed, there will be problems. When there are too many messages to be sent and they cannot be processed, they are put in the queue and processed one by one. 2> Guangzhou - Big Data - Yida : The most obvious function is to prevent avalanches. When the amount of data suddenly increases at a certain moment, it acts as a buffer. 3>Beijing-arige-Android : Generally asynchronous, no immediate response is required. For example, you can only do one thing at a time, but you have a ToDoList. Every time you finish one task, cross it out in the ToDoList. If there is a new task assigned to you, put it behind the ToDoList. This ToDoList is almost a queue. The queue is a data structure that reduces more than just the pressure on the database. 4>Chengdu-Liu Shengjie-Backend : Message queues can be used to implement some lazy operations. We can use message queues to implement many lazy operations. Of course, they can also be used to implement communication between different languages. Lazy operations refer to some untimely operations and time-consuming operations, such as sending emails, image processing, data statistics, etc. Those that do not need to return results immediately can be saved in message queues first, and then processed one by one. For example, the operation of sending emails can be processed by multiple threads, because sending emails takes time. If there is a message queue, we only need to put the data required for sending emails in the message queue, and then another program dedicated to sending emails will get them one by one from the message queue and send them. At this time, the front end of sending emails only needs to save the data in the message queue and return, and does not need to wait for the email to be actually sent out before returning. You can send emails, but there is a blockage. If you don't use a separate thread, just like you want to remotely calculate the size of a picture, you still need to wait for the picture to be downloaded before you can get the size, and this picture download takes time, which is an optimization of the intermediate waiting time. Shenzhen-Shenzhen-Java : Does anyone know how to implement mobile phone recording in H5? Anhui-Coeus-PHP: requires third-party support. If WeChat development is simpler, you can directly call WeChat's API. There was record.js on github to handle this problem before. You can search for it. https://github.com/mattdiamond/Recorderjs to see if it works. Anhui-Coeus-PHP : I have a question about JAVA learning. Does Android belong to the category of Java WEB front-end? Beijing-arige-Android : No, Java is just a language, Android is a system. There are many languages that can be used to write Windows applications, but we cannot say that WIN is a part of any language. Zhengzhou-Baiyang-Back to school study : Teacher Cao, are visual face recognition technology and verification code graphics automatic filling the same concept? What framework does face detection use? Beijing - Cao Hongwei - Half-baked Full-Stack Craftsman : It's different. Face detection uses OpenCV3, a well-known open source library in the field of computer vision. Shanghai-Xiaojie-Student: Please tell me, how can I adjust this problem?
1>Anhui-coeus-PHP : Is a solid state drive installed? You need to modify the hard disk mode in BIOS. 2>Jiangsu-Mike-Dasu : Is it a new machine? Just change the BIOS mode to traditional. It should be UEFI mode at present. 3> Nanchang - Xiaocao - Design/Front-end : No need to install SSD, you only need a partition assistant to modify the hard disk partition in PE. It should be prompted when reinstalling the system and activating it. Generally, repartitioning is enough. Zhengzhou-Aiya-php : When the interface uses HTTPS, does the App application need to use a signature when accessing the interface with a token? How should the security of some interfaces that can be browsed without logging in be restricted? In other words, it can be browsed without permission verification. In order to prevent some data crawling and disgusting behaviors, can anyone popularize it? 1> Beijing - Cui Yifan - Architect : Generally speaking, a token is enough. It depends on your purpose. If your interface design can only be accessed by your App, you can negotiate the interaction protocol with the App. The backend and the App agree on the secret key, and the message is encrypted for transmission. Each time a new version is changed, the version number is agreed in the message, and some measures are taken based on the version number. Or you can design it to be more complicated, such as automatically generating a secret key when the App is installed and initialized, and sending it to the backend for storage, and the device tag remains unchanged. Anyway, no matter how you consider security, it can be cracked, and I don’t have a foolproof method. I can only add a few more layers of verification mechanisms to increase the cost of cracking for others. 2> Anhui-Coeus-PHP : Basically, app_key and app_secret are assigned. The client uses app_key and app_secret to verify with the server and obtains an invalid token_code in exchange. Then the client uses token_code as a credential to retrieve data. Beijing-Jingjing-lT: I want to ask, the company network must be configured here before you can access the Internet. If you don't configure it, you can't access the Internet. How do you configure it here? For example, I don't want to let them access the Internet now, but if I need the Internet, I can configure it here and they can access the Internet. 1> Yunnan - Small Elements - VBA: Actually, I will tell you a simple method. Just block the MAC. The router has a MAC blocking function. You can create a network IP conflict, find an IP that can access the Internet in the LAN, modify your computer MAC, and fill in the other party's MAC. You can ping which address in your LAN can be pinged, and then arp -a can resolve the other party's macle. You can also batch ping your company's IP, write a bat script, or directly download the MAC tool to scan directly. All three methods are OK. 2> Beijing-Warlord-Embedded: Change your IP address to his, and then bind the MAC in the router table. If the other party obtains the address automatically, it will not work. Beijing-Jingjing-lT : Should I configure the red router port? I have configured the red router port according to the green router port, but it does not work. I don't know what went wrong. 1>Beijing-RK-Java: You are using Cisco Packet Tracer, right? You can go to 51CTO to watch Professor Han Ligang’s video about Packet Tracer. 2>Beijing-Xiao Chong-Security : Check if you have made any mistakes in your interface. The configurations of Huawei's simulator and Cisco's simulator are different, and the commands are also different from Cisco's. They are all based on the same network technology, but there are some differences in the commands. If you want to learn this, either learn from Cisco or Huawei. There is no need to memorize the commands by rote. Just put a question mark when you need them and they will all come out. The question mark indicates the commands that can be entered in the current location, followed by explanations of the commands. I remember Huawei also had Chinese explanations. If you enter show?, the command that can be followed by show will appear. For example, entering show is the same as entering sh. Each mode has its own command. The one with # enters the privileged mode. You can find a CCNA book to read. There are many in the 51CTO download channel. You can also read HCNA and HCNP. HCNA and HCNP are from Huawei, and CCNA is from Cisco. It is not difficult to type commands. First read the theory, and then type commands to do related experiments. This will be easier to learn. Here is a very simple Cisco PT example tutorial. Follow the above and type it again to understand the switching and routing theory. ***You can also look at IE. Wuhan-Huazi-Operation and Maintenance: Which one is better at Dynamips, Boson NetSim, GNS3, or Cisco device simulation? Is there any that can simulate Cisco and Huawei at the same time? Guangzhou-Diqin dQ-PHP: No simulator can simulate everything. Mastering the theory is the most important thing. PT is the official simulator of Cisco. It has a graphical front end and is easy to use. Currently, the more popular ones are GNS and Dynamips. Do you still have questions about these solutions? Welcome to join the 51CTO developer QQ exchange group 312724475 for discussion. Next event : May 9 Keywords : intelligent customer service, deep learning, mobile, cloud platform Activity review : Aiti Tribe ***: Spark offline analysis dimension The second issue of Aiti Tribe: Application and practice of big data in the medical field The third episode of the Aiti tribe consultation: Analysis of Python's advantages in big data processing [51CTO original article, please indicate the original author and source as 51CTO.com when reprinting on partner sites] |
<<: Miscellaneous: MVC/MVP/MVVM (Part 2)
>>: About Android strings.xml - Several principles you should know
Popular Science Times reporter Han Rong and inter...
Two months after the release of the Meizu Blue 3,...
In recent years, my country's home building m...
Gu Chuanling-Postpartum Nutrition Course Resource...
Companies began to shift from acquiring new users...
Samsung launched its second foldable phone, the G...
Recently, the Italian website macitynet.it release...
Winter and spring are the peak seasons for respir...
On April 5th, we usher in this year's Qingmin...
The topic of AI has been discussed for many years...
I grabbed the phone on May 8th and received it on ...
This article was first published by Hunzhi (WeCha...
As one of the earliest short video platforms, Kua...