Design and Implementation of MongoDB-based Unstructured Log Processing System over Cloud Computing Environment (클라우드 환경에서 MongoDB 기반의 비정형 로그 처리 시스템 설계 및 구현)
-
- Journal of Internet Computing and Services
- /
- v.14 no.6
- /
- pp.71-84
- /
- 2013
Log data, which record the multitude of information created when operating computer systems, are utilized in many processes, from carrying out computer system inspection and process optimization to providing customized user optimization. In this paper, we propose a MongoDB-based unstructured log processing system in a cloud environment for processing the massive amount of log data of banks. Most of the log data generated during banking operations come from handling a client's business. Therefore, in order to gather, store, categorize, and analyze the log data generated while processing the client's business, a separate log data processing system needs to be established. However, the realization of flexible storage expansion functions for processing a massive amount of unstructured log data and executing a considerable number of functions to categorize and analyze the stored unstructured log data is difficult in existing computer environments. Thus, in this study, we use cloud computing technology to realize a cloud-based log data processing system for processing unstructured log data that are difficult to process using the existing computing infrastructure's analysis tools and management system. The proposed system uses the IaaS (Infrastructure as a Service) cloud environment to provide a flexible expansion of computing resources and includes the ability to flexibly expand resources such as storage space and memory under conditions such as extended storage or rapid increase in log data. Moreover, to overcome the processing limits of the existing analysis tool when a real-time analysis of the aggregated unstructured log data is required, the proposed system includes a Hadoop-based analysis module for quick and reliable parallel-distributed processing of the massive amount of log data. Furthermore, because the HDFS (Hadoop Distributed File System) stores data by generating copies of the block units of the aggregated log data, the proposed system offers automatic restore functions for the system to continually operate after it recovers from a malfunction. Finally, by establishing a distributed database using the NoSQL-based Mongo DB, the proposed system provides methods of effectively processing unstructured log data. Relational databases such as the MySQL databases have complex schemas that are inappropriate for processing unstructured log data. Further, strict schemas like those of relational databases cannot expand nodes in the case wherein the stored data are distributed to various nodes when the amount of data rapidly increases. NoSQL does not provide the complex computations that relational databases may provide but can easily expand the database through node dispersion when the amount of data increases rapidly; it is a non-relational database with an appropriate structure for processing unstructured data. The data models of the NoSQL are usually classified as Key-Value, column-oriented, and document-oriented types. Of these, the representative document-oriented data model, MongoDB, which has a free schema structure, is used in the proposed system. MongoDB is introduced to the proposed system because it makes it easy to process unstructured log data through a flexible schema structure, facilitates flexible node expansion when the amount of data is rapidly increasing, and provides an Auto-Sharding function that automatically expands storage. The proposed system is composed of a log collector module, a log graph generator module, a MongoDB module, a Hadoop-based analysis module, and a MySQL module. When the log data generated over the entire client business process of each bank are sent to the cloud server, the log collector module collects and classifies data according to the type of log data and distributes it to the MongoDB module and the MySQL module. The log graph generator module generates the results of the log analysis of the MongoDB module, Hadoop-based analysis module, and the MySQL module per analysis time and type of the aggregated log data, and provides them to the user through a web interface. Log data that require a real-time log data analysis are stored in the MySQL module and provided real-time by the log graph generator module. The aggregated log data per unit time are stored in the MongoDB module and plotted in a graph according to the user's various analysis conditions. The aggregated log data in the MongoDB module are parallel-distributed and processed by the Hadoop-based analysis module. A comparative evaluation is carried out against a log data processing system that uses only MySQL for inserting log data and estimating query performance; this evaluation proves the proposed system's superiority. Moreover, an optimal chunk size is confirmed through the log data insert performance evaluation of MongoDB for various chunk sizes.
I. Introduction Since the 1970's drug abuse among young people has increasingly become a social problem in Korea. In the 1980's, drug abuse, especially glue sniffing, has become the cause of many unfortunated incidents resulting in harm to others as well as the abusers themselves. Taking into consideration of the seriousness of this problem, the Republic of Korea National Red Cross initiated a nation-wide research programme, to understand the present situation and to raise the level of public awareness. The goal of this research was to begin a nation - wide campaign against drug abuse. The research team was composed of the Advisary Committee members and the staff of the Youth Department of the Republic of Korea National Red Cross. The data were collected in February 1988 with the collaboration of the staff and volunteers in the local Chapters. The respondents were allocated nation-wide by the quota sampling method. The questionnaires were distributed to the respondents in three groups :2, 700 to junior and senior high school students, 605 to working youths, and 916 to delinquent youths. A total of 4, 221 questionnaires were collected. II. Characteristics of the Respondents The respondents in each group were selected evenly from rural and urban areas. The general characteristics of the respondents can be described as follow: in case of students, the proportions between male and female respondents, and between senior high school and junior high school students were almost evenly distributed. In case of working youths, the proportion of females (80.5%) was higher than those of the students and the delinquents groups. Delinquent youths were defined as those currently being under custody of the centers for juvenile delinquents. Of this number, 38.8% and 68.2% were junior and senior high school drop-outs respectively. The majority of them (92.6%) were male. As for the family background of the respondents, the proportion of those residing in poverty - stricken areas, and the proportion of those from broken families were higher in case of working youths and delinquent youths than those in case of students. III. Present Patterns of Drug Abuse The following summarizes the presents of drug abuse, as tabulated from the results of the survey. 1. Smoking The percentage of youths who smoke was 36% in the student group, 32% m the working youths group, and 94.4% in the delinquent youths group. 2. Alcohol 50.3% of students, 71.6% of working youths, and 93.3% of delinquent youths has experienced drinking alcohol beverages. 3. Tonic: non - alcoholic, caffeinated beverages popular in Korea and Japan The percentage of those who have used tonic at least once was over 90% in all of the three groups. 4. Sedative About 70% of each group has used sedative with the proportion of working youths use higher than those in other groups. 5. Stimulants Those who have used stimulants comprised around 15% in each group. 6. Tranquilizers Somewhat less than 5% of students and working youths, and 28% of delinquent youths, have used tranquilizers. 7. Hypnotics The users of hypnotics amounted to 0.4% of students, 2.6% of working youths and 7.1% of delinquent youths. 8. Marihuana Those who have used marihuana indicated 0.7% of students, 0.8% of working youths, and 13% of delinquent youths. 9. Glue-sniffing The percentage of glue-sniffing was 3.7%, 5% in the students group and in the youths group respectively, but the proportion was unusually high, at 40.7% in the delinquent youths group. From the results of the survey the present situation of drug abuse in Korea can be summarized as follows: 1. A high percentage of Korean youths have experienced smoking cigarettes and drinking alcoholic beverages. 2. Tonics (non - alcoholic, caffeinated beverages), antipyretic analgesics and stimulants quite regularly used. 3. Tranquilizers, hypnotics, marihuana and glue-sniffing are more widely used among delinquent youths than the other youths. From this fact, there exists a correlation between drug abuse and juvenile delinquency. IV. Time-series Analysis of the First Experience of Drug Abuse and Deviant Behaviour The respoundents were asked when they were first exposed to drugs and when they committed deviant acts. By calculating the average age of each experience, the following pattern was found (See Figure 1). Youths are first exposed to drugs by abuse of tonic(non - alcoholic, caffeinated beverages). At the age of 13, they amoke cigarettes, the use of antipyretic analgesics begins at 14 year old, while at the age of 15, they use tranquilizers, and at 16 hynotics. The period of drug abuse which starts from drinking caffeinated beverages and smoking cigarettes and ends in the use of hypnotics takes about three years. During this period, other delinquent behaviours begin to surface, that is, at the age of 13 when smoking cigarettes begins, the delinquent behaviour pattern starts with truancy. Next, they start taking money from others by using physical force. Prior to the age of 15, they are suspended from school, become hostile to adults, begin running away from home, and start using stimulants and alcohol. Soon they become involved even in glue-sniffing and in the use of marihuana. At the age of 15, they begin to see adult videos and carry weapons. Sexual promiscuity and usage of tranquilizers follows the viewing of adult videos. Consequently, by the time they reach the age of 16, they visit drinking establishments, and are picked up by police for committing delinquent acts. And finally, they come to use hypnotic - type drugs. From the above descriptions, drug abuse can be assumed to have a close correlation with delinquent behaviour. V. Social Factors Related to Drug Abuse As for the Korean youths, glue-sniffing is found to he related to aggressive delinquency, in such cases as run - aways, being picked up by the police, and taking money by force. Smoking cigarettes and drinking alcohol is found to be related to seeing adult videos and visiting drinking establishments. Hypnotics and marihuana were found to be representive of drugs which are related to degenerational delinquency, irrespective of social delinquency. The social factors connected with these drug abuse are as follows: 1. Individual factors Male students were more heavily involved in the usage of drug than females. Youths who do not attend church were more likely to be involved in drugs than those who attend. 2. Family factors The youths who were displeased with their mothers smoking and those who thought their parents did not love each other, or those whose parents had used drugs without prescription, were more likely to he drug users. 3. School factors Those youths who found school life boring, were unsuccessful in their studies, spend most of their time with friends, feel their teachers smoke too much, those who had a positive perception of their teachers smoking were likely to he drug users. To sum up, drug abusers depend on the influence of their parents, teachers and peers. IV. Reasons for Drug Abuse Korean students have mainly used drugs to release stress (42.8%), to stay awake (19.7%), and because of the easy accessibility of drugs( 16.6%). Other reasons are due to their ignorance of the side effects of the drugs (3.6%), natural curiosity (4.2%), and to increase strength(3.O%). From the above facts, the major reasons for drug abuse among Korean youths are to release stress and to stay awake in order to prepare exams. Furthermore, since drugs are readily available, we can conclude that drug abuse is caused by the school system(such as entrance exams) in Korea. VII. Conclusion Drug usage among Korean youths are relatively less common than those of western youths. In some cases, such as, glue-sniffing and use of stimulants, the pattern of drug abuse is found. Moreover, early drug abuse is evident, and it has a close connection with deviant behaviour, resulting in juvenile delinquency. Drug abuse cannot be attributed to any one social factor. Specifically, drug abuse depends on parents, peers, teachers and other members of the community, and also is influenced by social institutions such as the entrance exam system. Every person and organization concerned with youth must participate collectively in restraining drug abuse. Finally, it is suggested that social agencial working for youth welfare should make every effort to tackle this serious problem confronted by the Korean youths today.