SlideShare uma empresa Scribd logo
1 de 32
Baixar para ler offline
Silt: Lessons Learned in a Smalltalk Web Deployment
Wednesday, September 6, 2006
How to Scale a Smalltalk Server
Without Any Planning
James A. Robertson
Product Manager
Smalltalk
Cincom Systems, Inc.
Agenda
• The Server: Basic Architecture
• A Few problems
• Summary
Project Discussed
• Silt
– http://www.cincomsmalltalk.com/CincomSmalltalkWik
i/Silt
– http://www.cincomsmalltalk.com/blog/blogView
• Managed in the public Store
– Silt is public domain
Architecture
BlogSaver
CacheManager StorageManager
Architecture
• BlogSaver
– The “ well known” API point for the server
– Originally, it was the entire server
– It still has way too much code in it 
– One instance per blog
Architecture
• StorageManager
– Manages the storage and retrieval of posts
– Extracted out of the BlogSaver class
– One serialized object file per day
– Posts (and their comments) are in a collection in that
object file
Architecture
• CacheManager
– Holds cache for the server
• Entire main page
• Last N individual posts asked for
• Keyword search cache
• Category search cache
• Dictionary of posts by year
– Older posts are less likely to change
Architecture
• Initially, BlogSaver was it
– Singleton
– Assumed a single blog
– Lots of references to it in the servlets, etc.
Problems
• First problem: Multiple Blogs
– I had set up the ability to have multiple posters
– I had not set up for multiple blogs
– Michael Lucas-Smith broached the subject
• I think he thought the delay was legal
• It was actually inertia – I didn’ t want to do the work!
Problems
Smalltalk.Blog defineClass: #AbstractBlogSaver
superclass: #{Core.Object}
indexedType: #none
private: false
instanceVariableNames: 'users settings ipFileSem settingsFile
syndicationSem '
classInstanceVariableNames: 'default '
imports: ''
category: 'Blog‘
Key was the “ default” class instance variable
Problems
• BlogSaver named: ‘ someName’ .
– The class instance variable holds a dictionary of blog
instances
– Those are created from configuration files
– Allowed me to set up multiple blogs
– There are now 24 active blogs, and a few inactive
ones
– Could easily add new Smalltalk servers and
segregate by blog
Problems
• Second Problem: Dynamic Request
Backup
– Posts are stored “ one file per day, all posts in that
file”
– To get the last few posts, every request ended up
reading the same files repeatedly
Problems
• Solution: Added a simple cache of all the
posts that belong on the front page
– New requests simply return the cached data
– Cleared out on updates to relevant posts, or on new
posts
– Immediately made the blog more responsive
Problems
• Third Problem: Slow Category Searches
– Each post can have a category
– Category searches required a scan of all posts
– Fine at first, but… I’ ve been at this since 2002
Problems
• Solution: A simple cache
– This is when I split out the CacheManager class
– One per blog
– Holds a Dictionary, where the keys are the categories, and the
values are the set of files containing matching posts
– One time hit to populate, updated on each new post or update
– Cache is saved to disk, so it does not need to be recreated at
startup
Problems
• Speeded up category searches
tremendously
– Only have to open matching files
– Linear search for matching posts in files
– “ fast enough”
– Considering Ajax for caching large result sets
Problems
• Fourth Problem: Keyword Searches
– Same problem as category searches, but cannot do
full up front cache
– Built same solution
– Cache the results as they get queried
– Still wasn’ t fast enough
Problems
• The issue: Scanning all blog posts in the
process that got kicked off by the servlet
– Runs at same priority as other queries
– Bogged the server down with I/O and CPU demands
Problems
• Solution: Class Promise
– Blogged: http://
www.cincomsmalltalk.com/blog/blogView?showComments
=true&entry=3307882025
Problems
• Original Code:
allResults := self actuallySearchFor: searchText
inTitle: searchInTitle
inText: searchInText.
^allResults asSortedCollection: [:a :b | a timestamp > b timestamp].
• New Code:
promise := [self actuallySearchFor: searchText
inTitle: searchInTitle
inText: searchInText] promiseAt: Processor
userBackgroundPriority.
allResults := promise value.
^allResults asSortedCollection: [:a :b | a timestamp > b timestamp].
Problems
• The Promise executes in the background,
and the asking thread waits as it executes
• Allows other server threads to execute
• Extended Back to Category searches
• As with Category searches, considering
an Ajax solution
Problems
• Still expensive: reading all posts takes
time
• Added a cache for posts, keyed to year
– Older posts unlikely to change
– Flush cache for year on change
– Makes searches much faster
Problems
• Fifth Problem: Spam
– Comments
– Trackbacks
– Referers
Problems
• In the server, comments and trackbacks
are handled the same way – i.e., solve
one, solve both
• Referers are gleaned from the server logs
Problems
• Comments/Trackbacks
– Turned off comments on posts off the front page
– Added a “ no more than N hrefs” rule for comments
– Added an IP throttle
• These steps mostly ended comment spam
• Turned off Trackback – it’ s a spam garden
Problems
• Referer Spam
– Bogus referrals from porn/pharma/etc sites
– Added a constantly updated blacklist of keywords
– List is updated every few hours
Problems
• The referral scanner was eating the
server!
– Executing the scan over the logs for each of the
blogs was wasteful
– Unified the scan
– Still ate too much time
– Ended up extracting the process from the server, set
it up as a CRON job
– The blog instances just look for (and cache) the
referral file every few hours
Summary
Summary
• I only solved these problems as they
came up
– I had no idea that they would be problems ahead of
time
• I patch the server live
– Update the code on the fly, including shape changes
to classes.
Summary
• I’ ve yet to hit a problem that wasn’ t my
fault
• Smalltalk is a powerful, scalable solution
for web applications
Contact Info
• James Robertson
– Jarober@gmail.com
– Jrobertson@cincom.com
• Silt
– http://www.cincomsmalltalk.com/CincomSmalltalkWiki/Silt
• BottomFeeder
– http://www.cincomsmalltalk.com/BottomFeeder

Mais conteúdo relacionado

Mais procurados

Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With JestBen McCormick
 
Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017Ivo Lukac
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Edmund Turbin
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to LaravelVin Lim
 
Trying Out Tomorrow’s WordPress Today
Trying Out Tomorrow’s WordPress TodayTrying Out Tomorrow’s WordPress Today
Trying Out Tomorrow’s WordPress TodayDrewAPicture
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jestpksjce
 
Bccon use notes objects in memory and other useful
Bccon   use notes objects in memory and other usefulBccon   use notes objects in memory and other useful
Bccon use notes objects in memory and other usefulFrank van der Linden
 
Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & consLaravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & consElenorWisozk
 
Using REST with VSTS and TFS
Using REST with VSTS and TFSUsing REST with VSTS and TFS
Using REST with VSTS and TFSJeff Bramwell
 
A brief intro to nodejs
A brief intro to nodejsA brief intro to nodejs
A brief intro to nodejsJay Liu
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Mike Melusky
 
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)
Parallel and Asynchronous Programming -  ITProDevConnections 2012 (English)Parallel and Asynchronous Programming -  ITProDevConnections 2012 (English)
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)Panagiotis Kanavos
 
Widening your JavaScript Application
Widening your JavaScript ApplicationWidening your JavaScript Application
Widening your JavaScript ApplicationAlex McPherson
 
2014 SpiceWorld London Breakout
2014 SpiceWorld London Breakout2014 SpiceWorld London Breakout
2014 SpiceWorld London BreakoutThomas Lee
 
IBM Connections Troubleshooting or “Get the Cow off the Ice”
IBM Connections Troubleshooting or “Get the Cow off the Ice” IBM Connections Troubleshooting or “Get the Cow off the Ice”
IBM Connections Troubleshooting or “Get the Cow off the Ice” LetsConnect
 
Best and worst practices deploying IBM Connections
Best and worst practices deploying IBM ConnectionsBest and worst practices deploying IBM Connections
Best and worst practices deploying IBM ConnectionsLetsConnect
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress developmentSteve Mortiboy
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Derek Jacoby
 
Coding with jetpack
Coding with jetpackCoding with jetpack
Coding with jetpackRich Collier
 

Mais procurados (20)

Saving Time By Testing With Jest
Saving Time By Testing With JestSaving Time By Testing With Jest
Saving Time By Testing With Jest
 
Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017Merging two big Symfony based applications - SymfonyCon 2017
Merging two big Symfony based applications - SymfonyCon 2017
 
Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?Theming in WordPress - Where do I Start?
Theming in WordPress - Where do I Start?
 
Selenium
SeleniumSelenium
Selenium
 
Introduction to Laravel
Introduction to LaravelIntroduction to Laravel
Introduction to Laravel
 
Trying Out Tomorrow’s WordPress Today
Trying Out Tomorrow’s WordPress TodayTrying Out Tomorrow’s WordPress Today
Trying Out Tomorrow’s WordPress Today
 
Introduction to jest
Introduction to jestIntroduction to jest
Introduction to jest
 
Bccon use notes objects in memory and other useful
Bccon   use notes objects in memory and other usefulBccon   use notes objects in memory and other useful
Bccon use notes objects in memory and other useful
 
Laravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & consLaravel and CodeIgniter: pros & cons
Laravel and CodeIgniter: pros & cons
 
Using REST with VSTS and TFS
Using REST with VSTS and TFSUsing REST with VSTS and TFS
Using REST with VSTS and TFS
 
A brief intro to nodejs
A brief intro to nodejsA brief intro to nodejs
A brief intro to nodejs
 
Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2Reactive Web Development with Spring Boot 2
Reactive Web Development with Spring Boot 2
 
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)
Parallel and Asynchronous Programming -  ITProDevConnections 2012 (English)Parallel and Asynchronous Programming -  ITProDevConnections 2012 (English)
Parallel and Asynchronous Programming - ITProDevConnections 2012 (English)
 
Widening your JavaScript Application
Widening your JavaScript ApplicationWidening your JavaScript Application
Widening your JavaScript Application
 
2014 SpiceWorld London Breakout
2014 SpiceWorld London Breakout2014 SpiceWorld London Breakout
2014 SpiceWorld London Breakout
 
IBM Connections Troubleshooting or “Get the Cow off the Ice”
IBM Connections Troubleshooting or “Get the Cow off the Ice” IBM Connections Troubleshooting or “Get the Cow off the Ice”
IBM Connections Troubleshooting or “Get the Cow off the Ice”
 
Best and worst practices deploying IBM Connections
Best and worst practices deploying IBM ConnectionsBest and worst practices deploying IBM Connections
Best and worst practices deploying IBM Connections
 
Getting started with WordPress development
Getting started with WordPress developmentGetting started with WordPress development
Getting started with WordPress development
 
Untangling - fall2017 - week 9
Untangling - fall2017 - week 9Untangling - fall2017 - week 9
Untangling - fall2017 - week 9
 
Coding with jetpack
Coding with jetpackCoding with jetpack
Coding with jetpack
 

Destaque

SBNWR Sediment Augmentation Lessons Learned
SBNWR Sediment Augmentation Lessons LearnedSBNWR Sediment Augmentation Lessons Learned
SBNWR Sediment Augmentation Lessons LearnedRick Nye
 
Investigating the impact of silt on habitat
Investigating the impact of silt on habitatInvestigating the impact of silt on habitat
Investigating the impact of silt on habitatlearningfforlife
 
Rocks And Sand Earth Science Lesson Portfolio
Rocks And Sand Earth Science Lesson PortfolioRocks And Sand Earth Science Lesson Portfolio
Rocks And Sand Earth Science Lesson Portfoliooliviaioannou
 
Kajaria Gres Tough
Kajaria Gres ToughKajaria Gres Tough
Kajaria Gres ToughSunil Pal
 
Classification of soil
Classification of soilClassification of soil
Classification of soilKavin Raval
 
Properties of soils (teach)
Properties of soils (teach) Properties of soils (teach)
Properties of soils (teach) Moira Whitehouse
 
Sand Dune Ecosystems
Sand Dune EcosystemsSand Dune Ecosystems
Sand Dune Ecosystemsjacksonthree
 
Biosphere : Sand Dune Succession
Biosphere : Sand Dune SuccessionBiosphere : Sand Dune Succession
Biosphere : Sand Dune SuccessionValVannet
 
types of soil
types of soiltypes of soil
types of soilmehanas
 
Coastal Protection Methods
Coastal Protection MethodsCoastal Protection Methods
Coastal Protection Methodsguesta38fc29
 
Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)
Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)
Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)Junnie Salud
 

Destaque (13)

SBNWR Sediment Augmentation Lessons Learned
SBNWR Sediment Augmentation Lessons LearnedSBNWR Sediment Augmentation Lessons Learned
SBNWR Sediment Augmentation Lessons Learned
 
Fase 1
Fase 1Fase 1
Fase 1
 
Investigating the impact of silt on habitat
Investigating the impact of silt on habitatInvestigating the impact of silt on habitat
Investigating the impact of silt on habitat
 
Rocks And Sand Earth Science Lesson Portfolio
Rocks And Sand Earth Science Lesson PortfolioRocks And Sand Earth Science Lesson Portfolio
Rocks And Sand Earth Science Lesson Portfolio
 
Kajaria Gres Tough
Kajaria Gres ToughKajaria Gres Tough
Kajaria Gres Tough
 
(classification of soil)
(classification of soil)(classification of soil)
(classification of soil)
 
Classification of soil
Classification of soilClassification of soil
Classification of soil
 
Properties of soils (teach)
Properties of soils (teach) Properties of soils (teach)
Properties of soils (teach)
 
Sand Dune Ecosystems
Sand Dune EcosystemsSand Dune Ecosystems
Sand Dune Ecosystems
 
Biosphere : Sand Dune Succession
Biosphere : Sand Dune SuccessionBiosphere : Sand Dune Succession
Biosphere : Sand Dune Succession
 
types of soil
types of soiltypes of soil
types of soil
 
Coastal Protection Methods
Coastal Protection MethodsCoastal Protection Methods
Coastal Protection Methods
 
Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)
Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)
Detailed Lesson Plan (ENGLISH, MATH, SCIENCE, FILIPINO)
 

Semelhante a Silt: Lessons Learned

How to write test in node.js
How to write test in node.jsHow to write test in node.js
How to write test in node.jsJason Lin
 
WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014Fikri Rasyid
 
BACKFiL Finding Files you left on the server
BACKFiL Finding Files you left on the serverBACKFiL Finding Files you left on the server
BACKFiL Finding Files you left on the servertmccurry
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Mike Schinkel
 
BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...
BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...
BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...Vangelis Banos
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSam Brannen
 
full-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptxfull-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptxPlasterdog Web Design
 
Acing the Elastic Certified Engineer Exam
Acing the Elastic Certified Engineer ExamAcing the Elastic Certified Engineer Exam
Acing the Elastic Certified Engineer ExamSandeep Kanabar
 
Tuenti Release Workflow v1.1
Tuenti Release Workflow v1.1Tuenti Release Workflow v1.1
Tuenti Release Workflow v1.1Tuenti
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsTaylor Lovett
 
Introduction tomaven
Introduction tomavenIntroduction tomaven
Introduction tomavenManav Prasad
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchExcella
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and SymfonyMichalSchroeder
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016David Brattoli
 
WordPress - fixing sites with problems
WordPress - fixing sites with problemsWordPress - fixing sites with problems
WordPress - fixing sites with problemsVictoria Pickering
 
WordPress Intermediate Workshop
WordPress Intermediate WorkshopWordPress Intermediate Workshop
WordPress Intermediate WorkshopThe Toolbox, Inc.
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPressNisha Singh
 
Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017
Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017
Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017Sahdev Zala
 

Semelhante a Silt: Lessons Learned (20)

How to write test in node.js
How to write test in node.jsHow to write test in node.js
How to write test in node.js
 
WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014WordPress Meetup Bandung - December 2014
WordPress Meetup Bandung - December 2014
 
BACKFiL Finding Files you left on the server
BACKFiL Finding Files you left on the serverBACKFiL Finding Files you left on the server
BACKFiL Finding Files you left on the server
 
WordPress Complete Tutorial
WordPress Complete TutorialWordPress Complete Tutorial
WordPress Complete Tutorial
 
Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)Developing Complex WordPress Sites without Fear of Failure (with MVC)
Developing Complex WordPress Sites without Fear of Failure (with MVC)
 
BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...
BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...
BlogForever Crawler: Techniques and algorithms to harvest modern weblogs Pres...
 
Spring Framework 3.2 - What's New
Spring Framework 3.2 - What's NewSpring Framework 3.2 - What's New
Spring Framework 3.2 - What's New
 
full-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptxfull-site-editing-theme-presentation.pptx
full-site-editing-theme-presentation.pptx
 
Acing the Elastic Certified Engineer Exam
Acing the Elastic Certified Engineer ExamAcing the Elastic Certified Engineer Exam
Acing the Elastic Certified Engineer Exam
 
Movingto moodle2 v1 1
Movingto moodle2 v1 1Movingto moodle2 v1 1
Movingto moodle2 v1 1
 
Tuenti Release Workflow v1.1
Tuenti Release Workflow v1.1Tuenti Release Workflow v1.1
Tuenti Release Workflow v1.1
 
Best Practices for Building WordPress Applications
Best Practices for Building WordPress ApplicationsBest Practices for Building WordPress Applications
Best Practices for Building WordPress Applications
 
Introduction tomaven
Introduction tomavenIntroduction tomaven
Introduction tomaven
 
Automated Acceptance Testing from Scratch
Automated Acceptance Testing from ScratchAutomated Acceptance Testing from Scratch
Automated Acceptance Testing from Scratch
 
SOA with PHP and Symfony
SOA with PHP and SymfonySOA with PHP and Symfony
SOA with PHP and Symfony
 
Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016Responsive themeworkshop wcneo2016
Responsive themeworkshop wcneo2016
 
WordPress - fixing sites with problems
WordPress - fixing sites with problemsWordPress - fixing sites with problems
WordPress - fixing sites with problems
 
WordPress Intermediate Workshop
WordPress Intermediate WorkshopWordPress Intermediate Workshop
WordPress Intermediate Workshop
 
How to get your theme in WordPress
How to get your theme in WordPressHow to get your theme in WordPress
How to get your theme in WordPress
 
Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017
Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017
Kubernetes Issues Management and Upstream Development_sahdevpzala_11302017
 

Mais de ESUG

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingESUG
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in PharoESUG
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapESUG
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoESUG
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...ESUG
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsESUG
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6ESUG
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationESUG
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingESUG
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesESUG
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportESUG
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsESUG
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector TuningESUG
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseESUG
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FutureESUG
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the DebuggerESUG
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing ScoreESUG
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptESUG
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocESUG
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsESUG
 

Mais de ESUG (20)

Workshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programmingWorkshop: Identifying concept inventories in agile programming
Workshop: Identifying concept inventories in agile programming
 
Technical documentation support in Pharo
Technical documentation support in PharoTechnical documentation support in Pharo
Technical documentation support in Pharo
 
The Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and RoadmapThe Pharo Debugger and Debugging tools: Advances and Roadmap
The Pharo Debugger and Debugging tools: Advances and Roadmap
 
Sequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in PharoSequence: Pipeline modelling in Pharo
Sequence: Pipeline modelling in Pharo
 
Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...Migration process from monolithic to micro frontend architecture in mobile ap...
Migration process from monolithic to micro frontend architecture in mobile ap...
 
Analyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early resultsAnalyzing Dart Language with Pharo: Report and early results
Analyzing Dart Language with Pharo: Report and early results
 
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
Transpiling Pharo Classes to JS ECMAScript 5 versus ECMAScript 6
 
A Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test GenerationA Unit Test Metamodel for Test Generation
A Unit Test Metamodel for Test Generation
 
Creating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic ProgrammingCreating Unit Tests Using Genetic Programming
Creating Unit Tests Using Genetic Programming
 
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution ModesThreaded-Execution and CPS Provide Smooth Switching Between Execution Modes
Threaded-Execution and CPS Provide Smooth Switching Between Execution Modes
 
Exploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience ReportExploring GitHub Actions through EGAD: An Experience Report
Exploring GitHub Actions through EGAD: An Experience Report
 
Pharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIsPharo: a reflective language A first systematic analysis of reflective APIs
Pharo: a reflective language A first systematic analysis of reflective APIs
 
Garbage Collector Tuning
Garbage Collector TuningGarbage Collector Tuning
Garbage Collector Tuning
 
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame CaseImproving Performance Through Object Lifetime Profiling: the DataFrame Case
Improving Performance Through Object Lifetime Profiling: the DataFrame Case
 
Pharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and FuturePharo DataFrame: Past, Present, and Future
Pharo DataFrame: Past, Present, and Future
 
thisContext in the Debugger
thisContext in the DebuggerthisContext in the Debugger
thisContext in the Debugger
 
Websockets for Fencing Score
Websockets for Fencing ScoreWebsockets for Fencing Score
Websockets for Fencing Score
 
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScriptShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
ShowUs: PharoJS.org Develop in Pharo, Run on JavaScript
 
Advanced Object- Oriented Design Mooc
Advanced Object- Oriented Design MoocAdvanced Object- Oriented Design Mooc
Advanced Object- Oriented Design Mooc
 
A New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and TransformationsA New Architecture Reconciling Refactorings and Transformations
A New Architecture Reconciling Refactorings and Transformations
 

Último

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 

Último (20)

SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 

Silt: Lessons Learned

  • 2. How to Scale a Smalltalk Server Without Any Planning James A. Robertson Product Manager Smalltalk Cincom Systems, Inc.
  • 3. Agenda • The Server: Basic Architecture • A Few problems • Summary
  • 4. Project Discussed • Silt – http://www.cincomsmalltalk.com/CincomSmalltalkWik i/Silt – http://www.cincomsmalltalk.com/blog/blogView • Managed in the public Store – Silt is public domain
  • 6. Architecture • BlogSaver – The “ well known” API point for the server – Originally, it was the entire server – It still has way too much code in it  – One instance per blog
  • 7. Architecture • StorageManager – Manages the storage and retrieval of posts – Extracted out of the BlogSaver class – One serialized object file per day – Posts (and their comments) are in a collection in that object file
  • 8. Architecture • CacheManager – Holds cache for the server • Entire main page • Last N individual posts asked for • Keyword search cache • Category search cache • Dictionary of posts by year – Older posts are less likely to change
  • 9. Architecture • Initially, BlogSaver was it – Singleton – Assumed a single blog – Lots of references to it in the servlets, etc.
  • 10. Problems • First problem: Multiple Blogs – I had set up the ability to have multiple posters – I had not set up for multiple blogs – Michael Lucas-Smith broached the subject • I think he thought the delay was legal • It was actually inertia – I didn’ t want to do the work!
  • 11. Problems Smalltalk.Blog defineClass: #AbstractBlogSaver superclass: #{Core.Object} indexedType: #none private: false instanceVariableNames: 'users settings ipFileSem settingsFile syndicationSem ' classInstanceVariableNames: 'default ' imports: '' category: 'Blog‘ Key was the “ default” class instance variable
  • 12. Problems • BlogSaver named: ‘ someName’ . – The class instance variable holds a dictionary of blog instances – Those are created from configuration files – Allowed me to set up multiple blogs – There are now 24 active blogs, and a few inactive ones – Could easily add new Smalltalk servers and segregate by blog
  • 13. Problems • Second Problem: Dynamic Request Backup – Posts are stored “ one file per day, all posts in that file” – To get the last few posts, every request ended up reading the same files repeatedly
  • 14. Problems • Solution: Added a simple cache of all the posts that belong on the front page – New requests simply return the cached data – Cleared out on updates to relevant posts, or on new posts – Immediately made the blog more responsive
  • 15. Problems • Third Problem: Slow Category Searches – Each post can have a category – Category searches required a scan of all posts – Fine at first, but… I’ ve been at this since 2002
  • 16. Problems • Solution: A simple cache – This is when I split out the CacheManager class – One per blog – Holds a Dictionary, where the keys are the categories, and the values are the set of files containing matching posts – One time hit to populate, updated on each new post or update – Cache is saved to disk, so it does not need to be recreated at startup
  • 17. Problems • Speeded up category searches tremendously – Only have to open matching files – Linear search for matching posts in files – “ fast enough” – Considering Ajax for caching large result sets
  • 18. Problems • Fourth Problem: Keyword Searches – Same problem as category searches, but cannot do full up front cache – Built same solution – Cache the results as they get queried – Still wasn’ t fast enough
  • 19. Problems • The issue: Scanning all blog posts in the process that got kicked off by the servlet – Runs at same priority as other queries – Bogged the server down with I/O and CPU demands
  • 20. Problems • Solution: Class Promise – Blogged: http:// www.cincomsmalltalk.com/blog/blogView?showComments =true&entry=3307882025
  • 21. Problems • Original Code: allResults := self actuallySearchFor: searchText inTitle: searchInTitle inText: searchInText. ^allResults asSortedCollection: [:a :b | a timestamp > b timestamp]. • New Code: promise := [self actuallySearchFor: searchText inTitle: searchInTitle inText: searchInText] promiseAt: Processor userBackgroundPriority. allResults := promise value. ^allResults asSortedCollection: [:a :b | a timestamp > b timestamp].
  • 22. Problems • The Promise executes in the background, and the asking thread waits as it executes • Allows other server threads to execute • Extended Back to Category searches • As with Category searches, considering an Ajax solution
  • 23. Problems • Still expensive: reading all posts takes time • Added a cache for posts, keyed to year – Older posts unlikely to change – Flush cache for year on change – Makes searches much faster
  • 24. Problems • Fifth Problem: Spam – Comments – Trackbacks – Referers
  • 25. Problems • In the server, comments and trackbacks are handled the same way – i.e., solve one, solve both • Referers are gleaned from the server logs
  • 26. Problems • Comments/Trackbacks – Turned off comments on posts off the front page – Added a “ no more than N hrefs” rule for comments – Added an IP throttle • These steps mostly ended comment spam • Turned off Trackback – it’ s a spam garden
  • 27. Problems • Referer Spam – Bogus referrals from porn/pharma/etc sites – Added a constantly updated blacklist of keywords – List is updated every few hours
  • 28. Problems • The referral scanner was eating the server! – Executing the scan over the logs for each of the blogs was wasteful – Unified the scan – Still ate too much time – Ended up extracting the process from the server, set it up as a CRON job – The blog instances just look for (and cache) the referral file every few hours
  • 30. Summary • I only solved these problems as they came up – I had no idea that they would be problems ahead of time • I patch the server live – Update the code on the fly, including shape changes to classes.
  • 31. Summary • I’ ve yet to hit a problem that wasn’ t my fault • Smalltalk is a powerful, scalable solution for web applications
  • 32. Contact Info • James Robertson – Jarober@gmail.com – Jrobertson@cincom.com • Silt – http://www.cincomsmalltalk.com/CincomSmalltalkWiki/Silt • BottomFeeder – http://www.cincomsmalltalk.com/BottomFeeder