タグ

ブックマーク / blog.64p.org (54)

  • TheSchwartz のような RDBMS をつかったジョブキューをリアルタイムに処理するアイディア - tokuhirom's blog

    TheSchwartz のような RDBMS をつかった job queue は、新規に daemon をたてたりする必要がないので楽でいいのですが、一方で job の追加の timing が storage から push でおくられてこないので、若干の delay が生じてしまうのが難点でした。 この問題を解決するために、mysql の binlog API を用いて、処理してみるハックを考えてみました。 binlog API を利用すると更新クエリを streaming で処理できるので、こういったハックも簡単にできちゃいます。おもしろい。 use 5.016000; use MySQL::BinLog; use TheSchwartz; my $sch = TheSchwartz->new(...) or die; $sch->can_do($_) for ...; $sch->w

    youpy
    youpy 2012/07/09
  • Amon2とJSONとセキュリティ - tokuhirom's blog

    [1]http://d.hatena.ne.jp/ockeghem/20110907/p1[2]http://www.atmarkit.co.jp/fcoding/articles/webapp/05/webapp05a.html[3] http://msdn.microsoft.com/ja-jp/asp.net/ff713315[4] http://labs.cybozu.co.jp/blog/kazuho/archives/2007/01/cross-site_including.phpあたりをよんで、JSON とセキュリティについてかんがえてみた。 ここで、有効とされている対策のうち while(1); を先頭に付与するPOST ですべて処理するといったあたりは、RESTful でないし、BK 感がひどいというか質的ではないのでできるだけやりたくない。 また、Amon2 では互換

  • ゆるふわ CI サーバー Ukigumo ちゃんのつかいかた、かいたよー - tokuhirom's blog

    Ukigumo はゆるふわであることを第一目標として設計されているので、適当にサーバーを設置していれば、プロジェクトの担当者がそれぞれすきなタイミングでつかえるようになります。 まあ、なんか気軽に設置して気軽につかえるやつがいまいまほしかったのでつくったというかんじです。 クライアント側とサーバー側は完全に分離しているんで、クライアント側は自分のすきな実装でできるし、サーバーの管理者の世話になる必要がまったくありません。その方が楽でしょうということで。というか俺は管理したくないので。いや、するけど、できるだけ最低限の手間でやりたいじゃん。セットアップも超簡単にできるようにしてあるというか、むしろ dotcloud とかにすぐに設置できるレベルですよ。 で、クライアント側はどうやってつかいはじめたらいいかということだけども、非常に簡単で、以下のように一個 HTTP Request をおくるだ

    youpy
    youpy 2011/09/09
  • mac ports やめました! ー homebrew で快適 OSX 生活! - tokuhirom's blog

    http://mxcl.github.com/homebrew/ 昨日 mac mini を購入しまして、「さて、mac ports いれなきゃなあ。でも mac ports での環境構築って時間かかるし、CPU パワーもくうし、電気代かかるしエコじゃないし」とかおもっていたところ、そういえば hsbt さんが homebrew ってのをオススメしてたなーとおもって、いれてみたところ、非常に快適。 mac ports は、システムにもともとはいっている perl とか ruby とかもいちいちコンパイルするので、序盤の環境構築が非常に時間がかかるのが難点です。 しかし homebrew は、system にもともとはいっているものはそのままつかうので、初動がはやい。自分の場合、macbook の調子がわるくって、mac mini にかいかえたので、すぐにでもつかいはじめたかったので、非常に

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    youpy
    youpy 2009/12/26
    本文抽出 SITEINFO
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • Dan the API shell 書いた - tokuhirom's blog

    http://gist.github.com/77254 Dan さんの perl eval API が便利だとおもった。どんなコードが実行できるのかためしたかったので、shell っぽく eval することにした。 Term::ReadLine で shell っぽく入力させて、URI::Escape でエスケープして、LWP::UserAgentAPI になげて JSON.pm で eval させてるだけ。 以下は実行例 dan> use XML::LibXML; Warning: XML::LibXML compiled against libxml2 20703, but runtime libxml2 is older 20702 dan> unpack 'p', 0xdeadbeef; dan> print "$ENV{SERVER_ADMIN}\n"; <ちょ、メアドみ

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    youpy
    youpy 2009/01/15
  • 技術的アドベントカレンダーの有用性について - tokuhirom's blog

    続かないかと思われていた JPerl Advent Calendar ですが、意外にも折り返し地点をまわっております。 http://perl-users.jp/articles/advent-calendar/2008/15.html 15日目は id:miyagawa さんです。perldoc の使い方の解説記事です。 来、アドベントカレンダーというのは、イエスの降誕祭を待ち望み、12月1日からクリスマスまでの間に1日一個ずつクリスマスツリーを模したカードの窓を一個ずつあけていくようなもののことです。 一方、エンジニアの世界では、技術系アドベントカレンダーというものがあります。これは、一日一個ずつ tips 的な記事を掲載していくというものです。Perl の世界では、2000年からはじまっています(発祥がどこかは寡聞にして知りませんが)。 http://www.perladvent.

    youpy
    youpy 2008/12/22
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    youpy
    youpy 2008/07/19
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    youpy
    youpy 2008/06/18
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    youpy
    youpy 2008/06/06
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    youpy
    youpy 2008/05/31
  • tokuhirom blog

    Blog Search when-present<#else>when-missing. (These only cover the last step of the expression; to cover the whole expression, use parenthesis: (myOptionalVar.foo)!myDefault, (myOptionalVar.foo)?? ---- ---- FTL stack trace ("~" means nesting-related): - Failed at: ${entry.path} [in template "__entry.ftlh" at line 3, column 25] - Reached through: #include "__entry.ftlh" [in template "entry.ftlh" at

    youpy
    youpy 2008/04/01