Github์์ ์ฌ์ฉ์(์ฝ 100๋ช )๊ฐ ์ฌ์ฉํ๋ language์ ์ง์ญ ๋ถํฌ์ ๋ํด ์์๋ณธ๋ค.
-
์ฌ์ฉํ๋ ์คํฌ
- Python
- Rest API (v3)
- GraphQL API (v4)
- ELK ์คํ
-
์คํ ์์ ๋ฐ ํ์ผ์ ๋ด์ฉ
- ์ฒซ ๋ฒ์งธ๋ก "python3 main.py userID:userPWD language" ๋ฅผ ์ด์ฉํ์ฌ ์ํ๋ ์ธ์ด์ ๋ํ ์ฌ๋๋ค์ location data๋ฅผ ๊ฐ์ ธ์จ๋ค. => ํด๋น ๊ฒฐ๊ณผ๋ก LocationData_langeage.csv ํ์ผ์ด ์์ฑ๋๋ค. (ex: LocationData_Python.csv)
- ๋ ๋ฒ์งธ๋ก "python3 change_df.py" ๋ฅผ ์ด์ฉํ์ฌ lang_confํด๋์ location.json ํ์ผ์ด ์์ฑ๋๋ค. => ํด๋น ํ์ผ์ ์ต์ข ์ ์ผ๋ก Kibana์ data๋ฅผ ์ ์ฅํ์ฌ chart๋ก ํ์ํ๊ธฐ ์ํ ํํ๋ฅผ ๋ง๋ ๊ฒ์ด๋ค.
- ./lang_conf/mapping.json ์ Elastic search์์ ๊ฐ๊ฐ์ properties์ type์ ์ง์ ํ๊ธฐ ์ํด์ ์ฌ์ฉํ๋ค.
- ./lang_conf/location.json ์ Elastic search์์ index์์ Bucket์ผ๋ก ์ ๋ณด๋ฅผ ๋ฃ๊ธฐ ์ํด์ ์ฌ์ฉํ๋ค.
-
ELK ์คํ ๊ฐ๋จํ ๋ช ๋ น์ด (์์๋๋ก)
- curl -XPUT http://localhost:9200/locations (์ ์ฅ๊ณต๊ฐ์ธ index ์์ฑ)
- curl -XPUT http://localhost:9200/locations/latlon/_mapping -H 'Content-Type:application/json' -d @mapping.json (index์ ๋ค์ด์๋ data๋ค์ type๋ฑ์ ์ค์ )
- curl -XPOST http://localhost:9200/_bulk?pretty -H 'Content-Type:application/json' --data-binary @location.json (bulk post๋ก location.jsonํ์ผ์ ํํ๋ก data๋ฅผ ์ฝ์ )
- curl -XGET http://localhost:9200/locations?pretty (ํด๋น ์ ๋ณด๋ฅผ ๊ฐ์ ธ์ค์)
1. ์ง์ญ์ ์ขํ(์๋, ๊ฒฝ๋)๋ฅผ ์ป์ด์ค๋ ๊ณผ์ ์์ Google Map API๋ ๋น์ฉ์ ๋ถ๋ดํด์ผ ํ๊ธฐ์ python selenium์ ์ฌ์ฉํ์ฌ ์ขํ๋ฅผ ์ฐพ์์ต๋๋ค.
1. ์ขํ๋ฅผ ์ป๋ ๊ณผ์ ์์ ํด๋น ์ฌ์ดํธ์ ๋ง์ ์์กด์ ๋์๊ธฐ์ ๋ฑ๋ก์ด ๋์ด์์ง ์์ ์ขํ์ ๋ํด์๋ ์๋ตํ์์ต๋๋ค.
2. Logstash๋ฅผ ์ฌ์ฉํ ๋ ค๊ณ ํ์์ผ๋, geo_point์ ๋ํ ์ดํด ๋ถ์กฑ์ผ๋ก Elastic search์์ ๋ฐ๋ก Kibana๋ฅผ ์ฌ์ฉํ์์ต๋๋ค.