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
650
What's Missing for Postgres Monitoring
lfittl
0
250
A Map For Monitoring PostgreSQL
lfittl
2
380
Monitoring Postgres at Scale
lfittl
1
440
Monitoring PostgreSQL at Scale
lfittl
4
270
Postgres Performance for App Developers
lfittl
2
310
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
600
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
590
PostgreSQL at a Web Startup
lfittl
3
600
Other Decks in Programming
See All in Programming
CSC509 Lecture 11
javiergs
PRO
0
310
ゼロダウンタイムでミドルウェアの バージョンアップを実現した手法と課題
wind111
0
210
GeistFabrik and AI-augmented software development
adewale
PRO
0
150
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
600
OSS開発者の憂鬱
yusukebe
12
5.7k
手軽に積ん読を増やすには?/読みたい本と付き合うには?
o0h
PRO
1
110
『実践MLOps』から学ぶ DevOps for ML
nsakki55
2
460
Flutterアプリ運用の現場で役立った監視Tips 5選
ostk0069
1
500
開発生産性が組織文化になるまでの軌跡
tonegawa07
0
190
モデル駆動設計をやってみよう Modeling Forum2025ワークショップ/Let’s Try Model-Driven Design
haru860
0
180
JEP 496 と JEP 497 から学ぶ耐量子計算機暗号入門 / Learning Post-Quantum Crypto Basics from JEP 496 & 497
mackey0225
2
460
connect-python: convenient protobuf RPC for Python
anuraaga
0
170
Featured
See All Featured
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Music & Morning Musume
bryan
46
7k
Code Review Best Practice
trishagee
72
19k
Rails Girls Zürich Keynote
gr2m
95
14k
Navigating Team Friction
lara
190
16k
Keith and Marios Guide to Fast Websites
keithpitt
413
23k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
231
22k
How to train your dragon (web standard)
notwaldorf
97
6.4k
Bash Introduction
62gerente
615
210k
Why Our Code Smells
bkeepers
PRO
340
57k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
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