Hi,
Thank you for your comments.  I am new to both django and thrift.  I
am hosting my service with a shared web hosting server.  That's why I
want to use django to expose a thrift API.  Basically, what I want is
to have a web service that can be consumed by both python and c++.  Do
you think this is possible with django?

Thanks.

On Wed, Sep 7, 2011 at 8:57 PM, Malcolm Box <malcolm....@gmail.com> wrote:
> On 7 September 2011 07:18, leon <leon.li.lir...@gmail.com> wrote:
>>
>> Hi,
>>
>> I have one question.  Is it possible to use Django to write thrift
>> (http://thrift.apache.org/) formated web service? If it is possible,
>> is there any sample?
>>
>
> Possible, maybe. But almost certainly the wrong thing to do.
> Thrift is a binary protocol that doesn't look much like HTTP. Attempting to
> use a web framework to handle it will cause grief.
> Use the Thrift Python bindings to write a server, either a straight Thrift
> server or using Twisted. Then if you need access to things like the Django
> ORM then use those in the server.
> Don't try to tie handling Thrift into the Django
> URL/HttpRequest/HttpResponse cycle or you'll go mad.
> Malcolm
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to