SlideShare a Scribd company logo
SNAKER
url shortener using django at Djangocon eric fb.com/hosuk0w0
Software Engineer / Kakao
Shin Hosuk / 신호석
(주)카카오 - AI Service팀 S셀 dev. part Engineer (2018.04 ~ 현재)
타이드스퀘어 - 플레이윙즈팀 Lead Developer / CTO (2016.12 ~ 2018.03)
옐로트래블 - 플레이윙즈팀 Software Developer (2015.06 ~ 2016.11)
플레이윙즈 - Android Developer / 창립 멤버 (2014.06 ~ 2015.05)
Microsoft Student Partners - Software developer (2013.08 ~ 2014.06)
url shortener using django
SNAKER
- SNAKER
(마! 내가 구글이다)
- SNAKER
요오우~구글구도쨔쓰들이피료한쇼트너를만들었BAAAM!!!
출처 : https://googleblog.blogspot.com/2009/12/making-urls-shorter-for-google-toolbar.html
- SNAKER
요오우~구글구도쨔쓰들이피료한쇼트너를만들었BAAAM!!!
출처 : https://googleblog.blogspot.com/2009/12/making-urls-shorter-for-google-toolbar.html
- SNAKER
출처 : https://googleblog.blogspot.com/2009/12/making-urls-shorter-for-google-toolbar.html
- SNAKER
출처 : https://googleblog.blogspot.com/2009/12/making-urls-shorter-for-google-toolbar.html
- SNAKER
그럼 제 서비스랑 추천을 연관할 ㅅ...
응, 안돼
- SNAKER
SNAKER
url shortener using django
- https://github.com/erishforG/snaker
- Language : Python 2, 3
- Framework : Django 1.+, 2.+
- DB : MySQL
- SNAKER
https://entertain.v.daum.net/v/
20180923171311542
https://snaker.com/1ekds
- SNAKER
https://entertain.v.daum.net/v/
20180923171311542
https://snaker.com/1ekds
Id 1
hash 1ekds
long_url
https://
entertain.v.daum.net/v/
20180923171311542
Description Test url
created_At 생성 날짜
- SNAKER
https://snaker.com/1ekds
Id 1
hash 1ekds
long_url
https://
entertain.v.daum.net/v/
20180923171311542
Description Test url
created_At 생성 날짜
Id 1
Link https://entertain.v.daum.net/v/
20180923171311542
created_At 생성 날짜
media_id 1 (android)
url_id 1
Id 2
Link https://entertain.v.daum.net/v/
20180923171311542
created_At 생성 날짜
media_id 2 (ios)
url_id 1
- SNAKER
https://snaker.com/1ekds
Id 1
hash 1ekds
long_url
https://
entertain.v.daum.net/v/
20180923171311542
Description Test url
created_At 생성 날짜
Id 1
Link https://entertain.v.daum.net/v/
20180923171311542
created_At 생성 날짜
media_id 1 (android)
url_id 1
Id 2
Link https://entertain.v.daum.net/v/
20180923171311542
created_At 생성 날짜
media_id 2 (ios)
url_id 1
Django View에 전달되는 request 내 Meta 중 User Agent 정보 확인
- SNAKER
https://entertain.v.daum.net/v/
20180923171311542
https://snaker.com/1ekds
Id 1
hash 1ekds
long_url
https://
entertain.v.daum.net/v/
20180923171311542
Description Test url
created_At 생성 날짜
- SNAKER
https://entertain.v.daum.net/v/
20180923171311542
https://snaker.com/1ekds
Id 1
hash 1ekds
long_url
https://
entertain.v.daum.net/v/
20180923171311542
Description Test url
created_At 생성 날짜
Id 1
url_id 1
created_At 생성 날짜
os Android
device Galaxy S9
- SNAKER
https://entertain.v.daum.net/v/
20180923171311542
https://snaker.com/1ekds
Id 1
hash 1ekds
long_url
https://
entertain.v.daum.net/v/
20180923171311542
Description Test url
created_At 생성 날짜
Id 1
url_id 1
created_At 생성 날짜
os Android
device Galaxy S9
Django View에 전달되는 request 내 Meta 정보 활용
- SNAKER
CAUTION
1. Operating Server, Redirect Server 별도 운영 필수
- Redirect Server는 사용자들의 redirect 기능에 전
적으로 운영하는 용도로 사용해야 함.
- Operating Server에서 생성, 삭제, 조회등으로 인
한 부하를 Redirect Server 운영시에 같이 겪게 해
서는 안됨
- SNAKER
1. Redirect 기능은 일정 수준이 넘으면 부하가 발생할 가능성
있음
CAUTION
- Django ORM의 성능은 평범하게 쓸때는 좋다.
- 하지만 Redirect를 할때, Django ORM을 활용해
URL 정보를 조회 및 Redirect한 사용자 정보를 기
록하기 때문에, Cache를 활용해 조회 및 저장을 활
용해야 한다.
- SNAKER
Honey Tip
1. Pipenv (https://github.com/pypa/pipenv)
- 패키지 관리와 가상 환경을 같이 관리하
자
- SNAKER
Honey Tip
1. pinject (https://github.com/google/pinject)
- Django Server 아키텍처에서 MTV 패턴 골조가
기본이다.
- 위 패턴을 기본으로 DI(Dependency Injection)를
통한 의존성 제거를 하는 것이 좋다.
- SNAKER
Honey Tip
1. Pytest-django (https://pytest-django.readthedocs.io/
en/latest/)
- TDD는 당연히 해야 할 것. Service를 기본으로 테
스트를 진행할수도, 하단의 feature에 대해서도 테
스트할 수 있다.
DjangoCon섹션네임
THANK YOU

More Related Content

Featured

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
Skeleton Technologies
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
SpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Lily Ray
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
Rajiv Jayarajah, MAppComm, ACC
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
Christy Abraham Joy
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
Vit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
MindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
GetSmarter
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
Project for Public Spaces & National Center for Biking and Walking
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

snaker - django url shortener