[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Orekit Users] SFDaaS : Space Flight Dynamics as a Service



Hi Luc:

I've enhanced SFDaaS's output.  An example of the new output is below.  

My interest has been piqued with the threading and caching issue that you mentioned.  Therefore, I've instantiated a virtual machine on Amazon's EC2 and I'm running a shared memory storage service on it.  In the near future, I hope to attempt to demonstrate the safe caching capability that could be deployed as a web service for OreKit.  

I'm learning as I go. :-)


A priori state:

 t0 = 2010-05-28T12:00:00.000
 r0 = [3198022.67,2901879.73,5142928.95]
 v0 = [-6129.640631,4489.647187,1284.511245]

A posteriori state: 
 tf = 2010-05-28T14:00:00.000
 rf = [-6174454.063243,2474544.324750,-976156.9807064387]
 vf = [-991.274325,-4808.930607,-5927.623934582873]

Assumptions:
 1) The epochs, t0 and tf, are assumed to be in UTC. 
 2) The radius and velocity vectors are in meters and meters/second, respectively.
 3) The frame is assumed to be the J2000 Earth-centered one.

Run Properties: Run Start : 2011-10-21T16:59:12.736-0400 Run End : 2011-10-21T16:59:12.755-0400 Username : haisam JSESSIONID : 1A3280005C04F6A2BDC4343070E1BBBF Created : 2011-10-21T16:13:06.195-0400 Last Accessed : 2011-10-21T16:58:28.495-0400 CACHING KEY : haisam]|[1A3280005C04F6A2BDC4343070E1BBBF]|[2010-05-28T12:00:00.000]|[[3198022.67,2901879.73,5142928.95]]|[[-6129.640631,4489.647187,1284.511245]]|[2010-05-28T14:00:00.000

On Mon, Oct 10, 2011 at 00:15, Haisam Ido <haisam.ido@gmail.com> wrote:
Hi Luc:

Thank you for your reply.

I believe that a thread-dependent caching system like memcached with
appropriate key/pair values would answer successive requests from the
same remote client.  Something akin to a session id, used as a key,
and unique to each client should be able to return the values
associated with that key and hence for that client.  Session ids would
have to be also stored, on the client side, in cookie type files which
should have an expire date.  Facebook, the primary force behind
memcached, successfully applies this for hundreds of millions of
users.  For Space Flight Dynamics to be effectively deployed in a
distributed and shared environment and in the cloud the
key/pair/sessionid concept would be a necessity.

Cheers,
Haisam Ido

On Sun, Oct 9, 2011 at 15:28, MAISONOBE Luc <luc.maisonobe@c-s.fr> wrote:
>
> Haisam Ido <haisam.ido@gmail.com> a écrit :
>
>> My responses are below.
>>
>> On Sun, Oct 9, 2011 at 11:10, MAISONOBE Luc <luc.maisonobe@c-s.fr> wrote:
>>
>>> haisam.ido@gmail.com a écrit :
>>>
>>>
>>>
>>>> This may be of interest to others.  I've added my crude Space Flight
>>>> Dynamics
>>>> as a Service (SFDaaS) application on GitHub here
>>>> https://github.com/haisam/**SFDaaS <https://github.com/haisam/SFDaaS> .
>>>>
>>>
>>> Thank you very much Haisam, this is interesting.
>>> I have two questions about this project.
>>>
>>> The first question is a legal one. Are people allowed to use this code,
>>> change it and publish it ? I did not find any copyright nor licensing terms.
>>> Orekit by itself is Apache licensed, to allow almost any use, but without
>>> any hint about the licensing scheme, we do not know even if we can simply
>>> use your project locally, notwithstanding modifying or republish it.
>>>
>>>
>> Good question! Your guidance in this area would appreciated.  Let me know
>> how I can make it "legal".
>
>
> It depends on what you want. If you want as many people as possible use it and if you don't mind if a few of them don't share their changes, you should go to a permissive type license, like the Apache which is already used for Orekit, Apache Commons Math, Apache Tomcat ... If you want to force every one to either share their work or not use your product at all, you should use a copyleft type license like GNU GPL.
>
> Our rationale when we chose the license was that the space flight dynamics field is not a large market, so we could not afford upsetting potential industrial users who often don't like copyleft license, so we chose a permissive license, and since Apache Commons Math was already using Apache, we used it. I don't know if this rationale apply to you.
>
> Whatever license you choose, you should simply put it prominently in the project, in the README file, in the source files headers, in dedicated license text files ... For Apache license, usage is to put the LICENSE and NOTICE files in the top level folder. For GPL license, you generally put a COPYING file with the GPL text.
>
> By the way, as you distribute copies of Orekit and Apache Commons Math, you should also fulfill the requirements of the apache license for these two projects, which imply you state you use some products that are available under the apache license, and you should put their LICENSE file and merge the contents of there NOTICE files so your users can see them (see points 1 and 4 of section 4 of the Apache license here: <http://www.apache.org/licenses/LICENSE-2.0.html>).
>
>>
>>
>>> The second question is a technical one. One of the current problem in
>>> Orekit is thread-safety (see issue <https://www.orekit.org/forge/**
>>> issues/3 <https://www.orekit.org/forge/issues/3>>. The reason this problem
>>>
>>> is not solved yet is due to data caching needs, which implies that simply
>>> adding a bunch of "synchronized" statements does NOT work (see <
>>> https://www.orekit.org/forge/**projects/orekit/wiki/SOCIS#**
>>> secure-multi-threading-in-**Orekit-while-preserving-data-**
>>> caching-features<https://www.orekit.org/forge/projects/orekit/wiki/SOCIS#secure-multi-threading-in-Orekit-while-preserving-data-caching-features>>).
>>>
>>> This is a major problem and it typically appears in web services. Thomas
>>> addressed the problems of Frames, but there are  more problems like this one
>>> in the library. Did you experience any concurrency problems ? Do you have
>>> some ideas about how to solve it ?
>>>
>>>
>> I haven't experienced it yet because my testing has not been extensive
>> enough.  I assume you're using a distributed shared memory service like
>> memcached.  I think one should setup appropriate key value pairs that take
>> care of this.  As an example, process id (PID) 111111 should have 111111 as
>> one of its primary keys such that only that PIDs cached data is returned.
>>  If there are global data caching needs then one of the keys could be
>> GLOBAL, etc.
>
>
> We also thought about a thread-dependent cache. However, I'm not sure that a multi-threaded server would always use the same thread to answer successive requests from the same remote client.
>
> Luc
>
>>
>> Can you elaborate on the
>>
>> best regards,
>>>
>>> Luc
>>>
>>>
>>>
>>>> Currently, its only capability is to propagate state forwards or backwards
>>>> in
>>>> time using the http://orekit.org Java library.
>>>>
>>>>
>>>> Requirements:
>>>>
>>>>  * Eclipse IDE
>>>>  * Tomcat 6.0
>>>>  * apache.commons.math (included)
>>>>
>>>>
>>>> Usage:
>>>>
>>>> http://localhost:8080/SFDaaS/**PropagateServlets?t0=2010-05-**
>>>> 28T12:00:00.000&tf=2010-05-**29T12:00:00.000&r0=[3198022.**
>>>> 67,2901879.73,5142928.95]&v0=[**-6129.640631,4489.647187,1284.**511245]<http://localhost:8080/SFDaaS/PropagateServlets?t0=2010-05-28T12:00:00.000&tf=2010-05-29T12:00:00.000&r0=[3198022.67,2901879.73,5142928.95]&v0=[-6129.640631,4489.647187,1284.511245]>
>>>>
>>>>
>>>>
>>>> Output:
>>>>
>>>> ------------------------------**------------------------------**
>>>>
>>>> -------------------------
>>>> Run Start : 2011-10-07T23:48:48.894-0400
>>>> Run End : 2011-10-07T23:48:48.907-0400
>>>>
>>>> A priori state :
>>>> Epoch = 2010-05-28T12:00:00.000
>>>> r = [3198022.67,2901879.73,**5142928.95]
>>>>
>>>> v = [-6129.640631,4489.647187,1284.511245]
>>>>
>>>>
>>>> Posteriori state :
>>>> Epoch = 2010-05-29T12:00:00.000
>>>> r = [5630517.796159,-3606350.**100536,-606046.049292627]
>>>> v = [3048.698685,3756.457104,6000.**256417807639]
>>>>
>>>>
>>>> The epochs are assumed to be UTC and r0 and v0 are in meters and in the
>>>> J2000
>>>> Earth-centered frame.
>>>> ------------------------------**------------------------------**
>>>> -------------------------
>>>>
>>>>
>>>>
>>>
>>>
>>> ------------------------------**------------------------------**----
>>>
>>> This message was sent using IMP, the Internet Messaging Program.
>>>
>>>
>>>
>>
>
>
>
> ----------------------------------------------------------------
> This message was sent using IMP, the Internet Messaging Program.
>
>