• Like
下吧开发总结
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

下吧开发总结

  • 5,214 views
Published

chinavisual privately project summary.

chinavisual privately project summary.

Published in Technology , Education
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
No Downloads

Views

Total Views
5,214
On SlideShare
0
From Embeds
0
Number of Embeds
4

Actions

Shares
Downloads
78
Comments
0
Likes
7

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

Transcript

  • 1. @nightsailer
  • 2. • • •• •
  • 3. • • • • •
  • 4. • • • • • 99%
  • 5. • • • • •
  • 6. • • HTML/CSS) • Pagespeed • image •
  • 7. • • • •
  • 8. • • • •
  • 9. • • • •
  • 10. • • PBP • Perl Best Practices • UTF-8 • css, @charset
  • 11. • Git • • branch/rebase/stash • GUI • gix/git-tower for mac •
  • 12. • • PHP-fpm • PECL • Nginx •
  • 13. • MongoDB/Installation • • 32bit OS 2G 64bit •
  • 14. • MongoDB/Model • DoggyX_Model_Mongo_Base • CRUD method • proxy method • proxy_method like: add_user($name,
  • 15. • DoggyX_Model_Mongo_Base • _id 3 • MONGO_ID_NATIVE • MONGO_ID_SEQ • MONGO_ID_CUSTOM
  • 16. • MONGO_ID_NATIVE • new MongoID• MONGO_ID_SEQ • auto-increment• MONGO_ID_CUSTOM • _id
  • 17. • Don’t use MongoDateTime, it’s suck!• Timestamp • protected $created_timestamp_fields = array(created_on,updated_on); • $updated_timestamp_fields = array(updated_on); • auto_update_timestamp
  • 18. • Create/Insert created_timestamp_fields• model save/update* updated_timestamp_fields•
  • 19. • Event/Hook model • before_save(&$data) • before_update(&$data) • after_save • validate • • return false
  • 20. • Session • DoggyX_Session_Service( ) • on_service_init • on_service_stop • load_visitor • bind_session_to_action($action) • , Interceptor
  • 21. • Session • DoggyX_Interceptor_XSession • check_session_auth($service, $invocation) • session
  • 22. • Session • Session_Servie session, session cookie • , session is_login=true, visitor->id id • visitor • destroy session
  • 23. • Session • Session state, • Session # Cache! • Session Clean Perl service
  • 24. •• Redmine • /Milestone • • Issues Track
  • 25. • Issue Track / Roadmap • • • • •
  • 26. ••
  • 27. • • • debug••
  • 28. • • cookie • css/javascript/images • Javascript • Css • Image , css spirit
  • 29. • /Exipres • Cache • query Cache • Url-rewrite • /css/v0.0.9-b200910/base.css • => /css/base.css • css/
  • 30. • • • • Gearman • Perl PHP Worker • PHP is suck!
  • 31. • PHP • • • IO • IO• Gearman Job
  • 32. • MongoDB • Query • Type cast: (int) $user_id • Query sort • •• vmstat
  • 33. • copy&paste• Bench••
  • 34. • • •• •
  • 35. •• Scale-out• • GUI •
  • 36. • • • MongoDB RS• • • Gearman+VPN
  • 37. • C10K • C10K 3 • Nginx• How? • Starman is good, but • Prefork C10K
  • 38. • Quick work around: • Evented IO, Twiggy! • AnyEvent based • Archive PSGI AE • Must keep non-blocking IO • Nginx upstream balance!
  • 39. • Works fine, Nginx upstream balance! upsteam xiaba { server 127.0.0.1:9001; server 127.0.0.1:9002; .... }• TODO • Nginx-Lua/Nginx-Misc/Echo • Low latency!