The document provides an overview of getting started with Cloud Foundry. It discusses registering for a Cloud Foundry account, installing the vmc CLI tool on Windows and Mac, and the various ways Cloud Foundry can be used to deploy applications. It also covers key Cloud Foundry features like choice of runtimes, choice of cloud providers, scaling applications, developing applications using Eclipse/STS, and using services in applications.
This document discusses deploying applications to Cloud Foundry using Spring, Vaadin, and Cloud Foundry. It provides an overview of deploying a Java application using the vmc command line tool and Spring Tool Suite. It also covers services, runtime choices, and the benefits of using open source Cloud Foundry which avoids vendor lock-in.
This was a quick (15 minutes!) tour of Cloud Foundry that I gave at JFokus 2012 introducing Cloud Foundry as the answer to the question, "I've got a working web application and Spring made it easy, but where do I host it?"
The document discusses the polyglot capabilities of JBoss AS 7 through projects like TorqueBox and Immutant. TorqueBox allows Ruby applications to run on JBoss AS 7, providing services like web applications, background jobs, messaging, and more through integration with Java libraries. Similarly, Immutant aims to enable Clojure applications to run on JBoss AS 7 with analogous services. The goal is to leverage JBoss AS 7 as a platform while allowing developers to choose the best programming language for the task.
Complex Made Simple: Sleep Better with TorqueBoxbobmcwhirter
The document discusses using TorqueBox, a Ruby application server based on JRuby and JBoss AS7, to deploy a Rails application in production. It compares various deployment options from rolling your own infrastructure to using a platform as a service like Heroku. TorqueBox provides a middle ground where it handles services like caching, background jobs, scheduling, and clustering but still allows customization. The document walks through migrating an existing Rails app's Delayed::Job and caching implementations to use TorqueBox equivalents to simplify the deployment.
The document summarizes TorqueBox, which allows Ruby applications to run on the JBoss Application Server. TorqueBox combines JRuby and JBoss AS to provide features like clustering, load balancing, high availability, messaging, background jobs, and long-running services to Ruby applications. It allows Ruby applications to leverage Java libraries and tools while retaining the simplicity and flexibility of Ruby.
TorqueBox allows developers to build and deploy Rack and JRuby applications on JBoss Application Server. It provides features such as background processing, scheduling, services and clustering out of the box. TorqueBox makes use of JRuby's Java integration to provide a fast Ruby runtime and access to Java libraries and tools. It aims to provide all the capabilities of a full application server while allowing developers to work in Ruby and avoid technologies like XML, Java code and WAR files. Setting up TorqueBox involves downloading the distribution, exporting some environment variables and using Rake tasks to deploy and manage applications.
This document discusses common misconceptions around Java EE concurrency and provides best practices for asynchronous and parallel programming in Java EE. It covers improper uses of threads, thread pools, and synchronization, and recommends using message-driven beans, Java EE singleton beans, asynchronous methods, and the fork/join framework as better alternatives. The document also provides code examples and discusses transaction management, load balancing, and throughput.
This document discusses asynchronous I/O in Java and Scala using the Play Framework. It describes how LinkedIn uses a service-oriented architecture with hundreds of services making requests to each other. It then covers how Play supports non-blocking I/O using asynchronous code, promises, and futures to allow parallel requests without blocking threads. Key points covered include using map and flatMap to transform promises and futures, handling errors and timeouts, and the benefits of non-blocking I/O for scalability.
This document discusses deploying applications to Cloud Foundry using Spring, Vaadin, and Cloud Foundry. It provides an overview of deploying a Java application using the vmc command line tool and Spring Tool Suite. It also covers services, runtime choices, and the benefits of using open source Cloud Foundry which avoids vendor lock-in.
This was a quick (15 minutes!) tour of Cloud Foundry that I gave at JFokus 2012 introducing Cloud Foundry as the answer to the question, "I've got a working web application and Spring made it easy, but where do I host it?"
The document discusses the polyglot capabilities of JBoss AS 7 through projects like TorqueBox and Immutant. TorqueBox allows Ruby applications to run on JBoss AS 7, providing services like web applications, background jobs, messaging, and more through integration with Java libraries. Similarly, Immutant aims to enable Clojure applications to run on JBoss AS 7 with analogous services. The goal is to leverage JBoss AS 7 as a platform while allowing developers to choose the best programming language for the task.
Complex Made Simple: Sleep Better with TorqueBoxbobmcwhirter
The document discusses using TorqueBox, a Ruby application server based on JRuby and JBoss AS7, to deploy a Rails application in production. It compares various deployment options from rolling your own infrastructure to using a platform as a service like Heroku. TorqueBox provides a middle ground where it handles services like caching, background jobs, scheduling, and clustering but still allows customization. The document walks through migrating an existing Rails app's Delayed::Job and caching implementations to use TorqueBox equivalents to simplify the deployment.
The document summarizes TorqueBox, which allows Ruby applications to run on the JBoss Application Server. TorqueBox combines JRuby and JBoss AS to provide features like clustering, load balancing, high availability, messaging, background jobs, and long-running services to Ruby applications. It allows Ruby applications to leverage Java libraries and tools while retaining the simplicity and flexibility of Ruby.
TorqueBox allows developers to build and deploy Rack and JRuby applications on JBoss Application Server. It provides features such as background processing, scheduling, services and clustering out of the box. TorqueBox makes use of JRuby's Java integration to provide a fast Ruby runtime and access to Java libraries and tools. It aims to provide all the capabilities of a full application server while allowing developers to work in Ruby and avoid technologies like XML, Java code and WAR files. Setting up TorqueBox involves downloading the distribution, exporting some environment variables and using Rake tasks to deploy and manage applications.
This document discusses common misconceptions around Java EE concurrency and provides best practices for asynchronous and parallel programming in Java EE. It covers improper uses of threads, thread pools, and synchronization, and recommends using message-driven beans, Java EE singleton beans, asynchronous methods, and the fork/join framework as better alternatives. The document also provides code examples and discusses transaction management, load balancing, and throughput.
This document discusses asynchronous I/O in Java and Scala using the Play Framework. It describes how LinkedIn uses a service-oriented architecture with hundreds of services making requests to each other. It then covers how Play supports non-blocking I/O using asynchronous code, promises, and futures to allow parallel requests without blocking threads. Key points covered include using map and flatMap to transform promises and futures, handling errors and timeouts, and the benefits of non-blocking I/O for scalability.
0-60 with Goliath: Building High Performance Ruby Web-ServicesIlya Grigorik
The document discusses Goliath, an open source Ruby web framework for building high-performance web services. It provides an overview of Goliath's features like asynchronous HTTP processing, routing, middleware, streaming responses and websockets. Examples are given showing how to write simple Goliath applications and APIs. The document also discusses how Goliath enables building asynchronous apps using techniques like EventMachine and Fibers.
This document provides an overview of Apache Camel, an open source integration framework. It discusses Camel's architecture, including routes, endpoints and components. It also describes Camel's domain specific language for defining routes. Finally, it provides a sample route that reads an XML file from FTP, transforms it using XSLT, and sends it to a JMS queue.
0-60 with Goliath: High performance web servicesIlya Grigorik
This document discusses Goliath, an open source Ruby web framework for building high performance web services. It provides an overview of Goliath's architecture and goals of optimizing for performance through an asynchronous event-driven model. Key topics covered include HTTP pipelining and keep-alive, the EventMachine reactor loop, and Goliath's minimal client API.
This document provides a summary of Mike Malone's talk on scaling Django web apps. It discusses how Pownce scaled to handle hundreds of requests per second and thousands of database operations per second while serving millions of users, relationships, notes, and terabytes of static data. It also covers some of the common bottlenecks Pownce encountered and eliminated in scaling their Django application, including using caching, load balancing, and queuing to improve performance and scalability.
No callbacks, No Threads - Cooperative web servers in Ruby 1.9Ilya Grigorik
The document discusses using fibers and evented programming with Ruby to achieve asynchronous and concurrent behavior without threads. It introduces EventMachine and EM-Synchrony for implementing asynchronous drivers and applications. Code examples show wrapping database queries in fibers to make them non-blocking. This allows running queries concurrently using a threadpool and achieving higher throughput than blocking implementations. The approach is applied to build an asynchronous version of Rails using EventMachine, fibers and the Thin web server.
Asynchronous web apps with the Play Framework 2.0Oscar Renalias
This document discusses Play's asynchronous capabilities for building scalable and responsive web applications. It begins by explaining the traditional blocking request processing model and Play's asynchronous non-blocking model. It then covers asynchronous requests using Futures and Promises in Play. Examples are provided for making actions asynchronous using asynchronous responses. The document also discusses reactive IO in Play using Enumerators and Iteratees for non-blocking streaming of data. Real world use cases for asynchronous programming include asynchronous web services, streaming files and data, and websockets.
Presentation given during the phpDay 2014 in Verona.
It's about how to build durable web apis based on the experience gained at Namshi while we were developing our SOA architecture
Toby Crawley gives an overview of TorqueBox, an open-source application server for Ruby that is based on JBoss Application Server and JRuby. He discusses how TorqueBox allows Ruby applications to take advantage of features like background processing, scheduling, daemons, and clustering. He also provides instructions for installing TorqueBox and deploying Ruby applications on it using rake tasks and deployment descriptors.
Plack basics for Perl websites - YAPC::EU 2011leo lapworth
Run a website with Perl? - you should learn how to use Plack. Most Perl web frameworks support it and it makes your life a lot easier and a lot more fun
Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
This document provides a summary of a presentation on building a desktop application using HTTP::Engine, SQLite, and jQuery. The presentation discusses using HTTP::Engine as a lightweight web server, implementing RESTful APIs and backend actions with JSON responses, using SQLite for a simple and flexible local database, and manipulating the DOM with jQuery for the user interface. The goal is to create a desktop-like experience with the technologies of web applications.
PSGI is a Perl port of Python's WSGI and Ruby's Rack that defines a common interface between web servers and frameworks. Plack provides reference implementations of PSGI servers as well as middleware and utilities. This allows frameworks to run on many servers like standalone, FastCGI, and Apache using a common PSGI application interface. Plack is fast, supports many frameworks through adapters, and provides tools like Plackup and middleware to help build and test PSGI applications.
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Alexander Lisachenko
It is believed that the Symfony framework is quite heavy and it can be difficult to develop a website that will be able to work under the high load. It is true, but does this mean that it is impossible to implement a dynamic caching and to update only a small part of entire page as data is updated? This talk will give your an answer to that. It is Varnish, ESI-blocks and load balancing. With hundreds of thousands of unique visitors and million hits a day, we continue to use Symfony, and do not see any problems.
Apache Camel is a powerful open source integration framework that allows developers to focus on business logic by hiding complexity. It supports over 80 components and 19 data formats, and provides a domain-specific language for integration patterns in Java, XML, and Scala. Camel routes can be run in standalone applications or deployed to various containers.
The document discusses WebSocket technology. It provides an overview of WebSocket, including how it works, how it differs from HTTP by being bidirectional and using a single TCP connection, and how the handshake process upgrades an HTTP connection to WebSocket. It also covers WebSocket subprotocols and extensions.
Slides used during a Webinar on Feb 11, 2009 that introduces the Day CRX Version 1.4.1. CRX is a content application platform based on JSR-170 and a RESTful web framework. Learn more on www.day.com/crx
Converting Your Dev Environment to a Docker Stack - CascadiaDana Luther
The document discusses converting a development environment to a Docker stack. It describes some of the benefits of using Docker for consolidating different environments that may have varying PHP and MySQL versions. It provides an example docker-compose.yml file that defines services for Nginx, MySQL, and PHP-FPM containers along with networking and volume configurations. It also includes some sidebars on Docker concepts like the hierarchy of images, containers, services and stacks, as well as common Docker commands.
Converting Your Dev Environment to a Docker Stack - php[world]Dana Luther
Heard a lot about docker but not sure where to start? Frustrated maintaining development VMs? In this presentation we will go over the simplest ways to convert your development environment over to a docker stack, including support for full acceptance testing with Selenium. We’ll then go over how to modify the stack to mimic your production/pre-production environment(s) as closely as possible, and demystify working with the containers in the stack.
Gofer is a scalable stateless proxy architecture for DBI that is transport independent, highly configurable, efficient, tested, scalable, and cacheable. It uses a simple request/response protocol and pluggable transport modules. Popular transport modules include null, stream (SSH), HTTP, and Gearman. The DBD::Gofer driver accumulates DBI method calls and delays forwarding requests to reduce round trips. Connection pooling can be implemented using Gofer with an HTTP transport behind an Apache load balancer for high performance and fail-over.
This document discusses best practices for designing, scaling, and maintaining large-scale web applications. Some of the key points made include: having a consistent and flexible data model, loosely coupling components for easier testing and replacement, using caching strategies like page fragments and memcached, and emphasizing development practices like version control, testing, and monitoring performance. The document advocates for a modular architecture with components like load balancers, reverse proxies, caching layers, and asynchronous job queues.
The document discusses Spring Framework updates including versions 3.1, 3.2, and 3.3. Key features of Spring 3.1 include environment profiles for activating bean definitions in different environments, Java-based application configuration, and declarative caching. Spring 3.2 will include a Gradle build system and GitHub contributions. Spring 3.3 will add support for Java SE 8 features like lambda expressions and the Java EE 7 API. The document provides code examples of using these new Spring features.
using Spring and MongoDB on Cloud FoundryJoshua Long
This talk introduces how to build MongoDB applications with Spring Data MongoDB on Cloud Foundry. Spring Data provides rich support for easily building applications that work on multiple data stores.
0-60 with Goliath: Building High Performance Ruby Web-ServicesIlya Grigorik
The document discusses Goliath, an open source Ruby web framework for building high-performance web services. It provides an overview of Goliath's features like asynchronous HTTP processing, routing, middleware, streaming responses and websockets. Examples are given showing how to write simple Goliath applications and APIs. The document also discusses how Goliath enables building asynchronous apps using techniques like EventMachine and Fibers.
This document provides an overview of Apache Camel, an open source integration framework. It discusses Camel's architecture, including routes, endpoints and components. It also describes Camel's domain specific language for defining routes. Finally, it provides a sample route that reads an XML file from FTP, transforms it using XSLT, and sends it to a JMS queue.
0-60 with Goliath: High performance web servicesIlya Grigorik
This document discusses Goliath, an open source Ruby web framework for building high performance web services. It provides an overview of Goliath's architecture and goals of optimizing for performance through an asynchronous event-driven model. Key topics covered include HTTP pipelining and keep-alive, the EventMachine reactor loop, and Goliath's minimal client API.
This document provides a summary of Mike Malone's talk on scaling Django web apps. It discusses how Pownce scaled to handle hundreds of requests per second and thousands of database operations per second while serving millions of users, relationships, notes, and terabytes of static data. It also covers some of the common bottlenecks Pownce encountered and eliminated in scaling their Django application, including using caching, load balancing, and queuing to improve performance and scalability.
No callbacks, No Threads - Cooperative web servers in Ruby 1.9Ilya Grigorik
The document discusses using fibers and evented programming with Ruby to achieve asynchronous and concurrent behavior without threads. It introduces EventMachine and EM-Synchrony for implementing asynchronous drivers and applications. Code examples show wrapping database queries in fibers to make them non-blocking. This allows running queries concurrently using a threadpool and achieving higher throughput than blocking implementations. The approach is applied to build an asynchronous version of Rails using EventMachine, fibers and the Thin web server.
Asynchronous web apps with the Play Framework 2.0Oscar Renalias
This document discusses Play's asynchronous capabilities for building scalable and responsive web applications. It begins by explaining the traditional blocking request processing model and Play's asynchronous non-blocking model. It then covers asynchronous requests using Futures and Promises in Play. Examples are provided for making actions asynchronous using asynchronous responses. The document also discusses reactive IO in Play using Enumerators and Iteratees for non-blocking streaming of data. Real world use cases for asynchronous programming include asynchronous web services, streaming files and data, and websockets.
Presentation given during the phpDay 2014 in Verona.
It's about how to build durable web apis based on the experience gained at Namshi while we were developing our SOA architecture
Toby Crawley gives an overview of TorqueBox, an open-source application server for Ruby that is based on JBoss Application Server and JRuby. He discusses how TorqueBox allows Ruby applications to take advantage of features like background processing, scheduling, daemons, and clustering. He also provides instructions for installing TorqueBox and deploying Ruby applications on it using rake tasks and deployment descriptors.
Plack basics for Perl websites - YAPC::EU 2011leo lapworth
Run a website with Perl? - you should learn how to use Plack. Most Perl web frameworks support it and it makes your life a lot easier and a lot more fun
Building a desktop app with HTTP::Engine, SQLite and jQueryTatsuhiko Miyagawa
This document provides a summary of a presentation on building a desktop application using HTTP::Engine, SQLite, and jQuery. The presentation discusses using HTTP::Engine as a lightweight web server, implementing RESTful APIs and backend actions with JSON responses, using SQLite for a simple and flexible local database, and manipulating the DOM with jQuery for the user interface. The goal is to create a desktop-like experience with the technologies of web applications.
PSGI is a Perl port of Python's WSGI and Ruby's Rack that defines a common interface between web servers and frameworks. Plack provides reference implementations of PSGI servers as well as middleware and utilities. This allows frameworks to run on many servers like standalone, FastCGI, and Apache using a common PSGI application interface. Plack is fast, supports many frameworks through adapters, and provides tools like Plackup and middleware to help build and test PSGI applications.
Handling 10k requests per second with Symfony and Varnish - SymfonyCon Berlin...Alexander Lisachenko
It is believed that the Symfony framework is quite heavy and it can be difficult to develop a website that will be able to work under the high load. It is true, but does this mean that it is impossible to implement a dynamic caching and to update only a small part of entire page as data is updated? This talk will give your an answer to that. It is Varnish, ESI-blocks and load balancing. With hundreds of thousands of unique visitors and million hits a day, we continue to use Symfony, and do not see any problems.
Apache Camel is a powerful open source integration framework that allows developers to focus on business logic by hiding complexity. It supports over 80 components and 19 data formats, and provides a domain-specific language for integration patterns in Java, XML, and Scala. Camel routes can be run in standalone applications or deployed to various containers.
The document discusses WebSocket technology. It provides an overview of WebSocket, including how it works, how it differs from HTTP by being bidirectional and using a single TCP connection, and how the handshake process upgrades an HTTP connection to WebSocket. It also covers WebSocket subprotocols and extensions.
Slides used during a Webinar on Feb 11, 2009 that introduces the Day CRX Version 1.4.1. CRX is a content application platform based on JSR-170 and a RESTful web framework. Learn more on www.day.com/crx
Converting Your Dev Environment to a Docker Stack - CascadiaDana Luther
The document discusses converting a development environment to a Docker stack. It describes some of the benefits of using Docker for consolidating different environments that may have varying PHP and MySQL versions. It provides an example docker-compose.yml file that defines services for Nginx, MySQL, and PHP-FPM containers along with networking and volume configurations. It also includes some sidebars on Docker concepts like the hierarchy of images, containers, services and stacks, as well as common Docker commands.
Converting Your Dev Environment to a Docker Stack - php[world]Dana Luther
Heard a lot about docker but not sure where to start? Frustrated maintaining development VMs? In this presentation we will go over the simplest ways to convert your development environment over to a docker stack, including support for full acceptance testing with Selenium. We’ll then go over how to modify the stack to mimic your production/pre-production environment(s) as closely as possible, and demystify working with the containers in the stack.
Gofer is a scalable stateless proxy architecture for DBI that is transport independent, highly configurable, efficient, tested, scalable, and cacheable. It uses a simple request/response protocol and pluggable transport modules. Popular transport modules include null, stream (SSH), HTTP, and Gearman. The DBD::Gofer driver accumulates DBI method calls and delays forwarding requests to reduce round trips. Connection pooling can be implemented using Gofer with an HTTP transport behind an Apache load balancer for high performance and fail-over.
This document discusses best practices for designing, scaling, and maintaining large-scale web applications. Some of the key points made include: having a consistent and flexible data model, loosely coupling components for easier testing and replacement, using caching strategies like page fragments and memcached, and emphasizing development practices like version control, testing, and monitoring performance. The document advocates for a modular architecture with components like load balancers, reverse proxies, caching layers, and asynchronous job queues.
The document discusses Spring Framework updates including versions 3.1, 3.2, and 3.3. Key features of Spring 3.1 include environment profiles for activating bean definitions in different environments, Java-based application configuration, and declarative caching. Spring 3.2 will include a Gradle build system and GitHub contributions. Spring 3.3 will add support for Java SE 8 features like lambda expressions and the Java EE 7 API. The document provides code examples of using these new Spring features.
using Spring and MongoDB on Cloud FoundryJoshua Long
This talk introduces how to build MongoDB applications with Spring Data MongoDB on Cloud Foundry. Spring Data provides rich support for easily building applications that work on multiple data stores.
The document discusses tailoring Spring for custom usage. It explores extension points in the Spring framework and how to exploit lesser known but powerful hooks. The agenda includes demos of introducing the tool chain, basic dependency injection, BeanPostProcessor, AspectJ, life cycle callbacks, scopes, FactoryBeans, Spring Expression Language, profiles, proxies, resources, object to XML marshalling, REST, transactions, caching, custom views and view resolvers, writing adapters in Spring Integration, and more. QA is also on the agenda.
Spring provides tools for building multi-client web applications, including support for mobile clients and REST APIs. It includes the Spring MVC framework for building web UIs, the RestTemplate for consuming REST services, and tools like Spring Android for building native Android apps that integrate with REST backends. Demos show consuming a Spring REST service from a web UI, Android app, and HTML5 app to demonstrate support for multiple client types from a single backend.
Integration and Batch Processing on Cloud FoundryJoshua Long
This talk explores the new possibilities for scale by using Spring Integration, Spring Batch and RabbitMQ on Cloud Foundry, the open source PaaS from VMWare.
Slides from my talk introducing Spring Boot. Unfortunately, this talk is 90% live-coding, so I'll post the relevant video recording here when it's available.
Josh Long presents on Spring Boot, an approach to building stand-alone, production-grade Spring based applications. He discusses how Spring Boot makes it easy to create Spring applications with embedded Tomcat, Jetty or Undertow with minimum fuss. The presentation also covers how to easily add RESTful services, security, production-ready features like metrics, health checks and externalized configuration using Spring Boot.
The document discusses strategies for building scalable applications. It introduces the concept of a "scale cube" with three axes: horizontal duplication for scaling stateless apps, data partitioning, and bounded contexts. It provides examples of using various technologies like RabbitMQ, Redis, MongoDB, Neo4j, Couchbase, Hadoop, and Spring XD to address different areas of the scale cube. The document emphasizes that building adaptive, scalable applications is challenging and recommends approaches like microservices and separating applications into bounded contexts.
This talk introduces Spring's REST stack - Spring MVC, Spring HATEOAS, Spring Data REST, Spring Security OAuth and Spring Social - while refining an API to move higher up the Richardson maturity model
Josh Long is a Spring Developer Advocate at Pivotal. He discusses various Spring and microservices related topics including:
- The single responsibility principle and how it relates to microservices and Unix tools.
- Exposing services simply using REST which has no strict rules but embraces HTTP verbs and status codes.
- The Richardson Maturity Model for grading APIs on their REST compliance from Level 0 to Level 3.
- Security topics like OAuth, SSL/TLS, and ensuring applications are production ready with monitoring and management.
Questions sur le Cloud à Sacha Labourey, CEO et fondateur de CloudBees, pour la keynote du Cloud Day 2012 chez Xebia. Cette Keynote est animée par Cyrille Le Clerc, CTO de Xebia.
La vidéo de la présentation est disponible ici : http://vimeo.com/44024516
Le Xebia Cloud Day 2012 est une conférence gratuite dédiée au Cloud Computing focalisée sur l'écosystème Java.
http://blog.xebia.fr/22-mai-2012-cloud-day-chez-xebia/
The document discusses common pitfalls and best practices for iOS app development. It identifies several key cost drivers: 1) using inappropriate interaction models, 2) lack of collaboration between designers and developers, 3) changing fundamental requirements, 4) using technically complex solutions not suited for iOS, 5) backwards compatibility challenges with older iOS versions, 6) suboptimal testing approaches, 7) underestimating app maintenance needs, 8) issues with the closed iOS platform, and 9) opportunities to leverage useful frameworks. The presentation provides examples and recommendations to help developers avoid these pitfalls and adopt best practices.
Session an der Mobile Tech Conf im September 2012. Patrick Jayet und Reto Zenger von Zühlke Engineering AG sprechen über verschiedene Kostentreiber bei der iOS Entwicklung. Dabei erzählen sie von Erfahrungen aus der Praxis und zeigen verschiedene Do's und Dont's.
This document summarizes a Cloud Foundry bootcamp presented by Josh Long and Eric Bottard. The bootcamp covered what Cloud Foundry offers including choice of runtimes and frameworks, choice of clouds, its open source advantages, and services. It demonstrated deploying applications from the command line, developing in Eclipse/STS, and getting started with Cloud Foundry by registering for an account.
The document discusses the development and launch of the Guardian Anywhere Android app. It provides statistics on installs, retention rates, and reviews. Key points include that the app has over 89,000 total installs with a 47.9% retention rating, and positive feedback from journalists Clay Shirky and Dan Gillmor who said it was very good and hard to see how it could be much better.
Palestra de Zeno Rocha no InterCon Dev - Android, em setembro de 2013, sobre HTML5 APIs para Mobile. Saiba mais em: http://intercon.imasters.com.br/dev/android/
Lessons I Learned While Scaling to 5000 Puppet AgentsPuppet
Russ Johnson of StubHub talks about "Learning Lessons Scaling to 5000 Puppet Agents" at Puppet Camp San Francisco 2013. Find a Puppet Camp near you: puppetlabs.com/community/puppet-camp/
Cloud Foundry the Open PaaS - OpenTour Austin KeynotePatrick Chanezon
The document discusses Cloud Foundry, an open platform as a service (PaaS). It allows developers to build and deploy applications to the cloud. Cloud Foundry supports multiple languages, frameworks, services and can run applications across public and private clouds. It is open source software licensed under Apache 2.
The document describes the birth of a virtual cloud pet named Fluffy Puffy Cloud born on February 22, 2009 in Mountain View, CA. It discusses the pet's conception and birth over 3 days, with labor pains on Saturday and birth on Sunday. It provides details about the cloud pet concept and the team that created it.
Japan Developer Summit (en) - Cloud Foundry, the Open Platform As A ServicePatrick Chanezon
This talk will provide an overview of the PaaS (Platform as a Service) landscape, and will describe the Cloud Foundry open source PaaS, with its multi-framework, multi-service, multi-cloud model.
Cloud Foundry allows developers to provision apps in Java/Spring, Ruby/Rails, Ruby/Sinatra, Javascript/Node, and leverage services like MySQL, MongoDB, Reddis, Postgres and RabbitMQ.
It can be used as a public PaaS on CloudFoundry.com and other service providers (ActiveState, AppFog), to create your own private cloud, or on your laptop using the Micro Cloud Foundry VM.
I will describe the Cloud Foundry architecture, and talk about the open source development process for Cloud Foundry.
This document provides an overview of Cloud Foundry, an open platform as a service (PaaS). It describes Cloud Foundry as an open source PaaS that allows developers to build and deploy applications on multiple languages, frameworks, services and cloud infrastructures. This helps prevent vendor lock-in. The document suggests Cloud Foundry addresses the main risk with PaaS of locking developers into a particular vendor's proprietary platform.
This document summarizes a workshop about using CloudInit to bootstrap cloud instances. CloudInit allows giving instances a user-data file on first start that can configure the instance. Examples shown include setting hostname, importing SSH keys, installing packages, executing scripts. The document provides advice to use existing recipes or write your own scripts in YAML or other languages to declare configuration.
This document contains the slides from a presentation by Patrick Chanezon on cloud computing. Some key points from the presentation include:
- Cloud computing has evolved from consumer websites needing to solve problems with large data sets, storage capacity, and scalability. This led to public cloud services from companies like Amazon and Google.
- While infrastructure as a service provides virtualization and scalability, platforms are still needed to build distributed applications. Platform as a service providers aim to make application development easier by providing services and hiding infrastructure details.
- Agile development processes are better suited for the fast iteration cycles needed when developing applications for consumer markets with short product lifetimes. Cloud platforms help enable more agile development.
Danny Bluestone from Cyber-Duck held workshops educating pupils and young students in Hackney, London during the summer of 2013 on how to design for websites and apps.
SmartGears is software that makes existing software and containers into resources that can be managed by the gCube framework in a transparent way. It works by installing libraries into any Servlet container that turn applications running in that container into gCube resources. This allows software not originally built for gCube to still benefit from features like discovery, monitoring, access control and lifecycle management. SmartGears achieves this by injecting logic into the application and request lifecycles using a set of lightweight component libraries without requiring changes to the applications or container themselves.
Fluffy Puffy Cloud Pets was a virtual pet cloud app launched over a three day period in March 2009. It was created by a team of developers at Google's campus in Mountain View, California. The app allowed users to adopt, care for, and nurture a virtual pet cloud. On the first night, the team worked to find the right people to join the project. They experienced labor pains on the second day as they rushed to divide work and complete the project. After multiple submissions and rejections, the app was officially launched on MySpace on the third day.
Keeping it small - Getting to know the Slim PHP micro frameworkJeremy Kendall
The document discusses the Slim micro PHP framework. It provides an overview of installing Slim via Composer, basic routing examples including GET and POST requests, and configuration options. Key topics covered include routing, templates, middleware, configuration via a config array, and logging/flash messaging. Examples demonstrate basic routing for homepage, single images, adding photos, and handling POST data and redirects.
This document discusses the relationship between Cloud Foundry and Ubuntu over the past year. It describes how Cloud Foundry, an open source Platform as a Service (PaaS), supports multiple languages and frameworks and can be deployed on various infrastructure providers both publicly and privately. It highlights how Cloud Foundry and Ubuntu have worked well together, with Ubuntu providing infrastructure and Cloud Foundry an open development platform.
The document lists the top 10 most notable open source projects on GitHub in 2012, including Ruby on Rails, CyanogenMod, CocoaPods, Symfony, Zend Framework, OpenStack Compute, Puppet, TrinityCore, Hubot scripts, and Amal Roumi's document is distributed under a Creative Commons license.
This document contains information about Josh Long, including his contact details, links to his work, and information about the Spring IO platform. It includes diagrams showing the architecture of Spring IO and its various modules. It also contains slides from one of Josh Long's presentations promoting Spring IO and its features, including Spring Boot, reactive programming, Java 8 support, REST design, security, and mobile development.
Spring, now part of Pivotal, continues to innovate and support next generation workloads. In this talk, I introduce some of the exciting new Spring technologies supporting websockets, Java 8, Java EE 7, data ingestion and stream processing, NoSQL and Hadoop, and production-ready REST, _and_ I introduce tools designed to expedite ramp-up time for teams who want to deliver, quickly.
Multi Client Development with Spring for SpringOne 2GX 2013 with Roy ClarksonJoshua Long
The document discusses Representational State Transfer (REST), an architectural style for building distributed hypermedia systems. It describes REST as being based on HTTP and having no hard rules, instead focusing on using HTTP verbs like GET, POST, PUT, DELETE and status codes to transfer representations of resources between clients and servers. It also discusses content negotiation, HATEOAS, the Richardson Maturity Model for grading RESTful implementations, and how Spring frameworks like Spring MVC, Spring Data REST, and Spring Security can be used to build RESTful services and clients.
This document summarizes Josh Long's presentation on updates to the Spring framework. It discusses:
- Spring Framework versions 3.1, 3.2, and the upcoming 4.0 release
- New features in Spring 3.1 including environment profiles, Java-based configuration, caching, and Servlet 3.0 support
- Plans for Spring 3.2 including a Gradle build, contribution model on GitHub, and asynchronous MVC processing
- Changes to plans for Spring 3.2 where support for Java EE 7 and Java SE 8 was postponed due to delays in those projects. Spring 3.2 will instead focus on core framework refinements with Java 8 and EE 7 features planned for Spring 3.
Today's applications don't live in a vacuum - you need to take the applications to where your users are. Let Spring's REST support along with its powerful client-side technology support, help you get there faster.
A Walking Tour of (almost) all of Springdom Joshua Long
this is the deck for my 3+ hour walking tour talk that I give as a workshop at various conferences. This talk introduces practically everything in Spring -- come into the talk unaware of the concepts or frameworks and leave with a working knowledge of all the frameworks, and of all the applications for the technologies.
This talk introduces the role that Spring MVC and REST can play as a service-side endpoint model that can be connected to from mobile, rich, and desktop applications.
A Spring Batch bootcamp! Spring Batch is the open source batch processing framework from SpringSource, makes of the Spring framework. http://www.springsource.org/spring-batch
The Cloud Foundry Bootcamp document provides an overview of a Cloud Foundry bootcamp presented in Portland in 2012. It was written by Chris Richardson and presented by Monica Wilkinson and Josh Long. The agenda covers why Platform as a Service (PaaS) matters to developers, an overview of Cloud Foundry, getting started with Cloud Foundry, the Cloud Foundry architecture, using Micro Cloud Foundry, and consuming Cloud Foundry services.
Spring in the Cloud - using Spring with Cloud FoundryJoshua Long
This talk's about using the power of the Spring framework with Cloud Foundry, the open source PaaS (platform as-a-service) from VMware. This is a bit more deep an introduction than my other Spring and Cloud Foundry talk, and so I've kept both, while encouraging people to check this one out, first.
Spring and Cloud Foundry; a Marriage Made in HeavenJoshua Long
Spring and Cloud Foundry: a Marriage Made in Heaven. This talk introduces how to build Spring applications on top of Cloud Foundry, the open source PaaS from VMware
The Spring framework packs a lot of punch, out of the box! The surface-level component model's extraordinarily flexible, and works well with in most situations, but the real power of Spring lays just underneath, in the numerous SPIs that Spring exposes, so that you can tailor the component model to your own use cases. Spring's SPI's are a great example of what Bob Martin describes as the open-closed principle, and it provides the solid underpinnings upon which the other Spring frameworks, including Spring Integration, Spring MVC and Spring Batch are built. In this talk, Josh Long, the Spring developer advocate from SpringSource, provides a walking tour of Spring's extension points.
In this talk, originally presented at JavaZone, in Oslo, Norway, I introduce the broad swath of supported inversion-of-control options in Spring's component model, and then introduce some more advanced features of the component model.
Enterprise Integration and Batch Processing on Cloud FoundryJoshua Long
Spring Integration, RabbitMQ and Spring Batch are natural vehicles for building bigger, better, more powerful applications on top of the scale that only Cloud Foundry can provide. This is the deck from my Spring IO 2012 talk.
This document discusses messaging and the HornetQ messaging broker. It provides an overview of messaging and its uses in enterprise application integration. It then describes features of message queues and HornetQ specifically. The document discusses using HornetQ for high availability and clustering. It also covers using the Spring framework with HornetQ and examples of how Shopzilla uses HornetQ for its Merchant Services and Inventory services.
HCL Notes and Domino License Cost Reduction in the World of DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-and-domino-license-cost-reduction-in-the-world-of-dlau/
The introduction of DLAU and the CCB & CCX licensing model caused quite a stir in the HCL community. As a Notes and Domino customer, you may have faced challenges with unexpected user counts and license costs. You probably have questions on how this new licensing approach works and how to benefit from it. Most importantly, you likely have budget constraints and want to save money where possible. Don’t worry, we can help with all of this!
We’ll show you how to fix common misconfigurations that cause higher-than-expected user counts, and how to identify accounts which you can deactivate to save money. There are also frequent patterns that can cause unnecessary cost, like using a person document instead of a mail-in for shared mailboxes. We’ll provide examples and solutions for those as well. And naturally we’ll explain the new licensing model.
Join HCL Ambassador Marc Thomas in this webinar with a special guest appearance from Franz Walder. It will give you the tools and know-how to stay on top of what is going on with Domino licensing. You will be able lower your cost through an optimized configuration and keep it low going forward.
These topics will be covered
- Reducing license cost by finding and fixing misconfigurations and superfluous accounts
- How do CCB and CCX licenses really work?
- Understanding the DLAU tool and how to best utilize it
- Tips for common problem areas, like team mailboxes, functional/test users, etc
- Practical examples and best practices to implement right away
Unlocking Productivity: Leveraging the Potential of Copilot in Microsoft 365, a presentation by Christoforos Vlachos, Senior Solutions Manager – Modern Workplace, Uni Systems
Climate Impact of Software Testing at Nordic Testing DaysKari Kakkonen
My slides at Nordic Testing Days 6.6.2024
Climate impact / sustainability of software testing discussed on the talk. ICT and testing must carry their part of global responsibility to help with the climat warming. We can minimize the carbon footprint but we can also have a carbon handprint, a positive impact on the climate. Quality characteristics can be added with sustainability, and then measured continuously. Test environments can be used less, and in smaller scale and on demand. Test techniques can be used in optimizing or minimizing number of tests. Test automation can be used to speed up testing.
Best 20 SEO Techniques To Improve Website Visibility In SERPPixlogix Infotech
Boost your website's visibility with proven SEO techniques! Our latest blog dives into essential strategies to enhance your online presence, increase traffic, and rank higher on search engines. From keyword optimization to quality content creation, learn how to make your site stand out in the crowded digital landscape. Discover actionable tips and expert insights to elevate your SEO game.
Removing Uninteresting Bytes in Software FuzzingAftab Hussain
Imagine a world where software fuzzing, the process of mutating bytes in test seeds to uncover hidden and erroneous program behaviors, becomes faster and more effective. A lot depends on the initial seeds, which can significantly dictate the trajectory of a fuzzing campaign, particularly in terms of how long it takes to uncover interesting behaviour in your code. We introduce DIAR, a technique designed to speedup fuzzing campaigns by pinpointing and eliminating those uninteresting bytes in the seeds. Picture this: instead of wasting valuable resources on meaningless mutations in large, bloated seeds, DIAR removes the unnecessary bytes, streamlining the entire process.
In this work, we equipped AFL, a popular fuzzer, with DIAR and examined two critical Linux libraries -- Libxml's xmllint, a tool for parsing xml documents, and Binutil's readelf, an essential debugging and security analysis command-line tool used to display detailed information about ELF (Executable and Linkable Format). Our preliminary results show that AFL+DIAR does not only discover new paths more quickly but also achieves higher coverage overall. This work thus showcases how starting with lean and optimized seeds can lead to faster, more comprehensive fuzzing campaigns -- and DIAR helps you find such seeds.
- These are slides of the talk given at IEEE International Conference on Software Testing Verification and Validation Workshop, ICSTW 2022.
Taking AI to the Next Level in Manufacturing.pdfssuserfac0301
Read Taking AI to the Next Level in Manufacturing to gain insights on AI adoption in the manufacturing industry, such as:
1. How quickly AI is being implemented in manufacturing.
2. Which barriers stand in the way of AI adoption.
3. How data quality and governance form the backbone of AI.
4. Organizational processes and structures that may inhibit effective AI adoption.
6. Ideas and approaches to help build your organization's AI strategy.
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Speck&Tech
ABSTRACT: A prima vista, un mattoncino Lego e la backdoor XZ potrebbero avere in comune il fatto di essere entrambi blocchi di costruzione, o dipendenze di progetti creativi e software. La realtà è che un mattoncino Lego e il caso della backdoor XZ hanno molto di più di tutto ciò in comune.
Partecipate alla presentazione per immergervi in una storia di interoperabilità, standard e formati aperti, per poi discutere del ruolo importante che i contributori hanno in una comunità open source sostenibile.
BIO: Sostenitrice del software libero e dei formati standard e aperti. È stata un membro attivo dei progetti Fedora e openSUSE e ha co-fondato l'Associazione LibreItalia dove è stata coinvolta in diversi eventi, migrazioni e formazione relativi a LibreOffice. In precedenza ha lavorato a migrazioni e corsi di formazione su LibreOffice per diverse amministrazioni pubbliche e privati. Da gennaio 2020 lavora in SUSE come Software Release Engineer per Uyuni e SUSE Manager e quando non segue la sua passione per i computer e per Geeko coltiva la sua curiosità per l'astronomia (da cui deriva il suo nickname deneb_alpha).
Full-RAG: A modern architecture for hyper-personalizationZilliz
Mike Del Balso, CEO & Co-Founder at Tecton, presents "Full RAG," a novel approach to AI recommendation systems, aiming to push beyond the limitations of traditional models through a deep integration of contextual insights and real-time data, leveraging the Retrieval-Augmented Generation architecture. This talk will outline Full RAG's potential to significantly enhance personalization, address engineering challenges such as data management and model training, and introduce data enrichment with reranking as a key solution. Attendees will gain crucial insights into the importance of hyperpersonalization in AI, the capabilities of Full RAG for advanced personalization, and strategies for managing complex data integrations for deploying cutting-edge AI solutions.
Threats to mobile devices are more prevalent and increasing in scope and complexity. Users of mobile devices desire to take full advantage of the features
available on those devices, but many of the features provide convenience and capability but sacrifice security. This best practices guide outlines steps the users can take to better protect personal devices and information.
HCL Notes und Domino Lizenzkostenreduzierung in der Welt von DLAUpanagenda
Webinar Recording: https://www.panagenda.com/webinars/hcl-notes-und-domino-lizenzkostenreduzierung-in-der-welt-von-dlau/
DLAU und die Lizenzen nach dem CCB- und CCX-Modell sind für viele in der HCL-Community seit letztem Jahr ein heißes Thema. Als Notes- oder Domino-Kunde haben Sie vielleicht mit unerwartet hohen Benutzerzahlen und Lizenzgebühren zu kämpfen. Sie fragen sich vielleicht, wie diese neue Art der Lizenzierung funktioniert und welchen Nutzen sie Ihnen bringt. Vor allem wollen Sie sicherlich Ihr Budget einhalten und Kosten sparen, wo immer möglich. Das verstehen wir und wir möchten Ihnen dabei helfen!
Wir erklären Ihnen, wie Sie häufige Konfigurationsprobleme lösen können, die dazu führen können, dass mehr Benutzer gezählt werden als nötig, und wie Sie überflüssige oder ungenutzte Konten identifizieren und entfernen können, um Geld zu sparen. Es gibt auch einige Ansätze, die zu unnötigen Ausgaben führen können, z. B. wenn ein Personendokument anstelle eines Mail-Ins für geteilte Mailboxen verwendet wird. Wir zeigen Ihnen solche Fälle und deren Lösungen. Und natürlich erklären wir Ihnen das neue Lizenzmodell.
Nehmen Sie an diesem Webinar teil, bei dem HCL-Ambassador Marc Thomas und Gastredner Franz Walder Ihnen diese neue Welt näherbringen. Es vermittelt Ihnen die Tools und das Know-how, um den Überblick zu bewahren. Sie werden in der Lage sein, Ihre Kosten durch eine optimierte Domino-Konfiguration zu reduzieren und auch in Zukunft gering zu halten.
Diese Themen werden behandelt
- Reduzierung der Lizenzkosten durch Auffinden und Beheben von Fehlkonfigurationen und überflüssigen Konten
- Wie funktionieren CCB- und CCX-Lizenzen wirklich?
- Verstehen des DLAU-Tools und wie man es am besten nutzt
- Tipps für häufige Problembereiche, wie z. B. Team-Postfächer, Funktions-/Testbenutzer usw.
- Praxisbeispiele und Best Practices zum sofortigen Umsetzen
Infrastructure Challenges in Scaling RAG with Custom AI modelsZilliz
Building Retrieval-Augmented Generation (RAG) systems with open-source and custom AI models is a complex task. This talk explores the challenges in productionizing RAG systems, including retrieval performance, response synthesis, and evaluation. We’ll discuss how to leverage open-source models like text embeddings, language models, and custom fine-tuned models to enhance RAG performance. Additionally, we’ll cover how BentoML can help orchestrate and scale these AI components efficiently, ensuring seamless deployment and management of RAG systems in the cloud.
Things to Consider When Choosing a Website Developer for your Website | FODUUFODUU
Choosing the right website developer is crucial for your business. This article covers essential factors to consider, including experience, portfolio, technical skills, communication, pricing, reputation & reviews, cost and budget considerations and post-launch support. Make an informed decision to ensure your website meets your business goals.
Essentials of Automations: The Art of Triggers and Actions in FMESafe Software
In this second installment of our Essentials of Automations webinar series, we’ll explore the landscape of triggers and actions, guiding you through the nuances of authoring and adapting workspaces for seamless automations. Gain an understanding of the full spectrum of triggers and actions available in FME, empowering you to enhance your workspaces for efficient automation.
We’ll kick things off by showcasing the most commonly used event-based triggers, introducing you to various automation workflows like manual triggers, schedules, directory watchers, and more. Plus, see how these elements play out in real scenarios.
Whether you’re tweaking your current setup or building from the ground up, this session will arm you with the tools and insights needed to transform your FME usage into a powerhouse of productivity. Join us to discover effective strategies that simplify complex processes, enhancing your productivity and transforming your data management practices with FME. Let’s turn complexity into clarity and make your workspaces work wonders!
Monitoring and Managing Anomaly Detection on OpenShift.pdfTosin Akinosho
Monitoring and Managing Anomaly Detection on OpenShift
Overview
Dive into the world of anomaly detection on edge devices with our comprehensive hands-on tutorial. This SlideShare presentation will guide you through the entire process, from data collection and model training to edge deployment and real-time monitoring. Perfect for those looking to implement robust anomaly detection systems on resource-constrained IoT/edge devices.
Key Topics Covered
1. Introduction to Anomaly Detection
- Understand the fundamentals of anomaly detection and its importance in identifying unusual behavior or failures in systems.
2. Understanding Edge (IoT)
- Learn about edge computing and IoT, and how they enable real-time data processing and decision-making at the source.
3. What is ArgoCD?
- Discover ArgoCD, a declarative, GitOps continuous delivery tool for Kubernetes, and its role in deploying applications on edge devices.
4. Deployment Using ArgoCD for Edge Devices
- Step-by-step guide on deploying anomaly detection models on edge devices using ArgoCD.
5. Introduction to Apache Kafka and S3
- Explore Apache Kafka for real-time data streaming and Amazon S3 for scalable storage solutions.
6. Viewing Kafka Messages in the Data Lake
- Learn how to view and analyze Kafka messages stored in a data lake for better insights.
7. What is Prometheus?
- Get to know Prometheus, an open-source monitoring and alerting toolkit, and its application in monitoring edge devices.
8. Monitoring Application Metrics with Prometheus
- Detailed instructions on setting up Prometheus to monitor the performance and health of your anomaly detection system.
9. What is Camel K?
- Introduction to Camel K, a lightweight integration framework built on Apache Camel, designed for Kubernetes.
10. Configuring Camel K Integrations for Data Pipelines
- Learn how to configure Camel K for seamless data pipeline integrations in your anomaly detection workflow.
11. What is a Jupyter Notebook?
- Overview of Jupyter Notebooks, an open-source web application for creating and sharing documents with live code, equations, visualizations, and narrative text.
12. Jupyter Notebooks with Code Examples
- Hands-on examples and code snippets in Jupyter Notebooks to help you implement and test anomaly detection models.
Generating privacy-protected synthetic data using Secludy and MilvusZilliz
During this demo, the founders of Secludy will demonstrate how their system utilizes Milvus to store and manipulate embeddings for generating privacy-protected synthetic data. Their approach not only maintains the confidentiality of the original data but also enhances the utility and scalability of LLMs under privacy constraints. Attendees, including machine learning engineers, data scientists, and data managers, will witness first-hand how Secludy's integration with Milvus empowers organizations to harness the power of LLMs securely and efficiently.
Building Production Ready Search Pipelines with Spark and MilvusZilliz
Spark is the widely used ETL tool for processing, indexing and ingesting data to serving stack for search. Milvus is the production-ready open-source vector database. In this talk we will show how to use Spark to process unstructured data to extract vector representations, and push the vectors to Milvus vector database for search serving.
In the rapidly evolving landscape of technologies, XML continues to play a vital role in structuring, storing, and transporting data across diverse systems. The recent advancements in artificial intelligence (AI) present new methodologies for enhancing XML development workflows, introducing efficiency, automation, and intelligent capabilities. This presentation will outline the scope and perspective of utilizing AI in XML development. The potential benefits and the possible pitfalls will be highlighted, providing a balanced view of the subject.
We will explore the capabilities of AI in understanding XML markup languages and autonomously creating structured XML content. Additionally, we will examine the capacity of AI to enrich plain text with appropriate XML markup. Practical examples and methodological guidelines will be provided to elucidate how AI can be effectively prompted to interpret and generate accurate XML markup.
Further emphasis will be placed on the role of AI in developing XSLT, or schemas such as XSD and Schematron. We will address the techniques and strategies adopted to create prompts for generating code, explaining code, or refactoring the code, and the results achieved.
The discussion will extend to how AI can be used to transform XML content. In particular, the focus will be on the use of AI XPath extension functions in XSLT, Schematron, Schematron Quick Fixes, or for XML content refactoring.
The presentation aims to deliver a comprehensive overview of AI usage in XML development, providing attendees with the necessary knowledge to make informed decisions. Whether you’re at the early stages of adopting AI or considering integrating it in advanced XML development, this presentation will cover all levels of expertise.
By highlighting the potential advantages and challenges of integrating AI with XML development tools and languages, the presentation seeks to inspire thoughtful conversation around the future of XML development. We’ll not only delve into the technical aspects of AI-powered XML development but also discuss practical implications and possible future directions.
1. Spring into the Cloud
Josh Long Chris Richardson
@starbuxman @crichardson
josh.long@springsource.com chris.richardson@springsource.com
Friday, July 13, 12
2. About Josh Long
Spring Developer Advocate
twitter: @starbuxman
josh.long@springsource.com
2
Friday, July 13, 12
3. About Josh Long
Spring Developer Advocate
@starbuxman
josh.long@springsource.com
th
s i
is
im
po
rta
nt
!
Free Book!
SpringSource.org/roo
CONFIDENTIAL
Friday, July 13, 12 3
21. Main Risk: Lock In Welcome to the hotel california
Such a lovely place
Such a lovely face
Plenty of room at the hotel california
Any time of year, you can find it here
Last thing I remember, I was
Running for the door
I had to find the passage back
To the place I was before
’relax,’ said the night man,
We are programmed to receive.
You can checkout any time you like,
But you can never leave!
-the Eagles
CONFIDENTIAL
Friday, July 13, 12 15
25. Cloud Foundry: Clouds
§ AppFog.com
• community lead for PHP
• PaaS for PHP
§ Joyent
• community lead for Node.js
§ ActiveState
• community lead for Python, Perl
• Providers of Stackato private PaaS
CONFIDENTIAL
Friday, July 13, 12 19
33. Cloud Foundry: Services
§ Services are one of the extensibility planes in Cloud Foundry
• there are more services being contributed by the community daily!
§ MySQL, Redis, MongoDB, RabbitMQ, PostgreSQL
§ Services may be shared across applications
§ Cloud Foundry abstracts the provisioning aspect of services through
a uniform API hosted in the cloud controller
§ It’s very easy to take an app and add a service to the app in a uniform
way
• Cassandra? COBOL / CICS, Oracle
CONFIDENTIAL
Friday, July 13, 12 27
34. Cloud Foundry: Services
§ Take Advantage of Services
• they cost nothing to setup
• they deliver value
§ They Encourage Better Architectures
• Need a fast read-write cache? Redis is ready to go!
• Need to store long-tail documents? Give MongoDB a try
• Need to decouple what applications do from when they do it?
Use messaging and RabbitMQ
CONFIDENTIAL
Friday, July 13, 12 28
37. Accessing Your Services
§ Debugging and accessing the data locally
• Caldecott --> Service tunneling. Access your Cloud Foundry service as if it was local.
CONFIDENTIAL
Friday, July 13, 12 31
38. Demo: Using the tunnel to talk to your services
CONFIDENTIAL
Friday, July 13, 12 32
39. Cloud Foundry
architecture
CONFIDENTIAL
Friday, July 13, 12 33
40. Application Deployment Flow
VMC Cloud Controller
DEA
DEA Application
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
41. Application Deployment Flow
vmc push
VMC Cloud Controller
DEA
DEA Application
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
42. Application Deployment Flow
vmc push
VMC Cloud Controller
DEA
DEA Application
Framework
detection
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
43. Application Deployment Flow
vmc push
create app
VMC Cloud Controller
DEA
DEA Application
Framework
detection
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
44. Application Deployment Flow
vmc push
create app
VMC Cloud Controller
DEA
DEA Application
Framework
detection
Framework
specific
staging plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
45. Application Deployment Flow
find DEA for app
vmc push
create app
VMC Cloud Controller
DEA
DEA Application
Framework
detection
Framework
specific
staging plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
46. Application Deployment Flow
find DEA for app
vmc push I’m available
create app
VMC Cloud Controller
DEA
DEA Application
Framework
detection
Framework
specific
staging plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
47. Application Deployment Flow
find DEA for app
vmc push I’m available
create app
VMC Cloud Controller
DEA
DEA Application
deploy droplet
Framework
detection
Framework
specific
staging plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
48. Application Deployment Flow
find DEA for app
vmc push I’m available
create app
start
VMC Cloud Controller
DEA
DEA Application
deploy droplet
Framework
detection
Framework
specific
staging plugin
Creates
Droplet
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
49. Application Deployment Flow
find DEA for app
vmc push I’m available
create app
start
VMC Cloud Controller
DEA
DEA Application
deploy droplet
Framework
detection
Framework
specific
staging plugin
update routes
Creates
Droplet
Router
Router
CONFIDENTIAL
Friday, July 13, 12 34
50. About the staging plugin
§ Framework specific
§ Creates a zip file = black box
• Contains everything necessary for DEA to run the application
• Two scripts: start.sh, stop.sh
CONFIDENTIAL
Friday, July 13, 12 35
51. Staging plugin for the Spring framework
§ Adds CloudAutoStagingBeanFactoryPostProcessor bean:
• Modifies bean definitions
• Implements auto-reconfiguration
§ Defines CloudApplicationContextInitializer in web.xml
• Activates cloud profile
• Defines PropertySource for CloudEnvironment properties
CONFIDENTIAL
Friday, July 13, 12 36
54. Self Healing Infrastructure
§If an application instance crashes
•DEA detects unexpected exit => DEA broadcasts message
•Routers remove instance from routing
•Health manager notifies Cloud Controller
•Cloud Controller re-launches instance
§If an DEA VM crashes
•Application instances become unavailable
•Health Manager notices the missing instances and notifies the Cloud
Controller
•Cloud Controller requests application instances to be started
•Existing DEA will reply and start the applications
CONFIDENTIAL
Friday, July 13, 12
55. But where are the VMs?!?
§ Cloud Foundry has a layered architecture
• Cloud Controller, DEA, … layer = processes
• VM management layer
§ Benefits: decoupling, simplicity, ….
§ CloudFoundry.com creates vSphere VMs running different Cloud
Foundry components
CONFIDENTIAL
Friday, July 13, 12
56. using
Micro Cloud Foundry
CONFIDENTIAL
Friday, July 13, 12 40
57. What is in Micro Cloud Foundry?
App Instances Services
Open source Platform as a Service project
10.04
A cloud packaged as a VMware Virtual Machine
Use as a developer sandbox
• Use the services from Junit integration tests
• Deploy your application for functional testing
• Remote debugging from STS
CONFIDENTIAL
Friday, July 13, 12 41
58. Pre-requisites for using Micro Cloud Foundry
Minimum 1 GB Minimum 8 GB Internet Connectivity
RAM Disk (w/DHCP is ideal)
VMC STS
Command line GUI
CONFIDENTIAL
Friday, July 13, 12 42
59. Register and login to CloudFoundry.com
CONFIDENTIAL
Friday, July 13, 12 43
60. Select a domain name
*.cloudfoundry.me => IP address of your machine where Micro Cloud Foundry is running
CONFIDENTIAL
Friday, July 13, 12 44
67. Logging into Micro Cloud Foundry
$ vmc target api.cer-micro1.cloudfoundry.me
Successfully targeted to [http://api.cer-micro1.cloudfoundry.me]
CONFIDENTIAL
Friday, July 13, 12 48
68. Logging into Micro Cloud Foundry
$ vmc target api.cer-micro1.cloudfoundry.me
Successfully targeted to [http://api.cer-micro1.cloudfoundry.me]
$ vmc register
Email: crichardson@vmware.com
Password: ********
Verify Password: ********
Creating New User: OK
Attempting login to [http://api.cer-micro1.cloudfoundry.me]
Successfully logged into [http://api.cer-micro1.cloudfoundry.me]
CONFIDENTIAL
Friday, July 13, 12 48
69. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Developing NoSQL applications for Cloud Foundry
• Why NoSQL?
• Overview of NoSQL databases
• Introduction to Spring Data
• Using Spring Data for Redis
• Using Spring Data for Mongo
• Deploying on Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
§ Wrap up
49
Friday, July 13, 12
70. Cloud Foundry provides NoSQL-aaS
But what’s a NoSQL database?
Why would you want to use it?
How do you use it?
50
Friday, July 13, 12
71. Relational databases are great...
§ SQL
• High-level
• Sorting
• Aggregation
§ ACID semantics
§ Well supported
• JDBC
• Hibernate/JPA
• Spring
§ Well understood
• Developers
• Operators
51
Friday, July 13, 12
72. ... but they have limitations
§ Object/relational impedance mismatch
§ Complicated to map rich domain model to relational schema
§ Difficult to handle semi-structured data, e.g. varying attributes
§ Schema changes
§ Extremely difficult/impossible to scale
§ Poor performance for some use cases
52
Friday, July 13, 12
73. Solution: Spend Money
OR
http://upload.wikimedia.org/wikipedia/commons/e/e5/Rising_Sun_Yacht.JPG
http://www.trekbikes.com/us/en/bikes/road/race_performance/madone_5_series/madone_5_2/#
53
Friday, July 13, 12
76. Future = multi-paradigm data storage for enterprise applications
e.g. Netflix
• RDBMS
• SimpleDB
• Cassandra
• Hadoop/Hbase
IEEE Software Sept/October 2010 - Debasish Ghosh / Twitter @debasishg
56
Friday, July 13, 12
77. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
• Why NoSQL?
• Overview of NoSQL databases
• Introduction to Spring Data
• Using Spring Data for Redis
• Using Spring Data for Mongo
• Deploying on Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
§ Wrap up
57
Friday, July 13, 12
78. Redis
§ Advanced key-value store
§ Very fast
§ Optional persistence
§ Transactions with optimistic locking
§ Master-slave replication
§ Sharding using client-side consistent hashing
58
Friday, July 13, 12
79. Redis
§ Advanced key-value store
§ Very fast
§ Optional persistence K1 V1
§ Transactions with optimistic locking K2 V2
§ Master-slave replication
K3 V2
§ Sharding using client-side consistent hashing
58
Friday, July 13, 12
80. Adding members to a sorted set
Redis Server
Value
Score
Key
zadd myset 5.0 a
59
Friday, July 13, 12
81. Adding members to a sorted set
Redis Server
Value
Score
Key
zadd myset 5.0 a
59
Friday, July 13, 12
82. Adding members to a sorted set
Redis Server
Value
Score
Key
a
zadd myset 5.0 a myset
5.0
59
Friday, July 13, 12
83. Adding members to a sorted set
Redis Server
a b
zadd myset 10.0 b myset
5.0 10.
60
Friday, July 13, 12
84. Adding members to a sorted set
Redis Server
c a b
zadd myset 1.0 c myset
1.0 5.0 10.
61
Friday, July 13, 12
85. Retrieving members by index range
Start Stop
Index Index
Key Redis Server
zrange myset 0 1
c a b
myset
1.0 5.0 10.
62
Friday, July 13, 12
86. Retrieving members by index range
Start Stop
Index Index
Key Redis Server
zrange myset 0 1
c a b
myset
1.0 5.0 10.
c a
62
Friday, July 13, 12
87. Retrieving members by score
Key Min. Max.
Score Score
Redis Server
zrangebyscore myset 1 6
c a b
myset
1.0 5.0 10.
63
Friday, July 13, 12
88. Retrieving members by score
Key Min. Max.
Score Score
Redis Server
zrangebyscore myset 1 6
c a b
myset
1.0 5.0 10.
c a
63
Friday, July 13, 12
89. Redis use cases
§ Drop-in replacement for Memcached
• Session state
• Cache of data retrieved from SOR
§ Replica of SOR for queries needing high-performance
§ Handling tasks that overload an RDBMS
• Hit counts - INCR
• Most recent N items - LPUSH and LTRIM
• Randomly selecting an item – SRANDMEMBER
• Queuing – Lists with LPOP, RPUSH, ….
• High score tables – Sorted sets and ZINCRBY
•…
§ Notable users: github, guardian.co.uk, ….
64
Friday, July 13, 12
90. MongoDB
§ Document-oriented database
• JSON-style documents: Lists, Maps, primitives
• Schema-less
§ Transaction = update of a single document
§ Rich query language for dynamic queries
§ Very fast
§ Writes are asynchronous!
§ Highly scalable and available
65
Friday, July 13, 12
91. Data model = Binary JSON documents
{
"name" : "Sahn Maru",
"type" : ”Korean",
"serviceArea" : [
"94619",
"94618"
],
"openingHours" : [
{ Sequence of
"dayOfWeek" : "Wednesday",
"open" : 1730,
bytes on
"close" : 2230 disk è fast
}
], i/o
"_id" : ObjectId("4bddc2f49d1505567c6220a0")
}
66
Friday, July 13, 12
92. Data model = Binary JSON documents
Collection: Restaurants
{
"name" : "Sahn Maru",
"type" : ”Korean",
"serviceArea" : [
"94619",
"94618"
],
"openingHours" : [
{ Sequence of
"dayOfWeek" : "Wednesday",
"open" : 1730,
bytes on
"close" : 2230 disk è fast
}
], i/o
"_id" : ObjectId("4bddc2f49d1505567c6220a0")
}
66
Friday, July 13, 12
93. Data model = Binary JSON documents
Database: Food To Go
Collection: Restaurants
{
"name" : "Sahn Maru",
"type" : ”Korean",
"serviceArea" : [
"94619",
"94618"
],
"openingHours" : [
{ Sequence of
"dayOfWeek" : "Wednesday",
"open" : 1730,
bytes on
"close" : 2230 disk è fast
}
], i/o
"_id" : ObjectId("4bddc2f49d1505567c6220a0")
}
66
Friday, July 13, 12
94. Data model = Binary JSON documents
Server
Database: Food To Go
Collection: Restaurants
{
"name" : "Sahn Maru",
"type" : ”Korean",
"serviceArea" : [
"94619",
"94618"
],
"openingHours" : [
{ Sequence of
"dayOfWeek" : "Wednesday",
"open" : 1730,
bytes on
"close" : 2230 disk è fast
}
], i/o
"_id" : ObjectId("4bddc2f49d1505567c6220a0")
}
66
Friday, July 13, 12
96. MongoDB query by example
{ Find a restaurant
serviceArea:"94619", that serves the
openingHours: { 94619 zip code and
is open at 6pm on a
$elemMatch : { Monday
"dayOfWeek" : "Monday",
"open": {$lte: 1800},
"close": {$gte: 1800}
}
}
}
DBCursor cursor = collection.find(qbeObject);
while (cursor.hasNext()) {
DBObject o = cursor.next();
…
}
68
Friday, July 13, 12
97. MongoDB use cases
§ Use cases
• High volume writes
• Complex data
• Semi-structured data
§ Who is using it?
• Shutterfly, Foursquare
• Bit.ly Intuit
• SourceForge, NY Times
• GILT Groupe, Evite,
• SugarCRM
69
Friday, July 13, 12
98. Other NoSQL databases
Type Examples
Extensible columns/Column-oriented Hbase
SimpleDB
DynamoDB
Graph Neo4j
Key-value Membase
Voldemort
Document CouchDb
http://nosql-database.org/ lists 122+ NoSQL databases
70
Friday, July 13, 12
99. Other NoSQL databases
Type Examples
Extensible columns/Column-oriented Hbase
ri te
vo
SimpleDB
DynamoDB
fa
Graph Neo4j
yo ur
o ut
Key-value left Membase
I
if Voldemort
or ry
Document
S CouchDb
http://nosql-database.org/ lists 122+ NoSQL databases
70
Friday, July 13, 12
100. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
• Why NoSQL?
• Overview of NoSQL databases
• Introduction to Spring Data
• Using Spring Data for Redis
• Using Spring Data for Mongo
• Deploying on Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
§ Wrap up
71
Friday, July 13, 12
101. Spring Data is here to help
For
NoSQL databases
http://www.springsource.org/spring-data
72
Friday, July 13, 12
102. Spring Data sub-projects
§ SQL: Spring Data JPA, JDBC extensions
§ Commons: Polyglot persistence
§ Key-Value: Redis, Riak
§ Document: MongoDB
§ Graph: Neo4j
§ GORM for NoSQL
73
Friday, July 13, 12
103. What you get
§ Template classes that hide the boilerplate code
§ Auto-generated (generic) repositories
§ Java NoSQL mapping
§ Cross Store Persistence
§ Support in Roo and Grails
74
Friday, July 13, 12
104. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
• Why NoSQL?
• Overview of NoSQL databases
• Introduction to Spring Data
• Using Spring Data for Redis
• Using Spring Data for Mongo
• Deploying on Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
§ Wrap up
75
Friday, July 13, 12
105. Redis challenges
§ Connection management
• Need to get and close connections
§ Data mapping
• Redis = binary/strings
• Application = objects
§ Multiple client libraries
• Gratuitously different APIs
76
Friday, July 13, 12
106. Spring Data for Redis
§ Low-level - RedisConnection(Factory)
• Supports Jedis, Jredis and Rjc
• Insulates client code from underlying library
§ High-level - RedisTemplate
• Builds on RedisConnection(Factory)
• Connection management
• Pluggable Java binary conversion
§ Support classes:
• Collections-backed by RedisTemplate
• Atomic Counters
77
Friday, July 13, 12
107. Low-level API = RedisConnection(Factory)
78
Friday, July 13, 12
108. Using RedisConnectionFactory
public class LowLevelRedisTest {
@Autowired private RedisConnectionFactory redisConnectionFactory;
@Test
public void testLowLevel() {
Library independent code J
RedisConnection con = null;
try {
con = redisConnectionFactory.getConnection();
Ugly byte arrays L
byte[] key = "foo".getBytes();
byte[] value = "bar".getBytes();
con.set(key, value);
byte[] retrievedValue = con.get(key);
Assert.assertArrayEquals(value, retrievedValue);
} finally {
if (con != null) { con.close(); } Need to clean up L
}
}
79
Friday, July 13, 12
109. Configuring RedisConnectionFactory
@Configuration
public class RedisConfiguration {
@Value("${databaseHostName}")
protected String databaseHostName;
@Bean
public RedisConnectionFactory jedisConnectionFactory() {
JedisConnectionFactory factory = new JedisConnectionFactory();
factory.setHostName(databaseHostName);
factory.setPort(6379);
factory.setUsePool(true);
return factory;
}
}
80
Friday, July 13, 12
110. High-level API = RedisTemplate
§ Builds on RedisConnection(Factory)
§ Analogous to JdbcTemplate
§ Parameterized type
• K - Key type
• V – Value type
§ Handles Java Key/Value Redis byte[]
§ Maps Redis exceptions DataAccessException
§ StringRedisTemplate
• Extends RedisTemplate<String, String>
• Keys and values are Strings
81
Friday, July 13, 12
111. Using StringRedisTemplate
public class RedisTemplateTest {
@Autowired private StringRedisTemplate stringRedisTemplate;
@Test Returns KV type specific interface
public void testGetAndSet() {
stringRedisTemplate.opsForValue().set("foo", "bar");
assertEquals("bar", stringRedisTemplate.opsForValue().get("foo"));
}
@Test Converts between Strings and byte[]
public void testHashOps() {
stringRedisTemplate.opsForHash().put("myHash", "myKey", "value");
assertEquals("value",
stringRedisTemplate.opsForHash().get("myHash", "myKey"));
assertEquals(Collections.singleton("myKey"),
stringRedisTemplate.opsForHash().keys("myHash"));
assertEquals(Collections.singletonMap("myKey", "value"),
stringRedisTemplate.opsForHash().entries("myHash"));
}
82
Friday, July 13, 12
112. Configuring StringRedisTemplate
@Configuration
public class RedisConfiguration {
@Bean
public RedisConnectionFactory jedisConnectionFactory() {
…
}
@Bean
public StringRedisTemplate stringRedisTemplate(RedisConnectionFactory
factory) {
StringRedisTemplate template = new StringRedisTemplate();
template.setConnectionFactory(factory);
return template;
}
}
83
Friday, July 13, 12
113. RedisTemplate: Java objects binary data
§ RedisTemplate has multiple Serializers:
• DefaultSerializer - defaults to JdkSerializationRedisSerializer
• KeySerializer
• ValueSerializer
• HashKeySerializer
• HashValueSerializer
84
Friday, July 13, 12
115. Register serializers to override the default behavior
Converted to JSON by RedisTemplate
86
Friday, July 13, 12
116. Redis caching support
KVs = <prefix + K,V>
Template needs to (de)serialize K and V Sorted set of all keys for clear()
87
Friday, July 13, 12
117. Other Spring data for Redis features
§ Redis-backed collections
§ Atomic counters
§ Support for Redis Pub/sub
88
Friday, July 13, 12
118. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
• Why NoSQL?
• Overview of NoSQL databases
• Introduction to Spring Data
• Using Spring Data for Redis
• Using Spring Data for Mongo
• Deploying on Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
§ Wrap up
89
Friday, July 13, 12
119. MongoDB API usage patterns
§ Create and store Mongo singleton
§ Externalized server host, port etc.
§ Inserts/Updates
• Map application POJO DBObject
• mongo.getDatabase(…).getCollection(…)
• Partial document updates
• Configure asynchronous vs. synchronous writes
§ Queries
• Construct query object
• mongo.getDatabase(…).getCollection(…)
• Iterate through Cursor
• Map DBObject application POJO
Higher-level than JDBC but still repetitive, …
90
Friday, July 13, 12
120. Spring Data - MongoDB
§ MongoTemplate
§ Generic repositories
§ Querydsl integration
§ Cross-store persistence
91
Friday, July 13, 12
122. Example entity
public class Restaurant {
private String id;
private String name;
private List<MenuItem> menuItems;
public Restaurant() {
}
public class MenuItem {
public Restaurant(String name) { private String name;
this.name = name; private double price;
…
} public MenuItem() {
}
public String getName() { return name; }
public MenuItem(String name,
public void setName(String name) { double price) {
this.name = name; this.name = name;
} this.price = price;
}
…getters and setters…
…getters and setters…
93
Friday, July 13, 12
123. Example data access code
@Repository
public class RestaurantRepository {
@Autowired
private MongoTemplate mongoTemplate;
public static final String RESTAURANTS_COLLECTION = "restaurants";
public void add(Restaurant restaurant) {
mongoTemplate.save(RESTAURANTS_COLLECTION, restaurant);
}
public List<Restaurant> findRestaurantsByName(String restaurantName) {
return mongoTemplate.find(RESTAURANTS_COLLECTION,
new Query(where("name").is(restaurantName)),
Restaurant.class);
}
94
Friday, July 13, 12
125. Spring MongoDB Example - Config 1
@Configuration public class MongoDbExampleConfig {
private @Value("#{mongoDbProperties.databaseName}") String mongoDbDatabase;
private @Value("#{mongoDbProperties.host}") String mongoDbHost;
@Bean public Mongo mongo() throws Exception {
return new Mongo(mongoDbHost);
}
@Bean public MongoTemplate mongoTemplate(Mongo mongo) {
MongoTemplate mongoTemplate = new MongoTemplate(mongo, mongoDbDatabase);
mongoTemplate.setWriteConcern(WriteConcern.SAFE);
mongoTemplate.setWriteResultChecking(WriteResultChecking.EXCEPTION);
return mongoTemplate;
}
…
<beans>
<context:annotation-config/>
External Config <context:component-scan
base-package="net.chrisrichardson.mongodb.example"/>
<util:properties id="mongoDbProperties"
mongodb.properties: location="mongodb.properties"/>
</beans>
databaseName=demo1
host=192.168.253.150
96
Friday, July 13, 12
126. Spring MongoDB Example - Config 2
<bean id="mongoTemplate"
class="org.springframework.data.mongodb.core.MongoTemplate">
<constructor-arg ref="mongoFactory"/>
</bean>
<mongo:db-factory id="mongoFactory"
host= "#{mongoDbProperties.host}"
dbname="#{mongoDbProperties.databaseName}" />
<util:properties
id="mongoDbProperties"
location="mongodb.properties"/>
97
Friday, July 13, 12
127. Summarize other features
§ In-place updates
§ Callbacks
§ Generic repositories
§ Annotation-driven mapping
§ Support for QueryDSL
§ Cross-store persistence
98
Friday, July 13, 12
128. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
• Why NoSQL?
• Overview of NoSQL databases
• Introduction to Spring Data
• Using Spring Data for Redis
• Using Spring Data for Mongo
• Deploying on Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
§ Wrap up
99
Friday, July 13, 12
129. Using Mongo and Redis with Cloud Foundry
§ Create a service - Mongo or Redis
§ Bind it to your application
§ Use <cloud:*/> namespace to access the bound service
• when cloud profile is active
100
Friday, July 13, 12
134. About <cloud:redis-connection-factory/>
<cloud:redis-connection-factory
id="redisConnectionFactory"
Use when multiple
[ service-name="redis1" ]
services are bound
/>
105
Friday, July 13, 12
138. About <cloud:mongo-db-factory/>
Use when multiple
services are bound
<cloud:mongo-db-factory
id="mongoFactory"
[ service-name="mongo1" ]
[ write-concern="SAFE" ]
Whether to wait
>
[ <cloud:mongo-options for writes to
complete
connections-per-host="..."
max-wait-time="..."
/> ]
</cloud:mongo-db-factory>
109
Friday, July 13, 12
140. Uses MySQL and MongoDB
@Entity
public class Customer { Stored in MySQL
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Long id;
private String firstName;
private String lastName;
Stored in Mongo
@RelatedDocument
private SurveyInfo surveyInfo;
public class SurveyInfo { public class Survey {
private List<Survey> questionsAndAnswers = new ArrayList<Survey>(); String question;
public List<Survey> getQuestionsAndAnswers() { String answer;
return questionsAndAnswers;
}
111
Friday, July 13, 12
141. Cross store configuration
@Configuration
@ComponentScan(basePackageClasses = CrossStoreCustomerRepository.class)
@EnableTransactionManagement(mode = AdviceMode.ASPECTJ)
public class ServicesConfiguration {
private String mongoDatabaseServiceName = "survey-mongo";
private String mysqlDatabaseServiceName = "survey-mysql";
@Bean
public CloudEnvironment cloudEnvironment() {
return new CloudEnvironment();
}
@Bean
public MongoServiceInfo mongoServiceInfo() {
return cloudEnvironment().getServiceInfo(mongoDatabaseServiceName, MongoServiceInfo.class);
}
@Bean
public MongoDbFactory mongoDbFactory() {
MongoServiceCreator mongoServiceCreator = new MongoServiceCreator();
return mongoServiceCreator.createService(mongoServiceInfo());
}
@Bean
public DataSource dataSource() {
RdbmsServiceInfo rdbmsServiceInfo = cloudEnvironment().getServiceInfo(mysqlDatabaseServiceName, RdbmsServiceInfo.class);
RdbmsServiceCreator rdbmsServiceCreator = new RdbmsServiceCreator();
DataSource dataSource = rdbmsServiceCreator.createService(rdbmsServiceInfo);
return dataSource;
}
...
112
Friday, July 13, 12
143. NoSQL and Caldecott
§ Caldecott let’s you tunnel to a NoSQL service
§ Use Redis CLI
• redis-cli
• Explore database, adhoc operations
• ...
§ Use Mongo CLI etc
• Explore database, adhoc operations
• Mongo dump/restore
• ...
114
Friday, July 13, 12
144. NoSQL wrap up
§ Cloud Foundry supports Mongo and Redis
§ For some use cases, NoSQL databases offer some combination of:
• Higher scalability
• Higher performance
• Richer data models
• Schema less
§ Spring Data simplifies the development of NoSQL applications
Cloud Foundry Easy development
= and
+
deployment of
Spring Data NoSQL applications
115
Friday, July 13, 12
145. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
•Why messaging?
•Messaging with RabbitMQ and AMQP
•Using Spring Integration
•Cloud Foundry and RabbitMQ
§ Wrap up
116
Friday, July 13, 12
146. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
•Why messaging?
•Messaging with RabbitMQ and AMQP
•Using Spring Integration
•Cloud Foundry and RabbitMQ
§ Wrap up
117
Friday, July 13, 12
148. But why messaging? Why RabbitMQ?
Application A Application B
RabbitMQ
Traditional application integration
119
Friday, July 13, 12
149. But why messaging? Why RabbitMQ?
Application
Service A Service B Service ...
RabbitMQ
• Essential component of our new scalable and fault tolerant architecture
• Integration mechanism for the services
• Enables services to discover each other
120
Friday, July 13, 12
150. Let’s imagine you are building an e-
commerce application
121
Friday, July 13, 12
151. wgrus-monolithic.war
@Controller
StoreFront
Widget Gadget Accounting Shipping
InventoryService InventoryService Service Service
RDBMS
122
Friday, July 13, 12
152. It’s simple to develop but ....
§ Lack of scalability
• Scale through replication
• Non-replicable component => nothing can be replicated
• Can’t scale different parts of the application differently
§ Lack of deployability
• Deploy it all in one go
• Increased risk of something breaking
§ Applications are brittle
• Store can’t accept orders unless all services are available
• Failure (e.g. memory leak) in one component can take down every other
§ Monolingual
• Can’t use non-JVM server-side technologies: NodeJS, Rails,
123
Friday, July 13, 12
154. wgrus-billing.war
Accounting
Service
wgrus-shipping.war
wgrus-store.war Shipping
Synchronous
Service
Spring
StoreFront Remoting MySQL
Spring Web
Services wgrus-inventory.war
Widget
InventoryService
wgrus-inventory.war
Gadget
InventoryService
125
Friday, July 13, 12
155. Benefits and Drawbacks
§ Benefits:
• Scale each service independently
• Deploy each service independently
• Mix JVM and non-JVM languages
§ Drawbacks
• Application is still brittle
• Store can’t accept orders unless all services are available
• Failure (e.g. memory leak) in one component can take down every other
126
Friday, July 13, 12
156. Solution:
Asynchronous Architecture
127
Friday, July 13, 12
157. wgrus-billing.war
Accounting
Service
wgrus-inventory.war
wgrus-store.war Widget
InventoryService
Message
StoreFront Broker MySQL
wgrus-inventory.war
Gadget
InventoryService
wgrus-shipping.war
Shipping
Service
128
Friday, July 13, 12
158. Benefits and Drawbacks
§ Benefits:
• Scale each service independently
• Deploy each service independently
• Mix JVM and non-JVM languages
• Improved availability
• Front-end keeps working even when backend services are down
• Messaging broker can buffer traffic and smooth out spikes
§ Drawbacks
• Yet another moving part
• Sometimes synchronous RPC is a better fit
129
Friday, July 13, 12
159. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
•Why messaging?
•Messaging with RabbitMQ and AMQP
•Using Spring Integration
•Cloud Foundry and RabbitMQ
§ Wrap up
130
Friday, July 13, 12
160. RabbitMQ – Messaging that Just Works
Robust
High-performance
Easy to use
AMQP LEADER
Friday, July 13, 12
161. Why AMQP?
A
Protocol,
not
an
API
•A defined set of
messaging capabilities
called the AMQ model
•A network wire-level
protocol, AMQP
On
commodity
hardware
•10-‐25
thousand
messages
per
second
is
rou>ne
*
•The
NIC
is
usually
the
boDleneck
*
Non-‐persistent
messages
17
Friday, July 13, 12
162. AMQP Architecture
café deliveries
queue
café NA deliveries
queue
café WW deliveries
queue
20
Friday, July 13, 12
163. AMQP Architecture
café deliveries
queue
café NA deliveries
queue
café WW deliveries
queue
20
Friday, July 13, 12
178. AMQP Architecture
all_drinks
queue
k.*
drin
drink.cold cold_drinks
queue
dri
nk.
ho hot_drinks
t
queue
21
Friday, July 13, 12
179. AMQP Architecture
all_drinks
queue
k.*
drin
drink.cold cold_drinks
queue
dri
nk.
ho hot_drinks
t
queue
Message Routing Keys:
1.drink.hot
2.drink.cold
3.drink.warm
21
Friday, July 13, 12
180. AMQP Architecture
all_drinks
1 2 3
queue
k.*
drin
drink.cold cold_drinks
2
queue
dri
nk.
ho hot_drinks
t
1
queue
Message Routing Keys:
1.drink.hot
2.drink.cold
3.drink.warm
21
Friday, July 13, 12
181. Spring AMQP
§ Encapsulates low-level details
§ Simplifies sending and receiving Producer Consumer
of messages
Amqp Listener
Template Container
Spring AMQP
AMQP
Friday, July 13, 12
182. Sending AMQP messages
@Component public class MessageSender {
@Autowired
private volatile AmqpTemplate amqpTemplate;
public void send(String message) {
this.amqpTemplate.convertAndSend(
"myExchange", "some.routing.key", message);
}
}
137
Friday, July 13, 12
183. Receiving AMQP messages
public class MyComponent {
@Autowired
private AmqpTemplate amqpTemplate;
public void read() throws Exception {
...
String value = amqpTemplate.receiveAndConvert("myQueueName");
...
}
}
138
Friday, July 13, 12
184. Spring AMQP: SimpleMessageListenerContainer
l Asynchronous message receiver
l POJO handlers
l Handles re-connection and listener failure (rollback, redelivery)
l Message conversion and error handling strategies
<listener-container connection-factory="rabbitConnectionFactory">
<listener ref="handler" method="handle" queue-names="my.queue">
</listener-container>
139
Friday, July 13, 12
185. Spring configuration
<rabbit:template id="rabbitTemplate"
connection-factory="rabbitConnectionFactory"/>
<rabbit:connection-factory
id="rabbitConnectionFactory"/>
140
Friday, July 13, 12
186. Spring AMQP is flexible and dynamic
BUT
It’s very low level
141
Friday, July 13, 12
187. Agenda
§ Why Cloud? Why PaaS?
§ Introducing Cloud Foundry
§ Cloud Foundry for Spring developers
§ Building Java applications on Cloud Foundry
§ Moving Spring applications to the Cloud
§ Developing NoSQL applications for Cloud Foundry
§ Application integration with RabbitMQ and Spring AMQP
•Why messaging?
•Messaging with RabbitMQ and AMQP
•Using Spring Integration
•Cloud Foundry and RabbitMQ
§ Wrap up
142
Friday, July 13, 12
188. Spring Integration
§ Builds on Spring framework
§ High-level of abstraction for building message
based applications
§ Implements EAI patterns
§ Provides plumbing for exchanging messages
between application components
§ Promotes loosely coupled components
§ Integrates with external messaging
infrastructure: JMS, AMQP, HTTP, Email, File
transfer
143
Friday, July 13, 12
189. Spring Integration concepts
§ Message channel
• Virtual pipe connecting producer and consumer
§ Message endpoints
• The filter of a pipes-and-filter architecture
• Read from and/or write to channel
§ Endpoint types:
• Transformer
• Filter
• Router
• Splitter
• Aggregator
• ServiceActivator
• Inbound channel adapter - read from external source, writes to channel
• Outbound channel adapter - read from channel write to external destination
144
Friday, July 13, 12
190. Example of reconfigurability - local
@Service
public class OrderServiceImpl { @Service
public class ShippingServiceImpl {
@Autowired
private ShippingService shippingService; public void shipOrder(String orderId) {
System.out.println("shipped order: " +
public void placeOrder() { orderId);
String orderId = generateOrderId(); }
…
shippingService.shipOrder(orderId); }
}
}
Order Shipping
Service service
Messaging
Gateway
Channel Service
Activator
145
Friday, July 13, 12
191. Example of reconfigurability - distributed
Code unchanged in new deployment
Order Shipping
Service service
Messaging
Gateway RabbitMQ
Channel AMQP AMQP Channel Service
Activator
146
Friday, July 13, 12