SlideShare a Scribd company logo
1 of 23
Download to read offline
Building A Virtual Babel:
        Mono In Second Life
Dr Jim Purbrick, Technical Director, Linden Lab
                FOSDEM 2010
Second Life At 6




http://flickr.com/photos/rorowe/2650727613/sizes/o/
Second Life In 2003
Second Life Today

                                            87K
  600  2
 miles of land
                    25K
                                        peak concurrency

                     cores
                                              80M
                                           running scripts

                   150 +
US$47M
  user-to-user
                    countries           800GB
                                         new content/day
transactions/mo
                      40M                     390TB
US$10M               user hours/mo               content

exchanged/mo
                   769K                   12Gb
                                            data/s
                  repeat logins/mo
Pixie Dust




•   Animations
•   Dancing
•   Vehicles
•   Seats
•   Games, guns
•   Doors, elevators, teleporters
•   Big, tiny, non-human avatars
•   Chickens, dogs, bunnies, wildlife
•   Customizable hair, shoes, furniture
•   In world vendors and web sales
                                          Image Moon over Belgium
Scripting Second Life




•   Scripts in prims                            Image Suzanne Graves
•   Prims linked to make objects
•   Sensors and effectors via library calls
•   Communication via IM, email, XMLRPC, HTTP
•   Untrusted code
•   2000 scripts per process
•   Migration between processes
LSL


•   C-Like Language
•   Vectors and Rotations (DSL!)   default
•   Static Types (6!)              {
                                     state_entry()
•   Heterogenous Lists               {
•   States                             llSay(0, "Hello, Avatar!");
•   Textbook 16KB Bytecode VM        }

•   Easy Migration                     touch(integer total_number)
•   Easy Scheduling                    {
•   Easy Sandboxing (Maybe?)             llSay(0, "Touched.");
                                       }
•   Slow                           }
•   Inconsistent
LSL On Mono




                                            Image Ganymedes Costagravas

•   Rewrite assemblies for concurrency and mobilty
•   Induce stack state (Verification)
•   Rewrite bytecode (Reflection.Emit, RAIL, cecil)
•   Inject microthreading (JavaGoX, Brakes)
•   Serialize stack and heap, transfer assemblies
•   Migrate assemblies between app domains to unload
•   Subvert profiler for resource limitation
Migrating Managed Pointers




•   LSL value semantics
•   CIL pushes MP
•   Can’t copy to heap
•   Step back through CIL
•   Copy operands to heap                    Image Bettina Tizzy

•   Run CIL on restore
•   Resythesise MP
•   Microthread all CIL
Memory Allocation Monitoring




                                              Image Ka Rasmuson

•   Walk object tree between time slices
•   Concatenation allows rapid memory consumption
•   Limit length of lists and strings
•   Hard limit on allocation size
•   Exceptions would have been better
•   Lucky scheduling gives temporary memory boost
•   Yield whenever memory limit might be reached
Scheduling




•   Check time at yield points
•   System call gates execution
•   Execution time very variable
•   Adaptive timer skipping
•   Flywheel exploits              Image juria yoshikawa

•   Marshalling new bottle neck
Managed Execution After A SEGV




•   Emergency state save
•   Mono replaces handlers
•   Disable garbage collection      Image The New Media Consortium

•   Chain signal handlers
•   Definitely void warranty
•   Contributed signal chaining
Memory Model




•   Script Limits
•   Resource Pools
•   Big Scripts
•   Efficient Scripts
•   Bytecode Sharing
C#




•   Arrays
•   Primitive Types
•   Enumerations
•   User Defined Types
•   Exceptions
•   Ecosystem            Image Betina Tizzy
Complete UThreadInjector




• Full CIL Instruction Set
• RAIL or Cecil?
• Generics?
                             Image Gita Rau
Build Sandbox




•   Moonlight?
•   CoreCLR Security?
•   Embedded Mono?
•   Assembly Markup?




                        Image Raul Crimson
C# API




                                     Image Gita Rau
•   Library.llFoo Methods
•   System.Collections
•   System.Security.Crytography
•   XML?
•   Web?
•   .NET to Silverlight machinery?
C# Types
list l = [“foo”,42]

ArrayList l = new ArrayList(new object[]{“foo”,42})

List l = new List().Add(“foo”).Add(“42”);

llHTTPRequest(url, [HTTP_METHOD, “POST”]);

Library.llHTTPRequest(url, new ArrayList(new object[]{HTTP_METHOD, "POST"});

new HttpRequest().Url(url).Method(“POST”).Request();

•   Vector
•   Quaternion
•   Parsing and Formatting
•   ArrayList or object[]
•   FooBuilders?
•   Versioning?
C# Event Handling
      public class EventExample : Script
      {
         public override void OnRez(int param)
         {
            Touch = new Script.TouchDelegate(Touch);
         }

          void Touch(int num)
          {
              Libary.llSay(0, "Turning off...");
              Touch = null;
          }
      }

•   Subclass SecondLife.Script
•   Override OnFoo Event Handlers
•   Register Delegates
•   Events?                                Image keankelly
C# Libraries




• Scope?
• Naming?
• Versioning?
Future




•   F#/Boo/Haskell...       Image The New Media Consortium

•   IronPython/Ruby/JS...
•   IDE Integration
•   Client Side Scripting
•   Debugging?
How Can You Help?




                                    Image Atomo Hosho

 •   Publish current C# API soon
 •   Public C# beta this summer
 •   Snowglobe open source viewer
 •   Talk now!
Thank You




•   Jim Purbrick
•   Babbage Linden
•   babbage@lindenlab.com
•   http://blog.lindenlab.com
•   http://jimpurbrick.com

More Related Content

Recently uploaded

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMKumar Satyam
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Zilliz
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAnitaRaj43
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKJago de Vreede
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelDeepika Singh
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdfSandro Moreira
 

Recently uploaded (20)

Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Introduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDMIntroduction to use of FHIR Documents in ABDM
Introduction to use of FHIR Documents in ABDM
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)Introduction to Multilingual Retrieval Augmented Generation (RAG)
Introduction to Multilingual Retrieval Augmented Generation (RAG)
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
AI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by AnitarajAI in Action: Real World Use Cases by Anitaraj
AI in Action: Real World Use Cases by Anitaraj
 
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUKSpring Boot vs Quarkus the ultimate battle - DevoxxUK
Spring Boot vs Quarkus the ultimate battle - DevoxxUK
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot ModelMcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
Mcleodganj Call Girls 🥰 8617370543 Service Offer VIP Hot Model
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
 
[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf[BuildWithAI] Introduction to Gemini.pdf
[BuildWithAI] Introduction to Gemini.pdf
 

Featured

PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024Neil Kimberley
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)contently
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024Albert Qian
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsKurio // The Social Media Age(ncy)
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Search Engine Journal
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summarySpeakerHub
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next Tessa Mero
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentLily Ray
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best PracticesVit Horky
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project managementMindGenius
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...RachelPearson36
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Applitools
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at WorkGetSmarter
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...DevGAMM Conference
 

Featured (20)

Skeleton Culture Code
Skeleton Culture CodeSkeleton Culture Code
Skeleton Culture Code
 
PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024PEPSICO Presentation to CAGNY Conference Feb 2024
PEPSICO Presentation to CAGNY Conference Feb 2024
 
Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 

Building The Virtual Babel: Mono In Second Life

  • 1. Building A Virtual Babel: Mono In Second Life Dr Jim Purbrick, Technical Director, Linden Lab FOSDEM 2010
  • 2. Second Life At 6 http://flickr.com/photos/rorowe/2650727613/sizes/o/
  • 4. Second Life Today 87K 600 2 miles of land 25K peak concurrency cores 80M running scripts 150 + US$47M user-to-user countries 800GB new content/day transactions/mo 40M 390TB US$10M user hours/mo content exchanged/mo 769K 12Gb data/s repeat logins/mo
  • 5. Pixie Dust • Animations • Dancing • Vehicles • Seats • Games, guns • Doors, elevators, teleporters • Big, tiny, non-human avatars • Chickens, dogs, bunnies, wildlife • Customizable hair, shoes, furniture • In world vendors and web sales Image Moon over Belgium
  • 6. Scripting Second Life • Scripts in prims Image Suzanne Graves • Prims linked to make objects • Sensors and effectors via library calls • Communication via IM, email, XMLRPC, HTTP • Untrusted code • 2000 scripts per process • Migration between processes
  • 7. LSL • C-Like Language • Vectors and Rotations (DSL!) default • Static Types (6!) { state_entry() • Heterogenous Lists { • States llSay(0, "Hello, Avatar!"); • Textbook 16KB Bytecode VM } • Easy Migration touch(integer total_number) • Easy Scheduling { • Easy Sandboxing (Maybe?) llSay(0, "Touched."); } • Slow } • Inconsistent
  • 8. LSL On Mono Image Ganymedes Costagravas • Rewrite assemblies for concurrency and mobilty • Induce stack state (Verification) • Rewrite bytecode (Reflection.Emit, RAIL, cecil) • Inject microthreading (JavaGoX, Brakes) • Serialize stack and heap, transfer assemblies • Migrate assemblies between app domains to unload • Subvert profiler for resource limitation
  • 9. Migrating Managed Pointers • LSL value semantics • CIL pushes MP • Can’t copy to heap • Step back through CIL • Copy operands to heap Image Bettina Tizzy • Run CIL on restore • Resythesise MP • Microthread all CIL
  • 10. Memory Allocation Monitoring Image Ka Rasmuson • Walk object tree between time slices • Concatenation allows rapid memory consumption • Limit length of lists and strings • Hard limit on allocation size • Exceptions would have been better • Lucky scheduling gives temporary memory boost • Yield whenever memory limit might be reached
  • 11. Scheduling • Check time at yield points • System call gates execution • Execution time very variable • Adaptive timer skipping • Flywheel exploits Image juria yoshikawa • Marshalling new bottle neck
  • 12. Managed Execution After A SEGV • Emergency state save • Mono replaces handlers • Disable garbage collection Image The New Media Consortium • Chain signal handlers • Definitely void warranty • Contributed signal chaining
  • 13. Memory Model • Script Limits • Resource Pools • Big Scripts • Efficient Scripts • Bytecode Sharing
  • 14. C# • Arrays • Primitive Types • Enumerations • User Defined Types • Exceptions • Ecosystem Image Betina Tizzy
  • 15. Complete UThreadInjector • Full CIL Instruction Set • RAIL or Cecil? • Generics? Image Gita Rau
  • 16. Build Sandbox • Moonlight? • CoreCLR Security? • Embedded Mono? • Assembly Markup? Image Raul Crimson
  • 17. C# API Image Gita Rau • Library.llFoo Methods • System.Collections • System.Security.Crytography • XML? • Web? • .NET to Silverlight machinery?
  • 18. C# Types list l = [“foo”,42] ArrayList l = new ArrayList(new object[]{“foo”,42}) List l = new List().Add(“foo”).Add(“42”); llHTTPRequest(url, [HTTP_METHOD, “POST”]); Library.llHTTPRequest(url, new ArrayList(new object[]{HTTP_METHOD, "POST"}); new HttpRequest().Url(url).Method(“POST”).Request(); • Vector • Quaternion • Parsing and Formatting • ArrayList or object[] • FooBuilders? • Versioning?
  • 19. C# Event Handling public class EventExample : Script { public override void OnRez(int param) { Touch = new Script.TouchDelegate(Touch); } void Touch(int num) { Libary.llSay(0, "Turning off..."); Touch = null; } } • Subclass SecondLife.Script • Override OnFoo Event Handlers • Register Delegates • Events? Image keankelly
  • 20. C# Libraries • Scope? • Naming? • Versioning?
  • 21. Future • F#/Boo/Haskell... Image The New Media Consortium • IronPython/Ruby/JS... • IDE Integration • Client Side Scripting • Debugging?
  • 22. How Can You Help? Image Atomo Hosho • Publish current C# API soon • Public C# beta this summer • Snowglobe open source viewer • Talk now!
  • 23. Thank You • Jim Purbrick • Babbage Linden • babbage@lindenlab.com • http://blog.lindenlab.com • http://jimpurbrick.com