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
カンファレンス動画鑑賞会のススメ / Osaka.swift #1
hironytic
0
180
Оптимизируем производительность блока Казначейство
lamodatech
0
960
watsonx.ai Dojo #6 継続的なAIアプリ開発と展開
oniak3ibm
PRO
0
170
テストコードのガイドライン 〜作成から運用まで〜
riku929hr
7
1.4k
React 19でお手軽にCSS-in-JSを自作する
yukukotani
5
570
月刊 競技プログラミングをお仕事に役立てるには
terryu16
1
1.2k
ゼロからの、レトロゲームエンジンの作り方
tokujiros
3
1.1k
良いユニットテストを書こう
mototakatsu
11
3.6k
PHPで作るWebSocketサーバー ~リアクティブなアプリケーションを知るために~ / WebSocket Server in PHP - To know reactive applications
seike460
PRO
2
770
20241217 競争力強化とビジネス価値創出への挑戦:モノタロウのシステムモダナイズ、開発組織の進化と今後の展望
monotaro
PRO
0
290
令和7年版 あなたが使ってよいフロントエンド機能とは
mugi_uno
10
5.3k
Swiftコンパイラ超入門+async関数の仕組み
shiz
0
180
Featured
See All Featured
StorybookのUI Testing Handbookを読んだ
zakiyama
28
5.4k
Done Done
chrislema
182
16k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
174
51k
GitHub's CSS Performance
jonrohan
1030
460k
Code Review Best Practice
trishagee
65
17k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Designing on Purpose - Digital PM Summit 2013
jponch
116
7.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
28
4.5k
GraphQLの誤解/rethinking-graphql
sonatard
68
10k
Practical Orchestrator
shlominoach
186
10k
Building a Modern Day E-commerce SEO Strategy
aleyda
38
7k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
7
570
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