Giter Club home page Giter Club logo

seattlelib_v2's People

Contributors

aaaaalbert avatar choksi81 avatar justincappos avatar karthikgvss avatar linkleonard avatar lukpueh avatar monzum avatar rrgodhorus avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

seattlelib_v2's Issues

convert openDHTadvertise.py to .repy

We want to convert the openDHTadvertise library to repy so that we can use it within repy code. r2436 is a better place to start from because the XMLRPC conversion is already done.

The imported modules should be moderately straightforward to replace with repy code. The only real addition of functionality is the one call to urllib.urlopen. This needs to know enough HTTP to get the "webpage" that is the server list.

xmlparse does not properly process XML comments

The xmlparse module raises a xmlparse_XMLParseError exception on reading a XML comment. The comment should be ignored instead.

For example, parsing the following XML response fails:

Alabama

XML-RPC client module for seattlelib

In response to ticket #255. The functionality to bypass the web interface in communicating with the GENI portal requires the use of a RPC protocol, namely XML-RPC.

Support for Date/Time in xmlrpc_common

The XML-RPC protocol supports date and time data, but it is not currently supported by xmlrpc_common. Adding support would allow vessels to exchange time information more efficiently.

Make xmlrpc_client more robust

Check the return values of socket.send() for valid values so as not to go into an infinite loop on receiving bad data.

Deal with XML-RPC nil values

The nil value type in XML-RPC is an extension to the original protocol. The Python implementation can use it, but not by default. It would be nice to figure out how to handle nil values since functions can and should be able to return nil values.

timefromservice.repy retry logic needs modification

To fit into the new time.repy framework timefromservice_updatetime() must take a port as a parameter (and not a number of retries) The port does not have to be used, but it will be passed in.

Rather than retrying a connection to the same server in the event of a connection failure another server should be tried instead.

No sleep should be performed in between connection attempts.

base64 module for seattlelib

Base 64 encoding is widely used as a means to encode binary data to send in text format. It is a useful feature in XML-RPC that is easy to implement.

Update time.repy to use an interface for bringing in different implementations

Several changes need made to update the current methods used for repy programs to get ntp time.

  1. Include a new file time_interface.repy
  2. Change tcp_time.repy and ntp_time.repy to include time_interface.repy
  3. Replace time.repy with a file that is just:
    include ntp_time.repy
    include tcp_time.repy

how to use the new version:

old programs that currently include time.repy will now try to use both the ntp and tcp_time.repy methods to update the time. (this works from python with repyhelper as well as from repy)

If you want to write a program that uses only one method you just include that method (i.e include foo_time.repy)

You do not have to change any other code, the only calls you will ever have to make regradless of what / how many implementations you are using is time_updatetime(port) and time_getttime()

timeout_socket needs to handle multiple closes gracefully...

If you call socket.close() more than once, it should not have an error. Right now you see:

Traceback (most recent call last):
File "centralizedputget.py", line 673, in main
File "centralizedputget.py", line 486, in centralizedadvertise_announce
File "centralizedputget.py", line 363, in close
AttributeError: 'NoneType' object has no attribute 'close'

Service Deployment and Monitoring

We need a program that can run to deploy an arbitrary service (and keep the service running) on an arbitrary number of nodes.

This program will use the geni-xmlrpc interface and nmclient to acquire resources, deploy services, check the status of services, and redeploy as needed.

Additionally the program will be extensible, making it easy to add an additional application specific check to ensure that the deployed service is running.

timefromservice should use timeout sockets

In the event of a server or network failure timefromservice_updatetime() may never return.

This can be corrected by using timeoutsockets (found in seattlelib/sockettimeout.repy )

create a connection oriented socket that times out

Convert the current socket_timeout repy module in the standard library to have the openconn / waitforconn interface. This would be a relatively simple, but very useful abstraction to have. This would also be a good candidate for service composition.

This is inspired by the problems seen in ticket #129.

nmclient and nmAPI have a race to determine error messages.

nmclient_createhandle sets the default socket timeout to 10 seconds.

nmAPI startvessle waits 10 seconds for a vessel to start.

If a vessel "fails to start in a timely manner" an error message indicating the failure is generated by nmAPI, BUT it is more likely that the socket will timeout before the error message is delivered.

This masking of indications can complicate troubleshooting.

We need to look into this issue and know what the reasons for the different timeouts are, and what change history has taken place, prior to fixing this.

Implement timeout for xmlrpc_client

On slow or unreachable servers, the xmlrpc_client module should timeout to prevent possible denial of service attacks (or just slow operations). The module currently will run until Python or Repy kills the program.

xmlrpc repy library leaks sockets

The xmlrpc library is failing to close and free file descriptors. This was causing #470. It needs to be fixed so that this doesn't happen even in error cases.

XML parser module for seattlelib

The implementation of XML-RPC requires parsing XML data. Since REPY has no regular expressions, this must be implemented at a low level. In addition, performance may become an issue for medium-sized files.

signed_data: add new method to library that generates signature for a given string argument

The signed_data library currently has a signdata method that appends a timestamp, destination, public key, sequence id, and a signature to a given message, using "!" as the token separator. We should have another method in signed_data that simply takes a parameter string (with private and public keys) and returns a signature for that string. This will allow users more freedom in choosing how to compose their messages.
signeddata_create_signature(message_string, public_key, private_key)

Trouble acquiring vessels

During testing, in the execution of testprocess.py an error is thrown in emulcom.py.

The error seems to have to do with name resolution?

Traceback (most recent call last):
  File "./seattle_repy/testprocess.py", line 332, in <module>
    nmclient_rawsay(getmyip(), 1224, "GetVessels")
  File "/home/userdir/seattle_repy/emulcomm.py", line 684, in getmyip
    raise e
socket.gaierror: (-2, 'Name or service not known')

Additional information about the node:
-Version: 0.1h
-OS: fc10
-wireless connection that is definitely live as this is my box and I've got a live ssh connection.
-The computer is behind a router, no firewall.
-Error is not always reproducible, occurs seemingly randomly :). When it does occur, it takes a long time to process the testing script which would suggest some kind of timeout is triggered to prevent a hang.

Also noted to have occurred on the following planet-lab machines:
planet1.ku.edu.tr
planet2.ku.edu.tr

exception name bug: ParallelizeException vs. ParallelizeError

parallelize.repy raises and catches ParallelizeException but only defines ParallelizeError. r2495 changed the only usage of this exception that I could see outside of parallelize.repy. Here are the ones in that parallelize.repy that need to be changed:

seattlelib/parallelize.repy:      ParallelizeException is raised if the handle is unrecognized
seattlelib/parallelize.repy:    raise ParallelizeException("Cannot abort the parallel execution of a non-existent handle:"+str(parallelizehandle))
seattlelib/parallelize.repy:      ParallelizeException is raised if the handle is unrecognized
seattlelib/parallelize.repy:    raise ParallelizeException("Cannot get status for the parallel execution of a non-existent handle:"+str(parallelizehandle))
seattlelib/parallelize.repy:      ParallelizeException is raised if the handle is unrecognized
seattlelib/parallelize.repy:    raise ParallelizeException("Cannot get results for the parallel execution of a non-existent handle:"+str(parallelizehandle))
seattlelib/parallelize.repy:      ParallelizeException is raised if there isn't at least one free event.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.