Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Cross-Domain Sessions with Ruby on Rails
Search
Lukas Fittl
January 09, 2014
Programming
1
430
Cross-Domain Sessions with Ruby on Rails
So, how does one write a Rails 4 session store?
Lukas Fittl
January 09, 2014
Tweet
Share
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
500
What's Missing for Postgres Monitoring
lfittl
0
170
A Map For Monitoring PostgreSQL
lfittl
2
340
Monitoring Postgres at Scale
lfittl
1
330
Monitoring PostgreSQL at Scale
lfittl
4
220
Postgres Performance for App Developers
lfittl
2
230
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
510
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
430
PostgreSQL at a Web Startup
lfittl
3
550
Other Decks in Programming
See All in Programming
Next.js App Router
quramy
13
2.2k
Going beyond Apache Parquet's default settings
xhochy
0
140
Revisiting the Hotwire Landscape after Turbo 8 @ RailsConf 2024, Detroit
marcoroth
3
510
哲学史とモデリング
tanakahisateru
2
330
VS Code をプロダクトにどう取り込むか
onomax
1
800
冗長なエラーログを削減し、スタックトレースを手に入れる / Reducing Verbose Error Logs and Obtaining Stack Traces
upamune
0
1.1k
検証も兼ねて個人開発でHonoとかと向き合った話
hanetsuki
1
1.4k
GitLab CI/CD で C#/WPFアプリケーションのテストとインストーラーのビルド・デプロイを自動化する
hacarus
0
540
TypeScriptのパフォーマンス改善
yajihum
9
4.2k
TCAとKMPを用いた新規動画配信アプリ 「ABEMA Live」の設計
tomu28
2
130
AmperとFleetを使ったAndroidアプリ
yoppie
0
290
Open standards for building event-driven applications in the cloud
meteatamel
0
200
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
20
1.8k
No one is an island. Learnings from fostering a developers community.
thoeni
16
2.1k
Six Lessons from altMBA
skipperchong
22
3k
Build your cross-platform service in a week with App Engine
jlugia
226
17k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
660
120k
Debugging Ruby Performance
tmm1
70
11k
How STYLIGHT went responsive
nonsquared
92
4.8k
Music & Morning Musume
bryan
41
5.6k
How GitHub (no longer) Works
holman
305
140k
Web development in the modern age
philhawksworth
203
10k
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
41
4.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Transcript
@LukasFittl Cross-Domain Sessions So, how does one write a Rails
4 session store?
Biz + UX + Dev @LukasFittl
So, 7 years ago we started this company: commit 2086c55b13426c2834f7060ad3739eed68e891c2
Author: Esad Hajdarevic <
[email protected]
> Date: Sun Mar 25 22:47:30 2007 +0000 ! Initial tags+trunk creation git-svn-id: svn://svn.phoria.eu/soup/trunk@1 c0834aa2-9929-0410-9117-c50b2a7daf23
Its still around :) ! But it runs Rails 2.3.
100+ hours later we’re (almost) on Rails 4.
Soooo... Sessions.
www.soup.io = Login/Logout/etc
mysoup.io = Soup Admin, Create Posts, etc
How can we make that work?
First thought: <iframe>
Actually, thats pretty painful.
What we ended up doing: www.soup.io mysoup.io Memcached / Redis
SESSION_ID REMOTE_SESSION_ID
Getting a REMOTE_SESSION_ID: http://mysoup.io/ => http://soup.io/remote/generate?host=mysoup.io (requested with main session
cookie YYY) ! => http://mysoup.io/?sessid=ZZZ SetCookie: soup_session_id=ZZZ ! => http://mysoup.io/ ! remote_session_link_ZZZ => mysoup.io--YYY Memcached / Redis
Lets look at the code :)
@LukasFittl Thank you! pganalyze.com