This document discusses various computing concepts related to resources and performance in PHP applications. It covers topics like data storage technologies, areal storage density of hard drives and solid state drives, streams as a way to access input and output generically in PHP, using filters to perform operations on stream data, common issues like running out of memory and how to address them through better programming practices, limitations of CPU and how to distribute load through job queuing, and basics of networking like IP addresses, TCP, and using sockets. The key advice is to assume large amounts of data and potential failures, use appropriate data storage, avoid unnecessary processing in memory, optimize code through profiling, and offload work to other systems when possible.
Serialization is the process of converting an object into a byte stream to store or transmit the object. The document discusses three serialization frameworks: Avro, MessagePack, and Kryo. Avro uses a JSON-defined schema and is created by the creator of Hadoop. MessagePack supports rich data structures like JSON and has interfaces for RPC. Kryo makes serialization easy by collecting serializers by class and supports compression.
This document summarizes a presentation about the speaker's 3 years of experience using Clojure. Some key points include: the speaker wanted an operationally sane environment with good tooling and performance on the JVM; Clojure provided a productive, concise language with an excellent concurrency story and stability; Clojure's consistent, well-designed core and easy upgrades have made it a fun and motivating language to work with.
Developing high-performance network servers in LispVladimir Sedach
Overview of current high-performance Common Lisp web servers and implementation techniques, and description of a new hybrid approach to asynchronous I/O based on separate racing accept() and epoll() thread pools.
OpenNTF Domino API - Overview IntroductionPaul Withers
The document provides an overview of the OpenNTF Domino API (ODA) project. It describes the mission to modernize and extend the Domino API, lists the initial contributors and reasons for starting the project. It outlines the core areas and functionality that ODA has developed over time, including transaction processing, events, email handling, indexing, sorting, and graph implementations. It also describes the project structure and integration with XPages.
This is a presentation for International Lisp Conference 2012 which was held in Kyoto, Japan.
Clack is a web application environment for Common Lisp to make your web applications be portable and reusable by abstracting HTTP into a simple API.
In this paper, I describe what are problems in web development and how Clack solves them.
My talking points for the presentation on optimization of modern web applications. It is a huge topic, and I concentrated mostly on technical aspects of it.
This document discusses various computing concepts related to resources and performance in PHP applications. It covers topics like data storage technologies, areal storage density of hard drives and solid state drives, streams as a way to access input and output generically in PHP, using filters to perform operations on stream data, common issues like running out of memory and how to address them through better programming practices, limitations of CPU and how to distribute load through job queuing, and basics of networking like IP addresses, TCP, and using sockets. The key advice is to assume large amounts of data and potential failures, use appropriate data storage, avoid unnecessary processing in memory, optimize code through profiling, and offload work to other systems when possible.
Serialization is the process of converting an object into a byte stream to store or transmit the object. The document discusses three serialization frameworks: Avro, MessagePack, and Kryo. Avro uses a JSON-defined schema and is created by the creator of Hadoop. MessagePack supports rich data structures like JSON and has interfaces for RPC. Kryo makes serialization easy by collecting serializers by class and supports compression.
This document summarizes a presentation about the speaker's 3 years of experience using Clojure. Some key points include: the speaker wanted an operationally sane environment with good tooling and performance on the JVM; Clojure provided a productive, concise language with an excellent concurrency story and stability; Clojure's consistent, well-designed core and easy upgrades have made it a fun and motivating language to work with.
Developing high-performance network servers in LispVladimir Sedach
Overview of current high-performance Common Lisp web servers and implementation techniques, and description of a new hybrid approach to asynchronous I/O based on separate racing accept() and epoll() thread pools.
OpenNTF Domino API - Overview IntroductionPaul Withers
The document provides an overview of the OpenNTF Domino API (ODA) project. It describes the mission to modernize and extend the Domino API, lists the initial contributors and reasons for starting the project. It outlines the core areas and functionality that ODA has developed over time, including transaction processing, events, email handling, indexing, sorting, and graph implementations. It also describes the project structure and integration with XPages.
This is a presentation for International Lisp Conference 2012 which was held in Kyoto, Japan.
Clack is a web application environment for Common Lisp to make your web applications be portable and reusable by abstracting HTTP into a simple API.
In this paper, I describe what are problems in web development and how Clack solves them.
My talking points for the presentation on optimization of modern web applications. It is a huge topic, and I concentrated mostly on technical aspects of it.
This document provides an overview of PHP extensions, including reasons for creating extensions, the extension development process, and advanced extension topics. Some key points:
- Extensions allow PHP to interface with C/C++ libraries, modify how the PHP engine works, and increase performance of slow code.
- The extension development process includes setting up the compile environment, writing the module definition, adding functions, and testing.
- Advanced topics include using global variables, custom object handling, memory management, and threading safety. Well-documented extensions can be proposed for inclusion in the PECL repository.
Reuven Lerner is a web developer and consultant who primarily works with Ruby on Rails and PostgreSQL. He teaches Rails courses and uses various tools like iTerm2, RVM, IRB gems, Emacs, Firefox plugins, Growl, and Pow in his development environment. Emacs is his editor of choice, which he has highly customized over the years using Lisp functions and key bindings.
Beyond 'Set it and Forget it': Proactively managing your EZproxy serverNASIG
The document provides an overview of a presentation on proactively managing an EZproxy server. It includes an agenda that covers topics like the EZproxy admin interface, audit logs, configuring stanzas, best practices, and the EZproxy Community Center. The presentation aims to help attendees go beyond just setting up EZproxy and instead take a proactive approach to managing it over time through regular monitoring, configuration updates, and security best practices.
How to Write the Fastest JSON Parser/Writer in the WorldMilo Yip
How RapidJSON is developed in order to achieve highest performance among 20 C/C++ JSON libraries. Benchmarks, some C++ design, algorithm and low-level optimizations are covered.
This document discusses concurrency and parallelism in Ruby. It defines concurrency as performing two operations in tandem, while parallelism refers to performing two operations literally at the same time using multiple cores. The document examines traditional approaches to concurrency like threads and locks in Ruby and their limitations. It advocates for adopting models from other languages like actors and software transactional memory that can provide safer concurrency through message passing and transactions rather than shared mutable state and locks. The document reviews several Ruby libraries that implement actors and proposes areas for further improvement in Ruby's core support for concurrent programming.
This document provides an overview of building a command line interface (CLI) application in Go. It discusses UX considerations for CLIs, common CLI patterns and philosophies, and Go-specific topics. Some key points include:
- CLI apps should follow Unix philosophies of being simple, clear, composable, and extensible.
- Common CLI patterns include commands, arguments, options/flags, and subcommands.
- Go is a statically typed, compiled language with built-in concurrency and a large standard library.
- The document concludes by outlining plans to build a sample TODO app in Go called "Tri" to demonstrate CLI design and development.
Talk at RubyKaigi 2015.
Plugin architecture is known as a technique that brings extensibility to a program. Ruby has good language features for plugins. RubyGems.org is an excellent platform for plugin distribution. However, creating plugin architecture is not as easy as writing code without it: plugin loader, packaging, loosely-coupled API, and performance. Loading two versions of a gem is a unsolved challenge that is solved in Java on the other hand.
I have designed some open-source software such as Fluentd and Embulk. They provide most of functions by plugins. I will talk about their plugin-based architecture.
The document provides an overview of Akka HTTP, streams, and routes. It discusses core concepts like streams, elements, back-pressure, sources, sinks, flows, and runnable graphs. It explains that routes define the request handling logic and are assembled into routing trees. Routes can complete requests, reject them, or perform asynchronous processing and return route results.
The document discusses using MongoDB and Go together for painless data storage. Some key points:
- Go is a good language for working with MongoDB as it is fast, friendly to use, and supports concurrency well out of the box.
- MongoDB is also fast and scales well. It uses a flexible document model that maps well to Go's data types.
- The mgo driver makes it easy to connect to MongoDB from Go, perform CRUD operations, and work with data concurrently. Data can be serialized and deserialized to BSON format efficiently.
- Features like GridFS allow storing files within MongoDB, providing replicated file storage.
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010Arun Gupta
1. The document examines advanced features of JAX-RS, the Java API for RESTful web services.
2. It discusses runtime resource resolution, integration with EJB and CDI, runtime content negotiation, conditional HTTP requests, dealing with type erasure, and pluggable exception handling in JAX-RS.
3. The presentation encourages the use of "Software. Hardware. Complete." as the new corporate tagline to replace "Oracle Is the Information Company."
Groovy JSON support and the Boon JSON parser are up to 3x to 5x faster than Jackson at parsing JSON from String and char[], and 2x to 4x faster at parsing byte[].
Groovy JSON support and Boon JSON support are also faster than Jackson at encoding JSON strings. Boon is faster than Jackson at serializing/de-serializing Java instances to/fro JSON. The core of the Boon JSON parser has been forked into Groovy 2.3 (now in Beta). In the process Boon JSON support was improved and further enhanced. Groovy and Boon JSON parsers speeds are equivalent. Groovy now has the fastest JSON parser on the JVM.
Oak, the architecture of Apache Jackrabbit 3Jukka Zitting
Apache Jackrabbit is just about to reach the 3.0 milestone based on a new architecture called Oak. Based on concepts like eventual consistency and multi-version concurrency control, and borrowing ideas from distributed version control systems and cloud-scale databases, the Oak architecture is a major leap ahead for Jackrabbit. This presentation describes the Oak architecture and shows what it means for the scalability and performance of modern content applications. Changes to existing Jackrabbit functionality are described and the migration process is explained.
The document provides an overview and agenda for a presentation titled "The Padawan's Guide to the Dark Side of XPages". The presentation will cover XPages server processing, the Java virtual machine (JVM) and notes storage facility (NSF), memory management, the JavaServer Faces (JSF) lifecycle including event models and performance, and include bonus material. The presenters are Paul Withers and Tim Tripcony, and they aim to help attendees understand more about how XPages work under the hood in order to fear them less.
How to run system administrator recruitment process? By creating platform based on open source parts in just 2 nights! I gave this talk in Poland / Kraków OWASP chapter meeting on 17th October 2013 at our local Google for Entrepreneurs site. It's focused on security and also shows how to create recruitment process in CTF / challenge way.
This story covers mostly security details of this whole platform. There's great chance, that I will give another talk about this system but this time focusing on technical details. Stay tuned ;)
Creating a GraphQL API is more and more common for PHP developers. The task can seem complex but there are a lot of tools to help.
In this talk given at AFUP Paris PHP Meetup, I'm presenting GraphQL and why it is important. Then, I'm having a look at the existing libraries in PHP. Finally, I'm diving in the details of GraphQLite; a library that creates a GraphQL schema by analyzing your PHP code.
System Integration with Akka and Apache Camelkrasserm
This document summarizes the Apache Camel integration framework and how it can be used with Akka actors. Camel provides a domain-specific language and components for integration patterns and protocols. Akka actors handle asynchronous message processing and can be used as Camel consumers and producers through Akka-Camel integration. Consumer actors receive messages from Camel endpoints, while producer actors send messages to endpoints. Actor components allow actors to be used directly in Camel routes.
The document discusses various concurrency models including shared state concurrency, message passing concurrency using actors, and software transactional memory. Shared state concurrency uses locking to synchronize access to shared resources but is prone to issues like race conditions and deadlocks. Message passing concurrency avoids these issues by isolating actors and having them communicate asynchronously through message passing without shared state. The actor model is implemented in several JVM languages including Scala, Groovy, and Java libraries. Software transactional memory provides an alternative to locking by allowing transactions to access shared memory in an isolated and atomic manner.
Social Connections 2015 CrossWorlds and DominoPaul Withers
This document discusses CrossWorlds, which allows developing generic web applications using the IBM Domino application server. CrossWorlds is a feature for IBM Websphere Liberty Profile that makes Liberty act like a Domino server to applications. It allows accessing Domino data and services via the OpenNTF Domino API from standard web applications. CrossWorlds provides advantages like Domino's security and data storage along with Liberty's speed and tooling. The OpenNTF Domino API also provides more flexible session handling and data access than traditional XPages development.
Not Just ORM: Powerful Hibernate ORM Features and CapabilitiesBrett Meyer
DevNexus 2014
Hibernate has always revolved around data, ORM, and JPA. However, it’s much more than that. Hibernate has grown into a family of projects and capabilities, extending well beyond the traditional ORM/JPA space.
This talk will present powerful features provided both by Hibernate ORM, as well as third-party extensions. Some capabilities are brand new, while others are older-but-improved. Topics include multiple-tenancy, geographic data, auditing/versioning, sharding, OSGi, and integration with additional Hibernate projects. The talk will include live demonstrations.
Repeating History...On Purpose...with ElixirBarry Jones
A dive into the highlights of Elixir that make it the ideal platform for the web...and how all these questions were answered figured out 30 years ago. Presented to Upstate Elixir in Greenville, SC on Nov 16.
This document provides an overview of PHP extensions, including reasons for creating extensions, the extension development process, and advanced extension topics. Some key points:
- Extensions allow PHP to interface with C/C++ libraries, modify how the PHP engine works, and increase performance of slow code.
- The extension development process includes setting up the compile environment, writing the module definition, adding functions, and testing.
- Advanced topics include using global variables, custom object handling, memory management, and threading safety. Well-documented extensions can be proposed for inclusion in the PECL repository.
Reuven Lerner is a web developer and consultant who primarily works with Ruby on Rails and PostgreSQL. He teaches Rails courses and uses various tools like iTerm2, RVM, IRB gems, Emacs, Firefox plugins, Growl, and Pow in his development environment. Emacs is his editor of choice, which he has highly customized over the years using Lisp functions and key bindings.
Beyond 'Set it and Forget it': Proactively managing your EZproxy serverNASIG
The document provides an overview of a presentation on proactively managing an EZproxy server. It includes an agenda that covers topics like the EZproxy admin interface, audit logs, configuring stanzas, best practices, and the EZproxy Community Center. The presentation aims to help attendees go beyond just setting up EZproxy and instead take a proactive approach to managing it over time through regular monitoring, configuration updates, and security best practices.
How to Write the Fastest JSON Parser/Writer in the WorldMilo Yip
How RapidJSON is developed in order to achieve highest performance among 20 C/C++ JSON libraries. Benchmarks, some C++ design, algorithm and low-level optimizations are covered.
This document discusses concurrency and parallelism in Ruby. It defines concurrency as performing two operations in tandem, while parallelism refers to performing two operations literally at the same time using multiple cores. The document examines traditional approaches to concurrency like threads and locks in Ruby and their limitations. It advocates for adopting models from other languages like actors and software transactional memory that can provide safer concurrency through message passing and transactions rather than shared mutable state and locks. The document reviews several Ruby libraries that implement actors and proposes areas for further improvement in Ruby's core support for concurrent programming.
This document provides an overview of building a command line interface (CLI) application in Go. It discusses UX considerations for CLIs, common CLI patterns and philosophies, and Go-specific topics. Some key points include:
- CLI apps should follow Unix philosophies of being simple, clear, composable, and extensible.
- Common CLI patterns include commands, arguments, options/flags, and subcommands.
- Go is a statically typed, compiled language with built-in concurrency and a large standard library.
- The document concludes by outlining plans to build a sample TODO app in Go called "Tri" to demonstrate CLI design and development.
Talk at RubyKaigi 2015.
Plugin architecture is known as a technique that brings extensibility to a program. Ruby has good language features for plugins. RubyGems.org is an excellent platform for plugin distribution. However, creating plugin architecture is not as easy as writing code without it: plugin loader, packaging, loosely-coupled API, and performance. Loading two versions of a gem is a unsolved challenge that is solved in Java on the other hand.
I have designed some open-source software such as Fluentd and Embulk. They provide most of functions by plugins. I will talk about their plugin-based architecture.
The document provides an overview of Akka HTTP, streams, and routes. It discusses core concepts like streams, elements, back-pressure, sources, sinks, flows, and runnable graphs. It explains that routes define the request handling logic and are assembled into routing trees. Routes can complete requests, reject them, or perform asynchronous processing and return route results.
The document discusses using MongoDB and Go together for painless data storage. Some key points:
- Go is a good language for working with MongoDB as it is fast, friendly to use, and supports concurrency well out of the box.
- MongoDB is also fast and scales well. It uses a flexible document model that maps well to Go's data types.
- The mgo driver makes it easy to connect to MongoDB from Go, perform CRUD operations, and work with data concurrently. Data can be serialized and deserialized to BSON format efficiently.
- Features like GridFS allow storing files within MongoDB, providing replicated file storage.
S313265 - Advanced Java API for RESTful Web Services at JavaOne Brazil 2010Arun Gupta
1. The document examines advanced features of JAX-RS, the Java API for RESTful web services.
2. It discusses runtime resource resolution, integration with EJB and CDI, runtime content negotiation, conditional HTTP requests, dealing with type erasure, and pluggable exception handling in JAX-RS.
3. The presentation encourages the use of "Software. Hardware. Complete." as the new corporate tagline to replace "Oracle Is the Information Company."
Groovy JSON support and the Boon JSON parser are up to 3x to 5x faster than Jackson at parsing JSON from String and char[], and 2x to 4x faster at parsing byte[].
Groovy JSON support and Boon JSON support are also faster than Jackson at encoding JSON strings. Boon is faster than Jackson at serializing/de-serializing Java instances to/fro JSON. The core of the Boon JSON parser has been forked into Groovy 2.3 (now in Beta). In the process Boon JSON support was improved and further enhanced. Groovy and Boon JSON parsers speeds are equivalent. Groovy now has the fastest JSON parser on the JVM.
Oak, the architecture of Apache Jackrabbit 3Jukka Zitting
Apache Jackrabbit is just about to reach the 3.0 milestone based on a new architecture called Oak. Based on concepts like eventual consistency and multi-version concurrency control, and borrowing ideas from distributed version control systems and cloud-scale databases, the Oak architecture is a major leap ahead for Jackrabbit. This presentation describes the Oak architecture and shows what it means for the scalability and performance of modern content applications. Changes to existing Jackrabbit functionality are described and the migration process is explained.
The document provides an overview and agenda for a presentation titled "The Padawan's Guide to the Dark Side of XPages". The presentation will cover XPages server processing, the Java virtual machine (JVM) and notes storage facility (NSF), memory management, the JavaServer Faces (JSF) lifecycle including event models and performance, and include bonus material. The presenters are Paul Withers and Tim Tripcony, and they aim to help attendees understand more about how XPages work under the hood in order to fear them less.
How to run system administrator recruitment process? By creating platform based on open source parts in just 2 nights! I gave this talk in Poland / Kraków OWASP chapter meeting on 17th October 2013 at our local Google for Entrepreneurs site. It's focused on security and also shows how to create recruitment process in CTF / challenge way.
This story covers mostly security details of this whole platform. There's great chance, that I will give another talk about this system but this time focusing on technical details. Stay tuned ;)
Creating a GraphQL API is more and more common for PHP developers. The task can seem complex but there are a lot of tools to help.
In this talk given at AFUP Paris PHP Meetup, I'm presenting GraphQL and why it is important. Then, I'm having a look at the existing libraries in PHP. Finally, I'm diving in the details of GraphQLite; a library that creates a GraphQL schema by analyzing your PHP code.
System Integration with Akka and Apache Camelkrasserm
This document summarizes the Apache Camel integration framework and how it can be used with Akka actors. Camel provides a domain-specific language and components for integration patterns and protocols. Akka actors handle asynchronous message processing and can be used as Camel consumers and producers through Akka-Camel integration. Consumer actors receive messages from Camel endpoints, while producer actors send messages to endpoints. Actor components allow actors to be used directly in Camel routes.
The document discusses various concurrency models including shared state concurrency, message passing concurrency using actors, and software transactional memory. Shared state concurrency uses locking to synchronize access to shared resources but is prone to issues like race conditions and deadlocks. Message passing concurrency avoids these issues by isolating actors and having them communicate asynchronously through message passing without shared state. The actor model is implemented in several JVM languages including Scala, Groovy, and Java libraries. Software transactional memory provides an alternative to locking by allowing transactions to access shared memory in an isolated and atomic manner.
Social Connections 2015 CrossWorlds and DominoPaul Withers
This document discusses CrossWorlds, which allows developing generic web applications using the IBM Domino application server. CrossWorlds is a feature for IBM Websphere Liberty Profile that makes Liberty act like a Domino server to applications. It allows accessing Domino data and services via the OpenNTF Domino API from standard web applications. CrossWorlds provides advantages like Domino's security and data storage along with Liberty's speed and tooling. The OpenNTF Domino API also provides more flexible session handling and data access than traditional XPages development.
Not Just ORM: Powerful Hibernate ORM Features and CapabilitiesBrett Meyer
DevNexus 2014
Hibernate has always revolved around data, ORM, and JPA. However, it’s much more than that. Hibernate has grown into a family of projects and capabilities, extending well beyond the traditional ORM/JPA space.
This talk will present powerful features provided both by Hibernate ORM, as well as third-party extensions. Some capabilities are brand new, while others are older-but-improved. Topics include multiple-tenancy, geographic data, auditing/versioning, sharding, OSGi, and integration with additional Hibernate projects. The talk will include live demonstrations.
Repeating History...On Purpose...with ElixirBarry Jones
A dive into the highlights of Elixir that make it the ideal platform for the web...and how all these questions were answered figured out 30 years ago. Presented to Upstate Elixir in Greenville, SC on Nov 16.
An overview of Ruby, jRuby, Rails, Torquebox, and PostgreSQL that was presented as a 3 hour class to other programmers at The Ironyard (http://theironyard.com) in Greenville, SC in July of 2013. The Rails specific sections are mostly code samples that were explained during the session so the real focus of the slides is Ruby, "the rails way" / workflow / differentiators and PostgreSQL.
Barry Jones introduces himself as the instructor for the Ruby on Rails and PostgreSQL course. He has experience developing applications using various languages and databases. He wishes a course like this had been available when he took over a large Perl to Rails conversion project without knowing Rails or PostgreSQL, which led to issues he later had to fix. The goal of the course is to help students gain proficiency with Rails and PostgreSQL faster to avoid similar mistakes.
PostgreSQL - It's kind've a nifty databaseBarry Jones
This presentation was given to a company that makes software for churches that is considering a migration from SQL Server to PostgreSQL. It was designed to give a broad overview of features in PostgreSQL with an emphasis on full-text search, various datatypes like hstore, array, xml, json as well as custom datatypes, TOAST compression and a taste of other interesting features worth following up on.
Go provided a 25% performance improvement over Python for a data integration task. Further optimizations in Go, like using goroutines and minimizing memory allocations, resulted in a 3.5x faster runtime than the original Python code. While Python has many useful libraries, Go is better suited for CPU-intensive and high-throughput workloads due to its low overhead concurrency model and compiled speed. The team concluded Go would be preferable for their data ingestion needs due to its performance advantages.
GoLang is an open source programming language created by Google in 2009. It has a large community and was designed for scalability and concurrency. Some key features include being statically typed, compiled, and having built-in support for concurrency through goroutines and channels. Google uses GoLang extensively to build systems that scale to thousands of machines.
GoLang is an open source programming language created by Google in 2009. It has a large community and was designed for scalability and concurrency. Some key features include being statically typed, compiled, and having built-in support for concurrency through goroutines and channels. Google uses GoLang extensively to build systems that scale to thousands of machines.
#Pharo Days 2016 Data Formats and ProtocolsPhilippe Back
The document discusses various data formats and protocols for building bridges between Pharo and the outside world.
It describes common data formats like CSV, JSON, and XML that can be used to serialize and deserialize Pharo objects to and from streams. It provides examples of parsing and generating data in these formats using libraries like NeoCSV and NeoJSON.
It also discusses common protocols like HTTP, filesystem I/O, and subprocesses that can be used to communicate with external systems. Specific examples covered are the memcached protocol and using Zinc for HTTP client/server communication.
The document discusses C++ and its evolution over time. Some key points include:
- C++ has been active for over 30 years and remains relevant due to its performance and use in applications like mobile.
- The new C++11 standard adds many new features that make the language more powerful yet easier to use, such as rvalue references, lambdas, and type inference.
- Examples are provided showing how new C++11 features like futures, lambdas and static assertions can be used concisely to solve common programming problems in a more modern style.
Travis Oliphant "Python for Speed, Scale, and Science"Fwdays
Python is sometimes discounted as slow because of its dynamic typing and interpreted nature and not suitable for scale because of the GIL. But, in this talk, I will show how with the help of talented open-source contributors around the world, we have been able to build systems in Python that are fast and scalable to many machines and how this has helped Python take over Science.
The document provides an overview of the Go programming language. It discusses that Go was designed by Google to help solve their large-scale programming problems. It then summarizes Go's history, purpose, features, and syntax elements such as data types, operators, functions, concurrency using goroutines and channels. The document also provides examples of Go code and concludes that Go has emerged as a popular language for cloud infrastructure due to its simplicity, concurrency, and performance.
Writing concurrent program is hard; maintaining concurrent program even is a nightmare. Actually, a pattern which helps us to write good concurrent code is available, that is, using “channels” to communicate.
This talk will share the channel concept with common libraries, like threading and multiprocessing, to make concurrent code elegant.
It's the talk at PyCon TW 2017 [1] and PyCon APAC/MY 2017 [2].
[1]: https://tw.pycon.org/2017
[2]: https://pycon.my/pycon-apac-2017-program-schedule/
This document summarizes the Go programming language. It was created by Google in 2007 and announced in 2009. Go is intended for systems programming and features garbage collection, static typing, and built-in concurrency with goroutines and channels. It aims to have high compilation speed and a syntax familiar to C/C++/Java programmers. Concurrency in Go is based on lightweight goroutines and channel-based communication between them.
The document summarizes updates and future plans for .NET Core and C#. Key points include:
- .NET Standard 2.0 provides over 32,000 APIs, allowing better cross-platform compatibility.
- C# 7.0 introduced features like tuples, pattern matching, and binary literals. Future versions will focus on smaller releases with opt-in features like recursive patterns and nullable reference types.
- The tooling ecosystem including Visual Studio and the dotnet CLI continue to improve with a shared SDK and common project format.
Introduction to Groovy (Serbian Developer Conference 2013)Joachim Baumann
The document provides an overview of the Groovy programming language. It discusses key features of Groovy including that everything in Groovy is an object, its support for closures as first-class functions, and dynamic typing. Examples are given demonstrating how Groovy code is more concise than Java for common tasks like XML parsing, building a simple web server, and creating domain specific languages.
Python is a general purpose programming language that can be used for both programming and scripting. It was created in the 1990s by Guido van Rossum. Python is an interpreted language that is free, powerful, and portable. It can be used for tasks like web development, data analysis, and system scripting. The document provides an overview of Python including its history, uses, data types like strings and lists, and basic programming concepts like variables, conditionals, and loops. It recommends Python as a principal teaching language due to its free and easy installation, flexibility, use in academia and industry, and ability to offer a more rapid and enjoyable learning experience for students.
Erlang - Concurrent Language for Concurrent WorldZvi Avraham
This document provides biographical information about Zvi Avraham, the founder and CEO of ZADATA Ltd. It then discusses concurrency-oriented programming (COP) and how it differs from object-oriented programming (OOP). COP focuses on processes rather than objects and emphasizes location transparency, isolation of processes without shared memory, and message passing between processes. The document outlines principles of COP like "share nothing" and "no mutable state." It discusses the Erlang programming language, which is designed for COP. Key aspects of Erlang covered include lightweight processes, distribution, fault tolerance, hot code reloading, and the BEAM virtual machine. Tools for Erlang like OTP, libraries, and debuggers are also
Voxxed Days Vienna - The Why and How of Reactive Web-Applications on the JVMManuel Bernhardt
The document discusses the need for reactive and functional programming approaches to build scalable applications that can take advantage of many-core processors and distributed systems. It introduces key concepts like immutability, functions, and declarative programming. Specific frameworks like Scala, Play and Akka are presented as tools that support this reactive, functional style for building web applications that can horizontally scale across multiple cores and nodes. The talk promotes adopting these approaches to build systems that can better handle concurrency, distribution and failure.
introduction to Python by Mohamed Hegazy , in this slides you will find some code samples , these slides first presented in TensorFlow Dev Summit 2017 Extended by GDG Helwan
https://youtu.be/rT7qVmQpfJg
https://github.com/utmgdsc/2023-c-workshop
C Workshop
Sam Chan on February 24, 2023
CSC108 level of knowledge required, CSC148 basics recommended
Friday 24th, 5pm
What you’ll learn:
* C vs. Python: what are the main diffs?
* Structs, typedefs and pointers
* Manual memory management
* What can go wrong (segfaults, UB)
* Stack and heap
* Memory management best practices (malloc, free)
Presentation given on Monday 10 September at the ROOT Users' Workshop 2018 in Sarajevo. Progress update on the Automated Parallel Computation of Collaborative Statistical Models project, a collaboration between the Netherlands eScience Center and Nikhef.
We present an update on our recent efforts to further parallelize RooFit. We have performed extensive benchmarks and identified at least three bottlenecks that will benefit from parallelization. To tackle these and possible future bottlenecks, we designed a parallelization layer that allows us to parallelize existing classes with minimal effort, but with high performance and retaining as much of the existing class's interface as possible. The high-level parallelization model is a task-stealing approach. The implementation is currently based on the bi-directional memory mapped pipe (BidirMMapPipe), but could in the future be replaced by other modes of communication between processes.
A broad introduction to Java.
What is Java and where is it used
Programming Languages in the web development
What is Java and where is it used
OOP PRINCIPLES
JAVA SE, JRE, JDK
IDE’s
Where Java used in the “Real World”
PHP is an interpreted scripting language commonly used for web development. It allows embedding scripts in HTML pages using escapes and can also be used for command line and GUI applications. PHP has a large number of built-in functions that make it easy to work with forms, files, databases, protocols, and more. While easy to get started with, PHP may not be the best choice for large, complex projects due to lack of type safety and its treatment of objects and classes.
jRuby fixes some issues with the Ruby programming language like memory leaks and lack of kernel level threading by running Ruby code on the Java Virtual Machine which has features like a sophisticated garbage collector, just-in-time compilation for improved performance, and native threading; benchmarks show jRuby provides much higher concurrency and better performance than Ruby for background processing and web applications; deploying a Ruby application using jRuby and a Java application server like Torquebox allows it to take advantage of the reliability, scalability and deployment features of the Java platform.
This document introduces PostGIS, an extension to PostgreSQL that adds support for geographic objects allowing location queries to be run in SQL. It discusses geospatial data types and functions in PostGIS for working with spatial features like points, lines, polygons, and rasters. PostGIS allows importing and exporting geospatial data, integration with GIS software, and access to open mapping data sources. It also covers spatial queries and analysis in PostGIS using functions for distance, containment, intersections and more. Additional topics mentioned include pgRouting for routing/navigation, generating maps/images from PostGIS data, and real-world use cases.
This document provides an overview and review of relational database concepts and ActiveRecord functionality in Rails. It discusses the ACID principles of atomicity, consistency, isolation, and durability and how they are achieved. It also covers topics like transactions, locking, callbacks, associations, queries, and using the database console. The document aims to explain why following database rules ensures data integrity and discusses when it may be better to handle things in the database rather than just in Rails code.
My experiences combatting phishing and fraud using DMARC and assorted other techniques in a large eBay-like platform for a niche market...when the site previously did everything over direct user email...for over a decade.
A recap of some of the most interesting things learned from the AWS re:Invent 2013 Conference. Easily the most intense and educational conference I've ever attended.
Using Query Store in Azure PostgreSQL to Understand Query PerformanceGrant Fritchey
Microsoft has added an excellent new extension in PostgreSQL on their Azure Platform. This session, presented at Posette 2024, covers what Query Store is and the types of information you can get out of it.
Most important New features of Oracle 23c for DBAs and Developers. You can get more idea from my youtube channel video from https://youtu.be/XvL5WtaC20A
UI5con 2024 - Boost Your Development Experience with UI5 Tooling ExtensionsPeter Muessig
The UI5 tooling is the development and build tooling of UI5. It is built in a modular and extensible way so that it can be easily extended by your needs. This session will showcase various tooling extensions which can boost your development experience by far so that you can really work offline, transpile your code in your project to use even newer versions of EcmaScript (than 2022 which is supported right now by the UI5 tooling), consume any npm package of your choice in your project, using different kind of proxies, and even stitching UI5 projects during development together to mimic your target environment.
What is Augmented Reality Image Trackingpavan998932
Augmented Reality (AR) Image Tracking is a technology that enables AR applications to recognize and track images in the real world, overlaying digital content onto them. This enhances the user's interaction with their environment by providing additional information and interactive elements directly tied to physical images.
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Crescat
Crescat is industry-trusted event management software, built by event professionals for event professionals. Founded in 2017, we have three key products tailored for the live event industry.
Crescat Event for concert promoters and event agencies. Crescat Venue for music venues, conference centers, wedding venues, concert halls and more. And Crescat Festival for festivals, conferences and complex events.
With a wide range of popular features such as event scheduling, shift management, volunteer and crew coordination, artist booking and much more, Crescat is designed for customisation and ease-of-use.
Over 125,000 events have been planned in Crescat and with hundreds of customers of all shapes and sizes, from boutique event agencies through to international concert promoters, Crescat is rigged for success. What's more, we highly value feedback from our users and we are constantly improving our software with updates, new features and improvements.
If you plan events, run a venue or produce festivals and you're looking for ways to make your life easier, then we have a solution for you. Try our software for free or schedule a no-obligation demo with one of our product specialists today at crescat.io
E-commerce Development Services- Hornet DynamicsHornet Dynamics
For any business hoping to succeed in the digital age, having a strong online presence is crucial. We offer Ecommerce Development Services that are customized according to your business requirements and client preferences, enabling you to create a dynamic, safe, and user-friendly online store.
Transform Your Communication with Cloud-Based IVR SolutionsTheSMSPoint
Discover the power of Cloud-Based IVR Solutions to streamline communication processes. Embrace scalability and cost-efficiency while enhancing customer experiences with features like automated call routing and voice recognition. Accessible from anywhere, these solutions integrate seamlessly with existing systems, providing real-time analytics for continuous improvement. Revolutionize your communication strategy today with Cloud-Based IVR Solutions. Learn more at: https://thesmspoint.com/channel/cloud-telephony
GraphSummit Paris - The art of the possible with Graph TechnologyNeo4j
Sudhir Hasbe, Chief Product Officer, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Microservice Teams - How the cloud changes the way we workSven Peters
A lot of technical challenges and complexity come with building a cloud-native and distributed architecture. The way we develop backend software has fundamentally changed in the last ten years. Managing a microservices architecture demands a lot of us to ensure observability and operational resiliency. But did you also change the way you run your development teams?
Sven will talk about Atlassian’s journey from a monolith to a multi-tenanted architecture and how it affected the way the engineering teams work. You will learn how we shifted to service ownership, moved to more autonomous teams (and its challenges), and established platform and enablement teams.
WhatsApp offers simple, reliable, and private messaging and calling services for free worldwide. With end-to-end encryption, your personal messages and calls are secure, ensuring only you and the recipient can access them. Enjoy voice and video calls to stay connected with loved ones or colleagues. Express yourself using stickers, GIFs, or by sharing moments on Status. WhatsApp Business enables global customer outreach, facilitating sales growth and relationship building through showcasing products and services. Stay connected effortlessly with group chats for planning outings with friends or staying updated on family conversations.
A Study of Variable-Role-based Feature Enrichment in Neural Models of CodeAftab Hussain
Understanding variable roles in code has been found to be helpful by students
in learning programming -- could variable roles help deep neural models in
performing coding tasks? We do an exploratory study.
- These are slides of the talk given at InteNSE'23: The 1st International Workshop on Interpretability and Robustness in Neural Software Engineering, co-located with the 45th International Conference on Software Engineering, ICSE 2023, Melbourne Australia
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI AppGoogle
AI Fusion Buddy Review: Brand New, Groundbreaking Gemini-Powered AI App
👉👉 Click Here To Get More Info 👇👇
https://sumonreview.com/ai-fusion-buddy-review
AI Fusion Buddy Review: Key Features
✅Create Stunning AI App Suite Fully Powered By Google's Latest AI technology, Gemini
✅Use Gemini to Build high-converting Converting Sales Video Scripts, ad copies, Trending Articles, blogs, etc.100% unique!
✅Create Ultra-HD graphics with a single keyword or phrase that commands 10x eyeballs!
✅Fully automated AI articles bulk generation!
✅Auto-post or schedule stunning AI content across all your accounts at once—WordPress, Facebook, LinkedIn, Blogger, and more.
✅With one keyword or URL, generate complete websites, landing pages, and more…
✅Automatically create & sell AI content, graphics, websites, landing pages, & all that gets you paid non-stop 24*7.
✅Pre-built High-Converting 100+ website Templates and 2000+ graphic templates logos, banners, and thumbnail images in Trending Niches.
✅Say goodbye to wasting time logging into multiple Chat GPT & AI Apps once & for all!
✅Save over $5000 per year and kick out dependency on third parties completely!
✅Brand New App: Not available anywhere else!
✅ Beginner-friendly!
✅ZERO upfront cost or any extra expenses
✅Risk-Free: 30-Day Money-Back Guarantee!
✅Commercial License included!
See My Other Reviews Article:
(1) AI Genie Review: https://sumonreview.com/ai-genie-review
(2) SocioWave Review: https://sumonreview.com/sociowave-review
(3) AI Partner & Profit Review: https://sumonreview.com/ai-partner-profit-review
(4) AI Ebook Suite Review: https://sumonreview.com/ai-ebook-suite-review
#AIFusionBuddyReview,
#AIFusionBuddyFeatures,
#AIFusionBuddyPricing,
#AIFusionBuddyProsandCons,
#AIFusionBuddyTutorial,
#AIFusionBuddyUserExperience
#AIFusionBuddyforBeginners,
#AIFusionBuddyBenefits,
#AIFusionBuddyComparison,
#AIFusionBuddyInstallation,
#AIFusionBuddyRefundPolicy,
#AIFusionBuddyDemo,
#AIFusionBuddyMaintenanceFees,
#AIFusionBuddyNewbieFriendly,
#WhatIsAIFusionBuddy?,
#HowDoesAIFusionBuddyWorks
Need for Speed: Removing speed bumps from your Symfony projects ⚡️Łukasz Chruściel
No one wants their application to drag like a car stuck in the slow lane! Yet it’s all too common to encounter bumpy, pothole-filled solutions that slow the speed of any application. Symfony apps are not an exception.
In this talk, I will take you for a spin around the performance racetrack. We’ll explore common pitfalls - those hidden potholes on your application that can cause unexpected slowdowns. Learn how to spot these performance bumps early, and more importantly, how to navigate around them to keep your application running at top speed.
We will focus in particular on tuning your engine at the application level, making the right adjustments to ensure that your system responds like a well-oiled, high-performance race car.
Software Engineering, Software Consulting, Tech Lead, Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Transaction, Spring MVC, OpenShift Cloud Platform, Kafka, REST, SOAP, LLD & HLD.
What is Master Data Management by PiLog Groupaymanquadri279
PiLog Group's Master Data Record Manager (MDRM) is a sophisticated enterprise solution designed to ensure data accuracy, consistency, and governance across various business functions. MDRM integrates advanced data management technologies to cleanse, classify, and standardize master data, thereby enhancing data quality and operational efficiency.
DDS Security Version 1.2 was adopted in 2024. This revision strengthens support for long runnings systems adding new cryptographic algorithms, certificate revocation, and hardness against DoS attacks.
Revolutionizing Visual Effects Mastering AI Face Swaps.pdfUndress Baby
The quest for the best AI face swap solution is marked by an amalgamation of technological prowess and artistic finesse, where cutting-edge algorithms seamlessly replace faces in images or videos with striking realism. Leveraging advanced deep learning techniques, the best AI face swap tools meticulously analyze facial features, lighting conditions, and expressions to execute flawless transformations, ensuring natural-looking results that blur the line between reality and illusion, captivating users with their ingenuity and sophistication.
Web:- https://undressbaby.com/
E-commerce Application Development Company.pdfHornet Dynamics
Your business can reach new heights with our assistance as we design solutions that are specifically appropriate for your goals and vision. Our eCommerce application solutions can digitally coordinate all retail operations processes to meet the demands of the marketplace while maintaining business continuity.
Unveiling the Advantages of Agile Software Development.pdfbrainerhub1
Learn about Agile Software Development's advantages. Simplify your workflow to spur quicker innovation. Jump right in! We have also discussed the advantages.
Unveiling the Advantages of Agile Software Development.pdf
Go from a PHP Perspective
1. Go from a PHP Perspective
and some other languages *cough* ruby *cough* too…but MOSTLY PHP
2. Go (or Golang) from Google
From golang.org
“Go is an open source
programming language
that makes it easy to build
simple, reliable, and
efficient software.”
Valiant attempt to balance
• Productivity
• Workflow
• Growth
• Portability
• Efficiency
• Concurrency
6. IT IS A GREAT TOOL IN THE BOX
But it’s still not the answer to life, the universe and everything
7. Let’s talk PHP
• A few months back I gave a presentation
called:
What’s the “right” PHP framework?
• With the shocking conclusion that there isn’t
one
– It was very “meta” as the kids say
8. PHP gives 90% of needs
• Frameworks largely just arrange them
– While locking you into them
• The most successful PHP ecosystem is one
driven by Composer
– Lot’s of great parts
– Assemble them to your needs
– Skip the frameworks completely
9. My solution was going to be…
• Routes defined in PHP
– For development
– But generated as a file for nginx in production
– Framework routing is insanely expensive
• PHP is stupid fast when it’s lightweight
• Route direct to a PHP file
– Include only what you need for that file
– Share templates with straight PHP
• Because APC will hold that in RAM
• Use the power of the PostgreSQL
• Let PHP be the only real upgrade path
10. Random stats
Java takes the top 8 spots before
= 914,749 to 731,583
Go appears
= 348,555
Then more Java, jRuby, Go and Java
= 344,032 to 245,709
Before Node.js
= 228,887
Until we get to PHP at
= 180,147
12. More than raw requests
When requests have a database
involved things change
…a lot
13. Needed to learn Go for work
• Frameworks largely rejected (exist though)
• Code as interchangeable parts
– There are about 10 different URL routers
• Range from features to speed…
depending on your needs
• Even the frameworks are mostly
– “bring your own ORM…if you want”
14. So I started looking at trade offs
There’s a lot of trade offs with ALMOST
• Serves static files ALMOST as fast as nginx
– But better than just about everything else
• Composite objects ALMOST as good as Ruby
– But better than just about everything else
• Performance and garbage collection ALMOST as good as Java (portability
too)
– But better than just about everything else
• Concurrency model ALMOST as good as Erlang
– But better than just about everything else
• Save refresh workflow from a statically typed language ALMOST as
efficient as PHP
– But better than just about everything else
15. Other perks
• Default, programmatically enforced code style
– gofmt
• Compiler won’t allow includes/imports that aren’t used
– Avoids bloat
• Won’t even allow declaring VARIABLES that aren’t used
– Guardian of your RAM
• Other things to save your team from arguments
– Testing built in, standardized
– Templates built in, standardized
– HTTP and other protocol servers, built in, standardized
– Documentation built in, standardized
– Sort of a convention over configuration approach to standard
libraries
16. So…compared to my solution
PHP + nginx routing/static Go for static/routing/logic
• Same result, one binary
• Zero server config
• Assemble parts as needed
19. It’s not all gophers and rainbows
For “code heavy” projects
• Great performance
• Excellent for development
teams
• Code structure works great
for iterative development
• Concurrency, computation,
API, Services, encapsulation,
sharing code between
projects, portable scripts for
agents running reliably on
client machines
For “websites”
• Lot’s of assembly required
• HTML templates are tedious
– Rewriting lots of loading,
caching code
– Breaking large templates into
pieces is an exercise in pain
• CSS/JS minify/versioning
solutions are fairly clunky
• Better for refinement than
prototype or MVP dev
21. Or at least it did last year…
Unofficial, preliminary, unpublished, disclaimer heavy Round 10 benchmarks
22. Where does Go “fit” for a
PHP dev?
• Services / APIs / JSON
• SPA Backend
• Background jobs
• Queue workers
• Portability
• Client installed agent code
• High concurrency workload
• Server level code
– Drop uploads after seeing
bad headers
• Long polling / websockets
Basically, Go is good at the things that
PHP is really bad at without the
development time requirement of
doing it in Java.
PHP is really good at the things that Go
is really bad at, efficiently developing
complete web sites
23. LET’S LOOK AT SOME GO EXAMPLES
It’s about dang time
* Most of the examples come directly from the free golang-book.com
24. Compile Time
This 1 minute video explains it best
https://youtu.be/wwoWei-GAPo
25. Data Types
• uint = uint8 (byte), uint16, uint32, uint64
• int = int8, int16, int32 (rune), int64
• float32, float64
• complex64, complex128 (for imaginaries)
• string (byte[])
• Use := to infer type automatically
– x := “some cool text”
– var x string = “some cool text”
26. Array, Map, Interface
• Array = Numerically indexed set of Type
• Map = Key of Type and Value of Type
27. private / Public
Starts with capital letter = Public
Starts with lower case letter = private
Yes. Really.
28. Functions
func methodName(argument type) returnType {
}
// From the Go doc’s template tutorial
func loadPage(title string) *Page {
filename := title + ".txt"
body, _ := ioutil.ReadFile(filename)
return &Page{Title: title, Body: body}
}
29. Structs
type Circle struct {
x float64
y float64
r float64
}
// OR
type Circle struct {
x, y, r float64
}
var c Circle
// OR
c := new(Circle)
// OR with values
c := Circle{x: 0, y: 0,
r: 5}
// OR by definition order
c := Circle{0, 0, 5}
30. Compositional Object
type Circle struct {
x, y, r float64
} // Look…a closing bracket
func (c *Circle) area() float64 {
return math.Pi * c.r*c.r
}
• (c *Circle) means Circles can call this function.
• Meaning object data and methods are SEPARATE
• Data in the struct, methods on the type
• So you can keep adding methods as your application requires
without inheriting, extending, and reworking the entire
inheritance chain
• Similar to object Includes and Monkey Patching in Rails
– One of the strengths of the language for productivity
31. Interfaces
• Java / most Object Oriented languages
– Object defined to implement an interface
• Go
– Object just needs to match an interface
– Solves a big pain point of OO development
– Create interfaces for existing objects
• Without modifying or extending the objects
32. Interface Example
type Circle struct {
x, y, r float64
}
func (c *Circle) area() float64 {
return math.Pi * c.r*c.r
}
type Rectangle struct {
x1, y1, x2, y2 float64
}
func (r *Rectangle) area() float64 {
l := distance(r.x1, r.y1, r.x1, r.y2)
w := distance(r.x1, r.y1, r.x2, r.y1)
return l * w
}
// Any type with an area() float64 method is a Shape
type Shape interface {
area() float64
}
33. Interface Functions
type Shape interface {
area() float64
}
func totalArea(shapes ...Shape) float64 {
var area float64
for _, s := range shapes {
area += s.area()
}
return area
}
fmt.Println(totalArea(&c, &r))
34. Interfaces as Fields
type MultiShape struct {
shapes []Shape
}
// This actually makes MultiShape into a Shape
func (m *MultiShape) area() float64 {
var area float64
for _, s := range m.shapes {
area += s.area()
}
return area
}
35. Defer / Panic / Recover
func readFile(filename string) string {
f, _ := os.Open(filename)
defer f.Close() // Will always run before end
if filename == “SOME CONDITION” {
return f.getDataSpecialWay
} else {
return f.getDataNormalWay
}
} // Exception handling
defer func() {
str := recover()
fmt.Println(str)
}()
panic("PANIC”)
37. Mo Concurrency Mo Problems
• Concurrent / threaded operations fight for
variables
– Mutex locks
– Halt threads and wait
• Go uses channels to avoid this
38. Channels
func pinger(c chan string) {
for i := 0; ; i++ {
c <- "ping"
}
}
func ponger(c chan string) {
for i := 0; ; i++ {
c <- "pong"
}
}
func printer(c chan string) {
for {
msg := <- c
fmt.Println(msg)
time.Sleep(time.Second * 1)
}
}
func main() {
var c chan string = make(chan string)
go pinger(c)
go ponger(c)
go printer(c)
}
Send a message
c <- “ping”
Receive a message
msg := <- c
OR
fmt.Println(<-c)
Pinger and Ponger won’t send until
something is waiting to receive
- Unless it’s a buffered channel
- Only waits when buffer is full
Printer will wait to receive until
something sends it a message
39. More on Channels
// Send only
func pinger(c chan<- string)
// Receive only
func printer(c <-chan string)
// Listen to multiple
select {
case msg1 := <- c1:
fmt.Println(msg1)
case msg2 := <- c2:
fmt.Println(msg2)
case <- time.After(time.Second):
fmt.Println("timeout")
default:
fmt.Println("nothing ready")
}
Define channel direction
- Send only
- Receive only
Listen to multiple with select/case
- Whichever is ready first
- OR random
- OR set a timeout
- OR default if neither are ready
40. Fake Real World Example
type Job interface {
process()
complete()
failure()
}
func redisListener(c chan<- Job) {
c <- RedisJob()
}
func postrgresListener(c chan<- Job) {
c <- PostgresJob()
}
func awsSqsListener(c chan<- Job) {
c <- SqsJob()
}
func jobRunner(c <-chan Job) {
job := <- c
go job.process()
}
func main() {
// channel of Jobs with a buffer of 50
var c chan Job = make(chan Job, 50)
go redisListener(c)
go postrgresListener(c)
go awsSqsListener(c)
go jobRunner(c)
}
Multi-Queue Worker
- This is purely for insanity sake
- Create infinite job go routines
- Listen on 1 connection per queue
- Use an interface to define
common execution needs
Example could continue by
- Create a result channel per queue
- Use a single connection per to
report ALL job results in their own
way
42. Gorilla Mux Router
func main() {
r := mux.NewRouter()
r.HandleFunc("/", HomeHandler)
r.HandleFunc("/products", ProductsHandler)
r.HandleFunc("/articles", ArticlesHandler)
r.HandleFunc("/products/{key}", ProductHandler)
r.HandleFunc("/articles/{category}/", ArticlesCategoryHandler)
r.HandleFunc("/articles/{category}/{id:[0-9]+}", ArticleHandler)
// You could use multiple routers too
http.Handle("/", r)
}
43. Dependency Management
go get github.com/myname/mypackage
• Copies it locally
• Bundles it with your deployed binary
• Sits right next to your local packages
• Single “src” directory with all packages
• Makes code sharing between multiple packages
very simple
• Never depend on “remote library host” being
down to deploy again
44. Gopher It!
References / Credits
• Go
– http://golang.org/
• Golang Book
– http://www.golang-book.com/
• Gorilla Web Toolkit
– http://www.gorillatoolkit.org/
• Techempower Benchmarks
– Official Round 9
• http://www.techempower.com/benchmarks/#section=data-r9
– Preview Round 10
• http://www.techempower.com/benchmarks/previews/round10/
*Hulkbuster written in Go
45. Additional Resources
Who’s using Go?
• Sendgrid
– Convice Your Company
– Intro and Love
• IronMQ
– From 30 Servers to 2
– Go after 2 Years in Prod
• Heroku
– Go at Heroku
• Digital Ocean
– Super Fast Console. Thanks Go!
• Others
– Dropbox, StatHat, Hailo,
Soundcloud, TimeHop
Other good reading
• Concurrency is not Parallelism
• Scaling VividCortex
• Stability at Timehop
• Simplicity and Maintenance
• Worker Queues in Go
• A RESTful Microframework
• Monte Carlo Benchmarks
• Taking Cloud Dev by Storm
• Structuring Applications in Go
• Go by Example
• Let’s Learn Go!
• Going Go – Playground
• GopherCasts
Thanks to James, Josh and ACS Technologies