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
450
1
Share
Cross-Domain Sessions with Ruby on Rails
So, how does one write a Rails 4 session store?
Lukas Fittl
January 09, 2014
More Decks by Lukas Fittl
See All by Lukas Fittl
How to Scale Postgres - Automation, Tuning & Sharding
lfittl
0
680
What's Missing for Postgres Monitoring
lfittl
0
280
A Map For Monitoring PostgreSQL
lfittl
2
400
Monitoring Postgres at Scale
lfittl
1
480
Monitoring PostgreSQL at Scale
lfittl
4
280
Postgres Performance for App Developers
lfittl
2
320
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
630
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
620
PostgreSQL at a Web Startup
lfittl
3
620
Other Decks in Programming
See All in Programming
AIエージェントで業務改善してみた
taku271
0
520
PHPで TLSのプロトコルを実装してみるをもう一度しゃべりたい
higaki_program
0
200
ハーネスエンジニアリングにどう向き合うか 〜ルールファイルを超えて開発プロセスを設計する〜 / How to approach harness engineering
rkaga
19
7.1k
PCOVから学ぶコードカバレッジ #phpcon_odawara
o0h
PRO
0
260
Going Multiplatform with Your Android App (Android Makers 2026)
zsmb
2
390
瑠璃の宝石に学ぶ技術の声の聴き方 / 【劇場版】アニメから得た学びを発表会2026 #エンジニアニメ
mazrean
0
240
Coding at the Speed of Thought: The New Era of Symfony Docker
dunglas
0
4.8k
ルールルルルルRubyの中身の予備知識 ── RubyKaigiの前に予習しなイカ?
ydah
1
160
今こそ押さえておきたい アマゾンウェブサービス(AWS)の データベースの基礎 おもクラ #6版
satoshi256kbyte
1
240
「効かない!」依存性注入(DI)を活用したAPI Platformのエラーハンドリング奮闘記
mkmk884
0
320
「速くなった気がする」をデータで疑う
senleaf24
0
170
PHP で mp3 プレイヤーを実装しよう
m3m0r7
PRO
0
260
Featured
See All Featured
The State of eCommerce SEO: How to Win in Today's Products SERPs - #SEOweek
aleyda
2
10k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
How to Grow Your eCommerce with AI & Automation
katarinadahlin
PRO
1
170
Winning Ecommerce Organic Search in an AI Era - #searchnstuff2025
aleyda
1
2k
Large-scale JavaScript Application Architecture
addyosmani
515
110k
The World Runs on Bad Software
bkeepers
PRO
72
12k
The Cult of Friendly URLs
andyhume
79
6.8k
WENDY [Excerpt]
tessaabrams
10
37k
AI in Enterprises - Java and Open Source to the Rescue
ivargrimstad
0
1.2k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Building Applications with DynamoDB
mza
96
7k
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