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
600
What's Missing for Postgres Monitoring
lfittl
0
210
A Map For Monitoring PostgreSQL
lfittl
2
360
Monitoring Postgres at Scale
lfittl
1
380
Monitoring PostgreSQL at Scale
lfittl
4
230
Postgres Performance for App Developers
lfittl
2
260
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
560
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
530
PostgreSQL at a Web Startup
lfittl
3
570
Other Decks in Programming
See All in Programming
QA環境で誰でも自由自在に現在時刻を操って検証できるようにした話
kalibora
1
140
ErdMap: Thinking about a map for Rails applications
makicamel
1
610
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
280
Package Traits
ikesyo
1
210
はてなにおけるfujiwara-wareの活用やecspressoのCI/CD構成 / Fujiwara Tech Conference 2025
cohalz
3
2.7k
EC2からECSへ 念願のコンテナ移行と巨大レガシーPHPアプリケーションの再構築
sumiyae
3
590
混沌とした例外処理とエラー監視に秩序をもたらす
morihirok
13
2.2k
ATDDで素早く安定した デリバリを実現しよう!
tonnsama
1
1.9k
いりゃあせ、PHPカンファレンス名古屋2025 / Welcome to PHP Conference Nagoya 2025
ttskch
1
170
asdf-ecspresso作って 友達が増えた話 / Fujiwara Tech Conference 2025
koluku
0
1.4k
PHPカンファレンス 2024|共創を加速するための若手の技術挑戦
weddingpark
0
140
生成AIでGitHubソースコード取得して仕様書を作成
shukob
0
630
Featured
See All Featured
[RailsConf 2023] Rails as a piece of cake
palkan
53
5.1k
Documentation Writing (for coders)
carmenintech
67
4.5k
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
280
13k
Large-scale JavaScript Application Architecture
addyosmani
510
110k
How to Think Like a Performance Engineer
csswizardry
22
1.3k
Statistics for Hackers
jakevdp
797
220k
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Stop Working from a Prison Cell
hatefulcrawdad
267
20k
Gamification - CAS2011
davidbonilla
80
5.1k
Automating Front-end Workflow
addyosmani
1366
200k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Principles of Awesome APIs and How to Build Them.
keavy
126
17k
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