Page 1 of 2 1 2 LastLast
Results 1 to 15 of 17

Thread: IceBox on Python

  1. #1
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20

    Lightbulb IceBox on Python

    Hi to all!

    I usually work with Ice. It's services are very useful on my work. I use Python a lot, because it's easy and can bring new prototypes easily. But, I've some "needs". I've been searching through this forum, and I've found that there is no way to launch an Icebox service written in Python. So, we are going to try and write an Icebox server using Python.

    I would like to know if you could give me some general advice (thanks in advance). I will release it under a free software license, so everyone is free to use it.

    I'll try to update this thread with latest news.

    Best regards.

  2. #2
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20

    Question IceUtilInternal

    Hello again!

    First question raised! Is there something like IceUtilInternal on python? I didn't found it on source.

    Thanks.
    Last edited by Oscar.Acena; 11-10-2009 at 08:46 AM.

  3. #3
    matthew's Avatar
    matthew is offline ZeroC Staff
    Name: Matthew Newhook
    Organization: ZeroC, Inc.
    Project: Internet Communications Engine
    Join Date
    Feb 2003
    Location
    NL, Canada
    Posts
    1,458
    IceUtilInternal is an internal namespace, and should not be used by applications. We reserve the right to change anything in this namespace, and if you rely on this, your application will likely break when you upgrade your Ice version.

    With respect to IceBox, I'm afraid I cannot offer any specific advise other than looking at the implementations in C++/Java/C# to understand how it works. If you have specific questions, however, please ask.

  4. #4
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20

    Thank you

    Woahh!! This was very fast!!

    Thank you for your reply. I'll use other things then

  5. #5
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20

    Thumbs up Good news!

    Hi to all!

    Good news! I've almost finished the first release of IceBox on python!

    I've used code from Java, C++ and C# versions. I'm currently making tests, so, when tested, I'll make it available to everyone.

    There are a couple of interesting things to comment, but I will do it on the post.

    Cheers.

  6. #6
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20

    Talking PyIceBox first release

    Hello!

    I'm pleased to announce the first release of PyIceBox, an IceBox implementation on Python. It is reachable using our public svn repository, located at: https://arco.esi.uclm.es/svn/public/prj/pyicebox/ You can browse it using a navigator, but the best way to retrieve it is with an svn tool:

    Code:
    $ svn co https://arco.esi.uclm.es/svn/public/prj/pyicebox/
    This implementation is heavily based on the Java one, by ZeroC. It is released under the GNU license, GPL, so you are free to use, modify... granted by this license.

    There is some issues which should be taken into account.
    • The Python versión of Ice does not allow Collocated Optimization, so this advantage is not available.
    • The Python version of Communicator does not have 'admin features', i.e. some methods from the interface for Ice::Communicator are missing. To save this, there is Wrapper around Ice::Communicator, which adds this features. PyIceBox uses it, and you are allowed, when possible, to use it too.
    • This is an alpha stage development, so there may be loads of errors (or none, who knows...). Use it under your own responsability. And please, if you can, contribute with bugs, tests, ideas or whatever makes this better.

    Sorry, but there is no package, or other installation method. It's on my TODO. Meanwhile, you can put the whole folder whereever, and add a link to Server.py to your current path. If your Python module is not on CWD (Current Working Directory), you can use PYTHONPATH, as described on Python doc.

    There is an example service (icebox.service, SampleService.py), which you could use to get started. There are only two things to know:

    • IceBox.Service property defines the class used as a service, with the following syntaxis: IceBox.Service.ServiceName = PythonModule.Class [args]. See icebox.config for a real example configuration.
    • Your service must implement IceBox.Service interface, as usual.

    And that's all. Thanks for reading, and please, comment

  7. #7
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20

    PyIceBox on .deb package

    Hello to all!

    I've been working a little on installation issues. After finishing a rule on Makefile to install, I thought that a Debian package would be a great thing to do So, now, there are two ways of installing PyIceBox:

    1. A plain 'make install' with root permissions on source dir (this is the dirty one, as there is no uninstall yet...)
    2. Using the Debian package for this purpose. To achieve this, you can add this repo:
      Code:
      deb http://babel.esi.uclm.es/gnesis unstable main
      to your sources.list, and install as usual:
      Code:
      # apt-get update
      # apt-get install pyicebox

    I think that you can use aptitude too

    Cheers.

  8. #8
    Thaorius is offline Registered User
    Name: John Doe
    Organization: Personal
    Project: None at the moment
    Join Date
    Dec 2009
    Posts
    5
    Nice, I was looking for this (I'm building a big application, and I'm guessing it wouldn't be very nice, resource wise, to have 200 Ice servers running) .

    Does your implementation export an admin interface? I could really use something to start/stop services with a simple Ice client.

    Nice work, by the way.

  9. #9
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20
    Hello Thaorius,

    Thanks for your comments, it encourages me

    About the admin interface, yes If the property 'IceBox.ServiceManager.Endpoints' is defined, it will create an Object Adapter with this endpoints, and register here an object which implements "IceBox.ServiceManager". Thus, you can use the iceboxadmin tool (or another simple client) to start/stop services and to shutdown IceBox server. Like any other IceBox writen in C++ or Java

    Cheers.

  10. #10
    Thaorius is offline Registered User
    Name: John Doe
    Organization: Personal
    Project: None at the moment
    Join Date
    Dec 2009
    Posts
    5
    Oh, that's nice, I'll take a look at the iceboxadmin sources and make my own client (I need access from within the applications, and quite frankly, running a program in the shell from within my application isn't all that 'clean').

    All in all, I like your implementation.

    Another thing, do you plan to maintain this implementation?

  11. #11
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20
    About using a simple client, It's as easy as this:
    Code:
    import Ice, IceBox
    
    def testClient(str_prx):
         ice = Ice.initialize()
         prx = ice.stringToProxy(str_prx)
         prx = IceBox.ServiceManagerPrx.checkedCast(prx)
    
         prx.stopService("TestService")
    And about maintaining PyIceBox, well, I plan to use it in other projects. So, I'll try to update it as Ice evolves. Nevertheless, It's free software, so you can make changes freely

    Best regards.

  12. #12
    Thaorius is offline Registered User
    Name: John Doe
    Organization: Personal
    Project: None at the moment
    Join Date
    Dec 2009
    Posts
    5
    Ah, Ice's simplicity, it's starting to grow on me.

    I'll probably begin testing your pyicebox as soon as I'm done reading the Ice manual (I've gone through about half of it in the last couple days).

    I'll post again if I have anything relevant to report after some testing .

  13. #13
    Gravitas is offline Registered User
    Name: Shane Tolmie
    Organization: NeuralFutures LLC
    Project: Server modules in C++, C# and Java, to client.
    Join Date
    Feb 2011
    Posts
    40
    Great to see the good work - thanks. Its amazing that you could implement the Python version of icebox so quickly.

  14. #14
    Oscar.Acena's Avatar
    Oscar.Acena is offline Registered User
    Name: Oscar Aceña
    Organization: Universidad Castilla-La Mancha
    Project: Wireless sensor networks
    Join Date
    May 2007
    Location
    Ciudad Real, Spain
    Posts
    20

    Smile Thanks

    This is because of Ice and Python simplicity Good to hear someone is interested on it. It needs some testing, and see if works with Ice 3.4. If there are people using it, I'll do it with pleasure

    Cheers.

  15. #15
    Gravitas is offline Registered User
    Name: Shane Tolmie
    Organization: NeuralFutures LLC
    Project: Server modules in C++, C# and Java, to client.
    Join Date
    Feb 2011
    Posts
    40
    Quote Originally Posted by Oscar.Acena View Post
    This is because of Ice and Python simplicity Good to hear someone is interested on it. It needs some testing, and see if works with Ice 3.4. If there are people using it, I'll do it with pleasure

    Cheers.
    We use central Python scripts, mainly as a kind of "master coordinator" for daughter services written in C++, Java or C# (some of them are running remotely on different machines on the internet). We are certainly following your work on icebox for Python with interest. And again - great work!

Page 1 of 2 1 2 LastLast

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Replies: 3
    Last Post: 01-23-2008, 09:22 AM
  2. IceBox and Python
    By rspivak in forum Help Center
    Replies: 2
    Last Post: 04-11-2006, 01:55 PM
  3. IceBox in Python
    By cris78 in forum Help Center
    Replies: 3
    Last Post: 09-08-2005, 10:54 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •