How to create a Restful web service in .Net Using MySQL?

Should I use Apache Thrift or TastyPie for a Django RESTful API?

  • I could allow a user to connect to a Django URI, which would then make an outbound connection to my Thrift application server or I could do the same approach via TastyPie. Would one approach be better than the other? [ADDED]: I may not entirely understand how Apache Thrift integrates into an environment. I want to create a web service (using a RESTFUL API) that will require auth and authorization. I intended to do this w/TastyPie and Django. My configuration would be the following: An nginx web server as my front end configured as a reverse proxy to a uWSGI instance that would interact w/Django. As API requests came in, they'd be placed in a queue. Django, nginx, and uWSGI would all run on the same server. The queue would be SQS via AWS. I would then have an application server reading from said queue that would be doing the work requested by the API. B/c these systems are decoupled I could scale as needed based on a utilization metric. Now how does any of this relate to Thrift? Well, I met a guy recently who convinced me Thrift would add performance to this scenario, but now I'm second guessing this assumption as frankly not even sure how Thrift would fit in my proposed environment. What am I missing here?

  • Answer:

    If I understand the question correctly, these are the two options you have at the moment, Client ---> Tastypie (Django) ---> Apache Thrift Client ---> Apache thrift If your thrift application server is on the same network as that of the Django server, you can consider routing it via Django since it will add very little delay to the whole process, and tastypie takes care of most of the things.(Given that you are using apache thrift as a data source, I believe that you are looking for non-model based data, this might help - http://django-tastypie.readthedocs.org/en/latest/non_orm_data_sources.html.) Going forward, if you plan to have authentication or custom permissions for the REST API based on the different user groups, you could just add the checks in Django without worrying about the same in your thrift server. Hope that helps.

Anonymous at Quora Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.