Introduction to Multilingual Retrieval Augmented Generation (RAG)
UUWL aka Unix to Unix Wrapper Library
1. Unix to Unix Wrapper Library (B64)
UUWL Shanghai Solution Center Team
Cheng Yan-Zhang, HP RISC Migrations Solutions Lead
Bruno Cornec HP EMEA Open Source Profession Lead
Arnaud Meurant HP WW OSSI & RISC Migrations
2. Introducing Myself
●
Software engineering and Unices since 1988
●
Mostly Configuration Management Systems (CMS), Build systems, quality tools,
on multiple commercial Unix systems
●
Discover Open Source & Linux (OSL) & first contributions in 1993
●
Full time on OSL since 1995, first as HP reseller then @HP
●
Currently:
●
Master Technology Architect on OSL for the HP/Intel Solution Center, Grenoble
●
OSL HP Advocate
●
EMEA OSL HP Profession Lead
●
Solutions Linux Conference and OWF board member
●
MondoRescue, Dploy.org, Project-Builder.org project lead
●
LinuxCOE, mrepo, tellico, rinse, fossology, collectl contributor
●
FOSSBazaar and OSL Governance enthusiast
●
Mandriva, Mageia, Fedora packager
2 Bruno Cornec
4. Agenda
• UUWL Introduction
• Project Outline
• Goals and phased approach
• Architecture
• Global Architecture
• Implementation details
• Demo
• Project Deliverables
• Wrap-up / Next steps
4 HP / OSSI / Bruno Cornec
5. Context & Status
HP Intel RISC Migrations Program
Context:
●
Work done as part of the joint HP Intel Solution Centers and Open Source Solutions
Initiative work on RISC to Linux migrations
Goal:
●
Accelerate and ease customer transitions from competition RISC/Unix to HP IA.
●
Allow for easy integration inside their own developments
Timeline:
●
2011-Oct-17: Solution Stack approved by HP/Intel - First phase targets Solaris to Linux
migration, with a global architecture to support more migrations
●
2011-12 → 2012-04: First phase Development
●
2012-04-19: Second phase targets AIX to Linux migration, approved by HP TS WW
●
2012-05 → 2012-11: Second phase Development
●
2012-12 → 2013-03: Finalize tests, documentation and packaging
●
More information available on http://www.hpintelco.net
5 HP / OSSI / Bruno Cornec
6. Project Goals
Definition and Targets
UUWL is: UUWL is targeted at:
• A porting tool for speeding up the Unix to • Reducing the cost of migration by saving 40%
Unix/Linux migration of C/C++ of total migration effort.
applications.
• covering >70% of all incompatibility issues in
• Reducing the number of changes to be Linux porting, which may take about 60% of
made to the original source code while porting effort
migrating Unix-based applications, to cut
down the time and effort it takes to be up • taking 5% of the porting effort in its study
and running on Linux.
• Taking out 15% of the porting effort of each
• Designed to support porting from any Unix project by leveraging code in it
to any Unix, with phase 1 focussing on
Solaris (9 and upper) to Linux and phase 2 • Improving the stability of the migrated system
from AIX to Linux. with a tested layer
• NOT a tool to detect porting issues nor to • RHEL 6 x86_64 as the test platform (gcc 4.1.x
help with porting the build environment as and above), with support of 32 bits apps as
other tools like SLPK. well.
6 HP / OSSI / Bruno Cornec
8. Technical Architecture on Solaris
Conceptual Approaches
Two migration approaches :
• modifying the code of the original
application to make it use a set of new
portable system calls providence by
the UUWL, themselves being identical
from an interface perspective from
one Unix to another
• keeping the original application
untouched. In that case, the
adaptation required should be
performed with an additional piece of
software, called the adapter, which
will in turn call the UUWL, and should
exist for each pair of source/target OS
8 HP / OSSI / Bruno Cornec
9. Technical Architecture on AIX
Conceptual Approaches
Two migration approaches :
• modifying the code of the original
application to make it use a set of new
portable system calls providence by
the UUWL, themselves being identical
from an interface perspective from
one Unix to another
• keeping the original application
untouched. In that case, the
adaptation required should be
performed with an additional piece of
software, called the adapter, which
will in turn call the UUWL, and should
exist for each pair of source/target OS
9 HP / OSSI / Bruno Cornec
10. Technical Details Approach 1
Design and Implementation of UUWLfor Approach 1
Change the source file to include
A new entry is created in the UUWL the related UUWL .h file
for this function and realized •new function names corresponds to the
An incompatible call is found based on its specification on the original one prefixed by “uuwl_” as much
as possible, and similarly for include files
source OS. It just calls the source
function on the source OS.
The application is now portable by
Application to be linked with the
calling uuwl_ consistent and
UUWL library (with -luuwl) to work
available system calls across
correctly
OSes.
10 HP / OSSI / Bruno Cornec
11. Technical Details Approach 2
Design and Implementation of UUWLfor Approach 2
11 HP / OSSI / Bruno Cornec
12. UUWL characteristics
Summary of the Development
• Delivered: Sloccount Results Effort:
●
UUWL Source code Development Effort Estimate, Person-Years
●
User Guide (Person-Months) = 0.72 (8.63)
●
Function List
(Basic COCOMO model, Person-Months = 2.4 *
●
Tested sample programs ported with UUWL (KSLOC**1.05))
• Coverage Summary:
Schedule Estimate, Years (Months) = 0.47 (5.67)
●
Functions covered: 321
●
Macros covered: 537 (Basic COCOMO model, Months = 2.5 * (person-
●
Structures covered: 51 months**0.38))
• Sloccount Results Code: Estimated Average Number of Developers
●
Include ansic=2002 (Effort/Schedule) = 1.52
●
src_top_dir ansic=1367
Total Estimated Cost to Develop = $97112
●
Total Physical Source Lines of Code (SLOC)
ansic 3369 (99.62%) (average salary = $56,286/year, overhead = 2.40).
sh 13 (0.38%)
12 HP / OSSI / Bruno Cornec
13. UUWL usage
Generic Steps to Use UUWL in Porting Approach 1 :
To Implement: To Verify:
1. Find the most commonly-used header file (ask • Is the program using the UUWL ?
to the program owner, search for keywords e.g. $ ldd <executable_file>
“common.h”)
2. Adds a #Include ''uuwl/UUW.h'' line in the • Does the program run on the target OS ?
identified commonly-used header files or in all
souce files if it doesn' t exist
3. Update the makefile by adapting compile
options and referencing the UUWL library (-
luuwl)
4. Update the original source code to replace non-
portable system calls by the corresponding
uuwl_ ones.
5. Compile the source code with new makefile
6. Fix other errors according to the compilation
output
13 HP / OSSI / Bruno Cornec
14. UUWL usage
Generic Steps to Use UUWL in Porting Approach 2 :
To Implement: To Verify:
1. Find the most commonly-used header file (ask • Is the program using the UUWL ?
to the program owner, search for keywords e.g. $ ldd <executable_file>
“common.h”)
2. Adds a #Include ''uuwl/ • Does the program run on the target OS ?
UUWLSolaristoLinuxAdapter.h'' line in the
identified commonly-used header files or in all
souce files if it doesn' t exist
3. Update the makefile by adapting compile
options and referencing the UUWL library (-
luuwl) and the related adapter
--lUUWLSolarisToLinux)
4. Compile the source code with new makefile
5. Fix other errors according to the compilation
output
14 HP / OSSI / Bruno Cornec
15. Sample UUWL Implementation
To prove the design and part of the functions
Sample Programs: Sample Sourcecode Compilation:
• $ gcc -DLINUX -DNFS -DVPRINTF -DKVM -DSVR4 -DSUNOS=55
• sps on Solaris -DMAXUSERS=30000 -DMAXTTYS=2500 -D_GNU_SOURCE -I/usr/include
-I. -lm -lrt -lcrypt -c -g -O2 -Wall filecount.c
• apcd on Solaris
• lpr on Solaris
• Before adding UUWL header to the common header-sps.h
Targets: • sps.h:151:9: warning: extra tokens at end of #endif
directive
• Work on Linux after adding the UUWL layer • In file included from filecount.c:1:
• sps.h:273: error: field 'pr_pi' has incomplete type
into the Solaris source-codes • sps.h:276: error: field 'pr_p' has incomplete type
• sps.h:282: error: field 'pr_pu' has incomplete type
• Functions kept • sps.h:300:9: warning: extra tokens at end of #endif
directive
• Changes to the source code reduced
compared to a direct porting
• After adding UUWL header to the common header-sps.h
• Simple implementation process • sps.h:151:9: warning: extra tokens at end of #endif
directive
• sps.h:300:9: warning: extra tokens at end of #endif
directive
15 HP / OSSI / Bruno Cornec
16. Demo of porting
sps from Solaris
to Linux using the
UUWL
16 HP / OSSI / Bruno Cornec
18. Deliverables
Project URL and Resources
Project home URL
• http://uuwl.project-builder.org/
• Source code viewer
• Reference documents, a User's guide and links
• Test code
• The project is an HP OSRB approved project since 2012-02-17 (#10686 at
http://pts.corp.hp.com/proposal_editor/?10686).
• The code is delivered under the dual licences MIT and LGPLv2.1
To checkout source code from SVN:
• svn co svn://svn.project-builder.org/uuwl/devel devel
To submit issues:
• http://uuwl.project-builder.org/newticket
18 HP / OSSI / Bruno Cornec
19. Next steps
Project usage in PoCs
• Large plane manufacturer interested to use it in 3 migration projects (US). Shanghai team
asked to contribute to the setup and extend the UUWL.
• 2 Banks in UK are also in the funnel list.
Next phases :
• Funding is under discussion for an HP-UX to Linux proprietary module (Phase 3) with HP WW
TS
Other developments
• Discussions are held with the SLPK team to see what commonalities and synergies can be
setup.
• Project has been internally announced (5000 persons) and also externally.
• 2 webinars done for phase 1 in May 2012 – 1 new webinar in Nov. 2012 for phase 1&2.
• Use project-builder.org to produce packages for 120+ distribution tuples.
• Official Mageia/Fedora packaging is a next step.
19 HP / OSSI / Bruno Cornec