Displaying 20 results from an estimated 6000 matches similar to: "Streaming content"
2008 Jan 14
29
Ebb Web Server
Hello Mongrel Users,
I''m writing a web server called Ebb. It''s written in C, makes use of
the Mongrel HTTP parser, and uses libev its event loop. The goal is to
be small, fast, and language independent server that can host web
frameworks. I have written a small Ruby binding which provides a Rack
handler - this will allow Ebb to host Rails, Merb, and other Ruby
frameworks. In the
2007 Dec 11
54
1.9
Hey so,
People are asking about Mongrel Ruby 1.9 compatibility. Isn''t the
point of 1.9 for library developers to have time to get ready for 2.0?
It''s not like 1.9 is a production release.
Evan
--
Evan Weaver
Cloudburst, LLC
2007 Aug 29
11
Non-Erubis Templates
Trunk Issue: Because of the use of ''autoload'', template handlers other
than Erubis are not loaded automatically (Haml, XMLBuilder). Either
this should be fixed, or the documentation should be updated to
instruct people how to use non-Erb template engines.
Apparently the solution is to do something like this in merb_init.rb:
::Merb::AbstractController.register_engine
2007 Sep 20
11
Proposed API change for respond_to
Ez (or someone) asked on #merb tonight whether respond_to was the
right API for
what it does. After some discussion and pasties, I offer the
following proposed
API for content negotiation and response format selection:
First, what does respond_to do right now? I see at as performing 3
distinct
operations:
1. parse params[:format] and the accepts header to find out what
format the
2007 Jul 08
1
streaming upload progress plug-in
I''m working on new methods of doing Ajax calls through streaming
responses. I''ve created a little javascript library (which depends on
prototype.js) that can interpret a stream of JSON objects separated by
semicolons.
As an application of this, this Mongrel plug-in streams upload status
when given a qualified upload_id. It looks like this:
2007 Apr 02
2
a new upload progress bar
I''m modifying techno weenie''s progress bar plug-in. Currently it works
by making the browser poll the server, via AJAX, for updates on amount
received. My plug-in provides a handler which will stream updates on
the amount received, thus only one request needs to be made. Also, the
progress can be updated at faster rates since the client doesn''t need
to poll. This should
2007 Aug 13
1
SqueezeBox, a new Mongrel handler
SqueezeBox is a simple file system based routing framework for erubis
templates.
It aims for a couple of niceties as well:
Instead of putting your logic inside your template, like you would
with PHP, SqueezeBox recognizes a separate logic file to be called
before it loads the template. This allows you room to load
ActiveRecord models or do calculations. These logic files return to
the webserver
2007 Aug 17
1
Cookies for Mongrels
This class provides a CookieJar object for Mongrels. Just initialize
with response and request objects and then treat like a hash. Does not
depend on cgi.rb
ry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: cookies_for_mongrels.rb
Type: text/x-ruby-script
Size: 4776 bytes
Desc: not available
Url :
2007 Aug 17
1
Cookie Sessions in Merb?
I like the cookie sessions that Rails edge has - they make sense,
they''re fast, easy.
For those that don''t know: the default session mechanism is to give
developers a Hash called session. To store this object between
requests it Marshals the session object and sends the object itself
(now as a bitstream) back to clients to store in their cookie file. To
prevent users from
2007 Sep 22
2
http helpers c extension
hi,
I rewrote escape, unescape, and query_parse in a C extension.
http://s3.amazonaws.com/four.livejournal/20070922/http_helpers.tar.bz2
Here are some sample benchmarks (the benchmark script is included in
the package)
user system total real
escape: Single long
Mongrel: 1.680000 0.020000 1.700000 ( 1.837793)
HttpHlp: 0.030000 0.010000 0.040000 ( 0.036590)
2008 Apr 24
4
Pure Ruby HTTP parser
Before anything else, let me state this: Of course it''s going to be
PAINFULLY slow on MRI. That''s not the point :)
I thought I''d try out writing out a Ruby version of the parser for the
purposes of Rubinius. For those of you who aren''t aware, Ragel supports a
goto-driven FSM on Rubinius by injecting assembly directly, and Rubinus head
honcho guy Evan Phoenix
2007 Oct 22
30
TST is right out
Hi Zed,
I checked in a pure-Ruby URI classifier to Mongrel trunk. Ola''s Java
port of the TST had some bug, and I don''t think it''s necessary in the
first place. The Ruby classifier is around 25 lines instead of the
400-odd lines for the C extension and the 200-odd for the Java
extension. It uses a Regexp which is perhaps shady:
@matcher = Regexp.new(routes.map do
2007 Sep 18
10
Routes
hi all,
I want to move some routing tasks out of the router and into the
controller. The goal is to make Merb feel less like mod_rewrite and
give the user more control at the controller. The new Router is
simple: it takes the path_info (not the whole request) then outputs a
controller class and some parameters from the path matching. The rest
of the routing would be done at the controller level.
2007 Sep 02
17
A Proposal To Magically Remove ''params''
I have a magical proposal for the anti-magic web framework.
Controller methods do not use arguments and yet expect arguments. This
is handled through this params hash because we don''t know in advance
what parameters a client could pass to Merb. But in almost every
instance, it is too much to know all the query parameters - one
doesn''t care if the user threw in an extraneous
2007 Jul 30
1
streaming response
hello list!
I like merb a lot, it frees me from dropping to mongrel every time i
want to stream something.
i have an action which will stream a list of JSON objects (separated
by semicolons). unfortunately because of Mongrel''s write-only header
hash, once a Content-Length header has been written, I can never again
tell it to not send such a thing - and streaming doesn''t work if
2006 Mar 28
7
Is Ruby stable for production use?
Hi,
I realise that Windows is a poor platform and that Webrick is a development,
not production, server. However, we have started seeing this crop up when
perfectly simple page to page links are invoked...
[2006-03-28 08:32:21] ERROR Errno::ECONNABORTED: Software caused connection
abort
/usr/lib/ruby/1.8/webrick/httpresponse.rb:324:in `write''
2006 Sep 13
1
Net::HTTPResponse
Hello :) I have a problem with the Net::HTTP library...
The Net::HTTP library [1] uses a Net::HTTPResponse object for all it''s
responses from web servers. This class has many subclasses, such as
HTTPSuccess, HTTPRedirecttion, etc.
When obtaining a response, the library suggests to check what it is by testing
the class of the returned object - using case/when or kind_of? (which it does
2009 Feb 11
16
Unicorn: UNIX+localhost/LAN-only Mongrel fork
Hello all,
Last week, I finally decided to put into motion some ideas I''ve been
kicking around for a year in my head since last year...
Basically I don''t want to have to deal with threads or support platforms
that rely on or encourage threads. Especially given MRI 1.9 where
kernel threads are more difficult to debug than green ones.
Given the limited scope of this project,
2007 Aug 10
1
serving static files
It seems that Merb is sending static files with Mongrel::DirHandler.
(mongrel_handler.rb:52)
if get_or_head and @files.can_serve(path_info)
# File exists as-is so serve it up
MERB_LOGGER.info("Serving static file: #{path_info}")
@files.process(request,response)
I haven''t done benchmarks and I''ve hardly glanced at DirHandler''s code
but the
2006 Aug 02
1
Modifying Mongrel Examples
Hi,
I am tryinig to work on the Mongrel examples. I am trying to modify
the HttpResponse.
def process(request, response)
response.start do |head,out|
if request.params["REQUEST_METHOD"] == OPTIONS"
else
end
end
One can detect that the request is OPTIONS like this, but how does one
generate the custom response by using HttpResponse.
Please help.
Shubham