$30 off During Our Annual Pro Sale. View Details »
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
660
What's Missing for Postgres Monitoring
lfittl
0
250
A Map For Monitoring PostgreSQL
lfittl
2
390
Monitoring Postgres at Scale
lfittl
1
450
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
600
PostgreSQL at a Web Startup
lfittl
3
600
Other Decks in Programming
See All in Programming
TUIライブラリつくってみた / i-just-make-TUI-library
kazto
1
350
AIコーディングエージェント(Manus)
kondai24
0
160
Context is King? 〜Verifiability時代とコンテキスト設計 / Beyond "Context is King"
rkaga
6
920
Socio-Technical Evolution: Growing an Architecture and Its Organization for Fast Flow
cer
PRO
0
310
チームをチームにするEM
hitode909
0
290
配送計画の均等化機能を提供する取り組みについて(⽩⾦鉱業 Meetup Vol.21@六本⽊(数理最適化編))
izu_nori
0
140
リリース時」テストから「デイリー実行」へ!開発マネージャが取り組んだ、レガシー自動テストのモダン化戦略
goataka
0
120
tsgolintはいかにしてtypescript-goの非公開APIを呼び出しているのか
syumai
6
2.1k
新卒エンジニアのプルリクエスト with AI駆動
fukunaga2025
0
190
俺流レスポンシブコーディング 2025
tak_dcxi
14
8.4k
Level up your Gemini CLI - D&D Style!
palladius
1
180
令和最新版Android Studioで化石デバイス向けアプリを作る
arkw
0
370
Featured
See All Featured
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
48
9.8k
Rails Girls Zürich Keynote
gr2m
95
14k
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
Reflections from 52 weeks, 52 projects
jeffersonlam
355
21k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
[SF Ruby Conf 2025] Rails X
palkan
0
490
Git: the NoSQL Database
bkeepers
PRO
432
66k
GraphQLとの向き合い方2022年版
quramy
50
14k
[RailsConf 2023] Rails as a piece of cake
palkan
58
6.1k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Optimizing for Happiness
mojombo
379
70k
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