Ostrich Integration in ESME

58 views
Skip to first unread message

Dick Hirsch

unread,
Jun 8, 2010, 2:41:13 AM6/8/10
to Lift
In a recent post, the twitter development annnounced that a variety of
tools are now packages on scala-tools.org. Ostrich was one of those
tools.

If you are interested in integrating Ostrich into your lift app, you
can take a look at Apache ESME where we just implemented it.

Ostrich (http://github.com/robey/ostrich) is a small library for
collecting and reporting runtime statistics from a scala server and
originates from the Twitter development team. It can collect counters,
gauges, and timings, and it can report them via JMX, a simple web
interface (JSON), a plain-text socket, or a "W3C" log file. A server
can also be asked to shutdown or reload its config files using these
interfaces.

Here is the current output from ESME:

$ curl http://localhost:9990/stats
{"counters":{"userCount":1,"liftSessions":1},"timings":{},"jvm":
{"nonheap_commit;ted
":52723712,"heap_max":259522560,"thread_peak_count":
56,"heap_committed":25702
400,"uptime":204782,"nonheap_max":123731968,"thread_daemon_count":
35,"num_cpus":
2,"thread_count":55,"nonheap_used":42131152,"start_time":
1275742241593,"heap_use
d":17745008},"gauges":{"users":1.0,"listener":1.0}}

Since this info is available via JSON - you should be able to easily
create a web tool that graphically displays the stats from your lift
application. This functionality is important for productive usage in
that you can track not only java-related metrics but also your
application-specific measures.

Unfortunately, it doesn't work on Stax, because currently only one
port (80) is available in this environment and you can't have Lift and
ostrich listening to same port.

The patch was supplied by Imtiaz Ahmed Hajee Esmail and the patch URL
is here: http://svn.apache.org/viewvc?view=revision&revision=952273

D.

Co-Project Lead / Apache ESME
http://cwiki.apache.org/confluence/display/ESME/Index

TylerWeir

unread,
Jun 8, 2010, 10:13:20 AM6/8/10
to Lift
Cool stuff, Ostrich is on my list for integration in our app, so this
is helpful.

Thanks.

On Jun 8, 2:41 am, Dick Hirsch <hirsch.d...@gmail.com> wrote:
> In a recent post, the twitter development annnounced that a variety of
> tools are now packages on scala-tools.org. Ostrich was one of those
> tools.
>
> If you are interested in integrating Ostrich into your lift app, you
> can take a look at Apache ESME where we just implemented it.
>
> Ostrich (http://github.com/robey/ostrich) is a small library for
> collecting and reporting runtime statistics from a scala server and
> originates from the Twitter development team. It can collect counters,
> gauges, and timings, and it can report them via JMX, a simple web
> interface (JSON), a plain-text socket, or a "W3C" log file. A server
> can also be asked to shutdown or reload its config files using these
> interfaces.
>
> Here is the current output from ESME:
>
> $ curlhttp://localhost:9990/stats

David Pollak

unread,
Jun 8, 2010, 2:31:16 PM6/8/10
to lif...@googlegroups.com


On Tue, Jun 8, 2010 at 7:13 AM, TylerWeir <tyler...@gmail.com> wrote:
Cool stuff,

+1
 

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




--
Lift, the simply functional web framework http://liftweb.net
Beginning Scala http://www.apress.com/book/view/1430219890
Follow me: http://twitter.com/dpp
Blog: http://goodstuff.im
Surf the harmonics

Imtiaz Ahmed H E

unread,
Jun 9, 2010, 2:36:32 AM6/9/10
to lif...@googlegroups.com, Hirsch, Richard
Dick Hirsch said re Ostrich Integration in Esme, but about Ostrich alone,
 
<<
A server
> can also be asked to shutdown or reload its config files using these
> interfaces.
>>
 
I'm not sure 'reload' works in the integration of Ostrich into ESME. Will work with Dick and look into it.
 
I'm away from work, for some time today and all of tomorrow, 6/10, (India times)...
 
Imtiaz Ahmed Hajee Esmail
Bangalore, India
Reply all
Reply to author
Forward
0 new messages