Difference between revisions of "PyOGP Client Library Development"

From Second Life Wiki
Jump to navigation Jump to search
 
(36 intermediate revisions by 5 users not shown)
Line 1: Line 1:
This is the Development page for the [[Pyogp]] [[Pyogp/Client_Lib | Client Library]].
{{PyOGP/navigation}}
= Related Pages =
[[Pyogp/Client_Lib/Development/Design | Design]] - this is our page that outlines the draft design of the client library


'''Note:''' Major revisions are needed to pull this document up to speed.


= Code Status =
This is the development page for the [[Pyogp]] [[Pyogp/Client_Lib | Client Library]].
If you want to work with us on PyOGP here is all you need to know.
 
== Setup and Preliminary Info==
 
* [[Pyogp/Client_Lib/The_Development_Sandbox| How to setup a development sandbox for developing the library]]
* [[Pyogp/Client_Lib/Filesystem_Structure| The filesystem structure of pyogp]]
 
== Development Principles ==
 
* Tools we use (buildout, eggs, unit tests)
* How do I add new functionality the best way? See [[PyOGP_Client_Library]] for implementation details.
 
== How-Tos ==
 
* [[PyOGP_Client_Library#Extending_Functionality | How do I add a new component/subproject to the project?]]
* [[PyOGP_Package_Unittests | How do I write and run library unit tests? ]]
 
== Code Status ==
*[https://svn.secondlife.com/svn/linden/projects/2008/pyogp/ Current Pyogp Repo] - svn repo of the most up-to-date code we are using for the project
*[https://svn.secondlife.com/svn/linden/projects/2008/pyogp/ Current Pyogp Repo] - svn repo of the most up-to-date code we are using for the project
*[[Current_Sim_Capabilities]] - capabilities that are currently used
*[http://pysecondlife.googlecode.com/svn/pyogp/pyogp.lib.base/trunk: Tao Takashi's Pyogp] - svn repo - Tao Takashi has hit the ground running with an experimental framework which has been made available [http://code.google.com/p/pysecondlife/ here].
**Read more at his blogpost describing the start of his work at his very long [http://mrtopf.de/blog/secondlife/worldofsl/setting-up-a-framework-for-a-python-implementation-of-the-open-grid-protocol-technical url].
*[[Presence_Code_Python| Sai's Presence]] and [[Presence_Code_Python_cmd_line| Sai's Presence_cmd_line]] - Saijanai Kuhn's first attempts at some Python presence
*[https://svn.secondlife.com/svn/linden/projects/2008/pyogp_old/ Linden Pyogp] - svn repo of Linden's first stab at framework, using Sai's code as a base
**[https://svn.secondlife.com/svn/linden/projects/2008/pyogp_old/examples/pyogp.lib-login.py pyogp.lib-login.py] - sample script which logs into aditi's agent domain and establishes a presence on a simulator on vaak:
**Disclaimer*: Everything in the repo now will change dramatically in the next few weeks as things firm up structure wise. My desires for the work include: a simple, well defined library, a separate test framework (unittest, the initial high level code to be added this week), an samples/examples sandbox, and clean well commented code. That said, none of the above are in place now. They will be. More sophisticated implementations can evolve over time, or can be included on the side of the library...
*[[Example_protocol_code]] - code written about login and presence
* [http://zhaewry.wordpress.com/2008/06/05/happy-jumpy-ruths-interop-takes-a-step/ Interop Ruths] - some news that may be of interest to us
<br>
* [[Pyogp/Client_Lib/Protocols_Explained | Protocols_Explained]] - here's a listing of the protocols that we may implement, and the implementation details about them as well.


= Development Tasks =
== Coding Guidelines ==
Task list for the client library. These may get PJIRA tasks someday, or some other format we decide upon.
#Start looking over and learning [[Eventlet]] most of the other documentation listed on this page
#Decide whether to [http://docs.python.org/lib/module-doctest.html doctest] or not to doctest. We are certainly planning to use [http://docs.python.org/lib/module-unittest.html unittest]
#Develop requirements specification - let's first get an idea of what it is, exactly, that we want to build
#*Requirements
#*[[Use_Cases#Limited_Capability_Clients|Use Cases]] - these might help to identify how the lib might be used by someone. We should look at these and determine which of the use cases we want to implement.
#*Identify target audience and the corresponding limitations - this project is not meant solely for Linden Lab, so we should identify who could use it and how they may use it
#Design the structure of the code according to the spec
#*Taking into consideration some of the following:
#**Must work for both Legacy and OGP (any Login or other protocols must be interfaced so to be implemented by Legacy or OGP)
#**Flexibility to allow different ways to communicate between the client and server (e.g. either eventlet, urllib2, etc.)
#Implement the design
#*Determine how to distribute the code so nobody's toes hurt and no elbows bumped


Tasks that have been recently completed:
We've recently published goals to keep in mind while writing new code for PyOGP. Please follow [[PyOGP_Coding_Guidelines]] when possible.
#*Determine whether to [http://www.muthukadan.net/docs/zca.html ZCA] or not to ZCA - ZCA enables flexibility via modularity with a component based framework. The intent would be to incorporate this into the library, while the test harness bits would remain 'stock' python. Tao Takashi will extend his initial attempt at this one for AWG and LL to review early next week.
#*Decide whether or not to incorporate [http://pypi.python.org/pypi/zc.buildout/1.0.0b30 buildout]
 
= Components (and supporting environmental details)=
<br><b>Components</b>
#Basic web server parts - deployable snap-in network framework.
#*Login server
#*Agent Domain
#*Region Domain
#Agent
#Capabilities - need some way to POST and GET to capabilities
#UDP Connections - some of the main functionality for a client happens in communication (2-way) with the server.
#*Message Handlers - other than having huge switch states or specific cases, we should create some message handlers that will handle the specific messages coming in. The current way this is handled in the viewer is by having the client have a non-ported web server running in the viewer which handles the messages by parsing URLs in a local manner. We might consider something similar (this is because message handling is doing the same sort of thing as a web server, so might as well use currently working code).
#**To the sim - event queue (see chttp, [[SLGOGP_Draft_1#Event_Queues]]), using Capabilities
#**From the sim - when communication is sent to the client from the sim
<br>
<b>Protocols</b><br>
[[Pyogp/Client_Lib/Protocols_Explained | Protocols_Explained]] - here's a listing of the protocols that we may implement, and the implementation details about them as well.
#[[Pyogp/Protocols#Login | Login]] -  ability to login to a login url, which will connect us to a simulator or agent domain
#*The beta grid has an agent domain login accessible at https://login1.aditi.lindenlab.com/cgi-bin/auth.cgi
#*Parameters = firstname, lastname, password (or md5-password as '$1$' + md5-hash)
#*Regionuri list (log into the agent domain running on aditi, show up on vaak!). Use the regionuri parameter in viewers built from http://svn.secondlife.com/trac/linden/browser/branches/agent-domain-2
#**Note: people working with the agentd suggest trying one of 12035, 13000, 13001, and 13002. They say at LEAST 2 will work. Also note that the names listed below are not necessarily correct. They change frequently, so you can't count on being sent to the right named region. You should be OK going to the right region based on port, however. :)
#**#http://sim1.vaak.lindenlab.com:13000    Dore
#**#http://sim1.vaak.lindenlab.com:13001    Card
#**#http://sim1.vaak.lindenlab.com:13002    Grigiano
#**#http://sim1.vaak.lindenlab.com:12035    Island for Misfit Toys
#**#http://sim2.vaak.lindenlab.com:12035    Ahern
#**#http://sim2.vaak.lindenlab.com:13000    Miramare
#**#http://sim2.vaak.lindenlab.com:13001    Morris
#Presence - ability to be present on a grid


== Documentation ==
== Documentation ==
*[[AWG_Test_Harness_Intro]]
* Pyogp created documentation
* [[Pyogp/Client_Lib/Notes]] - notes that may help understand the rest
** [[Pyogp/Client_Lib/Packet]] - notes that may help understand the rest
** [[Pyogp/Documentation/Specification/pyogp.lib.base]] - documentation on the code
<br>
<br>
* Current Protocols
* Current Protocols
** [[Current_login_protocols]] - what login is like now
** [[Current_login_protocols]] - what login is like now
** [[Current_Sim_Capabilities]] - capabilities that are currently used
* OGP Protocols
* OGP Protocols
** [[Structural_Design]] - the design of the new architecture
** [[Structural_Design]] - the design of the new architecture
** [[SLGOGP_Draft_1]] - the outline of the OGP protocols
** [[Open Grid Protocol]] - the outline of the OGP protocols
** [[OGP_Draft_Login|OGP Draft Login flowchart]] - flowchart for current OGP login protocols
** [[OGP_Draft_Login|OGP Draft Login flowchart]] - flowchart for current OGP login protocols
** [[SLGOGP_Teleport_Strawman]] - what login may be like
** [[SLGOGP_Teleport_Strawman]] - what login may be like
Line 93: Line 57:
*****[http://webcleaner.sourceforge.net/pyOpenSSL-0.6.win32-py2.5.exe pyOpenSSL py2.5] - windows pyOpenSSL for Python 2.5
*****[http://webcleaner.sourceforge.net/pyOpenSSL-0.6.win32-py2.5.exe pyOpenSSL py2.5] - windows pyOpenSSL for Python 2.5
****util.py - has a dependency on fcntl. Go into eventlet's util.py, and either comment out all the fcntl calls, or for a slightly (not a good fix) better solution, [https://lists.secondlife.com/pipermail/sldev/2007-September/004790.html Donovan's Fix]
****util.py - has a dependency on fcntl. Go into eventlet's util.py, and either comment out all the fcntl calls, or for a slightly (not a good fix) better solution, [https://lists.secondlife.com/pipermail/sldev/2007-September/004790.html Donovan's Fix]
** [[Circuit]] - the way to pass two-way information along a UDP connection
** [[Circuit]] - the way to pass two-way information along a UDP connection
** [[Message]] - more detail of messages
** [[Message]] - more detail of messages
Line 106: Line 69:
** [http://peak.telecommunity.com/DevCenter/PythonEggs Python Eggs] -
** [http://peak.telecommunity.com/DevCenter/PythonEggs Python Eggs] -
*** [http://peak.telecommunity.com/DevCenter/setuptools setuptools] - lib to handle eggs
*** [http://peak.telecommunity.com/DevCenter/setuptools setuptools] - lib to handle eggs
* Old Code
**[http://pysecondlife.googlecode.com/svn/pyogp/pyogp.lib.base/trunk: Tao Takashi's Pyogp] - svn repo - Tao Takashi has hit the ground running with an experimental framework which has been made available [http://code.google.com/p/pysecondlife/ here].
***Read more at his blogpost describing the start of his work at his very long [http://mrtopf.de/blog/secondlife/worldofsl/setting-up-a-framework-for-a-python-implementation-of-the-open-grid-protocol-technical url].
**[[Presence_Code_Python| Sai's Presence]] and [[Presence_Code_Python_cmd_line| Sai's Presence_cmd_line]] - Saijanai Kuhn's first attempts at some Python presence
**[https://svn.secondlife.com/svn/linden/projects/2008/pyogp_old/ Linden Pyogp] - svn repo of Linden's first stab at framework, using Sai's code as a base
***[https://svn.secondlife.com/svn/linden/projects/2008/pyogp_old/examples/pyogp.lib-login.py pyogp.lib-login.py] - sample script which logs into aditi's agent domain and establishes a presence on a simulator on vaak:
***Disclaimer*: Everything in the repo now will change dramatically in the next few weeks as things firm up structure wise. My desires for the work include: a simple, well defined library, a separate test framework (unittest, the initial high level code to be added this week), an samples/examples sandbox, and clean well commented code. That said, none of the above are in place now. They will be. More sophisticated implementations can evolve over time, or can be included on the side of the library...
**[[Example_protocol_code]] - code written about login and presence
** [http://zhaewry.wordpress.com/2008/06/05/happy-jumpy-ruths-interop-takes-a-step/ Interop Ruths] - some news that may be of interest to us


== Licensing ==
== Licensing ==
Line 125: Line 98:
   limitations under the License.
   limitations under the License.
   </excerpt>
   </excerpt>
[[Category: Pyogp_Client_Lib]]

Latest revision as of 10:45, 25 June 2010

Note: Major revisions are needed to pull this document up to speed.

This is the development page for the Pyogp Client Library. If you want to work with us on PyOGP here is all you need to know.

Setup and Preliminary Info

Development Principles

  • Tools we use (buildout, eggs, unit tests)
  • How do I add new functionality the best way? See PyOGP_Client_Library for implementation details.

How-Tos

Code Status

Coding Guidelines

We've recently published goals to keep in mind while writing new code for PyOGP. Please follow PyOGP_Coding_Guidelines when possible.

Documentation


  • Old Code
    • Tao Takashi's Pyogp - svn repo - Tao Takashi has hit the ground running with an experimental framework which has been made available here.
      • Read more at his blogpost describing the start of his work at his very long url.
    • Sai's Presence and Sai's Presence_cmd_line - Saijanai Kuhn's first attempts at some Python presence
    • Linden Pyogp - svn repo of Linden's first stab at framework, using Sai's code as a base
      • pyogp.lib-login.py - sample script which logs into aditi's agent domain and establishes a presence on a simulator on vaak:
      • Disclaimer*: Everything in the repo now will change dramatically in the next few weeks as things firm up structure wise. My desires for the work include: a simple, well defined library, a separate test framework (unittest, the initial high level code to be added this week), an samples/examples sandbox, and clean well commented code. That said, none of the above are in place now. They will be. More sophisticated implementations can evolve over time, or can be included on the side of the library...
    • Example_protocol_code - code written about login and presence
    • Interop Ruths - some news that may be of interest to us

Licensing

  1. The code written as part of this effort is subject to the Apache v2 license. Read more at http://opensource.org/licenses/apache2.0.php.
 <excerpt>
 Copyright 2008, Linden Research, Inc.
 
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. </excerpt>