Enviar búsqueda
Cargar
Simple Spring Memcached
•
Descargar como ODP, PDF
•
3 recomendaciones
•
7,457 vistas
N
nelz9999
Seguir
This is the presentation I will be giving on Sunday at Silicon Valley Code Camp 2009.
Leer menos
Leer más
Tecnología
Noticias y política
Denunciar
Compartir
Denunciar
Compartir
1 de 37
Descargar ahora
Recomendados
strace for Perl Mongers
strace for Perl Mongers
Naosuke Yokoe
Password (in)security
Password (in)security
Enrico Zimuel
Security 202 - Are you sure your site is secure?
Security 202 - Are you sure your site is secure?
ConFoo
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
ConFoo
Secure password - CYBER SECURITY
Secure password - CYBER SECURITY
SupanShah2
Password Security
Password Security
Alex Hyer
Introduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmm
Simone Onofri
Passwords presentation
Passwords presentation
Greg MacPherson
Recomendados
strace for Perl Mongers
strace for Perl Mongers
Naosuke Yokoe
Password (in)security
Password (in)security
Enrico Zimuel
Security 202 - Are you sure your site is secure?
Security 202 - Are you sure your site is secure?
ConFoo
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
Marrow: A Meta-Framework for Python 2.6+ and 3.1+
ConFoo
Secure password - CYBER SECURITY
Secure password - CYBER SECURITY
SupanShah2
Password Security
Password Security
Alex Hyer
Introduzione ai network penetration test secondo osstmm
Introduzione ai network penetration test secondo osstmm
Simone Onofri
Passwords presentation
Passwords presentation
Greg MacPherson
Defending Against Attacks With Rails
Defending Against Attacks With Rails
Tony Amoyal
General Principles of Web Security
General Principles of Web Security
jemond
How Xslate Works
How Xslate Works
Goro Fuji
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
Wim Godden
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
PrestaShop
Itb session v_memcached
Itb session v_memcached
Skills Matter
<img src="xss.com">
<img src="xss.com">
"<u>aaa</u>
Fav
Fav
helloppt
Rails and security
Rails and security
Andrey Tokarchuk
Php My Sql Security 2007
Php My Sql Security 2007
Aung Khant
Symfony 1, mi viejo amigo
Symfony 1, mi viejo amigo
Jose Antonio Pio
Django Web Application Security
Django Web Application Security
levigross
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
Wim Godden
PHP Secure Programming
PHP Secure Programming
Balavignesh Kasinathan
Unusual Web Bugs
Unusual Web Bugs
amiable_indian
Web Bugs
Web Bugs
Dr Rushi Raval
Reutov, yunusov, nagibin random numbers take ii
Reutov, yunusov, nagibin random numbers take ii
DefconRussia
Random numbers
Random numbers
Positive Hack Days
The vJUG talk about jOOQ: Get Back in Control of Your SQL
The vJUG talk about jOOQ: Get Back in Control of Your SQL
Lukas Eder
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
Más contenido relacionado
Similar a Simple Spring Memcached
Defending Against Attacks With Rails
Defending Against Attacks With Rails
Tony Amoyal
General Principles of Web Security
General Principles of Web Security
jemond
How Xslate Works
How Xslate Works
Goro Fuji
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
Wim Godden
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Wim Godden
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
PrestaShop
Itb session v_memcached
Itb session v_memcached
Skills Matter
<img src="xss.com">
<img src="xss.com">
"<u>aaa</u>
Fav
Fav
helloppt
Rails and security
Rails and security
Andrey Tokarchuk
Php My Sql Security 2007
Php My Sql Security 2007
Aung Khant
Symfony 1, mi viejo amigo
Symfony 1, mi viejo amigo
Jose Antonio Pio
Django Web Application Security
Django Web Application Security
levigross
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
Wim Godden
PHP Secure Programming
PHP Secure Programming
Balavignesh Kasinathan
Unusual Web Bugs
Unusual Web Bugs
amiable_indian
Web Bugs
Web Bugs
Dr Rushi Raval
Reutov, yunusov, nagibin random numbers take ii
Reutov, yunusov, nagibin random numbers take ii
DefconRussia
Random numbers
Random numbers
Positive Hack Days
The vJUG talk about jOOQ: Get Back in Control of Your SQL
The vJUG talk about jOOQ: Get Back in Control of Your SQL
Lukas Eder
Similar a Simple Spring Memcached
(20)
Defending Against Attacks With Rails
Defending Against Attacks With Rails
General Principles of Web Security
General Principles of Web Security
How Xslate Works
How Xslate Works
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability @ FrOSCon 2011
Caching and tuning fun for high scalability
Caching and tuning fun for high scalability
Good practices for PrestaShop code security and optimization
Good practices for PrestaShop code security and optimization
Itb session v_memcached
Itb session v_memcached
<img src="xss.com">
<img src="xss.com">
Fav
Fav
Rails and security
Rails and security
Php My Sql Security 2007
Php My Sql Security 2007
Symfony 1, mi viejo amigo
Symfony 1, mi viejo amigo
Django Web Application Security
Django Web Application Security
Caching and tuning fun for high scalability @ PHPTour
Caching and tuning fun for high scalability @ PHPTour
PHP Secure Programming
PHP Secure Programming
Unusual Web Bugs
Unusual Web Bugs
Web Bugs
Web Bugs
Reutov, yunusov, nagibin random numbers take ii
Reutov, yunusov, nagibin random numbers take ii
Random numbers
Random numbers
The vJUG talk about jOOQ: Get Back in Control of Your SQL
The vJUG talk about jOOQ: Get Back in Control of Your SQL
Último
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Safe Software
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
2toLead Limited
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
comworks
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Stephanie Beckett
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Enterprise Knowledge
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
Florian Wilhelm
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
BookNet Canada
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
hariprasad279825
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Scott Keck-Warren
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Manik S Magar
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
UiPathCommunity
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Mark Simos
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
Fwdays
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
null - The Open Security Community
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Ridwan Fadjar
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
charlottematthew16
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Wonjun Hwang
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Miki Katsuragi
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Kalema Edgar
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Rizwan Syed
Último
(20)
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
CloudStudio User manual (basic edition):
CloudStudio User manual (basic edition):
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
Streamlining Python Development: A Guide to a Modern Project Setup
Streamlining Python Development: A Guide to a Modern Project Setup
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
Advanced Test Driven-Development @ php[tek] 2024
Advanced Test Driven-Development @ php[tek] 2024
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
Tampa BSides - Chef's Tour of Microsoft Security Adoption Framework (SAF)
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
Simple Spring Memcached
1.
Simple-Spring-Memcached http://code.google.com/p/simple-spring-memcached/
A library that enables your code to benefit from distributed caching (via memcached), with minimal configuration and simple annotations.
2.
3.
Sr. Software Engineer
at Widgetbox, Inc
4.
10+ Years as
a Software Engineer
5.
http://www.nelz.net/
6.
http://www.twitter.com/nelz9999
7.
http://www.linkedin.com/in/nelz9999
8.
9.
Familiar with Spring
10.
May be interested
in adding Memcached
11.
Understand the basics
of Caching
12.
Understand the basics
of Distributed Caching
13.
14.
Spring
15.
Serializable / Externalizable
Objects
16.
High-Read, Low-Write
17.
You control (or
can wrap) the methods you want to cache
18.
Expensive Read Operations
19.
Operational Ability to
Support Memcached
20.
SSM's Niche
21.
22.
Share My Learnings
23.
Self-Evident Concept
24.
25.
26.
27.
EasyMock
28.
29.
Spring / AspectJ
30.
Log4J
31.
32.
Should be transparent
to main code flow
33.
34.
35.
AOP to the
Rescue!
36.
37.
<bean id="memcachedConnectionBean" class=
38.
"net.nelz.simplesm.config.MemcachedConnectionBean">
39.
<property name="consistentHashing" value="true"
/>
40.
<property name="nodeList" value="127.0.0.1:11211
127.0.0.1:11311" />
41.
</bean>
42.
<aop:aspectj-autoproxy />
43.
44.
if cacheHasKey($key), return
getFromCache($key)
45.
$value = doExpensiveRequestForValue()
46.
storeInCache($key, $value)
47.
return $value
48.
Gets info out
of the cache
49.
Also back door
of putting info into the cache
50.
[PS: Pertinent Negative
Null]
51.
52.
Key + Namespace
+ Other Characters (~16)
53.
No Spaces
54.
Default: toString()
55.
Preferred: @CacheKeyMethod
56.
57.
58.
Bad: 123 vs
123
59.
Good: Vet:123 vs
Pet:123
60.
61.
assignedKey = "InTheWindow",
62.
namespace = "DOG",
63.
expiration = 300)
64.
Dog getDogInWindow() {
65.
...
66.
}
67.
68.
keyIndex = 0,
69.
namespace = "VETS",
70.
expiration = 300)
71.
Vet getVet(Long id)
{
72.
...
73.
}
74.
75.
keyIndex = 1,
76.
namespace = "VETS",
77.
expiration = 300)
78.
Vet getVet(Credentials cred,
Long id) {
79.
...
80.
}
81.
82.
“ KEY” ->
List<Value>
83.
84.
Key -> List<Value>
85.
86.
@ReadThroughMultiCache
87.
88.
89.
No Map support
(yet?)
90.
Subset Pass-Through
91.
92.
keyIndex = 0,
93.
namespace = "VETS",
94.
expiration = 300)
95.
List<Vet> getVet(List<Long> ids)
{
96.
...
97.
}
98.
99.
doUnderlyingOperations()
100.
deleteFromCache($key)
101.
Removes info from
the cache
102.
103.
assignedKey = "InTheWindow",
104.
namespace = "DOG")
105.
void removeFromWindow(Dog dog)
{
106.
...
107.
}
108.
109.
keyIndex = 0,
110.
namespace = "FISH")
111.
void died(Fish fish)
{
112.
...
113.
}
114.
115.
keyIndex = 1,
116.
namespace = "DOG")
117.
void sellLitter(Buyer to,
List<Dog> dogs) {
118.
...
119.
}
120.
121.
$key = calculateValueCacheName()
122.
$value = harnessValueToStore()
123.
storeInCache($key, $value)
124.
Puts info into
the cache
125.
126.
assignedKey = "InTheWindow",
127.
dataIndex = -1,
128.
namespace = "DOG",
129.
expiration = 300)
130.
Dog chooseDogForWindow() {
131.
...
132.
}
133.
134.
keyIndex = 0,
135.
dataIndex = 0,
136.
namespace = "FISH",
137.
expiration = 300)
138.
void addToInventory(Fish fish)
{
139.
...
140.
}
141.
142.
keyIndex = 2,
143.
dataIndex = -1,
144.
namespace = "DOG",
145.
expiration = 300)
146.
List<Dog> newLitter(Dog mom,
Dog dad, List<Long> ids) {
147.
...
148.
}
149.
150.
Demo...
151.
Demo...
152.
Demo.
153.
154.
Exceptions within the
caching code should be invisible to user, other than via log
155.
Commons-logging / Log4J
156.
157.
Updates on Save
158.
159.
Namespace Invalidation
160.
Multi-Invalidation / Method
161.
Multi-Parameter Keys
162.
163.
Cache Observers
164.
Second-level cache
165.
166.
167.
168.
@ReturnValueKeyProvider(
169.
keyProviderBeanName = “myBeanName”
170.
)
171.
172.
Not Maintained?
173.
174.
175.
176.
Demo Code
177.
Also on SlideShare
178.
Gliffy.com
179.
180.
http://www.flickr.com/photos/edrabbit/3440426582/
181.
http://www.flickr.com/photos/nielsvk/258851215/
182.
http://www.flickr.com/photos/origomi/22442743/
183.
http://www.flickr.com/photos/samcrockett/2213593924/
184.
http://www.flickr.com/photos/themarkpike/83868756/
185.
http://www.flickr.com/photos/bohman/210977249/
186.
http://www.flickr.com/photos/red5standingby/235794106/
187.
http://www.flickr.com/photos/roblee/375671072/
188.
http://www.flickr.com/photos/andyandorla/239043213/
189.
http://www.flickr.com/photos/chrisdag/1225937650/
190.
http://www.flickr.com/photos/mechanikat/2727944748/
191.
http://www.flickr.com/photos/expressmonorail/3694867130/
192.
http://www.flickr.com/photos/ttstam/3833225072/
193.
http://www.flickr.com/photos/vernhart/1574355240/
194.
Questions Questions?
Descargar ahora