SlideShare ist ein Scribd-Unternehmen logo
1 von 23
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Kürzlich hochgeladen

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusZilliz
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
"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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard37
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontologyjohnbeverley2021
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfOrbitshub
 
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
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...apidays
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxRemote DBA Services
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityWSO2
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDropbox
 

Kürzlich hochgeladen (20)

Exploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with MilvusExploring Multimodal Embeddings with Milvus
Exploring Multimodal Embeddings with Milvus
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
"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 ...
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
JohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptxJohnPollard-hybrid-app-RailsConf2024.pptx
JohnPollard-hybrid-app-RailsConf2024.pptx
 
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
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Six Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal OntologySix Myths about Ontologies: The Basics of Formal Ontology
Six Myths about Ontologies: The Basics of Formal Ontology
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
WSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering DevelopersWSO2's API Vision: Unifying Control, Empowering Developers
WSO2's API Vision: Unifying Control, Empowering Developers
 
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdfRising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
Rising Above_ Dubai Floods and the Fortitude of Dubai International Airport.pdf
 
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
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
Apidays New York 2024 - APIs in 2030: The Risk of Technological Sleepwalk by ...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Vector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptxVector Search -An Introduction in Oracle Database 23ai.pptx
Vector Search -An Introduction in Oracle Database 23ai.pptx
 
Platformless Horizons for Digital Adaptability
Platformless Horizons for Digital AdaptabilityPlatformless Horizons for Digital Adaptability
Platformless Horizons for Digital Adaptability
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 

Empfohlen

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
 

Empfohlen (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