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
470
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
690
What's Missing for Postgres Monitoring
lfittl
0
290
A Map For Monitoring PostgreSQL
lfittl
2
410
Monitoring Postgres at Scale
lfittl
1
490
Monitoring PostgreSQL at Scale
lfittl
4
290
Postgres Performance for App Developers
lfittl
2
330
GraphQL ❤ PostgreSQL -- P.S. aka BeatQL
lfittl
1
650
Hacking PostgreSQL to Gain SQL Parsing Superpowers
lfittl
1
630
PostgreSQL at a Web Startup
lfittl
3
630
Other Decks in Programming
See All in Programming
Creating Composable Callables in Contemporary C++
rollbear
0
130
AIで効率化できた業務・日常
ochtum
0
130
技術記事、 専門家としてのプログラマ、 言語化
mizchi
13
5.8k
Language Server 使ってる? 〜VSCode と Zed の場合〜 / Are you using a Language Server? ~For VS Code and Zed~
handlename
0
780
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.3k
ADKを使って簡単にAIエージェントを作ってみよう
k1mu21
0
260
Vue × Nuxt × Oxc どこまで使える?実運用の現在地
andpad
0
250
Hunting Vulnerabilities in Symfony with LLMs
vinceamstoutz
0
540
Lessons from Spec-Driven Development
simas
PRO
0
190
3Dシーンの圧縮
fadis
1
770
Vite+ Unified Toolchain for the Web
naokihaba
0
300
AIとASP.NET Coreで雑Webアプリを作った話
mayuki
0
600
Featured
See All Featured
Lightning Talk: Beautiful Slides for Beginners
inesmontani
PRO
2
570
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
230
Information Architects: The Missing Link in Design Systems
soysaucechin
0
970
The SEO identity crisis: Don't let AI make you average
varn
0
490
Building Flexible Design Systems
yeseniaperezcruz
330
40k
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
1
280
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
780
Efficient Content Optimization with Google Search Console & Apps Script
katarinadahlin
PRO
1
620
Context Engineering - Making Every Token Count
addyosmani
9
960
Thoughts on Productivity
jonyablonski
76
5.2k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
49
10k
Introduction to Domain-Driven Design and Collaborative software design
baasie
1
840
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