Enviar pesquisa
Carregar
Webservices ingo
•
0 gostou
•
686 visualizações
Uttam Gandhi
Seguir
Restful Webservices in Go
Leia menos
Leia mais
Internet
Denunciar
Compartilhar
Denunciar
Compartilhar
1 de 26
Baixar agora
Baixar para ler offline
Recomendados
Writing HTTP Middleware In Go
Writing HTTP Middleware In Go
Shiju Varghese
Building & Testing Scalable Rails Applications
Building & Testing Scalable Rails Applications
evilmike
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
Yuval Ararat
MongoDB and MongoMK Source Event
MongoDB and MongoMK Source Event
Yuval Ararat
Rest assured
Rest assured
Yaniv Rodenski
Progressive Web Apps
Progressive Web Apps
Kranthi Lakum
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
Sencha
Recomendados
Writing HTTP Middleware In Go
Writing HTTP Middleware In Go
Shiju Varghese
Building & Testing Scalable Rails Applications
Building & Testing Scalable Rails Applications
evilmike
Melbourne User Group OAK and MongoDB
Melbourne User Group OAK and MongoDB
Yuval Ararat
MongoDB and MongoMK Source Event
MongoDB and MongoMK Source Event
Yuval Ararat
Rest assured
Rest assured
Yaniv Rodenski
Progressive Web Apps
Progressive Web Apps
Kranthi Lakum
ASP.NET Mvc 4 web api
ASP.NET Mvc 4 web api
Tiago Knoch
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
SenchaCon 2016: How to Give your Sencha App Real-time Web Performance - James...
Sencha
Getting Started with Web Services
Getting Started with Web Services
DataNext Solutions
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Lohika_Odessa_TechTalks
Microsoft exchange
Microsoft exchange
saeed ismail
Building solutions with the SharePoint Framework - deep-dive
Building solutions with the SharePoint Framework - deep-dive
Waldek Mastykarz
Node Session - 3
Node Session - 3
Bhavin Shah
Web services - A Practical Approach
Web services - A Practical Approach
Madhaiyan Muthu
WSO2 Gateway
WSO2 Gateway
Kasun Indrasiri
ASP.NET WEB API Training
ASP.NET WEB API Training
Chalermpon Areepong
Advance java session 2
Advance java session 2
Smita B Kumar
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
Phil Pursglove
Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5
Brij Mishra
Nginx caching
Nginx caching
reneedv
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and Redundancy
John Giaconia
Welcome to Web Services
Welcome to Web Services
Shivinder Kaur
Web servers (l6)
Web servers (l6)
Nanhi Sinha
Using the Cascade Server Web Service API, by Artur Tomusiak
Using the Cascade Server Web Service API, by Artur Tomusiak
hannonhill
Signal rity1
Signal rity1
Yaniv Rodenski
Web Performance Part 3 "Server-side tips"
Web Performance Part 3 "Server-side tips"
Binary Studio
Optimising for Performance
Optimising for Performance
thomas_mb
Website Performance
Website Performance
Hugo Fonseca
CDN implmentation consideration
CDN implmentation consideration
Avi Shalisman
Mais conteúdo relacionado
Mais procurados
Getting Started with Web Services
Getting Started with Web Services
DataNext Solutions
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Lohika_Odessa_TechTalks
Microsoft exchange
Microsoft exchange
saeed ismail
Building solutions with the SharePoint Framework - deep-dive
Building solutions with the SharePoint Framework - deep-dive
Waldek Mastykarz
Node Session - 3
Node Session - 3
Bhavin Shah
Web services - A Practical Approach
Web services - A Practical Approach
Madhaiyan Muthu
WSO2 Gateway
WSO2 Gateway
Kasun Indrasiri
ASP.NET WEB API Training
ASP.NET WEB API Training
Chalermpon Areepong
Advance java session 2
Advance java session 2
Smita B Kumar
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
Ram Awadh Prasad, PMP
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
Phil Pursglove
Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5
Brij Mishra
Nginx caching
Nginx caching
reneedv
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and Redundancy
John Giaconia
Welcome to Web Services
Welcome to Web Services
Shivinder Kaur
Web servers (l6)
Web servers (l6)
Nanhi Sinha
Using the Cascade Server Web Service API, by Artur Tomusiak
Using the Cascade Server Web Service API, by Artur Tomusiak
hannonhill
Signal rity1
Signal rity1
Yaniv Rodenski
Web Performance Part 3 "Server-side tips"
Web Performance Part 3 "Server-side tips"
Binary Studio
Optimising for Performance
Optimising for Performance
thomas_mb
Mais procurados
(20)
Getting Started with Web Services
Getting Started with Web Services
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Debugging Microservices - key challenges and techniques - Microservices Odesa...
Microsoft exchange
Microsoft exchange
Building solutions with the SharePoint Framework - deep-dive
Building solutions with the SharePoint Framework - deep-dive
Node Session - 3
Node Session - 3
Web services - A Practical Approach
Web services - A Practical Approach
WSO2 Gateway
WSO2 Gateway
ASP.NET WEB API Training
ASP.NET WEB API Training
Advance java session 2
Advance java session 2
An Overview of Web Services: SOAP and REST
An Overview of Web Services: SOAP and REST
ASP.NET Scalability - VBUG London
ASP.NET Scalability - VBUG London
Building Modern Web Applications with ASP.NET5
Building Modern Web Applications with ASP.NET5
Nginx caching
Nginx caching
Enterprise WordPress - Performance, Scalability and Redundancy
Enterprise WordPress - Performance, Scalability and Redundancy
Welcome to Web Services
Welcome to Web Services
Web servers (l6)
Web servers (l6)
Using the Cascade Server Web Service API, by Artur Tomusiak
Using the Cascade Server Web Service API, by Artur Tomusiak
Signal rity1
Signal rity1
Web Performance Part 3 "Server-side tips"
Web Performance Part 3 "Server-side tips"
Optimising for Performance
Optimising for Performance
Semelhante a Webservices ingo
Website Performance
Website Performance
Hugo Fonseca
CDN implmentation consideration
CDN implmentation consideration
Avi Shalisman
HWIOS Websocket CMS explained
HWIOS Websocket CMS explained
phrearch
introduction to Web system
introduction to Web system
hashim102
Mini-Training: Let's have a rest
Mini-Training: Let's have a rest
Betclic Everest Group Tech Team
Structured Functional Automated Web Service Testing
Structured Functional Automated Web Service Testing
rdekleijn
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
WebStackAcademy
Lecture 2: Servlets
Lecture 2: Servlets
Fahad Golra
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Amazon Web Services
Restful风格web服务架构
Restful风格web服务架构
Benjamin Tan
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
Betclic Everest Group Tech Team
Content Devilery Network
Content Devilery Network
Sanjiv Pradhan
REST API Recommendations
REST API Recommendations
Jeelani Shaik
Rest webservice ppt
Rest webservice ppt
sinhatanay
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
pkaviya
REST Introduction.ppt
REST Introduction.ppt
KGSCSEPSGCT
Delivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINX
NGINX, Inc.
Mtn view sql server nov 2014
Mtn view sql server nov 2014
EspressoLogic
Azure signalr service
Azure signalr service
Udaiappa Ramachandran
The Technical SEO Full Course how to do
The Technical SEO Full Course how to do
asadkhan888889990
Semelhante a Webservices ingo
(20)
Website Performance
Website Performance
CDN implmentation consideration
CDN implmentation consideration
HWIOS Websocket CMS explained
HWIOS Websocket CMS explained
introduction to Web system
introduction to Web system
Mini-Training: Let's have a rest
Mini-Training: Let's have a rest
Structured Functional Automated Web Service Testing
Structured Functional Automated Web Service Testing
Angular - Chapter 7 - HTTP Services
Angular - Chapter 7 - HTTP Services
Lecture 2: Servlets
Lecture 2: Servlets
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Dynamic Content Acceleration: Lightning Fast Web Apps with Amazon CloudFront ...
Restful风格web服务架构
Restful风格web服务架构
Web Performance Optimization (WPO)
Web Performance Optimization (WPO)
Content Devilery Network
Content Devilery Network
REST API Recommendations
REST API Recommendations
Rest webservice ppt
Rest webservice ppt
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
IT2255 Web Essentials - Unit V Servlets and Database Connectivity
REST Introduction.ppt
REST Introduction.ppt
Delivering High Performance Websites with NGINX
Delivering High Performance Websites with NGINX
Mtn view sql server nov 2014
Mtn view sql server nov 2014
Azure signalr service
Azure signalr service
The Technical SEO Full Course how to do
The Technical SEO Full Course how to do
Último
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
nirzagarg
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
imonikaupta
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
nilamkumrai
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
Escorts Call Girls
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Delhi Call girls
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
tanu pandey
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
Matthew Sinclair
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
ydyuyu
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
SUHANI PANDEY
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Delhi Call girls
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
rahman018755
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
SUHANI PANDEY
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
SUHANI PANDEY
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
ruhi
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
EleniIlkou
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
SUHANI PANDEY
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Call Girls in Nagpur High Profile
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Seo
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
SUHANI PANDEY
Último
(20)
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
💚😋 Bilaspur Escort Service Call Girls, 9352852248 ₹5000 To 25K With AC💚😋
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
Lucknow ❤CALL GIRL 88759*99948 ❤CALL GIRLS IN Lucknow ESCORT SERVICE❤CALL GIRL
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
( Pune ) VIP Baner Call Girls 🎗️ 9352988975 Sizzling | Escorts | Girls Are Re...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
(+971568250507 ))# Young Call Girls in Ajman By Pakistani Call Girls in ...
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
Busty Desi⚡Call Girls in Vasundhara Ghaziabad >༒8448380779 Escort Service
APNIC Updates presented by Paul Wilson at ARIN 53
APNIC Updates presented by Paul Wilson at ARIN 53
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
Nanded City ( Call Girls ) Pune 6297143586 Hot Model With Sexy Bhabi Ready ...
20240508 QFM014 Elixir Reading List April 2024.pdf
20240508 QFM014 Elixir Reading List April 2024.pdf
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
在线制作约克大学毕业证(yu毕业证)在读证明认证可查
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Ganeshkhind ! Call Girls Pune - 450+ Call Girl Cash Payment 8005736733 Neha T...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Hire↠Young Call Girls in Tilak nagar (Delhi) ☎️ 9205541914 ☎️ Independent Esc...
Trump Diapers Over Dems t shirts Sweatshirt
Trump Diapers Over Dems t shirts Sweatshirt
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Yerawada ] Independent Escorts in Pune - Book 8005736733 Call Girls Available...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
Shikrapur - Call Girls in Pune Neha 8005736733 | 100% Gennuine High Class Ind...
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
All Time Service Available Call Girls Mg Road 👌 ⏭️ 6378878445
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
2nd Solid Symposium: Solid Pods vs Personal Knowledge Graphs
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Sarola * Female Escorts Service in Pune | 8005736733 Independent Escorts & Da...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Top Rated Pune Call Girls Daund ⟟ 6297143586 ⟟ Call Me For Genuine Sex Servi...
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Call Girls Ludhiana Just Call 98765-12871 Top Class Call Girl Service Available
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Russian Call Girls Pune (Adult Only) 8005736733 Escort Service 24x7 Cash Pay...
Webservices ingo
1.
Web-Services In Go U1am Gandhi @U1amGandhi h1ps://in.linkedin.com/in/u1am-gandhi-0247aa21 www.synerzip.com
2.
Agenda • REST • Go Advantage •
Web service example • TesMng • Securing using JWT • HosMng
3.
Web-service • The W3C defines a Web service generally as: a so%ware system designed to support interoperable machine-to-machine interac7on over a network.
4.
RESTful Webservice Client HTTP GET /student/78/scores { id: 78, maths : 89, physics:81 } Server
5.
REST • Introduced by Roy Fielding, 2000 • REpresentaMonal State Transfer – Use HTTP methods explicitly. •
POST, GET, PUT, DELETE – Be stateless. – Expose directory structure-like URIs. • h1p://www.myservice.org/discussion/topics/{topic} – Transfer XML, JSON or both
6.
Why REST • Why REST – Minimize coupling between client and server – Client becomes resilient to server changes • Why Not REST – Secure data should not be sent as URI
7.
Stateful design Client Web Service previousPage++ nextPage = previousPage return nextPage GET /book/next_page JSON response
8.
Stateless design Client Web Service getPage(2) GET /book/page/2 JSON response
9.
Go advantage • Deployment – Single binary – Dependency needs staMc Mme managing • Performance of go – Built-in concurrency •
Garbage collecMon
10.
Basic web service using FileIO • The service handles inventory of IPAddresses • Uses – net/h1p of for handling h1p request •
h1p.ListenAndServe() – Handles concurrent requests – gorrilla/mux for parameterized rouMng – os and bufio for file handling • h1ps://github.com/u1amgandhi24/ipalloc
11.
Let’s build this webservice….
12.
Adding Handlers
13.
Handler for Get Request
14.
Handler for Post request
15.
IPAlloc In AcMon • ipalloc • ipalloc service listening on 8123 …. •
curl –XPOST –d ’{“Name”:”dev8”,”IPAddress”:”1.2.3.12”}’ h1p://localhost:8123/ipalloc • curl –G h1p://localhost:8123/ipalloc/1.2.3.12 {“Name”:”device12”,”IPAddress”:”1.2.3.12”}
16.
TesMng • test and h1ptest • Write tests in _test.go files •
func TestMain to write setup and tear-down code • Test case should start with Test prefix • go test runs all tests • go test –cover runs the test and shows coverage
17.
Test An API
18.
Securing with JWT.io • Json web tokens – JSON Web Token (JWT) is an open standard (RFC 7519) that defines a compact and self-contained way for securely transminng informaMon between parMes as a JSON object. •
Library support – C, Go, Swip, Scala, .NET, Java, Python, Node.js …... • Structure of JWT – base64 encoded header – base64 encoded payload – signature of the dot separated header and payload. • h1ps://github.com/u1amgandhi24/jwtdemo
19.
Client Web Service POST /auth User=.. Password=… HTTP 200 OK { JWT Token.. } GET /book/page/2 Auth: JWT Token HTTP 200 OK { Page 2 } Validate JWT
20.
Generate JWT in go
21.
Parse JWT Token in go
22.
JWT In AcMon • jwtdemo • jwtdemo service listening on 3080 …. •
curl –XPOST –H “AuthenMcaMon : U3luZXJ6aXAxOlBhc3N3b3JkMQ==” h1ps://localhost:3080/ authenMcate • "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTU2MTQzOT Z9.pzRgQSRHwSfUymQPsG-LVaH_2n10g3wxpJltYuiUco0" • curl –H “AuthenMcaMon : eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE0NTU2MTQzOTZ 9.pzRgQSRHwSfUymQPsG-LVaH_2n10g3wxpJltYuiUco0” h1p:// localhost:3080/book/page/2 {"PageNum":2, "content":"This a sample page”}
23.
HosMng • Heroku – Signup and install toolbelt – Create go webapp – Godep ( dependency manager ) – Push to heroku • h1ps://mmcgrana.github.io/2012/09/genng- started-with-go-on-heroku.html
24.
Thank You QuesMons
25.
References • h1p://thenewstack.io/make-a-resxul-json-api-go/ • h1p://www.ibm.com/developerworks/library/ws- resxul/ •
h1ps://scotch.io/tutorials/the-ins-and-outs-of-token- based-authenMcaMon • h1p://jwt.io/ • h1p://dghubble.com/blog/posts/json-web-tokens- and-go/ • h1p://www.tutorialized.com/tutorial/RESTful-Web- services:-The-basics/40001
26.
References • h1ps://golang.org/pkg/encoding/base64/ #example_Encoding_DecodeString • h1p://stackoverflow.com/quesMons/ 1368014/why-do-we-need-resxul-web- services •
h1p://di-side.com/di-side/services/web- soluMons/rest-webservice-symfony/ • h1p://spf13.com/post/soap-vs-rest
Baixar agora