This is the 6th of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
Connections Migrations the easy way Soccnx10Sharon James
Migrating & upgrading connections can be a daunting - Here i share some trips, best practises and information on how to ensure that your upgrades are stress free
This is the 6th of 8 presentations given at University of Texas during my Beginner to Builder Rails 3 Class. For more info and the whole series including video presentations at my blog:
http://schneems.com/tagged/Rails-3-beginner-to-builder-2011
Connections Migrations the easy way Soccnx10Sharon James
Migrating & upgrading connections can be a daunting - Here i share some trips, best practises and information on how to ensure that your upgrades are stress free
Watch along with the video at https://www.youtube.com/watch?v=ag-bI5lr55s
Luke Kanies, CEO and Founder of Puppet Labs, talks on "Making Puppet More Hackable" at PuppetCamp Europe '11, Amsterdam, Netherlands. Learn more: http://www.puppetlabs.com
Mobile content-centric applications are coming to an enterprise near you! Why do you need them? What are the constraints and opportunities of mobile ECM development? What technologies are available and what solutions will Nuxeo propose to help developers create these applications?
These are the slides from my talk about the AppScale project at the SBonRails meetup. It covers AppScale as well as Google App Engine and the research projects have come out of it, including Neptune, a Ruby DSL focused on computation-heavy workloads.
Javascript Views, Client-side or Server-side with NodeJSSylvain Zimmer
A talk I gave at the Paris Node Meetup on June 8th 2011, in front of all the best JS developers in Paris and NodeJS creator Ryan Dahl.
I hope it will make some devs avoid some of the horrible hashbang practices we see on websites like the new twitter !
Introduction to Google App Engine talk delivered 2010 Jul 16 at EuroPython in Birmingham, UK and 2010 Jul 22 at the GTUG in London by Wesley Chun, Developer Advocate for Google.
Integrating ECM (WebCenter Content) with your Enterprise! 5 Tips to Try, 5 Tr...Brian Huff
There are a number of ways to scale up a basic content or collaboration application into a true Enterprise Content Management system. But which one makes the most sense in your situation? If you pick the wrong path, how will you know it? And what techniques seem compelling, but will eventually lead to an unusable system? In this talk, we will present 10 integration strategies: 5 that work, and 5 that hurt.
10 clues showing that you are doing OSGi in the wrong manner - Jerome Molieremfrancis
This presentation aims to show common pitfalls in OSGi architecture and development and how to avoid them. It involves concrete use cases and their solutions. Antipatterns, bad designs , bad tooling will be presented during this session... This session is user oriented and aimed to give concrete feedbacks and good practices...
Watch along with the video at https://www.youtube.com/watch?v=ag-bI5lr55s
Luke Kanies, CEO and Founder of Puppet Labs, talks on "Making Puppet More Hackable" at PuppetCamp Europe '11, Amsterdam, Netherlands. Learn more: http://www.puppetlabs.com
Mobile content-centric applications are coming to an enterprise near you! Why do you need them? What are the constraints and opportunities of mobile ECM development? What technologies are available and what solutions will Nuxeo propose to help developers create these applications?
These are the slides from my talk about the AppScale project at the SBonRails meetup. It covers AppScale as well as Google App Engine and the research projects have come out of it, including Neptune, a Ruby DSL focused on computation-heavy workloads.
Javascript Views, Client-side or Server-side with NodeJSSylvain Zimmer
A talk I gave at the Paris Node Meetup on June 8th 2011, in front of all the best JS developers in Paris and NodeJS creator Ryan Dahl.
I hope it will make some devs avoid some of the horrible hashbang practices we see on websites like the new twitter !
Introduction to Google App Engine talk delivered 2010 Jul 16 at EuroPython in Birmingham, UK and 2010 Jul 22 at the GTUG in London by Wesley Chun, Developer Advocate for Google.
Integrating ECM (WebCenter Content) with your Enterprise! 5 Tips to Try, 5 Tr...Brian Huff
There are a number of ways to scale up a basic content or collaboration application into a true Enterprise Content Management system. But which one makes the most sense in your situation? If you pick the wrong path, how will you know it? And what techniques seem compelling, but will eventually lead to an unusable system? In this talk, we will present 10 integration strategies: 5 that work, and 5 that hurt.
10 clues showing that you are doing OSGi in the wrong manner - Jerome Molieremfrancis
This presentation aims to show common pitfalls in OSGi architecture and development and how to avoid them. It involves concrete use cases and their solutions. Antipatterns, bad designs , bad tooling will be presented during this session... This session is user oriented and aimed to give concrete feedbacks and good practices...
Fort de ses 1.7 millions de téléchargements l'an passé, Groovy continue son bonhomme de chemin en tête parmi les langages de programmation alternatifs pour la JVM.
Groovy 2.0, sorti l'an passé, introduisait dans son offre de la modularité, le support de JDK 7 au niveau syntaxique avec "Project Coin" autant qu'au niveau JVM avec l'utilisation d'"invoke dynamic", et proposait des fonctionnalités de typage et de compilation statique.
Groovy 2.1, quant à lui, s'appuie sur ces bases pour compléter le support d'"invoke dynamic" pour plus de performances. Il propose des améliorations permettant de documenter, d'aider les IDEs, et de vérifier statiquement les Domain-Specific Languages construits avec Groovy. Vous pourrez créer des méta-annotations regroupant d'autres annotations, pour éviter l'annotation "hell". Et enfin, vous irez encore plus loin dans la customisation du compilateur !
Accrochez votre ceinture, paré au décollage !
"Groovy 2.0 and beyond" presentation given at the Groovy/Grails eXchange conference.
Video can be seen here:
http://skillsmatter.com/podcast/groovy-grails/keynote-speech
Groovy Domain Specific Languages - SpringOne2GX 2012Guillaume Laforge
Paul King, Andrew Eisenberg and Guillaume Laforge present about implementation of Domain-Specific Languages in Groovy, while at the SpringOne2GX 2012 conference in Washington DC.
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.
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionAggregage
Join Maher Hanafi, VP of Engineering at Betterworks, in this new session where he'll share a practical framework to transform Gen AI prototypes into impactful products! He'll delve into the complexities of data collection and management, model selection and optimization, and ensuring security, scalability, and responsible use.
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!
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.
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024Neo4j
Neha Bajwa, Vice President of Product Marketing, Neo4j
Join us as we explore breakthrough innovations enabled by interconnected data and AI. Discover firsthand how organizations use relationships in data to uncover contextual insights and solve our most pressing challenges – from optimizing supply chains, detecting fraud, and improving customer experiences to accelerating drug discoveries.
Pushing the limits of ePRTC: 100ns holdover for 100 daysAdtran
At WSTS 2024, Alon Stern explored the topic of parametric holdover and explained how recent research findings can be implemented in real-world PNT networks to achieve 100 nanoseconds of accuracy for up to 100 days.
SAP Sapphire 2024 - ASUG301 building better apps with SAP Fiori.pdfPeter Spielvogel
Building better applications for business users with SAP Fiori.
• What is SAP Fiori and why it matters to you
• How a better user experience drives measurable business benefits
• How to get started with SAP Fiori today
• How SAP Fiori elements accelerates application development
• How SAP Build Code includes SAP Fiori tools and other generative artificial intelligence capabilities
• How SAP Fiori paves the way for using AI in SAP apps
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.
Dr. Sean Tan, Head of Data Science, Changi Airport Group
Discover how Changi Airport Group (CAG) leverages graph technologies and generative AI to revolutionize their search capabilities. This session delves into the unique search needs of CAG’s diverse passengers and customers, showcasing how graph data structures enhance the accuracy and relevance of AI-generated search results, mitigating the risk of “hallucinations” and improving the overall customer journey.
UiPath Test Automation using UiPath Test Suite series, part 4DianaGray10
Welcome to UiPath Test Automation using UiPath Test Suite series part 4. In this session, we will cover Test Manager overview along with SAP heatmap.
The UiPath Test Manager overview with SAP heatmap webinar offers a concise yet comprehensive exploration of the role of a Test Manager within SAP environments, coupled with the utilization of heatmaps for effective testing strategies.
Participants will gain insights into the responsibilities, challenges, and best practices associated with test management in SAP projects. Additionally, the webinar delves into the significance of heatmaps as a visual aid for identifying testing priorities, areas of risk, and resource allocation within SAP landscapes. Through this session, attendees can expect to enhance their understanding of test management principles while learning practical approaches to optimize testing processes in SAP environments using heatmap visualization techniques
What will you get from this session?
1. Insights into SAP testing best practices
2. Heatmap utilization for testing
3. Optimization of testing processes
4. Demo
Topics covered:
Execution from the test manager
Orchestrator execution result
Defect reporting
SAP heatmap example with demo
Speaker:
Deepak Rai, Automation Practice Lead, Boundaryless Group and UiPath MVP
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...Neo4j
Leonard Jayamohan, Partner & Generative AI Lead, Deloitte
This keynote will reveal how Deloitte leverages Neo4j’s graph power for groundbreaking digital twin solutions, achieving a staggering 100x performance boost. Discover the essential role knowledge graphs play in successful generative AI implementations. Plus, get an exclusive look at an innovative Neo4j + Generative AI solution Deloitte is developing in-house.
State of ICS and IoT Cyber Threat Landscape Report 2024 previewPrayukth K V
The IoT and OT threat landscape report has been prepared by the Threat Research Team at Sectrio using data from Sectrio, cyber threat intelligence farming facilities spread across over 85 cities around the world. In addition, Sectrio also runs AI-based advanced threat and payload engagement facilities that serve as sinks to attract and engage sophisticated threat actors, and newer malware including new variants and latent threats that are at an earlier stage of development.
The latest edition of the OT/ICS and IoT security Threat Landscape Report 2024 also covers:
State of global ICS asset and network exposure
Sectoral targets and attacks as well as the cost of ransom
Global APT activity, AI usage, actor and tactic profiles, and implications
Rise in volumes of AI-powered cyberattacks
Major cyber events in 2024
Malware and malicious payload trends
Cyberattack types and targets
Vulnerability exploit attempts on CVEs
Attacks on counties – USA
Expansion of bot farms – how, where, and why
In-depth analysis of the cyber threat landscape across North America, South America, Europe, APAC, and the Middle East
Why are attacks on smart factories rising?
Cyber risk predictions
Axis of attacks – Europe
Systemic attacks in the Middle East
Download the full report from here:
https://sectrio.com/resources/ot-threat-landscape-reports/sectrio-releases-ot-ics-and-iot-security-threat-landscape-report-2024/
PHP Frameworks: I want to break free (IPC Berlin 2024)Ralf Eggert
In this presentation, we examine the challenges and limitations of relying too heavily on PHP frameworks in web development. We discuss the history of PHP and its frameworks to understand how this dependence has evolved. The focus will be on providing concrete tips and strategies to reduce reliance on these frameworks, based on real-world examples and practical considerations. The goal is to equip developers with the skills and knowledge to create more flexible and future-proof web applications. We'll explore the importance of maintaining autonomy in a rapidly changing tech landscape and how to make informed decisions in PHP development.
This talk is aimed at encouraging a more independent approach to using PHP frameworks, moving towards a more flexible and future-proof approach to PHP development.
Alt. GDG Cloud Southlake #33: Boule & Rebala: Effective AppSec in SDLC using ...James Anderson
Effective Application Security in Software Delivery lifecycle using Deployment Firewall and DBOM
The modern software delivery process (or the CI/CD process) includes many tools, distributed teams, open-source code, and cloud platforms. Constant focus on speed to release software to market, along with the traditional slow and manual security checks has caused gaps in continuous security as an important piece in the software supply chain. Today organizations feel more susceptible to external and internal cyber threats due to the vast attack surface in their applications supply chain and the lack of end-to-end governance and risk management.
The software team must secure its software delivery process to avoid vulnerability and security breaches. This needs to be achieved with existing tool chains and without extensive rework of the delivery processes. This talk will present strategies and techniques for providing visibility into the true risk of the existing vulnerabilities, preventing the introduction of security issues in the software, resolving vulnerabilities in production environments quickly, and capturing the deployment bill of materials (DBOM).
Speakers:
Bob Boule
Robert Boule is a technology enthusiast with PASSION for technology and making things work along with a knack for helping others understand how things work. He comes with around 20 years of solution engineering experience in application security, software continuous delivery, and SaaS platforms. He is known for his dynamic presentations in CI/CD and application security integrated in software delivery lifecycle.
Gopinath Rebala
Gopinath Rebala is the CTO of OpsMx, where he has overall responsibility for the machine learning and data processing architectures for Secure Software Delivery. Gopi also has a strong connection with our customers, leading design and architecture for strategic implementations. Gopi is a frequent speaker and well-known leader in continuous delivery and integrating security into software delivery.
A tale of scale & speed: How the US Navy is enabling software delivery from l...sonjaschweigert1
Rapid and secure feature delivery is a goal across every application team and every branch of the DoD. The Navy’s DevSecOps platform, Party Barge, has achieved:
- Reduction in onboarding time from 5 weeks to 1 day
- Improved developer experience and productivity through actionable findings and reduction of false positives
- Maintenance of superior security standards and inherent policy enforcement with Authorization to Operate (ATO)
Development teams can ship efficiently and ensure applications are cyber ready for Navy Authorizing Officials (AOs). In this webinar, Sigma Defense and Anchore will give attendees a look behind the scenes and demo secure pipeline automation and security artifacts that speed up application ATO and time to production.
We will cover:
- How to remove silos in DevSecOps
- How to build efficient development pipeline roles and component templates
- How to deliver security artifacts that matter for ATO’s (SBOMs, vulnerability reports, and policy evidence)
- How to streamline operations with automated policy checks on container images
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.
National Security Agency - NSA mobile device best practices
Gaelyk - Guillaume Laforge - GR8Conf Europe 2011
1. Gaelyk
Skyrocketing Groovy
into the cloud!
Guillaume Laforge
Groovy Project Manager
SpringSource / VMware
jeudi 19 mai 2011
2. Gaelyk
Skyrocketing Groovy
into the cloud!
Guillaume Laforge
Groovy Project Manager
SpringSource / VMware
jeudi 19 mai 2011
3. Guillaume Laforge
• Groovy Project Manager
• JSR-241 Spec Lead
• Head of Groovy Development
at SpringSource / VMWare
• Initiator of the Grails framework
• Creator of the Gaelyk toolkit
• Co-author of Groovy in Action
• Speaker: JavaOne, QCon, JavaZone, Sun TechDays,
Devoxx, The Spring Experience, SpringOne, JAX,
Dynamic Language World, IJTC, and more...
2
jeudi 19 mai 2011
4. Guillaume Laforge
• Groovy Project Manager
• JSR-241 Spec Lead
• Head of Groovy Development
at SpringSource / VMWare
• Initiator of the Grails framework
• Creator of the Gaelyk toolkit
• Co-author of Groovy in Action
• Speaker: JavaOne, QCon, JavaZone, Sun TechDays,
Devoxx, The Spring Experience, SpringOne, JAX,
Dynamic Language World, IJTC, and more...
2
jeudi 19 mai 2011
5. IaaS, PaaS, SaaS
• Software as a Service
– Gmail, SalesForce.com
SaaS
• Platform as a Service
– Google App Engine PaaS
• Infrastructure as a Service
– Amazon EC2
IaaS
3
jeudi 19 mai 2011
6. IaaS, PaaS, SaaS
• Software as a Service
– Gmail, SalesForce.com
SaaS
• Platform as a Service
– Google App Engine PaaS
• Infrastructure as a Service
– Amazon EC2
IaaS
3
jeudi 19 mai 2011
7. IaaS, PaaS, SaaS
• Software as a Service
– Gmail, SalesForce.com
SaaS
• Platform as a Service
– Google App Engine PaaS
• Infrastructure as a Service
– Amazon EC2
IaaS
3
jeudi 19 mai 2011
8. Google App Engine
• Google’s PaaS solution
– Run your app on Google’s infrastructure
• Initially just Python supported
• Java support added too
– Sandboxed JVM
– Jetty servlet container
• Several JVM-compatible language supported
4
jeudi 19 mai 2011
9. Key aspects
• You can use most of your usual web frameworks for
developping apps on App Engine Java
– A WAR file, basically! (an exploded war actually)
– Uploading to the cloud by sending deltas of changes
• No OS image, or software to install
– Unlike with Amazon EC2
• All the scaling aspects are handled for you
– Database / session replication, load balancing...
• There are quotas, but you need a high traffic
application to start being charged
– Free to get started
5
jeudi 19 mai 2011
10. Some of the available services
• Memcache • XMPP
– JCache implementation – Send / receive Jabber
– Save on CPU and datastore messages (GTalk)
• URL Fetch • User
– Use Google’s user/
– Access remote resources
authentication system
– HttpUrlConnection
– OAuth support
• Mail • Cron & Task queues
– Support both incoming and – Schedule tasks at regular
outgoing emails intervals
• Images – Queue units of work
– Resize, crop, rotate... • Blobstore
– For storing large content
6
jeudi 19 mai 2011
11. Limitations
•30 seconds request duration limit
– Task queues raised to 10 minutes
– Notion of Backends servers since 1.5.0
• Forbidden to
– write on the file system
– create threads
– use raw sockets
– issue system calls
– use IO / Swing / etc. directly
•There’s a whitelist of classes allowed
• Number of files and their size are limited
7
jeudi 19 mai 2011
27. The Datastore
Europe 2011 — Copenhagen, Denmark
jeudi 19 mai 2011
28. The datastore...
• Distributed key / value store
– Based on Google’s «BigTable»
– Schema-less approach
• Supporting
– Transactions and partitioning
– Hierarchies through entity groups
• Data access APIs
– JPA and JDO
• but adds a big request load time factor
– Direct low-level APIs
12
jeudi 19 mai 2011
29. ...and its «limitations»
• You’re not using SQL
–No joins
– No database constraints
– No aggregation functions (count, avg...)
• In a query, you can only filter on one column
for inequality
• Transactions only available in entity groups
• You can only update an entity once in a transaction
• No full text search capability
13
jeudi 19 mai 2011
30. Nice dashboard
Europe 2011 — Copenhagen, Denmark
jeudi 19 mai 2011
33. • Gaelyk is a lightweight Groovy toolkit on top of
the Google App Engine Java SDK
• Gaelyk builds on Groovy’s servlet support
– Groovlets: Groovy scripts instead of raw servlets!
– Groovy templates: JSP-like template engine
– Both allow for a clean separation of views and logic
• Gaelyk provides several enhancements around the
GAE Java SDK to make life easier, thanks to
Groovy’s dynamic nature
16
jeudi 19 mai 2011
34. Gaelyk 0.7 released
• Right on time for GR8Conf
• What’s new?
– Upgraded to Groovy 1.8 and GAE SDK 1.5
– XMPP presence and subscription support
– Support for the files service and initial support for the
backends service
– New variables for files service, backends service, and
lifecycle manager
– Datastore metadata querying methods
17
jeudi 19 mai 2011
35. Why Groovy?
• Groovy is a dynamic language for the JVM
– very flexible, malleable, expressive and concise syntax
– easy to learn for Java developers
• deriving from the Java 5 grammar
– provides powerful APIs to simplify the life of developers
• possibility to dynamically enrich existing APIs
– support for Groovlets and its own template engine
18
jeudi 19 mai 2011
36. First steps...
• Go to http://gaelyk.appspot.com
• Download the template project
• Put your first Groovlet in /WEB-INF/groovy
• And your templates in /WEB-INF/pages
• And you’re ready to go!
• Launch dev_appserver.sh
• Go to http://localhost:8080/
Europe 2011 — Copenhagen, Denmark
jeudi 19 mai 2011
38. MVC: Groovlets and templates
Groovlets Templates
(controllers) (views)
Entities
(domain)
jeudi 19 mai 2011
21
39. A groovlet
• Instead of writing full-blown servlets, just write
Groovy scripts (aka Groovlets)
def numbers = [1, 2, 3, 4]
def now = new Date()
html.html {
body {
numbers.each { number -> p number }
p now
}
}
22
jeudi 19 mai 2011
40. A groovlet
• Instead of writing full-blown servlets, just write
Groovy scripts (aka Groovlets)
def numbers = [1, 2, 3, 4]
def now = new Date()
html.html {
body {
numbers.each { number -> p number }
p now
}
di ng
oa
}
-rel
to
Au
22
jeudi 19 mai 2011
50. Accessing the datastore
• Direct interaction with the low-level datastore API
Entity entity = new Entity("person")
map
// subscript notation, like when accessing a
entity['name'] = "Guillaume Laforge"
// normal property access notation
entity.age = 32
entity.save() // asyncSave()
entity.delete() // asyncDelete()
datastore.withTransaction {
// do stuff with your entities
// within the transaction
}
// use the asynchronous datastore service
datastore.async.put(entity)
29
jeudi 19 mai 2011
51. Querying to be improved...
import com.google.appengine.api.datastore.*
der.*
import static com.google.appengine.api.datastore.FetchOptions.Buil
// query the scripts stored in the datastore
def query = new Query("savedscript")
// sort results by descending order of the creation date
query.addSort("dateCreated", Query.SortDirection.DESCENDING)
author
// filters the entities so as to return only scripts by a certain
r)
query.addFilter("author", Query.FilterOperator.EQUAL, params.autho
PreparedQuery preparedQuery = datastore.prepare(query)
// return only the first 10 results
def entities = preparedQuery.asList( withLimit(10) )
30
jeudi 19 mai 2011
52. ...into something groovier?
def entities = datastore.query {
select all from savedscript
sort desc by dateCreated
where author == params.author
limit 10
} as List
31
jeudi 19 mai 2011
53. ...into something groovier?
def entities = datastore.query {
select all from savedscript
sort desc by dateCreated
where author == params.author
limit 10 te d!
} as List m en
p le
t im
ill no
S t
31
jeudi 19 mai 2011
54. URL Routing system
• You can have friendly URL mappings
with the URL routing system
all "/aboutus",
redirect: "/blog/2008/10/20/about-us"
all "/blog/@year/@month/@day/@title",
y@title=@title"
for ward: "/blog.groovy?year=@year&month=@month@day=@da
get "/blog/@year/@month/@day",
@day"
forward: "/blog.groovy?year=@year&month=@month@day=
get "/book/isbn/@isbn",
forward: "/book.groovy?isbn=@isbn",
validate: { isbn ==~ /d{9}(d|X)/ }
– RouteFilter should be configured in web.xml
32
jeudi 19 mai 2011
56. URL Routing system
• You can also define caching times
get "/aboutus", cache: 24.hours,
forward: "/aboutus.gtpl"
get "/breaking-news", cache: 1.minute,
forward: "/news.groovy?last=10"
– Nice for GAE’s infamous «loading requests»
•less critical since GAE SDK 1.4
– warmup requests
– and with paid tier, you can have instances pre-allocated
34
jeudi 19 mai 2011
57. URL Routing system
• Special routes for specifying
– incoming emails
– jabber chat messages
– jabber presence and subscription messages
email to: "/incomingMail.groovy"
jabber to: "/incomingXmpp.groovy"
// synonym: jabber chat, to: "..."
jabber presence, to: "/subs.groovy"
jabber subscrpition, to: "/subs.groovy"
35
jeudi 19 mai 2011
58. URL Routing system
• Namespace awareness: nice for multitenancy
• Capability awareness: for graceful degradation
// @cust customer variable could be « acme »
post "/@cust/update", forward: "/update.groovy",
namespace: { "ns-$cust" }
es status
// different destinations depending on the GAE servic
get "/speakers", forward {
to "/speakers.groovy" // default destination
// when the datastore is not available
to "/unavailable.gtpl" on DATASTORE not ENABLED
// show some maintenance is upcoming
to "/speakers.groovy?maintenance=true" on DATASTORE
is SCHEDULED_MAINTENANCE
}
36
jeudi 19 mai 2011
59. Capabilities
• Google App Engine allows you to know the status
and availability of the various services
– DATASTORE, DATESTORE_WRITE, MEMCACHE...
– ENABLED, DISABLED, UNKNOWN,
SCHEDULED_MAINTENANCE
– is() and not() methods
if (capabilities[DATASTORE_WRITE].is(ENABLED)) {
// write some content in the datastore
} else {
// otherwise, redirect to some maintenance page
}
37
jeudi 19 mai 2011
60. Task queue API
// access a configured queue using the subscript notation
queues['dailyEmailQueue']
// or using the property access notation
queues.dailyEmailQueue
// you can also access the default queue with:
queues.default
defaultQueue
// add a task to the queue
queue << [
countdownMillis: 1000, url: "/task/dailyEmail",
taskName: "sendDailyEmailNewsletter",
method: 'PUT', params: [date: '20090914'],
payload: content
]
38
jeudi 19 mai 2011
61. Jabber / XMPP support (1/3)
• Sending instant messages
String recipient = "someone@gmail.com"
// check if the user is online
if (xmpp.getPresence(recipient).isAvailable()) {
// send the message
def status = xmpp.send(to: recipient,
body: "Hello, how are you?")
// checks the message was successfully
// delivered to all the recipients
assert status.isSuccessful()
}
39
jeudi 19 mai 2011
62. Jabber / XMPP support (2/3)
• Sending instant messages with an XML payload
String recipient = "service@gmail.com"
// check if the service is online
if (xmpp.getPresence(recipient).isAvailable()) {
// send the message
def status = xmpp.send(to: recipient, xml: {
customers {
customer(id: 1) {
name 'Google'
}
}
})
// checks the message was successfully delivered to the service
assert status.isSuccessful()
}
40
jeudi 19 mai 2011
63. Jabber / XMPP support (2/3)
• Sending instant messages with an XML payload
String recipient = "service@gmail.com"
// check if the service is online
if (xmpp.getPresence(recipient).isAvailable()) {
// send the message
def status = xmpp.send(to: recipient, xml: {
customers {
customer(id: 1) { <customers>
name 'Google' <customer id=’1’>
} <name>Google</name>
} </customer>
</customers>
})
// checks the message was successfully delivered to the service
assert status.isSuccessful()
}
40
jeudi 19 mai 2011
64. Jabber / XMPP support (3/3)
• Receving incoming instant messages
– Once you’ve configured a route for jabber messages
– Add the inbound message service in appengine-web.xml
def message = xmpp.parseMessage(request)
// get the body of the message
message.body
// get the sender Jabber ID
message.from
// get the list of recipients Jabber IDs
message.recipients
// if the message is an XML document instead of a raw string message
if (message.isXml()) {
// get the raw XML
message.stanza
// get a document parsed with XmlSlurper
message.xml
}
41
jeudi 19 mai 2011
65. Memcache service
• Map notation access to the cache
}
class Country implements Serialzable { String name
def countryFr = new Country(name: 'France')
in the cache
// use the subscript notation to put a country object
// (you can also use non-string keys)
memcache['FR'] = countryFr
// check that a key is present in the cache
if ('FR' in memcache) {
the cache using a key
// use the subscript notation to get an entry from
def countryFromCache = memcache['FR']
}
42
jeudi 19 mai 2011
66. Closure memoization
• Cache the return values for each dinstinct
invocation (for a given arguments set)
->
def countEntities = memcache.memoize { String kind
datastore.prepare( new Query(kind) )
.countEntities()
}
// first call
def totalPics = countEntityes('photos')
// second call, hitting the cache
totalPics = countEntityes('photos')
43
jeudi 19 mai 2011
67. Blobstore enhancements
• The blobstore allows to store some large content
– images, videos, etc.
def blob = ...
print blob.filename // contentType, creation, size
// output the content of the blob to the response
blob.serve response
// read the content of the blob
blob.withReader { Reader r -> ... }
blob.withStream { InputStream is -> ... }
// delete the blob
blob.delete()
44
jeudi 19 mai 2011
68. File service
• The file service provides a file-like read/write access
over blobs from the blobstore services
– programmatic creation of blobs was an issue before
def file = files.createNewBlobFile("text/plain", "hello.txt")
// writing with a writer
file.withWriter { writer ‐>
writer << "some content"
}
// writing binary content
file.withOutputStream { stream ‐>
stream << "some content".bytes
}
// file.withWriter(encoding: "US‐ASCII")
// file.withWriter(locked: false, finalize: false)
45
jeudi 19 mai 2011
69. File service
• Instead of using the blobstore reading capabilities,
you can read from the file service
// read from a buffered input stream
file.withI nputStream { BufferedInputStream stream ‐>
// read from the stream
}
// read from a buffered reader
file.withReader{ BufferedReader reader ‐>
// read from the reader
}
// locked and encoding params available too
46
jeudi 19 mai 2011
71. Channel Service
• For Comet-style applications
def token = channel.createChannel('clientID')
channel.send 'clientID', 'Hi!'
• Then in the view, in JavaScript...
channel = new goog.appengine.Channel(token);
socket = channel.open();
socket.onmessage = function(msg) { ... }
48
jeudi 19 mai 2011
72. Simple plugin system
• Gaelyk features a simple plugin system for
extending your apps and share commonalities
• A plugin lets you
– provide additional groovlets and templates
– contribute new URL routes
– add new categories
– define variables in the binding
– override existing binding variables
– provide any static content
– add new libraries
– do any initialization
– add before/after request hooks
49
jeudi 19 mai 2011
73. Simple plugin system
• A plugin is actually just a zip file!
– Basically, just a Gaelyk application, minus...
•the Groovy / Gaelyk / GAE JARs
•the web.xml and appengine-web.xml descriptors
– But with a /WEB-INF/plugins/myplugin.groovy
descriptor
• A plugin must be referenced in /WEB-INF/
plugins.groovy with
– install myplugin
•shortcut to /WEB-INF/plugins/myplugin.groovy
50
jeudi 19 mai 2011
74. Simple plugin system
• An example plugin descriptor
– /WEB-INF/plugins/jsonPlugin.groovy
import net.sf.json.groovy.*
// add new variables in the binding
binding {
le
jsonLibVersion = "2.3" // a simple string variab
json = new JsonGroovyBuilder() // 3rd party class
}
// add new routes with the usual routing system format
routes {
get "/json", forward: "/json.groovy"
}
// install a category you've developped
categories jsonlib.JsonlibCategory
before { req, resp ‐> ... } // or after
// any other initialization code you'd need
51
jeudi 19 mai 2011
75. Summary
• Easy access to a cloud solution
–Deploying Java apps, as easily as you would with PHP
• Familiar to Java folks
–Your good old Servlet centric webapps style
• Free tier
• Gaelyk provides a simplified approach to
creating Servlet centric webapps in a
productive manner
–Leveraging Groovy’s servlet / template support
and dynamic capabilities
52
jeudi 19 mai 2011
76. What’s coming next?
• Expect more sugar around the Datastore
– An SQL-like query DSL
• Testing facilities specific to Gaelyk
–testing utility class, Spock-specific ones...
• Anything that’ll come up in newer GAE SDK versions
–in particular, Full Text Search!
53
jeudi 19 mai 2011
77. Not only me...
Benjamin Muschko Vladimír Orany Marco Vermeulen
Gradle GAE plugin Gradle Gaelyk Spock testing
Gradle Gaelyk plugin Eclipse plugin integration
Gaelyk datastore TDD Gaelyk
viewer plugin template (w/ Spock
& Easyb integration)
Eclipse DSLD file
54
jeudi 19 mai 2011
78. One
more
thing...
Europe 2011 — Copenhagen, Denmark
jeudi 19 mai 2011