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
590
What's Missing for Postgres Monitoring
lfittl
0
200
A Map For Monitoring PostgreSQL
lfittl
2
360
Monitoring Postgres at Scale
lfittl
1
370
Monitoring PostgreSQL at Scale
lfittl
4
230
Postgres Performance for App Developers
lfittl
2
250
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
560
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
520
PostgreSQL at a Web Startup
lfittl
3
560
Other Decks in Programming
See All in Programming
「Chatwork」Android版アプリを 支える単体テストの現在
okuzawats
0
180
プロダクトの品質に コミットする / Commit to Product Quality
pekepek
2
770
テストケースの名前はどうつけるべきか?
orgachem
PRO
0
130
20年もののレガシープロダクトに 0からPHPStanを入れるまで / phpcon2024
hirobe1999
0
130
Scalaから始めるOpenFeature入門 / Scalaわいわい勉強会 #4
arthur1
1
300
快速入門可觀測性
blueswen
0
330
menu基盤チームによるGoogle Cloudの活用事例~Application Integration, Cloud Tasks編~
yoshifumi_ishikura
0
110
今年一番支援させていただいたのは認証系サービスでした
satoshi256kbyte
1
250
Zoneless Testing
rainerhahnekamp
0
120
선언형 UI에서의 상태관리
l2hyunwoo
0
140
ソフトウェアの振る舞いに着目し 複雑な要件の開発に立ち向かう
rickyban
0
890
From Translations to Multi Dimension Entities
alexanderschranz
2
130
Featured
See All Featured
Mobile First: as difficult as doing things right
swwweet
222
9k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
169
50k
4 Signs Your Business is Dying
shpigford
181
21k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
Visualization
eitanlees
146
15k
Automating Front-end Workflow
addyosmani
1366
200k
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
48
2.2k
VelocityConf: Rendering Performance Case Studies
addyosmani
326
24k
It's Worth the Effort
3n
183
28k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
The World Runs on Bad Software
bkeepers
PRO
65
11k
Build The Right Thing And Hit Your Dates
maggiecrowley
33
2.4k
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