Friday, February 29, 2008

เอามาทิ้งไว้ (เรื่องของการเสียเปล่า หรือเปล่านะ)

วันนี้จะลง http bining (boch) ให้กับ openfire jabber server
เพิ่งรู้ว่าตัว jabber โดยปกติมันไม่ support
ที่นี่http://groups.google.com/group/flex_india/msg/43397004ab6c9311
คุณ Arul Prasad เค้าว่าไว้อย่างนี้I've been working on a WildFire / Openfire based IM application, and so far its been acting good.
A few things pointers:
1. Wildfire / Openfire are pretty popular OS jabber servers out there 2. Flash libraries include - XIFF from JiveSoft, and mx.collaborations.xmpppackage, by Danny Dura of adobe. Not sure if there are more. A few things to remember:
1. I've heard from my network folks that Openfire/Wildfire is not 'scalable', so not very future proof. 2. Openfire/Wildfire work over xmlsockets - which might get blocked at firewalls. An answer to this is BOSH ( or HTTP Binding) and Openfire doesnt support it natively 3. you can install BOSH support as a component over wildfire/openfire. Google for BOSH and Punjab ( thats the name of the BOSH component)
Haven't used Red5, have heard its pretty good, but not sure especially since its still in early stages of development.
~Arul Prasad.
======
ก็เลยต้องออกแรงกันหน่อย โดนเริ่มไปเอา Punjab มาลง จากที่ http://butterfat.net/punjab/
ตัว punjab ยังต้องการ package เพิ่มเติมอีกนิดหน่อยดูจากใน Readme
Please make sure all dependencies are met before submitting a troubleshooting question.
- Python 2.3>
- Twisted >= 2.4
- Twisted-words >= 0.5.0 - Twisted-web >= 0.5.0
Recommended - Twisted-conch >= 0.5.0
NOTE : You can download all of these packages with the Twisted Sumo package. http://twistedmatrix.com/
- A jabber server like jabberd 1.4.x
ลืมบอกว่า punjab ที่ใช้คือ version 0.12 ในเวบเค้าบอกว่ากำลังจะเป็น 1.0 แต่มันก็ตั้งแต่กลางปี 2007
ดังนั้น เราจึงไป download python ตัวใหม่มาเพื่อความชัวร อย่าลืม check ด้วยว่า x64 มีมั้ย(ไม่เจอ แต่ไว้หาอีกที)ที่http://www.python.org/download/windows/คราวนี้ได้ปลา เอ้ย software version = pywin32-210.win32-py2.6.exe
โหลดต่อ จะเอา Twisted ที่ http://twistedmatrix.com/trac/ดันบอกว่า support กะ python 2.5 เลยต้องกลับไปโหลด python2.5 ใหม่คราวนี้ link ตรงไป sourceforge เลย http://sourceforge.net/project/platformdownload.php?group_id=78018
แล้วก็โหลด twisted ซะด้วย (สงสัยว่า twisted คืออะไร ก็อ่านเอา Twisted is an event-driven networking engine written in Python and licensed under the MIT license. )ได้ version นี้มา ฮ่าๆ http://tmrc.mit.edu/mirror/twisted/Twisted/2.5/Twisted_NoDocs-2.5.0.win32-py2.5.exe
แล้วก็ขนไปลงที่เครื่องกัน
กรรม python ที่เอาไปไม่ใช่ตัว python แต่เป็นหน้ากาก python เฉยๆ ซวยแระกลับไปเอาตัว python project มาด้วย
อืมๆ มีตัวของ x64 ด้วย ฝากไว้ก่อน ไว้ได้ดีจะกลับมาขอ
คราวนี้ขอน้อง python-2.5.2.msi ไปก่อนละกันนะhttp://www.python.org/download/releases/2.5.2/ เป็น vesion ของ 2.5 อันสุดท้านที่ release ก่อนไปขึ้น 3.0a2 ตอนนี้
Step เทพ ลงละนะ1.install python ก็ คลิ๊กๆ ง่ายจริงๆ ลงไปไว้ c โลด
1a แล้วก็ไหนๆโหลด python win มาแล้ว ก็ลงไปด้วย เผื่อมันช่วยอะไร ฮ่าๆ เนี่ยแหละวิธีทำงานของโปรแกรมเมอร์(มั่ว)มี lib เพิ่มดีกว่าไม่มี
2. ต่อไปลง Twisted อันนี้บอกตรงๆไม่เคยลงมาก่อนเลย ขอลงดู ก็คิ๊กๆเช่นเดิม (ไม่ได้นั่งหัวเราะเฉยๆนะ กดด้วยเม้าส์อะ)
3. สุดท้าย ลง punjab อันนี้งงนิดหน่อย เพราะเคยแต่ perl ไม่เคย python เท่าไร ฮะๆ(ปลอบใจตัวเอง) เห็นแต่พี่ชาเขียวใช้ เก่งโครตอยากทำได้มั่งแต่ขี้เกียจ เอ้า เลิกบ่น ไปทำซะหลังจากมั่วๆกู ก็ทำได้ ตามนี้เลย 1.ก่อนอื่นก็ต้อง set path ให้มันมี c:\python25 ที่เราเพิ่งลงไปได้ก่อน จะได้ run python.exe ได้ 2.จากนั้นก็ ไปที่ path c:\punjab-0.12 ที่เราเพิ่งลงไปเช่นกัน แล้วสั่ง command ตามใน readme
-------------Installing Punjab-------------
1. Untar the current punjab-X.X.tar.gz file in a directory you would like punjab to reside.
shell>tar vxzf punjab-X.X.tar.gz
2. Run setup to install
shell>python ./setup.py install
3. Configure punjab
shell>mktap punjab --port=5280 --host=localhost --xmlrpc=1 --httpp=1 --httpb=1 --soap=1 --html_dir="./html"
For viewing all options, run:
shell>mktap punjab --help
4. Run punjab
shell>twistd -f punjab.tap
5. HAVE FUN!!
3. ทำไงต่อหละ ไปทำต่อไป => อ้าวซวย mktap ไม่เห็นรู้จักเลย ก่งก๊ง เลยพึ่งพ่อกู(เกิ้ล)ก่อนใครไปเจอคำนึง จึงค่อยอ๋อ mktap/twistd in a Windows service << มันไม่เกี่ยวหรอก แต่รู้เลยว่า ต้องเรียกผ่าน twisted เมื่อกี้ไปเล่นแล้วรู้ว่ามันเป็น command line tool ตัวนึงนี่แหละ และเหมือนจะ set path อัตโนมัต i iไม่น่าโง่เลยตู แต่ก็ยังดีที่น่าจะทำได้ต่อ ก็ทำตาม command ที่เหลือเลย
คราวนี้ซวยของจริง ดัน error บอกว่าไม่มี SoapPy จะไปหาจากไหนละเนี่ย
C:\punjab-0.12>mktap punjab --port=5280 --host=localhost --xmlrpc=1 --httpp=1 --httpb=1 --soap=1 --html_dir="./html"C:\Python25\lib\site-packages\twisted\names\dns.py:50: RuntimeWarning: PyCryptonot available - proceeding with non-cryptographically secure random source 1Traceback (most recent call last): File "C:\Python25\scripts\mktap.py", line 19, in run() File "C:\Python25\lib\site-packages\twisted\scripts\mktap.py", line 180, in run ser = plg.makeService(options.subOptions) File "C:\punjab-0.12\punjab\tap.py", line 33, in makeService return punjab.makeService(config) File "C:\punjab-0.12\punjab\punjab.py", line 73, in makeService from soap import SOAPPJab File "C:\punjab-0.12\punjab\soap.py", line 2, in from twisted.web import server, resource, soap File "C:\Python25\lib\site-packages\twisted\web\soap.py", line 20, in
import SOAPpyImportError: No module named SOAPpy
C:\punjab-0.12>
search ต่อๆลองเอา SOAPPy มาลงเองเลยเพิ่งรู้ว่าการ set path ยังไงก็ต้องทำไว้ก่อน เจ้า twisted อะไรไม่ได้ช่วยตรงนี้เลยไป compile ตัว SoapPy อีกตัว ด้วยคำสั่ง python ./setup.py เหมือนๆเดิมอ้อ มีเวบนึงบอกว่า ให้ set เป็น PYTHONPATH ไว้ใน envirionment เลย จริงๆไปแหมะไว้กะ path เหมือนกัน เรียกหรูๆแค่นั้นก็ลองไปทำกันดูละกัน เอางี้ไปก่อน
อันนี้บอกว่าให้ลงเพิ่มเองhttp://twistedmatrix.com/pipermail/twisted-python/2004-July/008138.html
อันนี้เวบโปรเจค Soap ที่อยู่กะ python เชื่อมโดย twisted มั้งนะ มั่วๆเอาhttp://pywebsvcs.sourceforge.net/
ตัวนี้ไว้ไปโหลดมา SoapPyhttp://sourceforge.net/project/showfiles.php?group_id=26590&package_id=18246
พอรันคอมมานด์ปกติ (อย่าลืมใส่คำว่า install ผมลืม 2 ทีและ)มันก็ error บอกว่า import ต้องมาก่อน บรรทัดแรกอะไรงี้ก็ต้องไป search หาทางแก้ในเน็ทอันนี้แก้ http://lists.ibiblio.org/pipermail/cc-devel/2007-July/000530.html
เค้าบอกให้แก้ script เราก็ไม่ค่อยรู้เรื่อง แก้แค่เลื่อนบรรทัดไปก็ยัง error ก็เลย backup file setup.py เอาไว้ก่อน แล้วแก้ให้มัน simple ขึ้น โดยเลียนแบบจาก setup.py ของโปรเจค punjab ตามข้างล่างนี่
ก็เลยเปลี่ยน command setup มันให้ง่ายๆหน่อย set para วุ่นวายเลย error (ฮึ ไอ้พวกโชว์เหนือ -> บ้าเดะ เค้าทำให้ดูเป็นบุญตาแล้ว ยังไม่สำเหนียกอีก)
แก้ แบบนี้ ใส่ fix ไปโลด
from distutils.core import setup, Command, Extension
setup(name="SOAPpy", version='0.12.0', description="SOAP Services for Python", maintainer="Gregory Warnes", maintainer_email="Gregory.R.Warnes@Pfizer.com", url = 'http://pywebsvcs.sf.net/', long_description='SOAPpy provides tools for building SOAP clients and servers. For more information see http://pywebsvcs.sf.net/', packages=['SOAPpy','SOAPpy/wstools'] )
ก็ compile สำเร็จ เหอๆ ท้าทายดีหวะ เหนื่อย แต่ว่าทำไงต่อ หละเนี่ย


==========ข้อความเต็ม=================

Flex India Community

หน้าแรก
การสนทนา + การโพสต์ใหม่
หน้า
ไฟล์ เกี่ยวกับกลุ่มนี้ เข้าร่วมกลุ่มนี้ ข้อความจากการสนทนา Flex and Jabber กลุ่มที่คุณกำลังโพสต์ข้อความเข้าไปเป็นกลุ่ม Usenet ข้อความที่ถูกส่งไปยังกลุ่มนี้จะแสดงอีเมลต่อทุกๆ คนบนอินเทอร์เน็ตข้อความตอบกลับของคุณยังไม่ถูกส่งออกไปการโพสต์ของคุณสำเร็จแล้ว Arul Prasad M L ดูโปรไฟล์ ตัวเลือกเพิ่มเติม 8 ธ.ค. 2007, 03:27
จาก: "Arul Prasad M L" <arulpra...@gmail.com>วันที่: Sat, 8 Dec 2007 04:27:32 +0800ท้องที่: ส 8 ธ.ค. 2007 03:27เรื่อง: Re: [flex_india:4757] Re: Flex and Jabberตอบกลับผู้สร้าง ส่งต่อ พิมพ์ ดูกลุ่มหัวข้อ แสดงต้นฉบับ รายงานข้อความนี้ ค้นหาข้อความโดยผู้เขียนคนนี้ I've been working on a WildFire / Openfire based IM application, and so far its been acting good.
A few things pointers:
1. Wildfire / Openfire are pretty popular OS jabber servers out there 2. Flash libraries include - XIFF from JiveSoft, and mx.collaborations.xmpppackage, by Danny Dura of adobe. Not sure if there are more.
A few things to remember:
1. I've heard from my network folks that Openfire/Wildfire is not 'scalable', so not very future proof. 2. Openfire/Wildfire work over xmlsockets - which might get blocked at firewalls. An answer to this is BOSH ( or HTTP Binding) and Openfire doesnt support it natively 3. you can install BOSH support as a component over wildfire/openfire. Google for BOSH and Punjab ( thats the name of the BOSH component)
Haven't used Red5, have heard its pretty good, but not sure especially since its still in early stages of development.
~Arul Prasad.
On Dec 2, 2007 3:10 AM, Sajid Hussain <sajidun...@gmail.com> wrote:

> Hi Abdul ,
> Hos open fire and its given plugin for flash to make any IM ? > I also found tht with open fire we could use RED 5 for audio calls any > comment from u all guyz ?
> Thanks > Sajid > www.synergyi.com > Pakistan
> On Nov 28, 2007 7:57 AM, Abdul Qabiz <abdul.qa...@gmail.com> wrote:
> > Protocol is an industry standard and can do most of stuff (presence, p2p > > etc).... GTalk runs on Jabber protocol and there are many others...
> > You gotta take care of right server selection, there are many > > open-source servers, choose the one which scales...
> > You can surely take care of file-upload functionality, you can't do peer > > to peer stuff now... Hopefully, AIR would have P2P support (being able to > > open a socket connection or be a socket-server)
> > -abdul
> > On Nov 28, 2007 5:52 PM, vinay pillay <pillay.vi...@gmail.com> wrote:
> > > Hi friends > > > I am making a jabber client using a xmpplibrary > > > Can any one tell me how stable is this protocol > > > And is functionality like file transfer and transport possible
> > > Any kind of feedback is welcome I am waiting for ur response
> > > Thanks in advance
> > -- > > -abdul > > --------------------------------------- > > http://abdulqabiz.com/blog/ > > ---------------------------------------

-- Arul Prasad http://arulprasad.blogspot.com

ตอบกลับผู้สร้าง ส่งต่อ จัดอันดับการโพสต์นี้: Text for clearing space
โอยยยงง
เอาใหม่ตั้งแต่ต้นทำการ compile soappy ใหม่ (แก้กลับ)มันฟ้อง error
อ๋อพอดีไม่อ่าน Readme ของตัว Soap มันต้องการสองตัวนี้
- fpconst 0.6.0 or later, <http://research.warnes.net/projects/rzope/fpconst/>
- pyXML 0.8.3 or later, <http://pyxml.sourceforge.net>เรายังไม่ไดลงตัวล่างเลย ทำไมมันผ่านหละวะ

C:\punjab-0.12>mktap punjab --port=5280 --host=localhost --xmlrpc=1 --httpp=1 --httpb=1 --soap=1 --html_dir="./html"C:\Python25\lib\site-packages\twisted\names\dns.py:50: RuntimeWarning: PyCryptonot available - proceeding with non-cryptographically secure random source 1http://www.amk.ca/python/code/crypto

1 comment:

Anonymous said...

Ich tue Abbitte, diese Variante kommt mir nicht heran. Wer noch, was vorsagen kann? viagra preisg?nstig cialis online apotheke [url=http//t7-isis.org]cialis ohne rezept[/url]