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
450
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
670
What's Missing for Postgres Monitoring
lfittl
0
260
A Map For Monitoring PostgreSQL
lfittl
2
390
Monitoring Postgres at Scale
lfittl
1
460
Monitoring PostgreSQL at Scale
lfittl
4
270
Postgres Performance for App Developers
lfittl
2
310
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
620
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
600
PostgreSQL at a Web Startup
lfittl
3
600
Other Decks in Programming
See All in Programming
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
SourceGeneratorのススメ
htkym
0
200
AI & Enginnering
codelynx
0
120
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
1k
CSC307 Lecture 10
javiergs
PRO
1
670
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
110
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
CSC307 Lecture 09
javiergs
PRO
1
840
AI Schema Enrichment for your Oracle AI Database
thatjeffsmith
0
330
Amazon Bedrockを活用したRAGの品質管理パイプライン構築
tosuri13
5
810
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
620
Raku Raku Notion 20260128
hareyakayuruyaka
0
370
Featured
See All Featured
Rails Girls Zürich Keynote
gr2m
96
14k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
750
Writing Fast Ruby
sferik
630
62k
Between Models and Reality
mayunak
1
200
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
470
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Statistics for Hackers
jakevdp
799
230k
Tell your own story through comics
letsgokoyo
1
810
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
340
SEO in 2025: How to Prepare for the Future of Search
ipullrank
3
3.3k
Un-Boring Meetings
codingconduct
0
200
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