The slides provide details on how to build the sample Microservices application that covers the whole distributed system paradigm.
Please refer to the introduction to Microservices before following the contents in this slide
https://www.slideshare.net/anilallewar/introduction-to-microservices-78270318
An introduction to a popular framework for Service Oriented REST APIs, Proof of Concepts and Rapid Development. Swagger is a indispensable tool for Software Engineers, Developers and Architects.
Swagger is an open source software framework backed by
a large ecosystem of tools that helps developers
design, build, document and consume RESTful Web
services.
Document your rest api using swagger - Devoxx 2015johannes_fiala
This session will show you how you can easily document your REST API's using Spring & Swagger.
It will show you how to use the Swagger-Spring integration in a Spring Boot application:
Setup a basic REST API using Spring-Boot together with Swagger-Springfox
Access and test the REST-API using the Swagger-UI client
Generate client code stubs for your language (e.g. Java, PHP, Python, ...) using Swagger-Codegen
Graphically display your REST-API using the Chrome plugin Swagger.ed
Devoxx Belgium Nov. 2015
Swagger is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services. The overarching goal of Swagger is to enable client and documentation systems to update at the same pace as the server. The documentation of methods, parameters, and models are tightly integrated into the server code, allowing APIs to always stay in sync. With Swagger, deploying managing, and using powerful APIs has never been easier.
An introduction to a popular framework for Service Oriented REST APIs, Proof of Concepts and Rapid Development. Swagger is a indispensable tool for Software Engineers, Developers and Architects.
Swagger is an open source software framework backed by
a large ecosystem of tools that helps developers
design, build, document and consume RESTful Web
services.
Document your rest api using swagger - Devoxx 2015johannes_fiala
This session will show you how you can easily document your REST API's using Spring & Swagger.
It will show you how to use the Swagger-Spring integration in a Spring Boot application:
Setup a basic REST API using Spring-Boot together with Swagger-Springfox
Access and test the REST-API using the Swagger-UI client
Generate client code stubs for your language (e.g. Java, PHP, Python, ...) using Swagger-Codegen
Graphically display your REST-API using the Chrome plugin Swagger.ed
Devoxx Belgium Nov. 2015
Swagger is a specification and complete framework implementation for describing, producing, consuming, and visualizing RESTful web services. The overarching goal of Swagger is to enable client and documentation systems to update at the same pace as the server. The documentation of methods, parameters, and models are tightly integrated into the server code, allowing APIs to always stay in sync. With Swagger, deploying managing, and using powerful APIs has never been easier.
Introduction to angular with a simple but complete projectJadson Santos
A simple front end project with angular. Its show how to create your first components, include bootstrap templates, create routes and build the project to production.
Overview of Spring Boot for the rapid development of Java Applications and Microservices. More information can be found at : https://www.spiraltrain.nl/course-spring-boot-development/?lang=en
OpenAPI 3.0, And What It Means for the Future of SwaggerSmartBear
OpenAPI 3.0, which is based on the original Swagger 2.0 specification, is meant to provide a standard format to unify how an industry defines and describes RESTful APIs.
The release of OAS 3.0 marks a significant milestone in the growth of the API economy — bringing together collaborators from across industries, to evolve the specification to meet the needs of API developers and consumers across the world in an open and transparent manner.
We hosted a free Swagger training: OpenAPI 3.0, And What it Means for the Future of Swagger. More than 2,000 people signed up to learn more about the new specification, and to find out about what’s coming next for Swagger and SwaggerHub!
You can watch the full recording of the presentation here: https://swaggerhub.com/blog/api-resources/openapi-3-0-video-tutorial/
Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability.
a step by step tutorial to integrate swagger ui with your Spring service.
swagger ui is a web interface to view , test APIs either rest or soap . you can view an api services see descriptive documentation see example of input like request body and headers
and output like result
How can we harness AEM6 and Sling to integrate backed layers to the CMS and expose them as a unified framework. creation of these integrations is vital for a coherent, personalize-able and track-able sites.
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API ManagerWSO2
In this community call, we discuss mastering JWTs with WSO2 API Manager including
- Backend user authentication with JWT
- Backend JWT generation
- Best practices to validate JWT
- User-related claims in JWT
- JWT grant
Discussed the general OAuth2 features. Reviewer OAuth2 Roles and Grand Flows
Authorization code grant flow
Implicit grant flow
Resource owner password credentials grant flow
Client credentials grant flow
Reviewed access resource flow and token refresh.
see video: https://www.youtube.com/watch?v=UPsVD-A7gP0
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023Sam Brannen
Attend this talk to learn about the latest and greatest in the world of testing using the Spring Framework and JUnit Jupiter (a.k.a. JUnit 5) including tips for testing with Spring AOT and GraalVM native images.
In this presentation, Suraj Kumar Paul of Valuebound has walked us through GraphQL. Founded by Facebook in 2012, GraphQL is a data query language that provides an alternative to REST and web service architectures.
Here he has discussed core ideas of GraphQL, limitations of RESTful APIs, operations, arguments, fragmentation, variables, mutations etc.
----------------------------------------------------------
Get Socialistic
Our website: http://valuebound.com/
LinkedIn: http://bit.ly/2eKgdux
Facebook: https://www.facebook.com/valuebound/
Introduction to angular with a simple but complete projectJadson Santos
A simple front end project with angular. Its show how to create your first components, include bootstrap templates, create routes and build the project to production.
Overview of Spring Boot for the rapid development of Java Applications and Microservices. More information can be found at : https://www.spiraltrain.nl/course-spring-boot-development/?lang=en
OpenAPI 3.0, And What It Means for the Future of SwaggerSmartBear
OpenAPI 3.0, which is based on the original Swagger 2.0 specification, is meant to provide a standard format to unify how an industry defines and describes RESTful APIs.
The release of OAS 3.0 marks a significant milestone in the growth of the API economy — bringing together collaborators from across industries, to evolve the specification to meet the needs of API developers and consumers across the world in an open and transparent manner.
We hosted a free Swagger training: OpenAPI 3.0, And What it Means for the Future of Swagger. More than 2,000 people signed up to learn more about the new specification, and to find out about what’s coming next for Swagger and SwaggerHub!
You can watch the full recording of the presentation here: https://swaggerhub.com/blog/api-resources/openapi-3-0-video-tutorial/
Swagger is a simple yet powerful representation of your RESTful API. With the largest ecosystem of API tooling on the planet, thousands of developers are supporting Swagger in almost every modern programming language and deployment environment. With a Swagger-enabled API, you get interactive documentation, client SDK generation and discoverability.
a step by step tutorial to integrate swagger ui with your Spring service.
swagger ui is a web interface to view , test APIs either rest or soap . you can view an api services see descriptive documentation see example of input like request body and headers
and output like result
How can we harness AEM6 and Sling to integrate backed layers to the CMS and expose them as a unified framework. creation of these integrations is vital for a coherent, personalize-able and track-able sites.
[WSO2 API Manager Community Call] Mastering JWTs with WSO2 API ManagerWSO2
In this community call, we discuss mastering JWTs with WSO2 API Manager including
- Backend user authentication with JWT
- Backend JWT generation
- Best practices to validate JWT
- User-related claims in JWT
- JWT grant
Discussed the general OAuth2 features. Reviewer OAuth2 Roles and Grand Flows
Authorization code grant flow
Implicit grant flow
Resource owner password credentials grant flow
Client credentials grant flow
Reviewed access resource flow and token refresh.
see video: https://www.youtube.com/watch?v=UPsVD-A7gP0
Testing with Spring, AOT, GraalVM, and JUnit 5 - Spring I/O 2023Sam Brannen
Attend this talk to learn about the latest and greatest in the world of testing using the Spring Framework and JUnit Jupiter (a.k.a. JUnit 5) including tips for testing with Spring AOT and GraalVM native images.
In this presentation, Suraj Kumar Paul of Valuebound has walked us through GraphQL. Founded by Facebook in 2012, GraphQL is a data query language that provides an alternative to REST and web service architectures.
Here he has discussed core ideas of GraphQL, limitations of RESTful APIs, operations, arguments, fragmentation, variables, mutations etc.
----------------------------------------------------------
Get Socialistic
Our website: http://valuebound.com/
LinkedIn: http://bit.ly/2eKgdux
Facebook: https://www.facebook.com/valuebound/
This talk cover the principles and the best practices in creation of flexible Microsoft .NET Core-based applications in connection with Microsoft Azure services, as well as tools and libraries that greatly simplify the development, configuration and deployment of applications. Also, attention paid to some pitfalls that may be encountered while using .NET Core.
This presentation by Andrii Antilikatorov, Consultant at GlobalLogic Kharkiv, was delivered at GlobalLogic Kharkiv MS TechTalk #2 on November 4, 2017.
Easy integration of Bluemix services with your applicationsJack-Junjie Cai
This presentation talks about how your Java EE and node.js applications can easily consume various cloud services available in the IBM Bluemix cloud platform. IBM Bluemix is based CloudFoundry.
The “Twelve-Factor” application model has come to represent twelve best practices for building modern, cloud-native applications. With guidance on things like configuration, deployment, runtime, and multiple service communication, the Twelve-Factor model prescribes best practices that apply to everything from web applications to APIs to data processing applications.
Although serverless computing and AWS Lambda have changed how application development is done, the “Twelve-Factor” best practices remain relevant and applicable in a serverless world. In this talk, Chris will share with you how to apply the “Twelve-Factor” model to serverless application development with AWS Lambda and Amazon API Gateway and show you how these services enable you to build scalable, low cost, and low administration applications.
Designing a production grade realtime ml inference endpointChandim Sett
This presentation discusses about designing a ML inference endpoint application in python flask and Docker containers using appropriate software engineering design principles. The application being developed is an enterprise production grade.
Building Cloud Native Applications Using Spring Boot and Spring CloudGeekNightHyderabad
Nowadays enterprises as well as startups are looking to build their software applications leveraging Cloud Platforms so that they can greatly reduce their go to market time and infrastructure setup costs. However, Cloud Native Applications (NCA) should be designed with cloud computing architecture in mind which involves thinking about dynamic provisioning of resources, service downtimes, data redundancy etc. Spring Boot provides a robust platform for building microservices and Spring Cloud provides the capabilities to build Cloud Native Applications by abstracting the low level details. In this talk, we will learn how to develop Cloud Native Applications using Spring Boot and Spring Cloud frameworks.
SharePoint on demand with System Center - Matija BlagusSPC Adriatics
This session will demonstrate how to create SharePoint 2013 (and 2010) environment in your private cloud on demand. System Center family of product allow you to create SharePoint environments very easily and on demand. In demonstration we will show how to create templates that will be automatically created with System Center Virtual Machine Manager. This is a great feature that you can use for testing and development purposes. In this session will be also covered basics of other System Center products that can help you with provisioning, managing and orchestrating SharePoint environments.
Integrating Jira Software Cloud With the AWS Code SuiteAtlassian
In this talk, Jay Yeras, Partner Solutions Architect at Amazon Web Services, will demonstrate how to customize, build, and host your Connect app on AWS.
Learn best practices on how to containerize the application and store a custom container image in Amazon ECR. Jay will share sample code based on AWS CloudFormation to quickly provision a highly scalable and fully managed container orchestration service running on AWS Fargate. Build a CI/CD pipeline using AWS CodePipeline, AWS CodeCommit and AWS CodeBuild for automated deployments. Lastly, deploy the solution as an Atlassian Marketplace app.
This solution provides customers using the AWS Code Suite of services with the ability to report on build state and other relevant data through AWS Lambda based integrations that leverage the Jira REST APIs to push relevant details about the status of the pipeline in near real-time to Jira Software Cloud.
Presentation of Ada Web Application made during the AdaCore Tech days 2019. The presentation describes the important components that AWA is made of and explain how they help in building a web application.
12 Factor Serverless Applications - Mike Morain, AWS - Cloud Native Day Tel A...Cloud Native Day Tel Aviv
The “Twelve-Factor” application model has come to represent twelve best practices for building modern, cloud-native applications. With guidance on things like configuration, deployment, runtime, and multiple service communication, the Twelve-Factor model prescribes best practices that apply to everything from web applications to APIs to data processing applications. Although Serverless computing and AWS Lambda have changed how application development is done, the “Twelve-Factor” best practices remain relevant and applicable in a Serverless world. In this talk, we’ll apply the “Twelve-Factor” model to Serverless application development with AWS Lambda and Amazon API Gateway and show you how these services enable you to build scalable, low cost, and low administration applications.
Enhancing Research Orchestration Capabilities at ORNL.pdfGlobus
Cross-facility research orchestration comes with ever-changing constraints regarding the availability and suitability of various compute and data resources. In short, a flexible data and processing fabric is needed to enable the dynamic redirection of data and compute tasks throughout the lifecycle of an experiment. In this talk, we illustrate how we easily leveraged Globus services to instrument the ACE research testbed at the Oak Ridge Leadership Computing Facility with flexible data and task orchestration capabilities.
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.
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Globus
The Earth System Grid Federation (ESGF) is a global network of data servers that archives and distributes the planet’s largest collection of Earth system model output for thousands of climate and environmental scientists worldwide. Many of these petabyte-scale data archives are located in proximity to large high-performance computing (HPC) or cloud computing resources, but the primary workflow for data users consists of transferring data, and applying computations on a different system. As a part of the ESGF 2.0 US project (funded by the United States Department of Energy Office of Science), we developed pre-defined data workflows, which can be run on-demand, capable of applying many data reduction and data analysis to the large ESGF data archives, transferring only the resultant analysis (ex. visualizations, smaller data files). In this talk, we will showcase a few of these workflows, highlighting how Globus Flows can be used for petabyte-scale climate analysis.
Into the Box Keynote Day 2: Unveiling amazing updates and announcements for modern CFML developers! Get ready for exciting releases and updates on Ortus tools and products. Stay tuned for cutting-edge innovations designed to boost your productivity.
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.
Check out the webinar slides to learn more about how XfilesPro transforms Salesforce document management by leveraging its world-class applications. For more details, please connect with sales@xfilespro.com
If you want to watch the on-demand webinar, please click here: https://www.xfilespro.com/webinars/salesforce-document-management-2-0-smarter-faster-better/
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I ...Juraj Vysvader
In 2015, I used to write extensions for Joomla, WordPress, phpBB3, etc and I didn't get rich from it but it did have 63K downloads (powered possible tens of thousands of websites).
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.
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamtakuyayamamoto1800
In this slide, we show the simulation example and the way to compile this solver.
In this solver, the Helmholtz equation can be solved by helmholtzFoam. Also, the Helmholtz equation with uniformly dispersed bubbles can be simulated by helmholtzBubbleFoam.
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.
Custom Healthcare Software for Managing Chronic Conditions and Remote Patient...Mind IT Systems
Healthcare providers often struggle with the complexities of chronic conditions and remote patient monitoring, as each patient requires personalized care and ongoing monitoring. Off-the-shelf solutions may not meet these diverse needs, leading to inefficiencies and gaps in care. It’s here, custom healthcare software offers a tailored solution, ensuring improved care and effectiveness.
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.
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?
top nidhi software solution freedownloadvrstrong314
This presentation emphasizes the importance of data security and legal compliance for Nidhi companies in India. It highlights how online Nidhi software solutions, like Vector Nidhi Software, offer advanced features tailored to these needs. Key aspects include encryption, access controls, and audit trails to ensure data security. The software complies with regulatory guidelines from the MCA and RBI and adheres to Nidhi Rules, 2014. With customizable, user-friendly interfaces and real-time features, these Nidhi software solutions enhance efficiency, support growth, and provide exceptional member services. The presentation concludes with contact information for further inquiries.
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
Unleash Unlimited Potential with One-Time Purchase
BoxLang is more than just a language; it's a community. By choosing a Visionary License, you're not just investing in your success, you're actively contributing to the ongoing development and support of BoxLang.
Navigating the Metaverse: A Journey into Virtual Evolution"Donna Lenk
Join us for an exploration of the Metaverse's evolution, where innovation meets imagination. Discover new dimensions of virtual events, engage with thought-provoking discussions, and witness the transformative power of digital realms."
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.
Experience our free, in-depth three-part Tendenci Platform Corporate Membership Management workshop series! In Session 1 on May 14th, 2024, we began with an Introduction and Setup, mastering the configuration of your Corporate Membership Module settings to establish membership types, applications, and more. Then, on May 16th, 2024, in Session 2, we focused on binding individual members to a Corporate Membership and Corporate Reps, teaching you how to add individual members and assign Corporate Representatives to manage dues, renewals, and associated members. Finally, on May 28th, 2024, in Session 3, we covered questions and concerns, addressing any queries or issues you may have.
For more Tendenci AMS events, check out www.tendenci.com/events
3. Overview
The application consists of 9 different services
• config server - setup external configuration
• webservice-registry - Eureka server
• auth-server - Oauth2 authorization server
• user-webservice - User micro-service
• task-webservice - Task micro-service
• comments-webservice - Comments for task micro-service
• api-gateway - API gateway that proxies all the micro-services
• web-portal - Single Page Application that provides the UI
• zipkin-server – View the distributed trace data
9. Spring Boot
Opinionated framework
• Build on Spring
• Convention over configuration
Create Spring initializer project from http://start.spring.io/
Choose gradle project with dependencies as required
12. Run Gradle
Use “idea” plugin instead of “eclipse” plugin if using IntelliJ
IDE.
Add the contents in “red” from the build.gradle file
contents on the next slide
Once done run the following command on the project root
folder
• gradle clean eclipse (or idea)
Import project into your IDE and then refresh project
13. Gradle changes (build.gradle)
/*
* Build file for config server
*/
apply plugin: 'java'
apply plugin: 'org.springframework.boot'
apply plugin: 'application'
apply plugin: 'eclipse'
buildscript {
project.ext {
springBootVersion = '1.5.3.RELEASE'
jarName = 'basic-config-server'
versionName = '0.0.1'
gradleDockerVersion = '1.2'
}
repositories {
jcenter()
mavenCentral()
}
dependencies {
classpath "org.springframework.boot:spring-boot-gradle-plugin:${project.springBootVersion}"
classpath "se.transmode.gradle:gradle-docker:${project.gradleDockerVersion}"
}
}
task createWrapper(type: Wrapper) {
gradleVersion = '3.5'
}
// Used by the Docker gradle plugin, group refers to the account under which the docker
image is created
group = 'anilallewar'
mainClassName = 'com.anilallewar.microservices.config.ConfigApplication'
sourceCompatibility = 1.8
targetCompatibility = 1.8
repositories {
mavenCentral()
jcenter()
}
dependencyManagement {
imports {
mavenBom 'org.springframework.cloud:spring-cloud-dependencies:Dalston.RELEASE'
}
}
dependencies {
compile("org.springframework.cloud:spring-cloud-config-server")
}
jar {
baseName = "${project.jarName}"
version = "${project.versionName}"
}
15. Cloud ConfigWeb
Service A
Web
Service B
Cloud
Config
Web
Service c
Github
a.yml
b.yml
c.yml
mail:
server: gmail
from: noreply@synerzip.com
External Configuration
17. Configuration files (ensure only spaces in yml files – no
tabs or any other characters)
Resources/bootstrap.yml
spring:
application:
name: configserver
Resources/application.yml
spring:
cloud:
config:
server:
git:
uri: <path to your github config repo>
server:
port: 8888
18. Run application
Command to generate Jar
• gradle clean build –x test
Run jar file
• java –jar build/libs/<jar name>
19. Client
We’ll use our current project as the baseline
Make a copy of current project into another folder – say
“discovery”
Remove the dependencies from build.gradle and replace
with following
compile('org.springframework.cloud:spring-cloud-starter-config')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile("org.springframework.boot:spring-boot-starter-web")
20. Client
Only annotation required @SpringBootApplication
bootstrap.yml
Add a new webservice-registry.yml (or whatever is the name of
your application) at the github project that you created.
spring:
application:
name: webservice-registry
cloud:
config:
uri: http://localhost:8888
25. Client Side Load
Balancing (Ribbon)
Web
Service A
Ribbon
Web
Service D
Ribbon
Web
Service D
Ribbon
Web
Service D
Ribbon
Registry/Discovery (Eureka)
D D D
D?
http://ip1,http://ip2,
http://ip3
Dynamic Routing
26. Discovery Server
Make a copy of current project into another folder – say
“discovery”
Remove the dependencies from build.gradle and replace
with following
compile('org.springframework.cloud:spring-cloud-starter-config')
compile('org.springframework.boot:spring-boot-starter-actuator')
compile("org.springframework.cloud:spring-cloud-starter-eureka-server")
33. Client
Commit the changes to Github
Start the config server, discovery server
Then start the client
• Should start on port 8081 instead of default 8080
• You should see the client listed on http://localhost:8761
36. Auth Token
Store
Auth Server
(OAuth 2.0 Preferred)
Service A
Access
Denied
Credentials
token
Service A
With token
Response
from Service A
(Very simplistic view of Auth process)
Authorization Server
37. Components
User authentication
• Run MySQL docker image for database
docker run -d -p 3306:3306 -e MYSQL_ROOT_PASSWORD=password -e MYSQL_DATABASE=auth --
name auth-db mysql
• Connect to mySQL schema
docker run -it --link auth-db:mysql --rm mysql sh -c 'exec mysql -
h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -
p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
• JDBC Schema file
• UserDetailService to validate the user for API requests
• Initial setup of users
Endpoint providing access to logged in user
38. Components
Authorization Server
• JWT token for user credential tokens
• Client/Application setup
Login Form configuration
• Security
• Freemarker templates for the forms
39. OAuth2 Server
Make a copy of current project into another folder – say
“auth-server”
40. Dependencies - build.gradle
// Basic Spring boot with config client
compile('org.springframework.cloud:spring-cloud-starter-config')
compile("org.springframework.boot:spring-boot-starter-web")
compile("org.springframework.boot:spring-boot-starter-actuator")
compile("org.springframework.boot:spring-boot-starter-freemarker")
// Spring OAuth2 security
compile("org.springframework.boot:spring-boot-starter-security")
compile("org.springframework.security.oauth:spring-security-oauth2")
compile("org.springframework.security:spring-security-jwt")
// Eureka client
compile('org.springframework.cloud:spring-cloud-starter-eureka')
// JPA for persisting user data
compile("org.springframework.boot:spring-boot-starter-data-jpa")
compile("mysql:mysql-connector-java:5.1.30")
44. Run application
Command to generate Jar
• gradle clean build –x test
Run jar file
• java –jar build/libs/<jar name>
45. Authorization Code Grant
This flow is typically used by web server apps(server-to-server communication) to
authorize the user and then get the token using POST from the server.
Authorization code
• Browser – InCognito Window
http://localhost:8899/userauth/oauth/authorize?response_type=code&client_id=acme&redirect_uri=http://localhost:8090/i
ndex.html
curl acme:acmesecret@localhost:8899/userauth/oauth/token -d
grant_type=authorization_code -d client_id=acme -d
redirect_uri=http://localhost:8090/index.html -d code=5YBSBs
curl -X POST
http://localhost:8899/userauth/oauth/token?grant_type=refresh_token&client_id=a
cme&refresh_token=
OR use Postman chrome app or equivalent
46. Implicit Grant
Implicit grants are used in browser based application when
we can't show the client secret on the browser side.
Browser – InCognito Window
• http://localhost:8899/userauth/oauth/authorize?response_type=toke
n&client_id=acme&redirect_uri=http://localhost:8090/index.html
47. Password grant
The password grant is used to provide the username and
password to the authorization server and get the access token
directly.
Postman – chrome app
• POST method
• URL -
http://localhost:8899/userauth/oauth/token?grant_type=password&user
name=dave&password=secret&redirect_uri=http://localhost:8090/index.
html
• Basic Auth
Username – acme
Password - acmesecret
48. Client credentials
The client credential grant is used by the client themselves to
get an access token without the context of the user involved.
Postman – chrome app
• POST method
• URL -
http://localhost:8899/userauth/oauth/token?grant_type=client_credenti
als&client_id=acme&client_secret=acmesecret
• No Auth
We are bypassing the user.
51. Angular 1.x
MVC framework for dynamic web applications
HTML as template language to express application
components
AngularJS uses directives for extending the HTML
attributes and expressions for binding data to HTML
58. Security
Same as UI server
Additionally need to add CSRF (cross site request forgery)
protection
Angular already offers inbuilt CSRF protection – we need to
add support for it on the server
63. Functionality
In-memory / Persistent datastore to store users related to
system
Annotate it using @EnableResourceServer in addition to
other annotation
Endpoints
• getUsers -> GET, path /
• getUserByUserName -> GET, path /{userName}
Define dependencies and configuration
66. Functionality
In-memory / Persistent datastore to store tasks related to user
Annotate it using @EnableResourceServer in addition to other
annotation
Endpoints
• getTasks -> GET, path /
• getTaskByTaskId -> GET, path /{taskId}
• getTasksByUserName -> GET, path /usertask/{userName}
Define dependencies and configuration
68. API-Gateway
Make changes to the api-gateway to forward requests for
these 2 services
User context-root => /user-service
Task context-toot => /task-service
70. Functionality
In-memory / Persistent datastore to store comments related to
tasks
Annotate it using @EnableResourceServer in addition to other
annotation
Endpoints
• Root path /comments
• getCommentsByTaskId -> GET, path /{taskId}
Define dependencies and configuration
No changes needed on api-gateway.yml since this is an internal
service
73. Changes in Task Service
Add @EnableOAuth2Client on root application class
Add a new class for providing OAuth2RestTemplate.
Annotate with @Configuration
@Bean
@LoadBalanced
public OAuth2RestTemplate restTemplate(OAuth2ProtectedResourceDetails resource,
OAuth2ClientContext context) {
return new OAuth2RestTemplate(resource, context);
}
74. Changes in Task Service
Add method in @Service class getCommentsForTask
We pass the token from the task service to the called
comments service through tokenRelayHandlerInterceptor
Use RestTemplate to access the comments resource using
the discovered name - http://comments-
webservice/comments/{task-id}
75. Changes in Task Service
if (LOGGER.isLoggable(Level.INFO)) {
LOGGER.info(String.format("Checking comments for taskId [%s]",
taskId));
}
return
restTemplate.getForObject(String.format("http://comments-
webservice/comments/%s", taskId),
CommentCollectionResource.class);
78. Explained
By default the circuit is closed and the original method is
executed.
The original method throws an exception, the fallback
is executed.
Error rate hits the threshold, the circuit opens.
Until the circuit is open the original method is not executed
anymore, only the fallback.
After a predefined amount of time the circuit is closed, and the
flow starts from the beginning.
79. Dependencies
compile("org.springframework.cloud:spring-cloud-starter-
hystrix")
Add @EnableCircuitBreaker annotation on Application
class
Add the following annotation on the method for which you
need fallback behaviour
@HystrixCommand(fallbackMethod = "getFallbackCommentsForTask", commandProperties = {
@HystrixProperty(name = "execution.isolation.strategy", value = "SEMAPHORE"),
@HystrixProperty(name = "circuitBreaker.requestVolumeThreshold", value = "10"),
@HystrixProperty(name = "circuitBreaker.sleepWindowInMilliseconds", value = "1000") })
81. Docker
Containers
• Package software along with all dependencies – both binaries and
runtime
• Independent of Environment / OS
Containerization technology that lets us run containers
using virtualization on the host OS
83. Docker Compose
Define and run multi-container applications
Specify images and configuration in a simple YAML file:
• docker-compose.yml
One command to get it all running:
• $ docker-compose up
84. Rancher
Docker orchestration tool
• Schedule across multiple machines
• High Availability
• Monitoring and restarts of failed containers
• Load balance HTTP/s applications
Runs abstraction over choice of orchestration engines –
Swarm, Kubernetes, Mesos and Cattle
Essential to running Docker in production
Testing
MVP
Presenter contains UI business logic for view
For example, when someone clicks the "Save" button, the event handler delegates to the Presenter's "OnSave" method. Once the save is completed, the Presenter will then call back the View through its interface so that the View can display that the save has completed.
Presenter does NOT determine which view is being presented.
MVC
Controller contains the UI business logic for the View
In the MVC, Controller is tightly coupled to the View. I.e. Controller is responsible for determining which View is displayed in response to any action including when the application loads.
E.g. backbone.js, angular.js, ember.js
MVVC
The View binds directly to a Presentation Model
E.g knockout.js