Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2295
  • Last Modified:

micro services vs rest web services

Hi,

what are difference bewteen micro services vs rest web services . When we use which one along with SOAP webservices. How to learn more about these topics.Please advise
0
gudii9
Asked:
gudii9
  • 9
  • 5
  • 2
2 Solutions
 
dpearsonCommented:
A rest web service mostly defines how the URLs for your site should behave - e.g.  if you are building an ecommerce site, you might have

GET: www.myurl.com/order/123    <- retrieve order
DELETE: www.myurl.com/order/123 <-- cancel this order

etc.

Microservices is more about the internal architecture of how the web site is built.  So you might have one module handling orders and another handling price lookup.  It's basically about dividing up the problem into small pieces internally.

So a REST interface is mostly a definition of how the web site behaves externally (to outside users)
While micro services is mostly about how a web site is built internally.

Hope that helps - I'm not about to explain both of these huge concepts in more detail.  This is just the difference between them.

Doug
0
 
Tomas Helgi JohannssonCommented:
Hi!

In short then microservices is a way to design application by using a number of services "instead of one tightly coupled monolith of code".  In some cases it can be easier to manage in development and deployment and REST is one of the form for these services to communicate.

Here are some articles on microservices and REST to look at
http://www.javaworld.com/article/2683277/architecture-scalability/what-microservices-architecture-really-means.html
https://capgemini.github.io/architecture/is-rest-best-microservices/

http://nordicapis.com/microservice-showdown-rest-vs-soap-vs-apache-thrift-and-why-it-matters/
http://microservices.io/patterns/microservices.html

Regards,
    Tomas Helgi
0
 
gudii9Author Commented:

GET: www.myurl.com/order/123    <- retrieve order
DELETE: www.myurl.com/order/123 <-- cancel this order

both above URLs seems same? what is the difference between retrieve and cancel here?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
gudii9Author Commented:
any good video tutorials around these topics? please advise
0
 
Tomas Helgi JohannssonCommented:
0
 
dpearsonCommented:
GET: www.myurl.com/order/123    <- retrieve order
DELETE: www.myurl.com/order/123 <-- cancel this order

both above URLs seems same? what is the difference between retrieve and cancel here?

Those are different "Verbs".  When you browse to a URL in your web browser, you are actually issuing a "GET" request.  But you can send others (not from your browser but in code).

Read more here:
http://www.restapitutorial.com/lessons/httpmethods.html

Doug
0
 
gudii9Author Commented:
GET: www.myurl.com/order/123

when you say VERBS above bolded part? does that consider as part of URL
usually url starts with www. or http:// etc right?
0
 
dpearsonCommented:
The VERB isn't visible in the URL.

It's passed as part of the request (https://en.wikipedia.org/wiki/Hypertext_Transfer_Protocol#Request_methods)

The URL is the thing you are working with (the book in the library).
The verb is what you wish to do with that book (retrieve it, delete it, change it for another book).

Doug
0
 
gudii9Author Commented:
GET: www.myurl.com/order/123    <- retrieve order
DELETE: www.myurl.com/order/123 <-- cancel this order

Open in new window


in above URLs where is the VERB?
0
 
gudii9Author Commented:
GET: www.myurl.com/order/123    <- retrieve order
DELETE: www.myurl.com/order/123 <-- cancel this order

how above two are different as GET and DELETE are not part of URLS?
0
 
dpearsonCommented:
in above URLs where is the VERB?

Let me say it again, the verb is not in the URL.

An HTTP request (the thing your browser sends to a server) consists of more than just the URL.
Think of an HTTP request being a function call that is being made by the browser and sent all the way across the internet to a web server.

The parameters for that function call look like this:
sendRequest(Verb verb, String url) ;

The verb (e.g. "GET", "PUT") is sent separately from the URL.

The take home of all this is - if you don't understand HTTP verbs, best to avoid REST APIs.  Because it's based on those verbs.

Doug
0
 
gudii9Author Commented:
https://www.tutorialspoint.com/http/http_methods.htm

checking above link

GET Method
A GET request retrieves data from a web server by specifying parameters in the URL portion of the request. This is the main method used for document retrieval. The following example makes use of GET method to fetch hello.htm:

GET /hello.htm HTTP/1.1
User-Agent: Mozilla/4.0 (compatible; MSIE5.01; Windows NT)
Host: www.tutorialspoint.com
Accept-Language: en-us
Accept-Encoding: gzip, deflate
Connection: Keep-Alive
The server response against the above GET request will be as follows:

HTTP/1.1 200 OK
Date: Mon, 27 Jul 2009 12:28:53 GMT
Server: Apache/2.2.14 (Win32)
Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT
ETag: "34aa387-d-1568eb00"
Vary: Authorization,Accept
Accept-Ranges: bytes
Content-Length: 88
Content-Type: text/html
Connection: Closed
<html>
<body>
<h1>Hello, World!</h1>
</body>
</html>

how to run above example to see request and response and the verb?
just create html page and which server i supposed to deploy?any end to end example on this? please advise
0
 
gudii9Author Commented:
http://www.tutorialspoint.com/hello.htm%20HTTP/1.1

when i gave as above(host+/hello.htm HTTP/1.1 ie GET part) i got 404 error
0
 
gudii9Author Commented:
if you don't understand HTTP verbs,

can you please point me to good resources and links on this to learn more on this. I feel i know GET, POST, PUT on high level but at deeper level it seems i do not know whole lot? please advise
0
 
dpearsonCommented:
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 9
  • 5
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now