SpringOne 2021
Session Title: A Tour of the Modern Java Platform
Speakers: Bruce Eckel, President at Mindview LLC; James Ward, Developer Relations Engineer at Google Cloud
Spring Boot on Amazon Web Services with Spring Cloud AWSVMware Tanzu
SpringOne 2021
Session Title: Spring Boot on Amazon Web Services with Spring Cloud AWS
Speakers: Maciej Walkowiak, Software Consultant at Independent; Matej Nedic, Software engineer at Ingemark
L’evoluzione delle pratiche di sviluppo, delle architetture e delle infrastrutture è un processo che anche Drupal ha abbracciato, trasformandosi da un CMS per community a un framework PHP moderno.
Drupal oggi permette di creare un'esperienza developer-friendly e può essere la base su cui costruire la vostra applicazione cloud-native.
SpringOne 2021
Session Title: A Tour of the Modern Java Platform
Speakers: Bruce Eckel, President at Mindview LLC; James Ward, Developer Relations Engineer at Google Cloud
Spring Boot on Amazon Web Services with Spring Cloud AWSVMware Tanzu
SpringOne 2021
Session Title: Spring Boot on Amazon Web Services with Spring Cloud AWS
Speakers: Maciej Walkowiak, Software Consultant at Independent; Matej Nedic, Software engineer at Ingemark
L’evoluzione delle pratiche di sviluppo, delle architetture e delle infrastrutture è un processo che anche Drupal ha abbracciato, trasformandosi da un CMS per community a un framework PHP moderno.
Drupal oggi permette di creare un'esperienza developer-friendly e può essere la base su cui costruire la vostra applicazione cloud-native.
Headless Drupal: A modern approach to (micro)services and APIssparkfabrik
Drupal offre agli sviluppatori un ambiente di lavoro moderno, che permette di modellare dati ed esporli via API nativamente; questo lo rende un ottimo candidato sia per sviluppare un CMS headless usando un frontend framework moderno, sia per lo sviluppo di microservizi.
In questo talk vi presenteremo alcuni casi d’uso per sfruttare al meglio le potenzialità di Drupal fuori dal classico contesto CMS.
JavaFX is an open source, next generation client application platform for desktop, mobile and embedded systems built on Java. It is a collaborative effort by many individuals and companies with the goal of producing a modern, efficient, and fully featured toolkit for developing rich client applications.
I've been working a lot with React lately and thought it would be a good idea to share what I've learned with the group.
During this talk we'll take a look at Facebook's React library while drawing comparisons to frameworks like Angular. We'll see how we can use React and friends to create a fast and efficient single page app. Attendees are expected to have some familiarity with ES6/ES7 since we the codebase we will be looking at leverages features from the spec.
What we'll be taking a look at:
• React
• React Router
• Redux
• Redux Sagas
• Webpack
• Babel
With Grails 3, the plugin development experience changes a little bit compared to that of Grails 2. In this talk, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will cover several topics to understand how plugins work in Grails 3, focusing on best practices.
The session is structured as a set of tips and tricks with code samples in the following areas: modularisation, build system, testing and publishing.
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...Srijan Technologies
Speaker: Adheip Singh, Senior DevOps
Kubernetes has taken the tech world by storm. As an orchestration platform, it has eased the deployment & scaling of stateless applications. However, managing complex, in particular stateful applications, is a major pain.
The extensibility of Kubernetes has led to the development of a rapidly evolving ecosystem around K8S. And as an outcome of this extensibility, Kubernetes Operators were designed which eased packaging, deployment as well as management of a Kubernetes application.
In this webinar, we will talk about K8S, with a focus on extensibility and architectural aspects of K8S operators. Additionally, we will perform a live demo of our attempt at writing a Drupal Operator.
Key Takeaways
Understand the extensibility of Kubernetes
- Conceptually understand how to run stateless and stateful services on K8S
- Learn all about K8S operators
- Get a hands-on demo for writing a Drupal Operator
Who is this for
- DevOps
- Technical Architects
- Software Developers
- Anyone interested in learning how to run Drupal workloads on Kubernetes and extensibility of Kubernetes
View all our webinars at: https://www.srijan.net/webinar
An introduction to Dropwizard, as well as examples of how to integrate it with Spring DI and Spring Security. Prepared for a presentation at the Houston Java User Group. Code samples at : https://github.com/jacek99/dropwizard-spring-di-security-onejar-example
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav DukhinFwdays
Is it possible to write a program that significantly changes its behaviour during the runtime without changing its source code? Have you ever wondered about native TypeScript support in Node.js? Or whether it is possible to write JavaScript code that syntactically feels a lot different but is still valid? The answers to these and a lot of other questions will be discussed in detail in this talk. From the basics of metaprogramming theory to practical examples of its application in enterprise projects. We are going to talk about metalinguistic abstractions, domain-specific languages, and how they can help us solve software engineering problems. We will take a look at how popular frameworks and libraries like React.js, Express.js, Nest.js and Lodash use metaprogramming to develop systems that are used worldwide. Moreover, we will learn how to think in terms of metaprograms and broaden our outlook towards the great world of metasystems.
Headless Drupal: A modern approach to (micro)services and APIssparkfabrik
Drupal offre agli sviluppatori un ambiente di lavoro moderno, che permette di modellare dati ed esporli via API nativamente; questo lo rende un ottimo candidato sia per sviluppare un CMS headless usando un frontend framework moderno, sia per lo sviluppo di microservizi.
In questo talk vi presenteremo alcuni casi d’uso per sfruttare al meglio le potenzialità di Drupal fuori dal classico contesto CMS.
JavaFX is an open source, next generation client application platform for desktop, mobile and embedded systems built on Java. It is a collaborative effort by many individuals and companies with the goal of producing a modern, efficient, and fully featured toolkit for developing rich client applications.
I've been working a lot with React lately and thought it would be a good idea to share what I've learned with the group.
During this talk we'll take a look at Facebook's React library while drawing comparisons to frameworks like Angular. We'll see how we can use React and friends to create a fast and efficient single page app. Attendees are expected to have some familiarity with ES6/ES7 since we the codebase we will be looking at leverages features from the spec.
What we'll be taking a look at:
• React
• React Router
• Redux
• Redux Sagas
• Webpack
• Babel
With Grails 3, the plugin development experience changes a little bit compared to that of Grails 2. In this talk, Álvaro (member of the Grails team at OCI, Grails committer and author of several plugins) will cover several topics to understand how plugins work in Grails 3, focusing on best practices.
The session is structured as a set of tips and tricks with code samples in the following areas: modularisation, build system, testing and publishing.
[Srijan Wednesday Webinar] How to Run Stateless and Stateful Services on K8S ...Srijan Technologies
Speaker: Adheip Singh, Senior DevOps
Kubernetes has taken the tech world by storm. As an orchestration platform, it has eased the deployment & scaling of stateless applications. However, managing complex, in particular stateful applications, is a major pain.
The extensibility of Kubernetes has led to the development of a rapidly evolving ecosystem around K8S. And as an outcome of this extensibility, Kubernetes Operators were designed which eased packaging, deployment as well as management of a Kubernetes application.
In this webinar, we will talk about K8S, with a focus on extensibility and architectural aspects of K8S operators. Additionally, we will perform a live demo of our attempt at writing a Drupal Operator.
Key Takeaways
Understand the extensibility of Kubernetes
- Conceptually understand how to run stateless and stateful services on K8S
- Learn all about K8S operators
- Get a hands-on demo for writing a Drupal Operator
Who is this for
- DevOps
- Technical Architects
- Software Developers
- Anyone interested in learning how to run Drupal workloads on Kubernetes and extensibility of Kubernetes
View all our webinars at: https://www.srijan.net/webinar
An introduction to Dropwizard, as well as examples of how to integrate it with Spring DI and Spring Security. Prepared for a presentation at the Houston Java User Group. Code samples at : https://github.com/jacek99/dropwizard-spring-di-security-onejar-example
"Applied Enterprise Metaprogramming in JavaScript", Vladyslav DukhinFwdays
Is it possible to write a program that significantly changes its behaviour during the runtime without changing its source code? Have you ever wondered about native TypeScript support in Node.js? Or whether it is possible to write JavaScript code that syntactically feels a lot different but is still valid? The answers to these and a lot of other questions will be discussed in detail in this talk. From the basics of metaprogramming theory to practical examples of its application in enterprise projects. We are going to talk about metalinguistic abstractions, domain-specific languages, and how they can help us solve software engineering problems. We will take a look at how popular frameworks and libraries like React.js, Express.js, Nest.js and Lodash use metaprogramming to develop systems that are used worldwide. Moreover, we will learn how to think in terms of metaprograms and broaden our outlook towards the great world of metasystems.
Becoming a Productive Groovy, Grails and Spring Developer with IntelliJ IDEAAndrey Cheptsov
When it comes to productivity, what counts is reliable and smart support from your IDE for the frameworks in your project. IntelliJ IDEA’s support for Groovy, Grails and Spring has been going strong for the last few years, expanding and refining its features with each new release.
Let’s explore the most tricky features of the IDE that help developers to be more productive.
Slides from my GGX 2013 talk. http://skillsmatter.com/podcast/home/message-driven-architecture-in-grails
Code here: https://github.com/danveloper/ggx-2013-mda
AppSync.org: open-source patterns and code for data synchronization in mobile...Niko Nelissen
AppSync.org is an open-source project for mobile app developers, that provides patterns, algorithms and source code to implement data synchronization between mobile apps (clients) and backends (server or mBaaS platform).
There are a lot of great things about the cloud, but the "destroy and rebuild" philosophy which is really good for building a continuous delivery pipeline, really sucks when applied to troubleshooting production problems. When your application goes haywire, the most valuable engineering skill is not the the ability to bring up a copy of your system or even the knowledge of your technology stack (although it doesn't hurt). It is the skill of understanding and solving problems.
Finding the root cause of the issue and mitigating it with minimal disruption in production is a must-have skill for engineers responsible for managing and maintaining production systems, which nowadays includes ops, dbas and devs alike. In this talk I will discuss the skills required to troubleshoot complex systems, traits that prevent engineers from being successful at troubleshooting and discuss some techniques and tips and trick for troubleshooting complex systems in production.
To view recording of this webinar please use below URL:
http://wso2.com/library/webinars/2015/09/event-driven-architecture/
Enterprise systems today are moving towards being dynamic where change has become the norm rather than the exception. Such systems need to be loosely coupled, autonomous, versatile and adaptive. There arises the need to model such systems, and event driven architecture (EDA) is how such systems can be modelled and explained.
This webinar will discuss
The basics of EDA
How it can benefit your enterprise
How the WSO2 product stack complements this architectural pattern
Microservices and functional programmingMichael Neale
A talk I did recently on microservices and functional programming. Microservices are small, single purpose apps that are run as a service, which are usually composed together to provide the real app.
Backbone.js helps structure you javascript application code in a scalable way.
In this keynote I demonstrate how to use it in a simple walk-through example, and discuss the advantages of using an MVC framework.
Paper by Paco Nathan (Mesosphere) and Girish Kathalagiri (AgilOne) presented at the PMML Workshop (2013-08-11) at KDD 2013 in Chicago http://kdd13pmml.wordpress.com/
The paper uses Open Data from the City of Chicago to build predictive models for crime based on seasonality, geolocation, and other factors. The modeling illustrates use of the Pattern library https://github.com/Cascading/pattern in Cascading to import PMML -- in this case, the use of model chaining to create ensembles.
CartoSet is a new Open Source framework to develop great geospatial websites. Based on the experience by Vizzuality developing highly visual geospatial websites, like protectedplanet.net, CartoSet is a Ruby on Rails framework based on CartoDB. Despite the number of existing geoportal websites none of them allow the creation of highly customized interfaces. On the other hand libraries like geoRuby provide great foundation but still it takes too much time to develop nice websites. CartoSet is a FOSS framework in the middle, allowing great customization but providing an easy building block for agile developers.
Project LASSO intends to deploy, improve and extend Linked Data (LD) infrastructure in three different use cases. Central feature of all use cases is a lookup service which helps to augment already existing, formalized knowledge with facts from the Linked Open Data (LOD) cloud. These three use cases are Semantic Desktop, Enterprise Collaboration and Inspiration Services. Currently available systems in all of these application domains are sparsely using data from the Semantic Web.
http://www.lassoproject.org/
Oredev 2013: Building Web Apps with Ember.jsJesse Cravens
Architected by Yehuda Katz (core Ruby on Rails contributor) and Tom Dale, Ember.js is a JavaScript MVC framework which evolved from Sproutcore 2.0. Seen as an alternative to other popular client MVC solutions like Backbone.js and Angular.js, Ember.js differs in that it provides 'Rails-like' defaults by convention to common coding patterns, intelligent memory management, built-in integration testing, and a next generation client side persistence solution called ember-data.
Join O'Reilly authors, Jesse Cravens and Thomas Brady, as they take the audience through the construction of a demo application: setting up client side models and exploring the use of various persistence solutions, using data bindings to live update the UI in response to data changes, and showing how Ember’s router manages application state.
Attendees should leave this session with an understanding of how to build and deploy Ember.js applications using various server side web frameworks and the latest in client-side build, package management, and workflow.
Covers the following topics:
- Build "Single Page Applications” with the following JS MVC frameworks: Angular.js, Ember.js, BackBone.js
- Node.js
- Trends in Web Application Development
- Architectural patterns
Similar to Application Architectures in Grails (20)
Maven and Ant have dominated the build landscape in the Java world for more than a decade. Why on earth do we need or want another one? That’s a question many people ask themselves when hearing about Gradle. In this talk, I provide some context to what makes a good build and hence what you should expect from your build tools.
You will then learn how Gradle provides the features you need to solve any build problem, while still being easy to use for standard stuff. Afterwards, you’ll start to understand why Google picked Gradle for the new Android build system.
Gradle is easy to use for building standard Java projects, but it’s rare to find a project that is completely standard. Whenever you have some custom requirement, you need to start using Gradle’s power features. It’s at that point that you can find yourself producing an unmaintainable mess and a hard-to-use build.
This talk will start by explaining Gradle’s model, which you need to understand if you want to retain control over your builds. I will then introduce you to some simple but effective guidelines that will ensure that your builds stay clean and effective.
Explains why software builds are important and what build tools should offer to users in terms of features. It also looks at how Gradle satisfies these requirements.
This is the slide part of a talk that introduces the Groovy programming language to Java developers. The focus is on what you can do with it rather than the details of how to program in it. Most of the presentation is also live coding, so the slides aren't much use on their own.
Groovy & Grails for Spring/Java developersPeter Ledbrook
Presentation given at SpringOne 2GX.
The original presentation is mostly demo, but these slides show some nice features of Groovy and how Grails can support the varying needs to enterprise developers.
This is the Grails WOT presentation delivered at SpringOne 2GX.
It looks at the current state of the development landscape, how Grails can help you work with all the new technologies, and what the future might hold.
A look at the changing development landscape and how we may have to rearchitect our Grails applications.
Also looks at existing, new, or potential Grails features that can help navigate this new world order.
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Ramesh Iyer
In today's fast-changing business world, Companies that adapt and embrace new ideas often need help to keep up with the competition. However, fostering a culture of innovation takes much work. It takes vision, leadership and willingness to take risks in the right proportion. Sachin Dev Duggal, co-founder of Builder.ai, has perfected the art of this balance, creating a company culture where creativity and growth are nurtured at each stage.
Software Delivery At the Speed of AI: Inflectra Invests In AI-Powered QualityInflectra
In this insightful webinar, Inflectra explores how artificial intelligence (AI) is transforming software development and testing. Discover how AI-powered tools are revolutionizing every stage of the software development lifecycle (SDLC), from design and prototyping to testing, deployment, and monitoring.
Learn about:
• The Future of Testing: How AI is shifting testing towards verification, analysis, and higher-level skills, while reducing repetitive tasks.
• Test Automation: How AI-powered test case generation, optimization, and self-healing tests are making testing more efficient and effective.
• Visual Testing: Explore the emerging capabilities of AI in visual testing and how it's set to revolutionize UI verification.
• Inflectra's AI Solutions: See demonstrations of Inflectra's cutting-edge AI tools like the ChatGPT plugin and Azure Open AI platform, designed to streamline your testing process.
Whether you're a developer, tester, or QA professional, this webinar will give you valuable insights into how AI is shaping the future of software delivery.
Neuro-symbolic is not enough, we need neuro-*semantic*Frank van Harmelen
Neuro-symbolic (NeSy) AI is on the rise. However, simply machine learning on just any symbolic structure is not sufficient to really harvest the gains of NeSy. These will only be gained when the symbolic structures have an actual semantics. I give an operational definition of semantics as “predictable inference”.
All of this illustrated with link prediction over knowledge graphs, but the argument is general.
Securing your Kubernetes cluster_ a step-by-step guide to success !KatiaHIMEUR1
Today, after several years of existence, an extremely active community and an ultra-dynamic ecosystem, Kubernetes has established itself as the de facto standard in container orchestration. Thanks to a wide range of managed services, it has never been so easy to set up a ready-to-use Kubernetes cluster.
However, this ease of use means that the subject of security in Kubernetes is often left for later, or even neglected. This exposes companies to significant risks.
In this talk, I'll show you step-by-step how to secure your Kubernetes cluster for greater peace of mind and reliability.
DevOps and Testing slides at DASA ConnectKari Kakkonen
My and Rik Marselis slides at 30.5.2024 DASA Connect conference. We discuss about what is testing, then what is agile testing and finally what is Testing in DevOps. Finally we had lovely workshop with the participants trying to find out different ways to think about quality and testing in different parts of the DevOps infinity loop.
Essentials of Automations: Optimizing FME Workflows with ParametersSafe Software
Are you looking to streamline your workflows and boost your projects’ efficiency? Do you find yourself searching for ways to add flexibility and control over your FME workflows? If so, you’re in the right place.
Join us for an insightful dive into the world of FME parameters, a critical element in optimizing workflow efficiency. This webinar marks the beginning of our three-part “Essentials of Automation” series. This first webinar is designed to equip you with the knowledge and skills to utilize parameters effectively: enhancing the flexibility, maintainability, and user control of your FME projects.
Here’s what you’ll gain:
- Essentials of FME Parameters: Understand the pivotal role of parameters, including Reader/Writer, Transformer, User, and FME Flow categories. Discover how they are the key to unlocking automation and optimization within your workflows.
- Practical Applications in FME Form: Delve into key user parameter types including choice, connections, and file URLs. Allow users to control how a workflow runs, making your workflows more reusable. Learn to import values and deliver the best user experience for your workflows while enhancing accuracy.
- Optimization Strategies in FME Flow: Explore the creation and strategic deployment of parameters in FME Flow, including the use of deployment and geometry parameters, to maximize workflow efficiency.
- Pro Tips for Success: Gain insights on parameterizing connections and leveraging new features like Conditional Visibility for clarity and simplicity.
We’ll wrap up with a glimpse into future webinars, followed by a Q&A session to address your specific questions surrounding this topic.
Don’t miss this opportunity to elevate your FME expertise and drive your projects to new heights of efficiency.
Dev Dives: Train smarter, not harder – active learning and UiPath LLMs for do...UiPathCommunity
💥 Speed, accuracy, and scaling – discover the superpowers of GenAI in action with UiPath Document Understanding and Communications Mining™:
See how to accelerate model training and optimize model performance with active learning
Learn about the latest enhancements to out-of-the-box document processing – with little to no training required
Get an exclusive demo of the new family of UiPath LLMs – GenAI models specialized for processing different types of documents and messages
This is a hands-on session specifically designed for automation developers and AI enthusiasts seeking to enhance their knowledge in leveraging the latest intelligent document processing capabilities offered by UiPath.
Speakers:
👨🏫 Andras Palfi, Senior Product Manager, UiPath
👩🏫 Lenka Dulovicova, Product Program Manager, UiPath
Kubernetes & AI - Beauty and the Beast !?! @KCD Istanbul 2024Tobias Schneck
As AI technology is pushing into IT I was wondering myself, as an “infrastructure container kubernetes guy”, how get this fancy AI technology get managed from an infrastructure operational view? Is it possible to apply our lovely cloud native principals as well? What benefit’s both technologies could bring to each other?
Let me take this questions and provide you a short journey through existing deployment models and use cases for AI software. On practical examples, we discuss what cloud/on-premise strategy we may need for applying it to our own infrastructure to get it to work from an enterprise perspective. I want to give an overview about infrastructure requirements and technologies, what could be beneficial or limiting your AI use cases in an enterprise environment. An interactive Demo will give you some insides, what approaches I got already working for real.
Epistemic Interaction - tuning interfaces to provide information for AI supportAlan Dix
Paper presented at SYNERGY workshop at AVI 2024, Genoa, Italy. 3rd June 2024
https://alandix.com/academic/papers/synergy2024-epistemic/
As machine learning integrates deeper into human-computer interactions, the concept of epistemic interaction emerges, aiming to refine these interactions to enhance system adaptability. This approach encourages minor, intentional adjustments in user behaviour to enrich the data available for system learning. This paper introduces epistemic interaction within the context of human-system communication, illustrating how deliberate interaction design can improve system understanding and adaptation. Through concrete examples, we demonstrate the potential of epistemic interaction to significantly advance human-computer interaction by leveraging intuitive human communication strategies to inform system design and functionality, offering a novel pathway for enriching user-system engagements.
Transcript: Selling digital books in 2024: Insights from industry leaders - T...BookNet Canada
The publishing industry has been selling digital audiobooks and ebooks for over a decade and has found its groove. What’s changed? What has stayed the same? Where do we go from here? Join a group of leading sales peers from across the industry for a conversation about the lessons learned since the popularization of digital books, best practices, digital book supply chain management, and more.
Link to video recording: https://bnctechforum.ca/sessions/selling-digital-books-in-2024-insights-from-industry-leaders/
Presented by BookNet Canada on May 28, 2024, with support from the Department of Canadian Heritage.
9. “The database is just a
detail that you don’t need
to figure out right away”
NO DB - May 2012
Robert “Uncle Bob” Martin
Wednesday, 11 September 13
10. Domain-driven Design
Wednesday, 11 September 13
Not the same as domain classes first
Model your domain first without integration concerns
It’s in operation at all stages of development, not just up-front
Reminded of a problem domain related to managing meetings and attendees - focused so
hard on the DB tables that the program logic was a dog’s breakfast.
12. from Wikmedia Commons
Wednesday, 11 September 13
We can use the model to calculate useful information, such as how long it takes for a ball to
roll down a hill
The model only includes significant complexity - ignores the rest
Formula 1 makes use of CFD because they need it at the bleeding edge
13. Remember: you’re
trying to solve a
business problem
Wednesday, 11 September 13
You need to understand the problem domain
The model needs to reflect that understanding
Gradle is a great example of a rich, evolving, and useful domain model
15. An example - reporting
ReportController ReportService
Jasper
Wednesday, 11 September 13
High volume transactional web site, optimised for write
Everything was OK at this point
16. An example - reporting
ReportController ReportService
Jasper + HTML reports with paging
Breakage!
Wednesday, 11 September 13
The logic for building reports was complex
Who is responsible for the paging? The HTML generation?
Where is the state kept? The service? A domain class?
17. An example - reporting
PublisherReport
HTTP
Request
Summary
Table 1
Table 2
...
Table N
It’s a command object!
Wednesday, 11 September 13
Let’s try again
The logic for building the report and pagination is in the PublisherReport class
18. An example - reporting
class ReportController {
def print(PublisherReport report) {
JasperRenderer.render report
}
def json(PublisherReport report) {
render report as JSON
}
...
}
Wednesday, 11 September 13
The controller is now very thin
The report can support parameters for sub-reports etc.
The domain model is embodied in the command object
21. What is my domain?
Domain Model
HTTP Database
? ?
Wednesday, 11 September 13
Always ask yourself this question throughout life of project
And is it closer to the user’s perspective or the persistence model? Or neither?
Former argues for a model based on command objects, the latter based on domain classes.
23. Wednesday, 11 September 13
Query model much more complex
Multiple timelines
Conversation threads
Retweets
24. Wednesday, 11 September 13
So working from your domain first is a good thing
And remember that different contexts have potentially different views of the model, i.e. the
user/client, persistence, other system components
DDD doesn’t preclude the CRUD/service-based architecture
So what are the driving forces behind architecture beyond the model?
28. Java
Wednesday, 11 September 13
Remember applets?
Liked the approach (particularly WebStart) but not often used. The browser was a delivery
mechanism, not a platform
29. It’s all about the
Javascript!
AngularJS
Knockout.js
Backbone.js
Underscore.js
jQuery.js
Moustache
Wednesday, 11 September 13
The browser is now a platform for rich applications
But how do these impact the Grails app?
The whole process of building a page on each request goes out the window
30. Google I/O 2012
Android activations to date
400 million
Apple WWDC 2012
iOS devices sold to date
365 million
Wednesday, 11 September 13
Let’s not forget Firefox OS
Lots of people potentially hitting a site at any one time!
Typical Grails architecture may struggle to handle the load (OpenSessionInViewInterceptor,
transactions, GSPs, thread-per-request)
31. An aside
If the whole Java client thing had worked out, would
you use it for every web application you wrote?
Would you use it for Wikipedia?
Wednesday, 11 September 13
Before jumping onto the whole “single-page app” bandwagon, work out whether it’s
appropriate for your app
32. Shared templates
HandlebarsViewResolver
or
<hbt:render template="..."/>
GSP
Wednesday, 11 September 13
Not much to talk about on client architecture, but template reuse is something to think about
View resolver only makes sense if client-side templates are complete views
hbt is a fictitious tag namespace representing a plugin based on Handlebars for Java
33. AJAX + JSON endpoints
enabler for async
Wednesday, 11 September 13
Rich UIs don’t talk HTML - use JSON endpoints (aka “REST”)
Asset delivery via Resources or asset-pipeline plugins
More scope for asynchronicity, since no wait for full page update
Grails 2.3 introduces some nice features for REST
34. What’s the need for
SiteMesh & GSP then?
Wednesday, 11 September 13
Difficult to impossible to remove these currently
Grails 3 will finally extricate them, allowing you to remove them from your project
35. Aside 2
Don’t be afraid to use Ruby/Node.js tooling
Grunt
Bower
Yeoman
Compass/SASS
Wednesday, 11 September 13
If you go for a heavy Javascript UI, consider Ruby/Node.js tooling
Generally richer than Java-based tooling
36. Async
for scalability
Wednesday, 11 September 13
To solve the problem of dealing with large number of concurrent requests
Without adding lots more servers
37. Grails Promise API
import static grails.async.Promises.*
class ReportController {
def print(PublisherReport report) {
task {
// Expensive report creation here
}
}
...
}
Wednesday, 11 September 13
We can now return Promise instances from actions
The expensive task no longer blocks the request thread, but...
38. Controller
Request
Thread Pool
Worker
Thread Pool
HTTP
Request
Offload
Task
Return thread
Wednesday, 11 September 13
The request threads are now free, but burden is on worker thread pool
If all worker tasks are synchronous, have we gained scalability?
In cases where just a few URLs are blocking for long(ish) periods of time, yes (kind of)
But otherwise, now bottleneck is on worker thread pool
39. Make efficient use of
server resources
Wednesday, 11 September 13
Async all the way through - Grails Promises, GPars, messaging
Remember that some things are inherently synchronous (think Fibonacci)
41. Async controllers
import static grails.async.Promises.*
class ReportController {
def tagService
def postService
def home() {
tasks tags: tagService.tagsWithCount()
trends: tagService.trendingTags()
timeline: postService.timeline(
params.userId)
}
...
}
Wednesday, 11 September 13
tagService and postService are both async
The model values are evaluated in parallel
This is a PromiseMap - view rendered only when all map values evaluated
42. Async controllers
import static grails.async.Promises.*
class TagService {
def remoteTagService
def tagsWithCount() {
task {
remoteTagService.tagsWithCount()
}
}
...
}
Wednesday, 11 September 13
You can also use @DelegateAsync to create async version of synchronous service
Currently not Grails’ sweet spot due to the solution’s lightweight nature...
...perhaps makes sense with Grails 3?
43. Rich domain model +
Promises API/GPars?
Wednesday, 11 September 13
Fully async backend
A good domain model makes it easy to identify parallelisable work
No simple solutions though! Concurrency is still a tricky problem.
44. GPars supports
• Dataflow
• Communicating Sequential Processes (CSP)
• Actor model
Wednesday, 11 September 13
50. Spring Integration
MyController
MyService
message
DB Persister
SplitterJMS Twitter
A channel (pipe)
Message endpoint
Wednesday, 11 September 13
Based on Enterprise Integration Patterns (filters & pipes)
Many options for routing and transforming messages
Logging adapters and wire tapping for debug
51. Spring Integration Groovy DSL
def builder = new IntegrationBuilder()
def ic = builder.doWithSpringIntegration {
messageFlow("flow") {
filter { it == "World" }
transform(inputChannel: "transformerChannel") {
"Hello " + it
}
handle { println "**** $it ****" }
}
}
ic.send "flow.inputChannel", "World"
ic.send "transformerChannel", "Earth"
Wednesday, 11 September 13
57. Event bus - (grails-)events
Event bus (Reactor)
PluginService
publish
PluginUpdateService YourListener
Wednesday, 11 September 13
58. Event bus - (grails-)events
Event bus (Reactor)
Browser
RabbitMQ (pending)
events-push plugin
Wednesday, 11 September 13
59. Event bus - (grails-)events
class PluginService {
def publish(PluginDetails info) {
...
event "pluginUpdate", info
}
}
class PluginUpdateService {
@Selector
def pluginUpdate(PluginDetails info) {
...
}
}
Wednesday, 11 September 13
with spring-events plugin
60. AppEvents.groovy
includes = ["push"]
doWithReactor = {
reactor("grailsReactor") {
ext "browser", ["pluginUpdate"]
}
}
Wednesday, 11 September 13
In grails-app/conf
Can control which events are propagated to the browser
The “push” include sets up a
62. A CQRS architecture
Updates
Views
Concurrency
via event bus
Store changes
Separate data stores
for queries
Wednesday, 11 September 13
Why? Updates and querying often have different data requirements.
For example, Lanyrd use Redis structured data support
All read databases can be rebuilt from master events DB
CQRS designed for scale