Well - the good folks at Google decided to abandon threads in favor of processes in the design of Chrom(e)(ium). And of course, there's Erlang. ;-) So the threads model isn't the only one. Efficiency comes from high-level design, algorithms and profiling. The "Hotspot" JVM is very efficient at threading, the Erlang VM is very efficient at message-passing between lightweight processes, and the Chrom(e)(ium) engine is very efficient at process creating / destruction.
--
M. Edward (Ed) Borasky
http://borasky-research.net http://twitter.com/znmeb

"A mathematician is a device for turning coffee into theorems." - Paul Erdos


Quoting "D. Smith" <emai...@sharedlog.com>:

If I was looking for the least efficient way to parse streaming API, I
would go with this solution, but since I am looking for more
efficient, I decided to use a language that supports multithreading
and Java is one of those languages.

On Oct 1, 6:52 pm, Justin <justin.carl...@gmail.com> wrote:
Alternatively, you can just dump to disk and have a separate process
read through the queue.

That would be ideal as you wouldn't lose any messages if your database
goes down. (I guess I'm assuming your db is on it's own machine).

On Oct 1, 12:11 pm, "M. Edward (Ed) Borasky" <zn...@borasky-



research.net> wrote:
> Yeah, the Perl library uses "AnyEvent" to achieve threading.
> --
> M. Edward (Ed) Boraskyhttp://borasky-research.nethttp://twitter.com/znmeb

> "A mathematician is a device for turning coffee into theorems." - Paul Erdos

> Quoting "D. Smith" <emai...@sharedlog.com>:

> > perl has the same limitation as php, I decided to use Java for
> > streaming API because of support for threads.

> > On Sep 30, 12:54 pm, "M. Edward (Ed) Borasky" <zn...@borasky-
> > research.net> wrote:
> >> I've used the Perl AnyEvent::Twitter::Stream CPAN module and the Ruby  
> >> tweetstream gem. Both of them work just fine, although I think the  
> >> error handling in the Perl one may have a glitch. The Perl one is  
> >> lighter on both CPU and RAM use, but that's the nature of Perl vs.  
> >> Ruby, not something in the library codes themselves.

> >> I don't know if either of them has been updated to work with the  
> >> official User Streams endpoint yet - last time I looked at User  
> >> Streams, I used cURL from the command line.

> >> I'll probably get back to my User Streams project next week - I've  
> >> been pushing to get my appliances in shape for the SUSE Disters  
> >> contest entry deadline, which is tomorrow. ;-)

> >> And yes, I'd still like the option to get "spritzer" data in User  
> >> Streams without having to open another connection. But I'm probably  
> >> the only one. ;-)
> >> --
> >> M. Edward (Ed) Boraskyhttp://borasky-research.nethttp://twitter.com/znmeb

> >> "A mathematician is a device for turning coffee into theorems." - Paul Erdos

> >> Quoting Taylor Singletary <taylorsinglet...@twitter.com>:

> >> > While it's in Scala, not Java, I've heard good things about
> >> > @alejandrocrosa's Scala-TwitterStreamer :
> >> >http://github.com/acrosa/Scala-TwitterStreamer--youshould be able
> >> > to make use of it fairly easily in a Java environment.

> >> > We'd love to start collecting libraries built around the Streaming API.

> >> > Regardless of language, does anyone have libraries to share with everyone?

> >> > Taylor

> >> > On Thu, Sep 30, 2010 at 8:25 AM, D. Smith <emai...@sharedlog.com> wrote:
> >> >> Hello there!
> >> >> I am pretty experienced with using PHP for Twitter, but now I want to
> >> >> use firehose and Java seems to be a much better fit because of
> >> >> 'Threads', so I can listen to Firehose the pass a job to a thread and > >> >> return right away. PHP cannot do that, well, maybe to some crazy hacks
> >> >> that I am not too impressed with.

> >> >> Anyway, can someone recommend a good Java client that does that,
> >> >> ideally where I can just extend the class to write my own runnable
> >> >> classes.

> >> >> thanks a lot.

> >> >> --
> >> >> Twitter developer documentation and resources:http://dev.twitter.com/doc
> >> >> API updates via Twitter:http://twitter.com/twitterapi
> >> >> Issues/Enhancements Tracker:  
> >> >>http://code.google.com/p/twitter-api/issues/list
> >> >> Change your membership to this group:  
> >> >>http://groups.google.com/group/twitter-development-talk

> >> > --
> >> > Twitter developer documentation and resources:http://dev.twitter.com/doc
> >> > API updates via Twitter:http://twitter.com/twitterapi
> >> > Issues/Enhancements  
> >> Tracker:http://code.google.com/p/twitter-api/issues/list
> >> > Change your membership to this group:  
> >> >http://groups.google.com/group/twitter-development-talk

> > --
> > Twitter developer documentation and resources:http://dev.twitter.com/doc
> > API updates via Twitter:http://twitter.com/twitterapi
> > Issues/Enhancements Tracker:http://code.google.com/p/twitter-api/issues/list
> > Change your membership to this group:  
> >http://groups.google.com/group/twitter-development-talk

--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: http://groups.google.com/group/twitter-development-talk




--
Twitter developer documentation and resources: http://dev.twitter.com/doc
API updates via Twitter: http://twitter.com/twitterapi
Issues/Enhancements Tracker: http://code.google.com/p/twitter-api/issues/list
Change your membership to this group: 
http://groups.google.com/group/twitter-development-talk

Reply via email to