Solved

micro services vs rest web services

Posted on 2016-10-25
16
150 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 27

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
Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

 
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 27

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 27

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 27

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 27

Expert Comment

by:dpearson
ID: 41887351
0
 
LVL 7

Author Comment

by:gudii9
ID: 41897907
0

Featured Post

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
Java functions are among the best things for programmers to work with as Java sites can be very easy to read and prepare. Java especially simplifies many processes in the coding industry as it helps integrate many forms of technology and different d…
The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

762 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