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
620
What's Missing for Postgres Monitoring
lfittl
0
220
A Map For Monitoring PostgreSQL
lfittl
2
370
Monitoring Postgres at Scale
lfittl
1
400
Monitoring PostgreSQL at Scale
lfittl
4
240
Postgres Performance for App Developers
lfittl
2
280
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
570
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
550
PostgreSQL at a Web Startup
lfittl
3
580
Other Decks in Programming
See All in Programming
Rollupのビルド時間高速化によるプレビュー表示速度改善とバンドラとASTを駆使したプロダクト開発の難しさ
plaidtech
PRO
1
160
DataStoreをテストする
mkeeda
0
280
データベースエンジニアの仕事を楽にする。PgAssistantの紹介
nnaka2992
9
4.5k
remix + cloudflare workers (DO) docker上でいい感じに開発する
yoshidatomoaki
0
130
Building a macOS screen saver with Kotlin (Android Makers 2025)
zsmb
1
140
ベクトル検索システムの気持ち
monochromegane
31
9.8k
Empowering Developers with HTML-Aware ERB Tooling @ RubyKaigi 2025, Matsuyama, Ehime
marcoroth
1
220
The Weight of Data: Rethinking Cloud-Native Systems for the Age of AI
hollycummins
0
270
技術選定を未来に繋いで活用していく
sakito
3
100
Enterprise Web App. Development (1): Build Tool Training Ver. 5
knakagawa
1
110
MCP世界への招待: AIエンジニアが創る次世代エージェント連携の世界
gunta
4
880
小田原でみんなで一句詠みたいな #phpcon_odawara
stefafafan
0
320
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
30
2.3k
YesSQL, Process and Tooling at Scale
rocio
172
14k
Thoughts on Productivity
jonyablonski
69
4.6k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
29
1.6k
Code Reviewing Like a Champion
maltzj
522
39k
Optimizing for Happiness
mojombo
377
70k
Site-Speed That Sticks
csswizardry
5
480
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
45
7.2k
Automating Front-end Workflow
addyosmani
1369
200k
How to Think Like a Performance Engineer
csswizardry
23
1.5k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
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