I dream a dream.

Archive for October, 2012

Aside

How is GUID with 2^128 big?

 

When learning about GUIDs, it feels like 39 measly digits aren’t enough. Won’t we run out if people get GUID-crazy, assigning them for everything from their pets to their favorite bubble gum flavor?

Let’s see. Think about how big the Internet is: Google has billions of web pages in its index. Let’s call it a trillion (10^12) for kicks. Think about every wikipedia article, every news item on CNN, every product in Amazon, every blog post from any author. We can assign a GUIDfor each of these documents.

Now let’s say everyone on Earth gets their own copy of the internet, to keep track of their stuff. Even crazier, let’s say each person gets their own copy of the internet every second. How long can we go on?

Over a billion years.

Let me say that again. Each person gets a personal copy of the internet, every second, for a billion years.

It’s a mind-boggling amount of items, and it’s hard to get our heads around it. Trust me, we won’t run out of GUIDs anytime soon. And if we do? We’ll start using GUIDs with more digits.

Copied from: [The Quick Guide to GUIDs]

Advertisements

Notes about SOAP, REST and when should we use them.

This is my bookmark about webservice protocol which genereated by Diigo when I investigate about them.
  1. SOAP Introduction

Soap introduction at W3C

tags: soap

What is SOAP?

  • SOAP stands for Simple Object Access Protocol
  • SOAP is a communication protocol
  • SOAP is for communication between applications
  • SOAP is a format for sending messages
  • SOAP communicates via Internet
  • SOAP is platform independent
  • SOAP is language independent
  • SOAP is based on XML
  • SOAP is simple and extensible
  • SOAP allows you to get around firewalls
  • SOAP is a W3C recommendation
  • HTTP is supported by all Internet browsers and servers. SOAP was created to accomplish this.
  • SOAP provides a way to communicate between applications running on different operating systems, with different technologies and programming languages.

 2. RESTful Web Services

“When to Use REST”

tags: REST webservice

  • The web services are completely stateless
  • A caching infrastructure can be leveraged for performance
  • However, the developer must take care because such caches are limited to the HTTP   GET method for most servers.
  • Bandwidth is particularly important and needs to be limited. REST is particularly useful for limited-profile devices such as PDAs and mobile phones

tags: webservice soap REST

  • So this means areas that REST works really well for are:

    • Limited bandwidth and resources; remember the return structure is really in any format (developer defined). Plus, any browser can be used because the REST approach uses the standard GET, PUT, POST, and DELETE verbs. Again, remember that REST can also use the XMLHttpRequest object that most modern browsers support today, which adds an extra bonus of AJAX.
    • Totally stateless operations; if an operation needs to be continued, then REST is not the best approach and SOAP may fit it better. However, if you need stateless CRUD (Create, Read, Update, and Delete) operations, then REST is it.
    • Caching situations; if the information can be cached because of the totally stateless operation of the REST approach, this is perfect.
  • if you have the following then SOAP is a great solution:

    • Asynchronous processing and invocation; if your application needs a guaranteed level of reliability and security then SOAP 1.2 offers additional standards to ensure this type of operation. Things like WSRM – WS-Reliable Messaging.
    • Formal contracts; if both sides (provider and consumer) have to agree on the exchange format then SOAP 1.2 gives the rigid specifications for this type of interaction.
    • Stateful operations; if the application needs contextual information and conversational state management then SOAP 1.2 has the additional specification in the WS* structure to support those things (Security, Transactions, Coordination, etc). Comparatively, the REST approach would make the developers build this custom plumbing.

tags: webservice Restfull soap

  • Amazon has both SOAP and REST interfaces to their web services, and 85% of their usage is of the REST interface.

Posted from Diigo. The rest of my favorite links are here.