Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
Cross-Domain Sessions with Ruby on Rails
Search
Lukas Fittl
January 09, 2014
Programming
480
1
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
710
What's Missing for Postgres Monitoring
lfittl
0
320
A Map For Monitoring PostgreSQL
lfittl
2
430
Monitoring Postgres at Scale
lfittl
1
510
Monitoring PostgreSQL at Scale
lfittl
4
310
Postgres Performance for App Developers
lfittl
2
350
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
670
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
660
PostgreSQL at a Web Startup
lfittl
3
660
Other Decks in Programming
See All in Programming
HTML-in-Canvasで作る未来のWeb UI表現
clockmaker
5
5.2k
Apple Intelligence を用いた個人情報誤送信防止、及びユーザーリクエスト体験の改善について
yukiny
0
360
コードで差別化できない時代の ソフトウェアエンジニアリング / Software Engineering in an Era Where Code Doesn’t Differentiate
kishida
2
180
golang-bob.pdf
iwatsukayura
0
130
Rでドレミ/Do-Re-Mi_with_R
florets1
0
130
Jetpack Compose Mechanisms
skydoves
3
840
Vue Fes Japan の “作る側”に関わってみて
naokihaba
1
180
月間100万人のサービス刷新で、 技術選定をHonoに振り切った話
yutobara
8
6.8k
設計次第でAIコードの読む量は減らせる / designing-for-code-reading
minodriven
35
17k
iOS 27でニュースアプリはどう変わる!? 〜日経電子版の新機能対応と、開発事例から〜
lynnswap
7
13k
Agentic Software Factoryに、すごく賢いIF文を。 / super smart IF statement into the Agentic Software Factory.
rkaga
8
2.3k
Next.js: The final boss of Web Performance
guaca
0
310
Featured
See All Featured
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.5k
The Impact of AI in SEO - AI Overviews June 2024 Edition
aleyda
6
1.2k
Leadership Guide Workshop - DevTernity 2021
reverentgeek
1
400
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
490
Building AI with AI
inesmontani
PRO
1
1.3k
The World Runs on Bad Software
bkeepers
PRO
72
12k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.5k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.9k
A Guide to Academic Writing Using Generative AI - A Workshop
ks91
PRO
1
530
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Money Talks: Using Revenue to Get Sh*t Done
nikkihalliwell
0
530
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
720
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