Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit 1b6da94

Browse files
committed
Initial commit
0 parents  commit 1b6da94

291 files changed

Lines changed: 40748 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

CMakeLists.txt

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (C) 2011 LuaDist.
2+
# Created by Peter Drahos
3+
# Redistribution and use of this file is allowed according to the terms of the MIT license.
4+
# For details see the COPYRIGHT file distributed with LuaDist.
5+
# Please note that the package source code is licensed under its own license.
6+
7+
PROJECT(oil C)
8+
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
9+
INCLUDE(dist.cmake)
10+
11+
INSTALL(DIRECTORY lua/oil DESTINATION ${INSTALL_LMOD})
12+
INSTALL(DIRECTORY doc/ DESTINATION ${INSTALL_DOC})
13+
INSTALL(DIRECTORY demo/ DESTINATION ${INSTALL_TEST})

HISTORY

Lines changed: 197 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,197 @@
1+
OiL 0.4 work1 [Tue, 27 Mar 2007]
2+
3+
(a) Better architectural organization;
4+
(b) Deferred calls;
5+
(c) ORB shutdown operation;
6+
(d) Interception support;
7+
(e) More functional API;
8+
oil.main(function)
9+
oil.sleep(number)
10+
oil.newthread(function, ...)
11+
oil.newencoder()
12+
oil.newdecoder(string)
13+
(f) Better integrated CORBA IR:
14+
Ability to change IR definitions;
15+
Ability to load module parts using different 'oil.loadidl*' calls;
16+
Consistent storage of all IDL definitions, not only interfaces;
17+
Ability to import any definition from the remote delegated IR (oil.setIR);
18+
(g) Support for IDL large numbers: long long, unsigned long long, long double.
19+
Lua must be changed so lua_Number is 'long double'.
20+
(h) Unix shell scripts for execution of demos.
21+
22+
OiL 0.4 work2 [Fri, 06 Apr 2007]
23+
24+
(a) Bugfix in single request processing (oil.step);
25+
(b) Bugfix in 'oil.narrow' without interface specification;
26+
(c) Bugfixes in 'union' marshal;
27+
(d) Better verbose message for calls with string arguments that contains
28+
non-printable characters;
29+
(e) Better verbose level distribution:
30+
1: operation invocation and dispatching;
31+
2: GIOP request and reply processing;
32+
3: mutual exclusion channel access (concurrent mode);
33+
4: GIOP message creation and handling (i.e. send and receive);
34+
5: socket channels creation and handling (i.e. connection and reuse);
35+
6: value (un)marshaling;
36+
7: hexadecimal view of marshaled streams;
37+
8: creation of IDL table descriptors;
38+
(f) Automatically generated object keys always start with '\0';
39+
(g) A single Lua object can be used as implementation of different CORBA objects
40+
created with automatic keys as long as they implement different interfaces
41+
because object keys now contains the interface table hash-code. As a result
42+
each time a Lua object is used as an object with a different interface
43+
a new CORBA object is created for each interface, which will be the actual
44+
(i.e. most specific) interface of the new CORBA object. To avoid implicit
45+
creation of different CORBA objects with different interfaces for a simgle
46+
Lua object, set the '__type' field of the objet meta-table (i.e. its
47+
class) to the interface (repID, absolute name, IDL descriptor, or remote IR
48+
object) that should be used;
49+
50+
OiL 0.4 work2 (emergency update for OpenBus) [Thu, 19 Apr 2007]
51+
52+
(a) Bugfix in 'loop.thread.Timer' that prevents the timer thread to end after
53+
first execution;
54+
(b) Bugfix in channel mutual exclusion control for receiving replies;
55+
(c) Addition of field 'oil.tasker' to get the coroutine scheduler component
56+
used by OiL;
57+
(d) Better verbose message in request invocation;
58+
59+
OiL 0.4 work3 [Wed, 25 Apr 2007]
60+
61+
(a) New version of LUAIDL (0.7.4b);
62+
(b) Bugfix: possible name collision of a host name 'retrieve' with an internal
63+
method of a data structure that holds information about hosts;
64+
(c) Bugfix: missing upvalue in 'reset' method of non-wrapped sockets
65+
(non-concurrent mode);
66+
(d) Bugfix: allow creation to proxies to 'CORBA::Object' references;
67+
(e) Bugfix in channel mutual exclusion control for sending replies of erroneous
68+
requests (e.g. invalid object key, wrong interface, location forward, etc);
69+
(f) Bugfix: correction of verbose messages for invocation and dispatch of
70+
methods that take string parameters;
71+
(g) 'oil.narrow' and 'proxy:_narrow' now accepts any valid interface
72+
specification, i.e. repID, absoulute name, IDL descriptor, or remote IR
73+
object;
74+
(h) Support for marshaling of typecode 'null' and therefore anys containing
75+
values of type 'null';
76+
(i) 'nil' values used as 'any' are automatically coded as 'null';
77+
(j) The interface of an implicitly created CORBA object can also be defined by
78+
field '__type' of the object implementation itself (in older versions,
79+
only the '__type' field of the metatable could be used);
80+
(k) Restore object implementation when an IOR is found that references the ORB
81+
itself. If the object was created implicitly or with an automatic object key
82+
then the object implementation is returned otherwise the CORBA object table
83+
is returned (i.e. not a proxy but the object originally returned by
84+
'oil.newservant');
85+
(l) The function used to handle exceptions can be defined for all proxies of a
86+
given interface by function 'oil.setexcepthandler(handler [, interface])'.
87+
If no interface is provided then the handler is set for all proxies.
88+
Previously, this handler could only be set for individual proxies by field
89+
'__exceptions';
90+
(m) Now, if the exception handler function returns (i.e. not raise a Lua error)
91+
then the exception is ignored and the values returned are used as the
92+
results of the invocation that raised in the original exception;
93+
(n) Addition of 'oil.deactivate(<corbaobj | implobj | objkey> [, interface])'
94+
that removes an object from the ORB;
95+
96+
OiL 0.4 work4 [Fri, 08 Jun 2007]
97+
98+
(a) Bugfix: addition of missing required libraries;
99+
(b) Bugfix: exceptions members were not loaded into the repository;
100+
(c) Bugfix: verbose message generation;
101+
(d) Bugfix: correction of the object returned by interception;
102+
(e) Bugfix: local CORBA exceptions are generated with proper repID;
103+
(f) Bugfix: handling of object forwarding in concurrent mode;
104+
(g) Support for proper handling of location request messages;
105+
(h) Automatic reconnections when connection is closed. WARNING: Operation
106+
invocation may be issued many times if no reply is sent (no at-most-once
107+
guarantees);
108+
109+
OiL 0.4 work5 [Fri, 18 Jul 2007]
110+
111+
(a) Bugfix in invocation error handling.
112+
(b) Bugfix in oneway invocations.
113+
(c) Bugfix in verbose message generation.
114+
(d) Bugfix in generation of local exceptions' repID.
115+
(e) Bugfix in verification of values being marshaled.
116+
(f) Bugfix in marshal of 'any'.
117+
(g) Bugfix in interface definition import from a remote Interface Repository
118+
(h) Bugfix in union field access.
119+
(i) Bugfix in absolute name resolution ('lookup' operation).
120+
(j) Bugfix in stream read when operation yields due to a full buffer.
121+
(k) Bugfix to allow servants to implement implicit operations (e.g. CORBA's
122+
operations that start with '_')
123+
(l) Any's now provide the field _anytype to identify the IDL type of the value.
124+
(m) Utility script to create Lua scripts that feed the internal IR from IDL files.
125+
(n) OiL internal components are available through the 'oil' module itself
126+
instead of field 'oil.Components'.
127+
(o) API operation 'oil.newobject' becomes 'oil.newservant'. However, the alias
128+
'oil.newobject' is provided for compatibility.
129+
(p) OiL internal coroutine scheduler is accessible through field 'oil.tasks'
130+
instead of 'oil.scheduler'.
131+
(q) OiL internal interface repository is accessible through field 'oil.types'.
132+
(r) CORBA interception is disabled by default. See demo 'interceptors' for
133+
information about how to enable it.
134+
(s) Rules to strip and reinsert verbose support from OiL's code.
135+
136+
OiL 0.4 work6 [Wed, 1 Aug 2007]
137+
138+
(a) Bugfix in array description registration in the internal Interface
139+
Repository.
140+
(b) Bugfix in 'oil.pcall' in CORBA interception mode.
141+
(c) Bugfix in script 'idl2lua.lua' by an improvement to avoid that global
142+
functions be serialized as module members.
143+
(d) Bugfix in select function wrapper. The error was not detected before due to
144+
strange behavior of LuaSocket that returned ordinary tables inserted in
145+
function arguments just like ready sockets.
146+
(e) Bugfix in importation of remote exception's members.
147+
(f) Bugfix in builder error handling.
148+
(g) Bugfix in verbose message generation and removal of redundant verbose
149+
messages.
150+
(h) Bugfix: select calls that executed without yielding returned socket objects
151+
instead of socket wrappers that implement scheduler integration.
152+
(i) Bugfix in TypeCode marshaling with indirections. Indirections cannot span
153+
across the top-most TypeCode boundaries. Improvement in verbose messages to
154+
avoid printing non-printable characters.
155+
(j) Exceptions created with oil.newexcept now can contain exceptions's abosule
156+
name instead of repID.
157+
(k) oil.setexcatch(func, iface) receives any interface identification (repID,
158+
absolute name, remote IR object, etc.)
159+
(l) Performance improvement by use of 'tcp-nodelay' option.
160+
161+
OiL 0.4 work7 [Tue, 21 Aug 2007 - r66613]
162+
163+
(a) Bugfix in handling of system exceptions raised by servants.
164+
(b) Bugfix in verbose message generation
165+
(c) Bugfix in serialization of long long type descriptor in 'idl2lua' script.
166+
(d) Bugfix to avoid that attributes be indexed through proxies.
167+
(e) Bugfix: channel is stored in the reference object to avoid retrieve the
168+
channel at each new invocation.
169+
(f) Bugfix: Verbose class use a specific Viewer instance to avoid changing the
170+
Viewer class' behavior.
171+
(g) Standard system exceptions are loaded into the internal IR.
172+
(h) Improvement to allow creation of GIOP Exceptions without body.
173+
(i) Sequences containing 'nil' can have the 'n' field to indicate the number of
174+
elements.
175+
(j) Implementation of _is_equivalent operation of CORBA references.
176+
(k) Object references with unknown types are created with field 'type_id' set to
177+
''.
178+
(l) Improvement by addition of 'cosocket' verbose tag as a new level of verbose
179+
in Scheduler verbose.
180+
(m) New demo about exception handling.
181+
182+
OiL 0.4 work8 [Tue, 4 Sep 2007 - r67052]
183+
184+
(a) Bugfix in Ludo protocol to work with object keys that contains null
185+
characters.
186+
(b) Bugfix to allow use with typeless protocols like Ludo.
187+
(c) New operation 'oil.tasks:halt()' to stop the coroutine scheduling.
188+
(d) Operation 'oil.deactivate' fails quietly allowing the application to
189+
deactivate an servant many times without getting an error.
190+
(e) Sequences returned by OiL now have the 'n' field set properly to handle
191+
sequences with nil values like sequence of objects or anys.
192+
(f) Support for commands 'step', 'step"in"', 'step"out"' and break points
193+
('mkbp(<file>,<line>)', 'rmbp(<file>,<line>)', 'lsbp') in debug console of
194+
'oil.verbose:debug()'.
195+
(g) Use of package 'socket.core' instead of 'socket' package due to unused
196+
functions provided by the former package.
197+
(h) Update of the demo 'hello_simple' to use the Ludo protocol.

INSTALL

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
This is OiL 0.5 release.
2+
3+
* Installation
4+
------------
5+
Building OiL on Unix systems should be very easy:
6+
7+
1. Read "config" and edit it to suit your platform and needs.
8+
2. Pick one of the platforms that better suits you and do "make <plat>".
9+
3. If you want to install OiL in an "official" place in your system,
10+
then do "make install". The official place and the way to install
11+
files are defined in "config". You may have to be root to do this.

LICENSE

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
OiL License
2+
-----------
3+
4+
OiL is licensed under the terms of the MIT license reproduced below.
5+
This means that OiL is free software and can be used for both academic
6+
and commercial purposes at absolutely no cost.
7+
8+
===============================================================================
9+
10+
Copyright (C) 2004-2009 Tecgraf, PUC-Rio.
11+
12+
Permission is hereby granted, free of charge, to any person obtaining a copy of
13+
this software and associated documentation files (the "Software"), to deal in
14+
the Software without restriction, including without limitation the rights to
15+
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
16+
the Software, and to permit persons to whom the Software is furnished to do so,
17+
subject to the following conditions:
18+
19+
The above copyright notice and this permission notice shall be included in all
20+
copies or substantial portions of the Software.
21+
22+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
23+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
24+
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
25+
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
26+
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
27+
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
28+
29+
===============================================================================
30+
31+
(end of LICENSE)

Makefile

Lines changed: 114 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,114 @@
1+
# makefile for installing OiL
2+
# see INSTALL for installation instructions
3+
# see config and src/Makefile for further customization
4+
5+
include config
6+
7+
# Installation directories
8+
INSTALL_DIR= $(INSTALL_INC) $(INSTALL_LIB) \
9+
$(INSTALL_LMOD) $(INSTALL_CMOD) \
10+
$(INSTALL_CMOD)/socket $(INSTALL_CMOD)/oil
11+
12+
all: $(PLAT)
13+
14+
$(PLATS) all o a so clibs precomp preload clean:
15+
cd src; $(MAKE) $@
16+
17+
install: clibs $(INSTALL_DIR)
18+
cd lua; $(INSTALL_DATA) $(TOLUA) $(INSTALL_LMOD)
19+
cd src; $(INSTALL_DATA) $(TOINC) $(INSTALL_INC)
20+
cd src; $(INSTALL_DATA) $(TOLIB) $(INSTALL_LIB)
21+
cd src; $(INSTALL_EXEC) $(TOSOL) $(INSTALL_LIB)
22+
cd $(INSTALL_LIB); for n in $(TOSOL); do $(INSTALL_COPY) $$n $${n%%.*}.so; done
23+
cd $(INSTALL_CMOD)/socket; $(INSTALL_COPY) $(INSTALL_LIB)/libluasocket.$(vSOCK).so core.so;
24+
cd $(INSTALL_CMOD)/oil ; $(INSTALL_COPY) $(INSTALL_LIB)/liboilbit.$(vOIL).so bit.so;
25+
26+
install-precomp: precomp $(INSTALL_INC) $(INSTALL_LIB) $(INSTALL_CMOD)
27+
cd src; $(INSTALL_DATA) $(PCINC) $(TOINC) $(INSTALL_INC)
28+
cd src; $(INSTALL_DATA) $(PCLIB) $(INSTALL_LIB)
29+
cd src; $(INSTALL_EXEC) $(PCSOL) $(INSTALL_LIB)
30+
cd $(INSTALL_LIB); for n in $(PCSOL); do $(INSTALL_COPY) $$n $${n%%.*}.so; done
31+
cd $(INSTALL_CMOD); for n in $(LLIBS); do $(INSTALL_COPY) $(INSTALL_LIB)/lib$(LIBPFX)$$n.so $${n%%.*}.so; done
32+
33+
install-preload: preload $(INSTALL_INC) $(INSTALL_LIB)
34+
cd src; $(INSTALL_DATA) $(PLINC) $(INSTALL_INC)
35+
cd src; $(INSTALL_DATA) $(PLLIB) $(INSTALL_LIB)
36+
cd src; $(INSTALL_EXEC) $(PLSOL) $(INSTALL_LIB)
37+
cd $(INSTALL_LIB); $(INSTALL_COPY) $(PLSOL) $(call modname,$(PLSOL)).so
38+
39+
local:
40+
$(MAKE) install INSTALL_TOP=.. INSTALL_EXEC="cp -p" INSTALL_DATA="cp -p"
41+
42+
no-verbose:
43+
for f in `find lua/ -iname "*.lua"`; do sed -i -e "s/\-\-\[\[VERBOSE\]\]/-- [[VERBOSE]]/g" $$f; done
44+
for f in `find lua/ -iname "*.lua"`; do sed -i -e "s/\-\-\[\[DEBUG\]\]/-- [[DEBUG]]/g" $$f; done
45+
46+
verbose:
47+
for f in `find lua/ -iname "*.lua"`; do sed -i -e "s/\-\- \[\[VERBOSE\]\]/--[[VERBOSE]]/g" $$f; done
48+
for f in `find lua/ -iname "*.lua"`; do sed -i -e "s/\-\- \[\[DEBUG\]\]/--[[DEBUG]]/g" $$f; done
49+
50+
none:
51+
@echo "Please do"
52+
@echo " make PLATFORM"
53+
@echo "where PLATFORM is one of these:"
54+
@echo " $(PLATS)"
55+
@echo "See INSTALL for complete instructions."
56+
57+
# create installation dirs
58+
$(INSTALL_DIR):
59+
mkdir -p $@
60+
61+
env:
62+
@echo ""
63+
@echo "Add the following paths to the proper enviroment variables to set up OiL $(vOIL):"
64+
@echo ""
65+
@echo "LUA_PATH += ';$(INSTALL_LMOD)/?.lua'"
66+
@echo "LUA_CPATH += ';$(INSTALL_CMOD)/?.so'"
67+
@echo ""
68+
69+
# echo config parameters
70+
echo:
71+
@echo ""
72+
@echo "These are the parameters currently set in src/Makefile to build OiL $(vOIL):"
73+
@echo ""
74+
@cd src; $(MAKE) -s echo
75+
@echo ""
76+
@echo "These are the parameters currently set in Makefile to install OiL $(vOIL):"
77+
@echo ""
78+
@echo "INSTALL_TOP = $(INSTALL_TOP)"
79+
@echo "INSTALL_BIN = $(INSTALL_BIN)"
80+
@echo "INSTALL_INC = $(INSTALL_INC)"
81+
@echo "INSTALL_LIB = $(INSTALL_LIB)"
82+
@echo "INSTALL_LMOD = $(INSTALL_LMOD)"
83+
@echo "INSTALL_CMOD = $(INSTALL_CMOD)"
84+
@echo "INSTALL_EXEC = $(INSTALL_EXEC)"
85+
@echo "INSTALL_DATA = $(INSTALL_DATA)"
86+
@echo "INSTALL_COPY = $(INSTALL_COPY)"
87+
@echo ""
88+
89+
# echo private config parameters
90+
pecho:
91+
@echo "TOLUA = $(TOLUA)"
92+
@echo "TOINC = $(TOINC)"
93+
@echo "TOLIB = $(TOLIB)"
94+
@echo "TOSOL = $(TOSOL)"
95+
@echo "PCINC = $(PCINC)"
96+
@echo "PCLIB = $(PCLIB)"
97+
@echo "PCSOL = $(PCSOL)"
98+
@echo "PLINC = $(PCINC)"
99+
@echo "PLLIB = $(PCLIB)"
100+
@echo "PLSOL = $(PCSOL)"
101+
102+
# echo config parameters as OiL code
103+
# uncomment the last sed expression if you want nil instead of empty strings
104+
lecho:
105+
@echo "-- installation parameters for OiL $(vOIL)"
106+
@echo "VERSION = '$(vOIL)'"
107+
@$(MAKE) echo | grep = | sed -e 's/= /= "/' -e 's/$$/"/' #-e 's/""/nil/'
108+
@echo "-- EOF"
109+
110+
# show what has changed since we unpacked
111+
newer:
112+
@find . -newer MANIFEST -type f
113+
114+
# (end of Makefile)

0 commit comments

Comments
 (0)