Talk at Stanford's CS442 (High Productivity and Performance with Domain Specific Languages in Scala http://www.stanford.edu/class/cs442/), on Rogue. 5/24/2011
Scala Days 2011 - Rogue: A Type-Safe DSL for MongoDBjorgeortiz85
This document summarizes a presentation about Rogue, a Scala DSL for MongoDB. Some key points:
- Rogue allows type-safe querying of MongoDB with features like filters, pagination, and awareness of indexes.
- It uses phantom types to prevent issues like multiple selects or limits.
- Queries can be logged and validated.
- Future goals include iteratees for cursors, compile-time checking, and generating JavaScript for map-reduce.
Solr provides concise summaries of key points from the document:
1. Solr discusses its search architecture including the use of Thrift for service encapsulation and reduced network traffic. Only IDs are returned from searches to reduce index size and enable easy scaling of primary key lookups.
2. Load balancing is discussed, including an algorithm that hashes the query and number of servers to provide server affinity while distributing load evenly.
3. Replication of the index is covered, including challenges with multicast and an implementation using BitTorrent to efficiently replicate files.
Presented by Gregg Donovan, Senior Software Engineer, Etsy.com, Inc.
Understanding the impact of garbage collection, both at a single node and a cluster level, is key to developing high-performance, high-availability Solr and Lucene applications. After a brief overview of garbage collection theory, we will review the design and use of the various collectors in the JVM.
At a single-node level, we will explore GC monitoring -- how to understand GC logs, how to monitor what % of your Solr request time is spend on GC, how to use VisualGC, YourKit, and other tools, and what to log and monitor. We will review GC tuning and how to measure success.
At a cluster-level, we will review how to design for partial availability -- how to avoid sending requests to a GCing node and how to be resilient to mid-request GC pauses.For application development, we will review common memory leak scenarios in custom Solr and Lucene application code and how to detect them.
The Ring programming language version 1.4.1 book - Part 13 of 31Mahmoud Samir Fayed
This document provides documentation on Ring's web library API for generating HTML pages and elements. It describes classes and methods for creating pages, adding content and attributes, handling forms, and more. The Page class allows adding various HTML elements to the page content through methods like text(), html(), h1(), etc. The Application class contains methods for encoding, cookies, and page structure. WebLib enables generating complete HTML pages in Ring code.
The Ring programming language version 1.9 book - Part 53 of 210Mahmoud Samir Fayed
This document provides code examples and documentation for Ring's web application framework. It includes code for user authentication using a database, classes for database access and web controllers, and descriptions of the main classes and methods in the WebLib API for generating HTML pages and handling requests. The document covers key concepts like generating pages dynamically based on request parameters, working with databases using Model classes, and common tasks like cookies, file uploads, and URL encoding.
Solr & Lucene at Etsy provides concise summaries of Gregg Donovan's experience using Solr and Lucene at Etsy and TheLadders, including optimizing Solr out-of-the-box, customizing at a low level, and knowing when each approach is best. The document also shares various techniques for improving relevance, performance, and customization including external file fields, boosting queries, impression tracking, and more.
Solr & Lucene at Etsy provides concise summaries of Gregg Donovan's experience using Solr and Lucene at Etsy and TheLadders, including optimizing Solr out-of-the-box, customizing at a low level, and continuous deployment practices. The document also shares techniques for cheap performance wins, indexing, ranking, caching, profiling, alerting, and internationalization.
DBIx::Lite is a minimal ORM that allows interacting with databases without declaring classes. It provides simple APIs for CRUD operations by chaining methods on a ResultSet object. The key components are DBIx::Lite, which represents the database connection, DBIx::Lite::ResultSet for query results, and DBIx::Lite::Row for row objects. The DBIx::Lite::Schema manages table metadata like primary keys and relationships. While easy to start with, some features require extending the base classes, and row classes are not automatically loaded.
Scala Days 2011 - Rogue: A Type-Safe DSL for MongoDBjorgeortiz85
This document summarizes a presentation about Rogue, a Scala DSL for MongoDB. Some key points:
- Rogue allows type-safe querying of MongoDB with features like filters, pagination, and awareness of indexes.
- It uses phantom types to prevent issues like multiple selects or limits.
- Queries can be logged and validated.
- Future goals include iteratees for cursors, compile-time checking, and generating JavaScript for map-reduce.
Solr provides concise summaries of key points from the document:
1. Solr discusses its search architecture including the use of Thrift for service encapsulation and reduced network traffic. Only IDs are returned from searches to reduce index size and enable easy scaling of primary key lookups.
2. Load balancing is discussed, including an algorithm that hashes the query and number of servers to provide server affinity while distributing load evenly.
3. Replication of the index is covered, including challenges with multicast and an implementation using BitTorrent to efficiently replicate files.
Presented by Gregg Donovan, Senior Software Engineer, Etsy.com, Inc.
Understanding the impact of garbage collection, both at a single node and a cluster level, is key to developing high-performance, high-availability Solr and Lucene applications. After a brief overview of garbage collection theory, we will review the design and use of the various collectors in the JVM.
At a single-node level, we will explore GC monitoring -- how to understand GC logs, how to monitor what % of your Solr request time is spend on GC, how to use VisualGC, YourKit, and other tools, and what to log and monitor. We will review GC tuning and how to measure success.
At a cluster-level, we will review how to design for partial availability -- how to avoid sending requests to a GCing node and how to be resilient to mid-request GC pauses.For application development, we will review common memory leak scenarios in custom Solr and Lucene application code and how to detect them.
The Ring programming language version 1.4.1 book - Part 13 of 31Mahmoud Samir Fayed
This document provides documentation on Ring's web library API for generating HTML pages and elements. It describes classes and methods for creating pages, adding content and attributes, handling forms, and more. The Page class allows adding various HTML elements to the page content through methods like text(), html(), h1(), etc. The Application class contains methods for encoding, cookies, and page structure. WebLib enables generating complete HTML pages in Ring code.
The Ring programming language version 1.9 book - Part 53 of 210Mahmoud Samir Fayed
This document provides code examples and documentation for Ring's web application framework. It includes code for user authentication using a database, classes for database access and web controllers, and descriptions of the main classes and methods in the WebLib API for generating HTML pages and handling requests. The document covers key concepts like generating pages dynamically based on request parameters, working with databases using Model classes, and common tasks like cookies, file uploads, and URL encoding.
Solr & Lucene at Etsy provides concise summaries of Gregg Donovan's experience using Solr and Lucene at Etsy and TheLadders, including optimizing Solr out-of-the-box, customizing at a low level, and knowing when each approach is best. The document also shares various techniques for improving relevance, performance, and customization including external file fields, boosting queries, impression tracking, and more.
Solr & Lucene at Etsy provides concise summaries of Gregg Donovan's experience using Solr and Lucene at Etsy and TheLadders, including optimizing Solr out-of-the-box, customizing at a low level, and continuous deployment practices. The document also shares techniques for cheap performance wins, indexing, ranking, caching, profiling, alerting, and internationalization.
DBIx::Lite is a minimal ORM that allows interacting with databases without declaring classes. It provides simple APIs for CRUD operations by chaining methods on a ResultSet object. The key components are DBIx::Lite, which represents the database connection, DBIx::Lite::ResultSet for query results, and DBIx::Lite::Row for row objects. The DBIx::Lite::Schema manages table metadata like primary keys and relationships. While easy to start with, some features require extending the base classes, and row classes are not automatically loaded.
Part of the JavaScript training series offered by Bitovi. Full course schedule is available here: http://blog.bitovi.com/free-weekly-online-javascript-training/
The document discusses various techniques in Perl for dealing with reference cycles and memory leaks caused by strong references, including using weak references, extracting needed data from objects before destroying them, and passing objects into subroutines to avoid capturing them. It also discusses analogous techniques used in Objective-C like weak references and guard objects to break cycles.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
The Ring programming language version 1.2 book - Part 19 of 84Mahmoud Samir Fayed
The document describes object-oriented programming concepts in Ring, including defining classes with attributes and methods, creating objects, accessing object data and methods using dot notation and braces, initializing objects, inheritance, private members, and other OOP features. Key classes like Point are defined and used to demonstrate how to set attributes, call methods, pass objects to functions, and more.
Patterns for slick database applicationsSkills Matter
Slick is Typesafe's open source database access library for Scala. It features a collection-style API, compact syntax, type-safe, compositional queries and explicit execution control. Community feedback helped us to identify common problems developers are facing when writing Slick applications. This talk suggests particular solutions to these problems. We will be looking at reducing boiler-plate, re-using code between queries, efficiently modeling object references and more.
The document discusses abstract syntax trees (ASTs) and parsing of code. It provides examples of parsing JavaScript code into tokens and then building a syntax tree. It also discusses common JavaScript parsers like Esprima and Acorn, and AST specifications like ESTree. Homomorphic parsing is shown where code and AST are equivalent. Common uses of ASTs include transpilation, linting, minification, and code transformation.
This C++ program implements a student record management system using binary search trees and file handling. The program defines a Student class with fields like registration number, name, address etc. and methods to insert, search, delete and display student records from binary search indexed text files. The main function provides a menu to call these class methods to manage the student records stored in files.
The document provides an overview of the Ruby programming language with sections on installation, data types, operators, control structures, methods, classes and modules. It discusses key aspects of Ruby like its object oriented nature, dynamic typing, syntax and cross-platform capabilities. The document serves as a quick tour of the Ruby language covering its basic concepts, structures and features.
As a result of an engine rewrite with focus on more efficient data structures, PHP 7 offers much improved performance and memory usage. This session describes important aspects of the new implementation and how it compares to PHP 5. A particular focus will be on the representation of values, arrays and objects.
PHP 7 – What changed internally? (Forum PHP 2015)Nikita Popov
One of the main selling points of PHP 7 is greatly improved performance, with many real-world applications now running twice as fast… But where do these improvements come from?
At the core of PHP 7 lies an engine rewrite with focus on improving memory usage and performance. This talk provides an overview of the most significant changes, briefly covering everything from data structure changes, over enhancements in the executor, to the new compiler implementation.
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber
The document provides rules and tools for debugging. It discusses understanding the system, making failures reproducible, quitting thinking and closely observing behaviors, dividing problems into smaller pieces, changing one thing at a time, and maintaining an audit trail of changes. Tools mentioned include Xdebug, Selenium, PHPUnit, strace, and source control systems. Logging, instrumentation, and testing techniques are also covered.
Teaching Your Machine To Find FraudstersIan Barber
The slides from my talk at PHP Tek 11.
When dealing with money online, fraud is an ongoing problem for both
consumers and sellers. Researchers have been developing statistical
and machine learning techniques to detect shady sellers on auction
sites, spot fraudulent payments on e-commerce systems and catch click
fraud on adverts. While there is no silver bullet, you will learn to
flag suspicious activity and help protect your site from scammers
using PHP and a little help from some other technologies.
This document contains code snippets for connecting to and extracting information from various data sources and applications using PHP, including:
1. Connecting to Microsoft Word and extracting the subject text from a document.
2. Retrieving thumbnail images from Adobe Lightroom files.
3. Accessing elevation data from SRTM files by calculating file offsets.
4. Sending SNMP traps containing error information from a RADIUS monitoring script.
5. Connecting to an Avaya OSSIS system using telnet and extracting field data.
The document discusses a "Just Another Perl Hacker" (JAPH) obfuscated code challenge that generates random text through a series of seeds and offsets. It then analyzes the Perl code to deobfuscate how it works by seeding a pseudo-random number generator, taking offsets, and gathering random characters to build the output string. Several pseudo-random number generation techniques are also briefly described including the middle square method.
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
The Ring programming language version 1.8 book - Part 50 of 202Mahmoud Samir Fayed
The Page class contains methods for generating HTML elements and adding content to web pages. It includes methods for common elements like headings, paragraphs, links, forms, tables, and more. Each method accepts a parameter that allows setting attributes of the element through a list. This allows generating HTML elements with customized attributes in a simple way.
The Ring programming language version 1.10 book - Part 47 of 212Mahmoud Samir Fayed
This document summarizes the methods available in various Ring classes for data types, conversions, databases, security, and internet functions. It provides examples of using each class and the output. The DataType class allows checking value types and properties. The Conversion class converts between data types. Database classes like ODBC, MySQL, SQLite and PostgreSQL provide methods for connecting to databases and executing queries. The Security class implements hashing and encryption algorithms. The Internet class allows downloading files and sending emails.
The document discusses RxSwift, which is a library for reactive programming with Swift. It combines ReactiveX with Swift by providing Observables and Observers. Observables allow data streams to be observed and manipulated through operators like map, filter, etc. The document provides examples of using RxSwift to validate a password field by observing text changes and mapping valid/invalid states to display feedback. It also shows an example of observing a nickname field to call an API on valid input. Overall, the document introduces the key concepts of RxSwift like Observables, Observers, operators, and provides examples of validating user input fields reactively.
1) This document provides examples of how to use Spark DataFrames and SQL to load and analyze Iris flower data. It shows how to load data from files and Kafka, define schemas, select, filter, sort, group, and join dataframes.
2) Methods like spark.read, dataframe.select(), dataframe.filter(), and dataframe.groupBy() are used to load and query the data. StructType and case classes define the schema. SQL statements can also be used via the sqlContext.
3) User defined functions (UDFs) are demonstrated to handle custom data types like maps. The examples provide an overview of basic Spark DataFrame and SQL functionality.
Foursquare uses MongoDB to power their location-based social network. They have over 9 million users generating around 3 million check-ins per day across over 15 million venues. Foursquare chose MongoDB because it is fast, supports rich queries, sharding, replication, and geo-indexes. Foursquare runs 8 MongoDB clusters across around 40 machines storing over 2.3 billion records and handling around 15,000 queries per second. They developed Rogue, a Scala DSL for MongoDB, to make queries type-safe and add features like pagination, logging, and index awareness.
This document discusses refactoring Java code to Clojure using macros. It provides examples of refactoring Java code that uses method chaining to equivalent Clojure code using the threading macros (->> and -<>). It also discusses other Clojure features like type hints, the doto macro, and polyglot projects using Leiningen.
Part of the JavaScript training series offered by Bitovi. Full course schedule is available here: http://blog.bitovi.com/free-weekly-online-javascript-training/
The document discusses various techniques in Perl for dealing with reference cycles and memory leaks caused by strong references, including using weak references, extracting needed data from objects before destroying them, and passing objects into subroutines to avoid capturing them. It also discusses analogous techniques used in Objective-C like weak references and guard objects to break cycles.
An Elephant of a Different Colour: HackVic Metcalfe
Slides from my GTA-PHP Meetup talk about Hack which is the Facebook version of the PHP programming language which runs under their HHVM runtime environment for PHP. The focus of my talk was the language improvements that the Facebook team has added to PHP.
There's a lot of information in the presenter's notes, so if you're interested in Hack scroll down to see the extras.
The Ring programming language version 1.2 book - Part 19 of 84Mahmoud Samir Fayed
The document describes object-oriented programming concepts in Ring, including defining classes with attributes and methods, creating objects, accessing object data and methods using dot notation and braces, initializing objects, inheritance, private members, and other OOP features. Key classes like Point are defined and used to demonstrate how to set attributes, call methods, pass objects to functions, and more.
Patterns for slick database applicationsSkills Matter
Slick is Typesafe's open source database access library for Scala. It features a collection-style API, compact syntax, type-safe, compositional queries and explicit execution control. Community feedback helped us to identify common problems developers are facing when writing Slick applications. This talk suggests particular solutions to these problems. We will be looking at reducing boiler-plate, re-using code between queries, efficiently modeling object references and more.
The document discusses abstract syntax trees (ASTs) and parsing of code. It provides examples of parsing JavaScript code into tokens and then building a syntax tree. It also discusses common JavaScript parsers like Esprima and Acorn, and AST specifications like ESTree. Homomorphic parsing is shown where code and AST are equivalent. Common uses of ASTs include transpilation, linting, minification, and code transformation.
This C++ program implements a student record management system using binary search trees and file handling. The program defines a Student class with fields like registration number, name, address etc. and methods to insert, search, delete and display student records from binary search indexed text files. The main function provides a menu to call these class methods to manage the student records stored in files.
The document provides an overview of the Ruby programming language with sections on installation, data types, operators, control structures, methods, classes and modules. It discusses key aspects of Ruby like its object oriented nature, dynamic typing, syntax and cross-platform capabilities. The document serves as a quick tour of the Ruby language covering its basic concepts, structures and features.
As a result of an engine rewrite with focus on more efficient data structures, PHP 7 offers much improved performance and memory usage. This session describes important aspects of the new implementation and how it compares to PHP 5. A particular focus will be on the representation of values, arrays and objects.
PHP 7 – What changed internally? (Forum PHP 2015)Nikita Popov
One of the main selling points of PHP 7 is greatly improved performance, with many real-world applications now running twice as fast… But where do these improvements come from?
At the core of PHP 7 lies an engine rewrite with focus on improving memory usage and performance. This talk provides an overview of the most significant changes, briefly covering everything from data structure changes, over enhancements in the executor, to the new compiler implementation.
Debugging: Rules And Tools - PHPTek 11 VersionIan Barber
The document provides rules and tools for debugging. It discusses understanding the system, making failures reproducible, quitting thinking and closely observing behaviors, dividing problems into smaller pieces, changing one thing at a time, and maintaining an audit trail of changes. Tools mentioned include Xdebug, Selenium, PHPUnit, strace, and source control systems. Logging, instrumentation, and testing techniques are also covered.
Teaching Your Machine To Find FraudstersIan Barber
The slides from my talk at PHP Tek 11.
When dealing with money online, fraud is an ongoing problem for both
consumers and sellers. Researchers have been developing statistical
and machine learning techniques to detect shady sellers on auction
sites, spot fraudulent payments on e-commerce systems and catch click
fraud on adverts. While there is no silver bullet, you will learn to
flag suspicious activity and help protect your site from scammers
using PHP and a little help from some other technologies.
This document contains code snippets for connecting to and extracting information from various data sources and applications using PHP, including:
1. Connecting to Microsoft Word and extracting the subject text from a document.
2. Retrieving thumbnail images from Adobe Lightroom files.
3. Accessing elevation data from SRTM files by calculating file offsets.
4. Sending SNMP traps containing error information from a RADIUS monitoring script.
5. Connecting to an Avaya OSSIS system using telnet and extracting field data.
The document discusses a "Just Another Perl Hacker" (JAPH) obfuscated code challenge that generates random text through a series of seeds and offsets. It then analyzes the Perl code to deobfuscate how it works by seeding a pseudo-random number generator, taking offsets, and gathering random characters to build the output string. Several pseudo-random number generation techniques are also briefly described including the middle square method.
PhoneGap: Local Storage
This presentation has been developed in the context of the Mobile Applications Development course, DISIM, University of L'Aquila (Italy), Spring 2013.
http://www.ivanomalavolta.com
The Ring programming language version 1.8 book - Part 50 of 202Mahmoud Samir Fayed
The Page class contains methods for generating HTML elements and adding content to web pages. It includes methods for common elements like headings, paragraphs, links, forms, tables, and more. Each method accepts a parameter that allows setting attributes of the element through a list. This allows generating HTML elements with customized attributes in a simple way.
The Ring programming language version 1.10 book - Part 47 of 212Mahmoud Samir Fayed
This document summarizes the methods available in various Ring classes for data types, conversions, databases, security, and internet functions. It provides examples of using each class and the output. The DataType class allows checking value types and properties. The Conversion class converts between data types. Database classes like ODBC, MySQL, SQLite and PostgreSQL provide methods for connecting to databases and executing queries. The Security class implements hashing and encryption algorithms. The Internet class allows downloading files and sending emails.
The document discusses RxSwift, which is a library for reactive programming with Swift. It combines ReactiveX with Swift by providing Observables and Observers. Observables allow data streams to be observed and manipulated through operators like map, filter, etc. The document provides examples of using RxSwift to validate a password field by observing text changes and mapping valid/invalid states to display feedback. It also shows an example of observing a nickname field to call an API on valid input. Overall, the document introduces the key concepts of RxSwift like Observables, Observers, operators, and provides examples of validating user input fields reactively.
1) This document provides examples of how to use Spark DataFrames and SQL to load and analyze Iris flower data. It shows how to load data from files and Kafka, define schemas, select, filter, sort, group, and join dataframes.
2) Methods like spark.read, dataframe.select(), dataframe.filter(), and dataframe.groupBy() are used to load and query the data. StructType and case classes define the schema. SQL statements can also be used via the sqlContext.
3) User defined functions (UDFs) are demonstrated to handle custom data types like maps. The examples provide an overview of basic Spark DataFrame and SQL functionality.
Foursquare uses MongoDB to power their location-based social network. They have over 9 million users generating around 3 million check-ins per day across over 15 million venues. Foursquare chose MongoDB because it is fast, supports rich queries, sharding, replication, and geo-indexes. Foursquare runs 8 MongoDB clusters across around 40 machines storing over 2.3 billion records and handling around 15,000 queries per second. They developed Rogue, a Scala DSL for MongoDB, to make queries type-safe and add features like pagination, logging, and index awareness.
This document discusses refactoring Java code to Clojure using macros. It provides examples of refactoring Java code that uses method chaining to equivalent Clojure code using the threading macros (->> and -<>). It also discusses other Clojure features like type hints, the doto macro, and polyglot projects using Leiningen.
Apache Spark for Library Developers with William Benton and Erik ErlandsonDatabricks
As a developer, data engineer, or data scientist, you’ve seen how Apache Spark is expressive enough to let you solve problems elegantly and efficient enough to let you scale out to handle more data. However, if you’re solving the same problems again and again, you probably want to capture and distribute your solutions so that you can focus on new problems and so other people can reuse and remix them: you want to develop a library that extends Spark.
You faced a learning curve when you first started using Spark, and you’ll face a different learning curve as you start to develop reusable abstractions atop Spark. In this talk, two experienced Spark library developers will give you the background and context you’ll need to turn your code into a library that you can share with the world. We’ll cover: Issues to consider when developing parallel algorithms with Spark, Designing generic, robust functions that operate on data frames and datasets, Extending data frames with user-defined functions (UDFs) and user-defined aggregates (UDAFs), Best practices around caching and broadcasting, and why these are especially important for library developers, Integrating with ML pipelines, Exposing key functionality in both Python and Scala, and How to test, build, and publish your library for the community.
We’ll back up our advice with concrete examples from real packages built atop Spark. You’ll leave this talk informed and inspired to take your Spark proficiency to the next level and develop and publish an awesome library of your own.
Map/reduce, geospatial indexing, and other cool features (Kristina Chodorow)MongoSF
The document appears to be notes from a MongoDB training session that discusses various MongoDB features like MapReduce, geospatial indexes, and GridFS. It also covers topics like database commands, indexing, and querying documents with embedded documents and arrays. Examples are provided for how to implement many of these MongoDB features and functions.
Functional programming avoids changing-state and mutable data. Referential transparency means expressions can be replaced without affecting observable behavior. Pure functions only depend on argument values and have no other effects. Case classes provide functionality like equals, hashCode and pattern matching out of the box. Futures allow running blocking operations asynchronously and chaining results with map, flatMap and for comprehensions. Implicits allow type conversions and providing parameters implicitly. Sealed classes allow exhaustive pattern matching of a type hierarchy.
My name is Neta Barkay , and I'm a data scientist at LivePerson.
I'd like to share with you a talk I presented at the Underscore Scala community on "Efficient MapReduce using Scalding".
In this talk I reviewed why Scalding fits big data analysis, how it enables writing quick and intuitive code with the full functionality vanilla MapReduce has, without compromising on efficient execution on the Hadoop cluster. In addition, I presented some examples of Scalding jobs which can be used to get you started, and talked about how you can use Scalding's ecosystem, which includes Cascading and the monoids from Algebird library.
Read more & Video: https://connect.liveperson.com/community/developers/blog/2014/02/25/scalding-reaching-efficient-mapreduce
Apple's Swift has achieved the top place in Stack Overflow's "Most Loved" list of programming languages in its 2015 Developer Survey. Based on information gleaned from GitHub and Stack Overflow, analyst firm RedMonk has seen Swift's popularity ranking soar from 68 to 22 in an unprecedented 6 months.
The "Extreme Swift" event does not require advanced, or even any, knowledge of Swift. Learn about some of the more outrageous features of the language which help explain what the fuss is all about!
Never look at programming the same way again — even if you never end up writing a single line of Swift code in your life.
The document describes MOBL, a programming language for building mobile web applications. MOBL aims to provide a small core language with large and extensible libraries. It includes built-in types, controls, and abstraction mechanisms like screens and functions. The language exposes low-level primitives while providing a native interface to external APIs. MOBL code can be deployed by concatenating, eliminating dead code, and minifying for client-side execution on mobile browsers. The language has been publicly released since January 2011 and sees over 1,000 visitors per day, with ongoing development focused on error handling, data evolution, documentation and libraries.
This document summarizes a talk given about Nokia's migration to Scala for its Places API. The key points are:
1) Nokia migrated its Places API codebase to Scala to take advantage of Scala's features like its powerful type system, immutable data structures, and functional programming capabilities.
2) The migration was done gradually over time while continuing to develop new features. They discovered many benefits of Scala along the way like improved test readability and JSON parsing capabilities.
3) Nokia uses Scala features like case classes, options, and functions to model data and add type safety to its codebase. This uncovered bugs that would have been hard to find in Java.
This document is a tutorial for the ScalikeJDBC library. It introduces ScalikeJDBC as a tidy SQL-based database access library for Scala developers. It covers key topics like the connection pool, implicit sessions, SQL syntax, the query DSL, testing support, and integration with Play. The tutorial aims to help beginners get started with ScalikeJDBC's main features.
From mysql to MongoDB(MongoDB2011北京交流会)Night Sailer
The document summarizes differences between MySQL and MongoDB data types and operations. MongoDB uses BSON for data types rather than separate numeric, text and blob types. It supports embedded documents and arrays. Unlike MySQL, MongoDB does not have tables or rows, but collections and documents. Operations like insert, update, find, sort and index are discussed as alternatives to SQL equivalents.
The Ring programming language version 1.5.3 book - Part 54 of 184Mahmoud Samir Fayed
The document discusses Ring code for database and web application classes and functions. It includes classes for Database, ModelBase, ControllerBase, and View classes. ModelBase handles database operations like insert, update, delete. ControllerBase handles routing and common functions. WebLib contains functions for loading variables, creating pages, encoding special characters, and templating.
The Ring programming language version 1.5.3 book - Part 44 of 184Mahmoud Samir Fayed
This document provides code examples for classes used in a web application framework in Ring. It includes the Database, ModelBase, and ControllerBase classes which handle database connectivity and operations. It also includes an overview of the WebLib API which provides functions and classes for generating HTML pages and elements. Some key classes described are Page, Form, Table, and classes to generate specific HTML elements like Div, Link, Image etc.
The Ring programming language version 1.7 book - Part 48 of 196Mahmoud Samir Fayed
This document provides code examples and documentation for Ring's web library (weblib.ring). It describes classes and methods for generating HTML pages, forms, tables and other elements. This includes the Page class for adding common elements like text, headings, paragraphs etc., the Application class for handling requests, cookies and encoding, and classes representing various HTML elements like forms, inputs, images etc. It also provides an overview of how to create pages dynamically using View and Controller classes along with Model classes for database access.
The document discusses Java and the benefits of Groovy compared to Java. It covers boilerplate code and ceremony in Java that can be reduced using Groovy. Examples are provided demonstrating Groovy's syntax for primitives, collections like lists and maps, closures, IO operations, XML processing, and a DSL. The document recommends Groovy for its duck typing, operators, and safe navigation operator to avoid null pointer exceptions.
Mastering Java Bytecode With ASM - 33rd degree, 2012Anton Arhipov
The document discusses bytecode and the ASM library for manipulating Java bytecode. It provides an overview of bytecode structure and instructions. ASM is introduced as a low-level API for working with bytecode using visitors and nodes. Examples are given for generating bytecode using ASM, such as creating a ClassWriter, visiting classes, fields and methods, and generating instructions.
Monitoring Your ISP Using InfluxDB Cloud and Raspberry PiInfluxData
When a large group of people change their habits, it can be tricky for infrastructures! Working from home and spending time indoor today means attending video calls and streaming movies and tv shows. This leads to increased internet traffic that can create congestion on the network infrastructure. So how do you get real-time visibility into your ISP connection? In this meetup, Mirko presents his setup based on a time series database and Raspberry Pi to better understand his ISP connection quality and speed — including upload and download speeds. Join us to discover how he does it using Telegraf, InfluxDB Cloud, Astro Pi, Telegram and Grafana! Finally, proof that your ISP connection is (or is not) as fast as it promises.
Ähnlich wie CS442 - Rogue: A Scala DSL for MongoDB (20)
Monitoring Your ISP Using InfluxDB Cloud and Raspberry Pi
CS442 - Rogue: A Scala DSL for MongoDB
1. rogue:
a scala dsl for mongodb
CS442 - 5/24/2011
Jorge Ortiz (@jorgeortiz85)
2. what is foursquare?
location-based social network - “check-in” to bars,
restaurants, museums, parks, etc
friend-finder (where are my friends right now?)
virtual game (badges, points, mayorships)
city guide (local, personalized recommendations)
location diary + stats engine (where was I a year ago?)
specials (get rewards at your favorite restaurant)
4. foursquare: the tech
Nginx, HAProxy
Scala, Lift
MongoDB, PostgreSQL (legacy)
(Kestrel, Munin, Ganglia, Python, Memcache, ...)
All on EC2
5. what is mongodb?
fast, schema-less document store
indexes & rich queries on any attribute
sharding, auto-balancing
replication
geo-indexes
6. mongodb: our numbers
8 clusters
some sharded, some not
some master/slave, some replica set
~40 machines (68.4GB, m2.4xl on EC2)
2.3 billion records
~15k QPS
10. mongodb: query example
val query =
(BasicDBOBjectBuilder
.start
.push(“mayorid”)
.add(“$lte”, 100)
.pop
.push(“veneuname”)
.add(“$eq”, “Starbucks”)
.pop
.get)
11. rogue: a scala dsl for mongo
type-safe
all mongo query features
logging & validation hooks
pagination
index-aware
cursors
http://github.com/foursquare/rogue
13. rogue: code example
val vs: List[Venue] =
(Venue where (_.mayorid <= 100)
and (_.venuename eqs “Starbucks”)
and (_.tags contains “wifi”)
and (_.latlng near
(39.0, -74.0, Degrees(0.2))
orderDesc (_._id)
fetch (5))