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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
320
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
620
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
610
PostgreSQL at a Web Startup
lfittl
3
610
Other Decks in Programming
See All in Programming
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
320
Apache Iceberg V3 and migration to V3
tomtanaka
0
200
Sekiban + Microsoft Orleans のアクターをAWS対応しました / Sekiban + Microsoft Orleans actors are now supported on AWS.
tomohisa
0
110
Vibe Coding - AI 驅動的軟體開發
mickyp100
0
190
AgentCoreとHuman in the Loop
har1101
5
270
今から始めるClaude Code超入門
448jp
8
9.3k
24時間止められないシステムを守る-医療ITにおけるランサムウェア対策の実際
koukimiura
1
160
AIに仕事を丸投げしたら、本当に楽になれるのか
dip_tech
PRO
0
120
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
120
iOSアプリでフロントエンドと仲良くする
ryunakayama
0
110
Claude Codeと2つの巻き戻し戦略 / Two Rewind Strategies with Claude Code
fruitriin
0
170
ご飯食べながらエージェントが開発できる。そう、Agentic Engineeringならね。
yokomachi
1
120
Featured
See All Featured
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
350
Information Architects: The Missing Link in Design Systems
soysaucechin
0
790
Exploring anti-patterns in Rails
aemeredith
2
260
The SEO Collaboration Effect
kristinabergwall1
0
360
New Earth Scene 8
popppiees
1
1.6k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
5
740
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Effective software design: The role of men in debugging patriarchy in IT @ Voxxed Days AMS
baasie
0
230
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
34k
The Limits of Empathy - UXLibs8
cassininazir
1
230
Designing Powerful Visuals for Engaging Learning
tmiket
0
240
svc-hook: hooking system calls on ARM64 by binary rewriting
retrage
1
110
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