tags:

views:

81

answers:

2

Hi all,

Summary: I need to know if there is an existing light-weight implementation of REST+JSON in .NET world which does not use WCF. If not, I am looking for some folks who would be interested to start a joint venture for an Open Source project.

I do not know about you but I was a big fan of WCF when it came out and I praised its design for its modularity and extensibility. However, as I used it more and more often, fundamental issues started to come into light to the point that I now feel it has to be scrapped and redesigned. That seems to be a big statement but I believe these are major issues:

  1. First of all, WCF internally uses SOAP for message which means if the transport message is not SOAP, we incur the cost of transforming to and back from SOAP for every call. This is expensive and time consuming.
  2. Transforming the outgoing message requires "plugging in" a message inspector and "stealing" the message. As the name implies, this is an inspector (must be used for inspection and logging) so using that for changing the message is frankly a hack.
  3. It was design according to WSDL and the world has changed so much since 2001. Implementing REST also requires stealing the message. WCF was designed according to WSDL and not REST.
  4. Channel stack is unnecessarily heavy.
  5. The main stack is protocol agnostic. This is not a advantage, it is a fundamental flaw. As you know, access to a lot of protocol level information was added later because was impossible to implement some important user scenarios. For example, client’s IP address in TCP was not accessible and added later (now accessible using perationContext.Current.IncomingMessageProperties[RemoteEndpointMessageProperty.Name])
  6. Interoperability with other platforms can be an issue.

Now it seems that a lot of designs are moving towards simplicity of JSON and REST. I just love their simplicity and I can see my washing machine consuming JSON in 5-10 years and hosting a REST service! I believe their implementation in .NET was a hack and we seriously need a very light weight and simple framework (because these are simple and light weight) to host REST+JSON services inside and outside IIS. I hope such a framework exist but if not, I am really eager to get something going with a number of like-minded folks.

So what do you think? Does such a framework exist? If not, is anyone interested?

+1  A: 

MVC that spits out JSON instead of HTML seems like a possibility. You have the freedom to either use the JsonDataContractSerializer or JSON.Net to serialize your datacontracts.

Jan Jongboom
Good answer! I think this combination covers most of my requirement. But it depends on having an IIS and hosting a light REST+JSON service should not necessarily require IIS. I am currently using WCF to host services for inter-process communication and no reason thsis could not be JSON+REST.
Aliostad
Why is the outside IIS requirement? IIS itself is quite lean and mean.
Jan Jongboom
A lot of companies do not allow IIS on client machines. In the connected world of today (and more in the future) each device should/eventually will be able to host JSON+REST services.
Aliostad
You will need a proxy application like IIS, if a company doesn't allow IIS it's most likely there isn't a single way to reach a machine from the internet.
Jan Jongboom
@Jan I will explore more on this route and I can use IIS for now. But I can see that time coming soon where devices talk REST+JSON and they need to be able to host it. OpenRasta still depends on IIS.
Aliostad
+1  A: 

Take a look at OpenRasta. It looks like it addresses many of your concerns.

ebpower
Thanks! I will have a look.
Aliostad
This still depends on IIS. Is there anything without IIS?
Aliostad