The document discusses using aspect-oriented programming (AOP) to add cross-cutting concerns like logging, validation, and retries to code. It provides examples of using AOP frameworks like PostSharp to add attributes that inject logging, validation, and retry code around method executions. While AOP can help avoid scattering such code throughout an application, it also introduces complexity and requires special tools or language features to be effective.
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Red Hat Developers
In this session you will see how to take your machine model from development to production by watching the steps involved, which include: 1) Developing a ML model crafted via a Jupyter Notebook directly on top of Kubernetes/OpenShift; 2) Publishing that model as a service to be shared with your team or even the world; and 3) Monitoring the RESTful service via Grafana.
Introduction to Reactive Extensions (Rx)Tamir Dresher
Presentations from the june meeting of IDNDUG
http://ariely.info/Communities/IDNDUG/IDNDUG19thJune2013/tabid/171
The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Using Rx, developers represent asynchronous data streams with Observables, query asynchronous data streams using LINQ operators, andparameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, Rx = Observables + LINQ + Schedulers
Tests should save our money and time. How is it that they often become the stumbling block and slow down the work? They fail every time you try to do some refactoring and are difficult to maintain ultimately increasing the cost of software maintenance. If you have such problems it means that you may have gone "a mock too far " - testing the wrong things, and you using mock in the wrong places.
Examples how to test different types of code wisely so tests will protect your application and will not be a burden for you.
Jupyter Notebooks for machine learning on Kubernetes & OpenShift | DevNation ...Red Hat Developers
In this session you will see how to take your machine model from development to production by watching the steps involved, which include: 1) Developing a ML model crafted via a Jupyter Notebook directly on top of Kubernetes/OpenShift; 2) Publishing that model as a service to be shared with your team or even the world; and 3) Monitoring the RESTful service via Grafana.
Introduction to Reactive Extensions (Rx)Tamir Dresher
Presentations from the june meeting of IDNDUG
http://ariely.info/Communities/IDNDUG/IDNDUG19thJune2013/tabid/171
The Reactive Extensions (Rx) is a library for composing asynchronous and event-based programs using observable sequences and LINQ-style query operators. Using Rx, developers represent asynchronous data streams with Observables, query asynchronous data streams using LINQ operators, andparameterize the concurrency in the asynchronous data streams using Schedulers. Simply put, Rx = Observables + LINQ + Schedulers
Tests should save our money and time. How is it that they often become the stumbling block and slow down the work? They fail every time you try to do some refactoring and are difficult to maintain ultimately increasing the cost of software maintenance. If you have such problems it means that you may have gone "a mock too far " - testing the wrong things, and you using mock in the wrong places.
Examples how to test different types of code wisely so tests will protect your application and will not be a burden for you.
The secret unit testing tools no one ever told you aboutDror Helper
There are more to unit testing than using a unit testing framework - in order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about - some enabling creating of top-notch, robust unit tests. Some will help you run your tests better and faster. In this session I'll explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits and how unit level BDD, AutoMocking, and Continuous Execution can help take control over your tests.
Unit testing patterns for concurrent codeDror Helper
Getting started with unit testing is not hard, the only problem is that most programs are more than a simple calculator with two parameters and a returns value that is easy to verify. Writing unit tests for multi-threaded code is harder still. Over the years I discovered useful patterns that helped me to test multi-threaded and asynchronous code and enabled the creation of deterministic, simple and robust unit tests. Come learn how to test code that uses concurrency and parallelism – so that the excuses of not writing unit tests for such code would become as obsolete as a single core processors.
Most ORMs can optimize querying/joining data to avoid the N + 1 query problem, but it is limited to querying a single database. This session presents a lightweight, purely stateless, and type-safe solution to the N + 1 query problem that can transparently be reused in any microservice environment, which is especially relevant in an event sourcing/CQRS architecture. Through source code examples, the presentation dives into some core java 8 functional patterns to design a simple and user-friendly API that decouples the core logic of querying and efficiently aggregating disparate datasources (REST, NoSQL, database) from the streaming/reactive technology used to connect to those sources (Project Reactor/Spring WebFlux, Akka Stream, RxJava, and so on).
Part of the software developer job is to find new and better ways to solve problems. Writing code using his/her wits, intelligent and creativity.
However, sometimes being too clever can lead to hard to track bugs, maintainability issues and impossible to understand code. Is all cleverly written code good code, or is it a problem just waiting to happen?
In this session, I will show you real world examples of cleverly written code. And show you how we can use clean code principles, refactoring and design patterns, to transform that code from clever code to good code, code one that your peers - and future self - would thank you for writing.
Using API mocking tools in the browser helps front-end developers to build web application without having to rely on any backend services.
Mirage runs a mock server alongside the rest of your frontend JavaScript code and existing code dose not need to be changed. It also provides many rich tools for data modelling.
program list:
WAP program to show constructor overloading using static member.
WAP to implement multilevel inheritance and method overriding.
WAP to implement interface class and show use of package.
WAP to implement multilevel exception handling and create your own exception.
WAP to implement 3 threads such that 1st sleeps for 200ms, 2nd for 400ms and 3rd for 600ms.
WAP to create applet of moving banner.
WAP to make a simple calculator.
Build a client server chat application.
Angular projects can expand quickly and become a real nightmare for maintenance.
Since V-6, Angular is now easy with creating custom libraries, but we still need to take care on building our libraries in a way we can reuse and communicate with other applications in our organisation.
In this talk we will walk through the right way to build an Angular project architecture, how we can use the ng-packger and the DI and to provide different type of Injection Tokens(what are injection tokens?) and how actually to inject them and pass configurations from outside your project.
This is a presentation given by Dirk-Jan Rutten and Florentijn Hogerwerf at the React-Amsterdam Winter Event held on the 23rd of February 2017 (https://www.meetup.com/React-Amsterdam/events/237423993/).
The secret unit testing tools no one ever told you aboutDror Helper
There are more to unit testing than using a unit testing framework - in order to succeed you want to use the right tools for the job. There are a few tools that almost no one talks about - some enabling creating of top-notch, robust unit tests. Some will help you run your tests better and faster. In this session I'll explain about the inevitable maintainability problems developers face when writing and maintaining huge unit testing suits and how unit level BDD, AutoMocking, and Continuous Execution can help take control over your tests.
Unit testing patterns for concurrent codeDror Helper
Getting started with unit testing is not hard, the only problem is that most programs are more than a simple calculator with two parameters and a returns value that is easy to verify. Writing unit tests for multi-threaded code is harder still. Over the years I discovered useful patterns that helped me to test multi-threaded and asynchronous code and enabled the creation of deterministic, simple and robust unit tests. Come learn how to test code that uses concurrency and parallelism – so that the excuses of not writing unit tests for such code would become as obsolete as a single core processors.
Most ORMs can optimize querying/joining data to avoid the N + 1 query problem, but it is limited to querying a single database. This session presents a lightweight, purely stateless, and type-safe solution to the N + 1 query problem that can transparently be reused in any microservice environment, which is especially relevant in an event sourcing/CQRS architecture. Through source code examples, the presentation dives into some core java 8 functional patterns to design a simple and user-friendly API that decouples the core logic of querying and efficiently aggregating disparate datasources (REST, NoSQL, database) from the streaming/reactive technology used to connect to those sources (Project Reactor/Spring WebFlux, Akka Stream, RxJava, and so on).
Part of the software developer job is to find new and better ways to solve problems. Writing code using his/her wits, intelligent and creativity.
However, sometimes being too clever can lead to hard to track bugs, maintainability issues and impossible to understand code. Is all cleverly written code good code, or is it a problem just waiting to happen?
In this session, I will show you real world examples of cleverly written code. And show you how we can use clean code principles, refactoring and design patterns, to transform that code from clever code to good code, code one that your peers - and future self - would thank you for writing.
Using API mocking tools in the browser helps front-end developers to build web application without having to rely on any backend services.
Mirage runs a mock server alongside the rest of your frontend JavaScript code and existing code dose not need to be changed. It also provides many rich tools for data modelling.
program list:
WAP program to show constructor overloading using static member.
WAP to implement multilevel inheritance and method overriding.
WAP to implement interface class and show use of package.
WAP to implement multilevel exception handling and create your own exception.
WAP to implement 3 threads such that 1st sleeps for 200ms, 2nd for 400ms and 3rd for 600ms.
WAP to create applet of moving banner.
WAP to make a simple calculator.
Build a client server chat application.
Angular projects can expand quickly and become a real nightmare for maintenance.
Since V-6, Angular is now easy with creating custom libraries, but we still need to take care on building our libraries in a way we can reuse and communicate with other applications in our organisation.
In this talk we will walk through the right way to build an Angular project architecture, how we can use the ng-packger and the DI and to provide different type of Injection Tokens(what are injection tokens?) and how actually to inject them and pass configurations from outside your project.
This is a presentation given by Dirk-Jan Rutten and Florentijn Hogerwerf at the React-Amsterdam Winter Event held on the 23rd of February 2017 (https://www.meetup.com/React-Amsterdam/events/237423993/).
Introduction to Aspect Oriented Programming (DDD South West 4.0)Yan Cui
Introduction to AOP talk at DDD SouthWest 4.0, including examples of AOP using dynamic proxies, functional programming, dynamic language and PostSharp.
High Availability Application Architectures in Amazon VPC (ARC202) | AWS re:I...Amazon Web Services
Amazon Virtual Private Cloud (Amazon VPC) lets you provision a logically isolated section of the Amazon Web Services (AWS) cloud where you can launch AWS resources in a virtual data center that you define. In this session you learn how to leverage the VPC networking constructs to configure a highly available and secure virtual data center on AWS for your application. We cover best practices around choosing an IP range for your VPC, creating subnets, configuring routing, securing your VPC, establishing VPN connectivity, and much more. The session culminates in creating a highly available web application stack inside of VPC and testing its availability with Chaos Monkey.
Из данной презентации Сергея Матюкевича, .NET-разработчика в Альторосе, вы узнаете:
1) основные принципы работы с Azure Mobile Services
2) достоинства/недостатки
3) как создать custom behavior, API и т.д.
Презентация была представлена на внутреннем .NET-баркэмпе компании.
Using xUnit as a Swiss-Aarmy Testing ToolkitChris Oldwood
Modern Unit Testing practices act as a conduit for improved software designs that are more amenable to change and can be easily backed by automation for fast feedback on quality assurance. The necessity of reducing external dependencies forces us to design our modules with minimum coupling which can then be leveraged both at the module, component and subsystem levels in our testing. As we start to integrate our units into larger blocks and interface our resulting components with external systems we find ourselves switching nomenclature as we progress from Unit to Integration testing. But is a change in mindset and tooling really required?
The xUnit testing framework is commonly perceived as an aid to Unit Testing but the constraints that it imposes on the architecture mean that it is an excellent mechanism for invoking arbitrary code in a restricted context. Tests can be partitioned by categorisation at the test and fixture level and through physical packaging leading to a flexible test code structure. Throw in its huge popularity and you have a simplified learning curve for expressing more that just unit tests.
Using scenarios from his current system Chris aims to show how you can use a similar format and tooling for unit, component and integration level tests; albeit with a few liberties taken to work around the inherent differences with each methodology.
Sebastian Schmidt, Rachel Myers - How To Go Serverless And Not Violate The GD...Codemotion
As your mobile users get accustomed to advanced features that require Cloud support, it becomes increasingly hard to protect their privacy while staying up to date with data protection regulations such as the GDPR. We would like to show you how you can continue to use cloud-based SDKs and employ Firebase to create an experience that pleases both your users and your newly hired data stewardship team.
Introdução à programação orientada para aspectos em AspectJ. Diapositivos de seminário realizado no contexto da disciplina de Engenharia do Software II, DCTI, ISCTE-IUL.
Similar to Aspect-Oriented Programming (AOP) in .NET (20)
Target Leakage in Machine Learning (ODSC East 2020)Yuriy Guts
Target leakage is one of the most difficult problems in developing real-world machine learning models. Leakage occurs when the training data gets contaminated with information that will not be known at prediction time. Additionally, there can be multiple sources of leakage, from data collection and feature engineering to partitioning and model validation. As a result, even experienced data scientists can inadvertently introduce leaks and become overly optimistic about the performance of the models they deploy. In this talk, we will look through real-life examples of data leakage at different stages of the data science project lifecycle, and discuss various countermeasures and best practices for model validation.
A tremendous backlog of predictive modeling problems in the industry and short supply of trained data scientists have spiked interest in automation over the last few years. A new academic field, AutoML, has emerged. However, there is a significant gap between the topics that are academically interesting and automation capabilities that are necessary to solve real-world industrial problems end-to-end. An even greater challenge is enabling a non-expert to build a robust and trustworthy AI solution for their company. In this talk, we’ll discuss what an industry-grade AutoML system consists of and the scientific and engineering challenges of building it.
Target leakage is one of the most difficult problems in developing real-world machine learning models. Leakage occurs when the training data gets contaminated with information that will not be known at prediction time. Additionally, there can be multiple sources of leakage, from data collection and feature engineering to partitioning and model validation. As a result, even experienced data scientists can inadvertently introduce leaks and become overly optimistic about the performance of the models they deploy. In this talk, we will look through real-life examples of data leakage at different stages of the data science project lifecycle, and discuss various countermeasures and best practices for model validation.
Paraphrase detection is an academically challenging NLP problem of detecting whether multiple phrases have the same meaning. In this talk, we’ll go through the existing traditional and deep learning approaches for this task, and see how they apply in practice as a silver-winning solution to the popular Kaggle Quora Question Pairs competition.
[JEEConf 2015] Lessons from Building a Modern B2C System in ScalaYuriy Guts
Whenever a functional language is mentioned, everyone talks about typical applications like DSL, parsing, data mining, or scientific computing. But what about mainstream consumer-facing applications? Can you build your next project with Scala? What if your system must run in the cloud, on desktop computers, and on specialized hardware, can you still do it? We’ll share our experience of implementing such a system for a German fitness startup that utilized custom-built devices, biometrics, cross-platform integration, and, of course, Scala. We’ll discuss the challenges we ran into and pitfalls you can avoid when your team decides to go functional.
Software Engineering, Software Consulting, Tech Lead.
Spring Boot, Spring Cloud, Spring Core, Spring JDBC, Spring Security,
Spring Transaction, Spring MVC,
Log4j, REST/SOAP WEB-SERVICES.
Cyaniclab : Software Development Agency Portfolio.pdfCyanic lab
CyanicLab, an offshore custom software development company based in Sweden,India, Finland, is your go-to partner for startup development and innovative web design solutions. Our expert team specializes in crafting cutting-edge software tailored to meet the unique needs of startups and established enterprises alike. From conceptualization to execution, we offer comprehensive services including web and mobile app development, UI/UX design, and ongoing software maintenance. Ready to elevate your business? Contact CyanicLab today and let us propel your vision to success with our top-notch IT solutions.
Top Features to Include in Your Winzo Clone App for Business Growth (4).pptxrickgrimesss22
Discover the essential features to incorporate in your Winzo clone app to boost business growth, enhance user engagement, and drive revenue. Learn how to create a compelling gaming experience that stands out in the competitive market.
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns
Unlocking Business Potential: Tailored Technology Solutions by Prosigns
Discover how Prosigns, a leading technology solutions provider, partners with businesses to drive innovation and success. Our presentation showcases our comprehensive range of services, including custom software development, web and mobile app development, AI & ML solutions, blockchain integration, DevOps services, and Microsoft Dynamics 365 support.
Custom Software Development: Prosigns specializes in creating bespoke software solutions that cater to your unique business needs. Our team of experts works closely with you to understand your requirements and deliver tailor-made software that enhances efficiency and drives growth.
Web and Mobile App Development: From responsive websites to intuitive mobile applications, Prosigns develops cutting-edge solutions that engage users and deliver seamless experiences across devices.
AI & ML Solutions: Harnessing the power of Artificial Intelligence and Machine Learning, Prosigns provides smart solutions that automate processes, provide valuable insights, and drive informed decision-making.
Blockchain Integration: Prosigns offers comprehensive blockchain solutions, including development, integration, and consulting services, enabling businesses to leverage blockchain technology for enhanced security, transparency, and efficiency.
DevOps Services: Prosigns' DevOps services streamline development and operations processes, ensuring faster and more reliable software delivery through automation and continuous integration.
Microsoft Dynamics 365 Support: Prosigns provides comprehensive support and maintenance services for Microsoft Dynamics 365, ensuring your system is always up-to-date, secure, and running smoothly.
Learn how our collaborative approach and dedication to excellence help businesses achieve their goals and stay ahead in today's digital landscape. From concept to deployment, Prosigns is your trusted partner for transforming ideas into reality and unlocking the full potential of your business.
Join us on a journey of innovation and growth. Let's partner for success with Prosigns.
Large Language Models and the End of ProgrammingMatt Welsh
Talk by Matt Welsh at Craft Conference 2024 on the impact that Large Language Models will have on the future of software development. In this talk, I discuss the ways in which LLMs will impact the software industry, from replacing human software developers with AI, to replacing conventional software with models that perform reasoning, computation, and problem-solving.
First Steps with Globus Compute Multi-User EndpointsGlobus
In this presentation we will share our experiences around getting started with the Globus Compute multi-user endpoint. Working with the Pharmacology group at the University of Auckland, we have previously written an application using Globus Compute that can offload computationally expensive steps in the researcher's workflows, which they wish to manage from their familiar Windows environments, onto the NeSI (New Zealand eScience Infrastructure) cluster. Some of the challenges we have encountered were that each researcher had to set up and manage their own single-user globus compute endpoint and that the workloads had varying resource requirements (CPUs, memory and wall time) between different runs. We hope that the multi-user endpoint will help to address these challenges and share an update on our progress here.
Developing Distributed High-performance Computing Capabilities of an Open Sci...Globus
COVID-19 had an unprecedented impact on scientific collaboration. The pandemic and its broad response from the scientific community has forged new relationships among public health practitioners, mathematical modelers, and scientific computing specialists, while revealing critical gaps in exploiting advanced computing systems to support urgent decision making. Informed by our team’s work in applying high-performance computing in support of public health decision makers during the COVID-19 pandemic, we present how Globus technologies are enabling the development of an open science platform for robust epidemic analysis, with the goal of collaborative, secure, distributed, on-demand, and fast time-to-solution analyses to support public health.
Understanding Globus Data Transfers with NetSageGlobus
NetSage is an open privacy-aware network measurement, analysis, and visualization service designed to help end-users visualize and reason about large data transfers. NetSage traditionally has used a combination of passive measurements, including SNMP and flow data, as well as active measurements, mainly perfSONAR, to provide longitudinal network performance data visualization. It has been deployed by dozens of networks world wide, and is supported domestically by the Engagement and Performance Operations Center (EPOC), NSF #2328479. We have recently expanded the NetSage data sources to include logs for Globus data transfers, following the same privacy-preserving approach as for Flow data. Using the logs for the Texas Advanced Computing Center (TACC) as an example, this talk will walk through several different example use cases that NetSage can answer, including: Who is using Globus to share data with my institution, and what kind of performance are they able to achieve? How many transfers has Globus supported for us? Which sites are we sharing the most data with, and how is that changing over time? How is my site using Globus to move data internally, and what kind of performance do we see for those transfers? What percentage of data transfers at my institution used Globus, and how did the overall data transfer performance compare to the Globus users?
Exploring Innovations in Data Repository Solutions - Insights from the U.S. G...Globus
The U.S. Geological Survey (USGS) has made substantial investments in meeting evolving scientific, technical, and policy driven demands on storing, managing, and delivering data. As these demands continue to grow in complexity and scale, the USGS must continue to explore innovative solutions to improve its management, curation, sharing, delivering, and preservation approaches for large-scale research data. Supporting these needs, the USGS has partnered with the University of Chicago-Globus to research and develop advanced repository components and workflows leveraging its current investment in Globus. The primary outcome of this partnership includes the development of a prototype enterprise repository, driven by USGS Data Release requirements, through exploration and implementation of the entire suite of the Globus platform offerings, including Globus Flow, Globus Auth, Globus Transfer, and Globus Search. This presentation will provide insights into this research partnership, introduce the unique requirements and challenges being addressed and provide relevant project progress.
In software engineering, the right architecture is essential for robust, scalable platforms. Wix has undergone a pivotal shift from event sourcing to a CRUD-based model for its microservices. This talk will chart the course of this pivotal journey.
Event sourcing, which records state changes as immutable events, provided robust auditing and "time travel" debugging for Wix Stores' microservices. Despite its benefits, the complexity it introduced in state management slowed development. Wix responded by adopting a simpler, unified CRUD model. This talk will explore the challenges of event sourcing and the advantages of Wix's new "CRUD on steroids" approach, which streamlines API integration and domain event management while preserving data integrity and system resilience.
Participants will gain valuable insights into Wix's strategies for ensuring atomicity in database updates and event production, as well as caching, materialization, and performance optimization techniques within a distributed system.
Join us to discover how Wix has mastered the art of balancing simplicity and extensibility, and learn how the re-adoption of the modest CRUD has turbocharged their development velocity, resilience, and scalability in a high-growth environment.
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Anthony Dahanne
Les Buildpacks existent depuis plus de 10 ans ! D’abord, ils étaient utilisés pour détecter et construire une application avant de la déployer sur certains PaaS. Ensuite, nous avons pu créer des images Docker (OCI) avec leur dernière génération, les Cloud Native Buildpacks (CNCF en incubation). Sont-ils une bonne alternative au Dockerfile ? Que sont les buildpacks Paketo ? Quelles communautés les soutiennent et comment ?
Venez le découvrir lors de cette session ignite
Listen to the keynote address and hear about the latest developments from Rachana Ananthakrishnan and Ian Foster who review the updates to the Globus Platform and Service, and the relevance of Globus to the scientific community as an automation platform to accelerate scientific discovery.
May Marketo Masterclass, London MUG May 22 2024.pdfAdele Miller
Can't make Adobe Summit in Vegas? No sweat because the EMEA Marketo Engage Champions are coming to London to share their Summit sessions, insights and more!
This is a MUG with a twist you don't want to miss.
Globus Compute wth IRI Workflows - GlobusWorld 2024Globus
As part of the DOE Integrated Research Infrastructure (IRI) program, NERSC at Lawrence Berkeley National Lab and ALCF at Argonne National Lab are working closely with General Atomics on accelerating the computing requirements of the DIII-D experiment. As part of the work the team is investigating ways to speedup the time to solution for many different parts of the DIII-D workflow including how they run jobs on HPC systems. One of these routes is looking at Globus Compute as a way to replace the current method for managing tasks and we describe a brief proof of concept showing how Globus Compute could help to schedule jobs and be a tool to connect compute at different facilities.
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Globus
Large Language Models (LLMs) are currently the center of attention in the tech world, particularly for their potential to advance research. In this presentation, we'll explore a straightforward and effective method for quickly initiating inference runs on supercomputers using the vLLM tool with Globus Compute, specifically on the Polaris system at ALCF. We'll begin by briefly discussing the popularity and applications of LLMs in various fields. Following this, we will introduce the vLLM tool, and explain how it integrates with Globus Compute to efficiently manage LLM operations on Polaris. Attendees will learn the practical aspects of setting up and remotely triggering LLMs from local machines, focusing on ease of use and efficiency. This talk is ideal for researchers and practitioners looking to leverage the power of LLMs in their work, offering a clear guide to harnessing supercomputing resources for quick and effective LLM inference.
Field Employee Tracking System| MiTrack App| Best Employee Tracking Solution|...informapgpstrackings
Keep tabs on your field staff effortlessly with Informap Technology Centre LLC. Real-time tracking, task assignment, and smart features for efficient management. Request a live demo today!
For more details, visit us : https://informapuae.com/field-staff-tracking/
We describe the deployment and use of Globus Compute for remote computation. This content is aimed at researchers who wish to compute on remote resources using a unified programming interface, as well as system administrators who will deploy and operate Globus Compute services on their research computing infrastructure.
Providing Globus Services to Users of JASMIN for Environmental Data AnalysisGlobus
JASMIN is the UK’s high-performance data analysis platform for environmental science, operated by STFC on behalf of the UK Natural Environment Research Council (NERC). In addition to its role in hosting the CEDA Archive (NERC’s long-term repository for climate, atmospheric science & Earth observation data in the UK), JASMIN provides a collaborative platform to a community of around 2,000 scientists in the UK and beyond, providing nearly 400 environmental science projects with working space, compute resources and tools to facilitate their work. High-performance data transfer into and out of JASMIN has always been a key feature, with many scientists bringing model outputs from supercomputers elsewhere in the UK, to analyse against observational or other model data in the CEDA Archive. A growing number of JASMIN users are now realising the benefits of using the Globus service to provide reliable and efficient data movement and other tasks in this and other contexts. Further use cases involve long-distance (intercontinental) transfers to and from JASMIN, and collecting results from a mobile atmospheric radar system, pushing data to JASMIN via a lightweight Globus deployment. We provide details of how Globus fits into our current infrastructure, our experience of the recent migration to GCSv5.4, and of our interest in developing use of the wider ecosystem of Globus services for the benefit of our user community.
4. public class ReputationService : IReputationService
...
private readonly IUserDataService _userDataService;
public ReputationService(IUserDataService userDataService)
{
_userDataService = userDataService;
}
public int AddReputationForQuestion(Question question)
{
int pointsToAdd = question.UpVotes * 5 - question.DownVotes * 2;
int newReputation = _userDataService.AddReputationForUser(question.Author, pointsToAdd);
return newReputation;
}
public int AddReputationForAnswer(Answer answer)
{
int pointsToAdd = answer.UpVotes * 10 - answer.DownVotes * 3;
int newReputation = _userDataService.AddReputationForUser(answer.Author, pointsToAdd);
return newReputation;
}
...
5. public int AddReputationForQuestion(Question question)
{
int pointsToAdd = question.UpVotes * 5 - question.DownVotes * 2;
int newReputation = _userDataService.AddReputationForUser(question.Author, pointsToAdd);
return newReputation;
}
6. public int AddReputationForQuestion(Question question)
{
Console.WriteLine("{0:HH:mm:ss.fff}: AddReputationForQuestion started.", DateTime.Now);
int pointsToAdd = question.UpVotes * 5 - question.DownVotes * 2;
int newReputation = _userDataService.AddReputationForUser(question.Author, pointsToAdd);
Console.WriteLine("{0:HH:mm:ss.fff}: AddReputationForQuestion completed.", DateTime.Now);
return newReputation;
}
7. public int AddReputationForQuestion(Question question)
{
Console.WriteLine("{0:HH:mm:ss.fff}: AddReputationForQuestion started.", DateTime.Now);
if (question == null)
{
throw new ArgumentNullException("question");
}
if (question.Author == null)
{
throw new ArgumentNullException("question", "Author cannot be null.");
}
if (question.UpVotes < 0 || question.DownVotes < 0)
{
throw new ArgumentException("A question cannot have a negative number of votes");
}
int pointsToAdd = question.UpVotes * 5 - question.DownVotes * 2;
int newReputation = _userDataService.AddReputationForUser(question.Author, pointsToAdd);
Console.WriteLine("{0:HH:mm:ss.fff}: AddReputationForQuestion completed.", DateTime.Now);
return newReputation;
}
8. public int AddReputationForQuestion(Question question)
{
Console.WriteLine("{0:HH:mm:ss.fff}: AddReputationForQuestion started.", DateTime.Now);
if (question == null) throw new ArgumentNullException("question");
if (question.Author == null) throw new ArgumentNullException("question", "Author cannot be null.");
if (question.UpVotes < 0 || question.DownVotes < 0) throw new ArgumentException("A question cannot have a negative number of votes");
var attemptsLeft = 3;
try
{
while (attemptsLeft > 0)
{
try
{
int pointsToAdd = question.UpVotes * 5 - question.DownVotes * 2;
int newReputation = _userDataService.AddReputationForUser(question.Author, pointsToAdd);
Console.WriteLine("{0:HH:mm:ss.fff}: AddReputationForQuestion completed.", DateTime.Now);
return newReputation;
}
catch
{
attemptsLeft--;
if (attemptsLeft == 0)
{
throw;
}
}
}
}
catch (Exception ex)
{
Console.WriteLine("{0:HH:mm:ss.fff}: AddReputationForQuestion failed with exception: {1}.", DateTime.Now, ex);
}
throw new Exception();
}
9. public int AddReputationForQuestion(Question question)
{
QuestionValidator.ValidateQuestion(question);
return BoundaryLogging<int>.Run("AddReputationForQuestion", () =>
{
return MultipleAttemptExecutor<int>.Run(3, () =>
{
int pointsToAdd = question.UpVotes * 5 - question.DownVotes * 2;
int newReputation = _userDataService.AddReputationForUser(question.Author, pointsToAdd);
return newReputation;
});
});
}
22. 1. Introduces “magic”, can reduce understanding of the big picture (*).
2. Requires special tools or code decorations.
3. Even mature frameworks have bugs.
(*) Greg Young:
www.infoq.com/presentations/8-lines-code-refactoring