Solved

micro services vs rest web services

Posted on 2016-10-25
16
429 Views
Last Modified: 2016-11-28
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
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 9
  • 5
  • 2
16 Comments
 
LVL 28

Accepted Solution

by:
dpearson earned 250 total points
ID: 41859701
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
 
LVL 25

Assisted Solution

by:Tomas Helgi Johannsson
Tomas Helgi Johannsson earned 250 total points
ID: 41860153
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
 
LVL 7

Author Comment

by:gudii9
ID: 41863976

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
PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

 
LVL 7

Author Comment

by:gudii9
ID: 41864002
any good video tutorials around these topics? please advise
0
 
LVL 25

Expert Comment

by:Tomas Helgi Johannsson
ID: 41864049
0
 
LVL 28

Expert Comment

by:dpearson
ID: 41866308
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
 
LVL 7

Author Comment

by:gudii9
ID: 41876495
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
 
LVL 28

Expert Comment

by:dpearson
ID: 41876521
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
 
LVL 7

Author Comment

by:gudii9
ID: 41876556
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
 
LVL 7

Author Comment

by:gudii9
ID: 41876559
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
 
LVL 28

Expert Comment

by:dpearson
ID: 41876617
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
 
LVL 7

Author Comment

by:gudii9
ID: 41879393
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
 
LVL 7

Author Comment

by:gudii9
ID: 41879406
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
 
LVL 7

Author Comment

by:gudii9
ID: 41886918
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
 
LVL 28

Expert Comment

by:dpearson
ID: 41887351
0
 
LVL 7

Author Comment

by:gudii9
ID: 41897907
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers learn about the “for” loop and how it works in Java. By comparing it to the while loop learned before, viewers can make the transition easily. You will learn about the formatting of the for loop as we write a program that prints even numbers…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question