changing Xml version in sinatra

V

Virendra Negi

hello to all

I have been working on sinatra for quite while now and i found it
as great as Rails

I recently constructed a sintra application that return result in
Xml format

all i wanted to know

1) how do i change the xml version of the generated xml
because currently "xml.instruct!"
generate the xml with version "1.0"
i needed to change it to version "1.1"

2) Iam using sinatra application to interact with the other
applications
Now currently the response time for sinatra is fluctuating.
as in the sinatra application seem to take different time for
for same request each time queried to it
i.e sometimes it takes less a second or so to return back the
response
the other time it take more than five second to do so.
any thought on why it is happening and what can i do to
bring down the 5+ second response time to less than a second


Thanks anyway
 
R

Rick DeNatale

hello to all

=A0 =A0I have been working on sinatra for quite while now and i found it
=A0 =A0as great as Rails

=A0 =A0I recently constructed a sintra application that return result in
=A0 =A0Xml format

=A0 =A0all i wanted to know

=A01) how do i change the xml version of the generated xml
=A0 =A0because currently "xml.instruct!"
=A0 =A0generate the xml with version "1.0"
=A0 =A0i needed to change it to version "1.1"

Really more of a question about Builder than Sinatra. The instruct!
method takes optional arguments, unfortunately you either take the
defaults or override everything so

xml.instruct!:)xml, :version =3D> '1.1', :encoding =3D> 'UTF-8')
=A02) Iam using sinatra application to interact with the other
applications
=A0 =A0Now currently the response time for sinatra is fluctuating.
=A0 =A0as in the sinatra application seem to take different time for
=A0 =A0for same request each time queried to it
=A0 =A0i.e sometimes it takes less a second or so to return back the
response
=A0 =A0the other time it take more than five second to do so.
=A0 =A0any thought on why it is happening and what can i do to
=A0 =A0bring down the 5+ second response time to less than a second

Well this depends somewhat on your actually application, somewhat on
the server os, and somewhat on how you'd deployed it
(mongrel/mongrel-cluster/passenger/???) This is the same for Sinatra,
Rails or any other server app.

Processing delays might mean that you don't have enough daemon
processes, if they are all busy when a new request comes in, the
request will need to wait, either for a daemon to finish, or a new one
to be spun up. It also may be that the server os is swapping
processes out due to memory over-utilization. So there are quite a
few variables here.


--=20
Rick DeNatale

Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top