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
440
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
640
What's Missing for Postgres Monitoring
lfittl
0
230
A Map For Monitoring PostgreSQL
lfittl
2
380
Monitoring Postgres at Scale
lfittl
1
420
Monitoring PostgreSQL at Scale
lfittl
4
260
Postgres Performance for App Developers
lfittl
2
290
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
590
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
580
PostgreSQL at a Web Startup
lfittl
3
590
Other Decks in Programming
See All in Programming
JetBrainsのAI機能の紹介 #jjug
yusuke
0
190
階層化自動テストで開発に機動力を
ickx
1
480
あなたとJIT, 今すぐアセンブ ル
sisshiki1969
0
430
Reactの歴史を振り返る
tutinoko
1
170
202507_ADKで始めるエージェント開発の基本 〜デモを通じて紹介〜(奥田りさ)The Basics of Agent Development with ADK — A Demo-Focused Introduction
risatube
PRO
6
1.4k
Infer入門
riru
4
1.1k
0から始めるモジュラーモノリス-クリーンなモノリスを目指して
sushi0120
0
250
Dart 参戦!!静的型付き言語界の隠れた実力者
kno3a87
0
180
MCPで実現できる、Webサービス利用体験について
syumai
7
2.4k
decksh - a little language for decks
ajstarks
4
21k
No Install CMS戦略 〜 5年先を見据えたフロントエンド開発を考える / no_install_cms
rdlabo
0
470
ワープロって実は計算機で
pepepper
2
1.1k
Featured
See All Featured
Thoughts on Productivity
jonyablonski
69
4.8k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
7
790
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
For a Future-Friendly Web
brad_frost
179
9.9k
How GitHub (no longer) Works
holman
314
140k
Become a Pro
speakerdeck
PRO
29
5.5k
Testing 201, or: Great Expectations
jmmastey
45
7.6k
Art, The Web, and Tiny UX
lynnandtonic
301
21k
Measuring & Analyzing Core Web Vitals
bluesmoon
8
540
Visualization
eitanlees
146
16k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
53
2.9k
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