março 20, 2006

formação progress + .net

penso que esta podia ser a estrutura para uma acção de formação que mostrasse como utilizar em conjunto as ferramentas progress e .net
Objectivos Gerais:
Os formandos deverão adquirir conhecimentos sobre as ferramentas disponíveis para aceder a informação e programas guardados em Base de Dados Progress utilizando tecnologias Microsoft.
Objectivos Específicos:
I. OpenEdge Reference Architecture (OERA)
- Conhecer diferentes camadas da Open Edge Reference Architecture
II.Application Server
- Conhecer principais serviços do Application Server
- Saber configurar serviços do Application Server que permitem o acesso via .Net
III.Modularização e Serviços
- Perceber necessidades de modularização do código para utilização do Application Server
IV.Proxy Generator
- Saber utilizar proxy generator
V.ProDatasets
- Conhecer e saber utilizar diferentes caracteristicas do ProDatasets
VI.WebServices
- Saber definir e consumir webservices

Publicado por vitorsilva às 11:46 AM | Comentários (0)

setembro 20, 2005

appserver nameserver

ID: P6234
Title: "How to connect to the AppServer without the NameServer ?"

Publicado por vitorsilva às 02:27 PM | Comentários (7)

agosto 31, 2005

IPv6 Problem

ID: P96686 - "Unable to connect to a Stateless/Statefree AppServer on Linux - Error Unspecified error ... disconnecting client. (8091)"
Cause(s): Progress is not ipv6 compliant and this configuration has not been certified

ID: P8934
Title: "Only limited amount of agents can be started within the WebSpeed broker
Cause(s): Database is running out or user resources.

ID: P47112
Title: "OpenEdge 10 Nameserver fails to start due to invalid hostname"

ID: P81991
Title: "NameServer fails to start when its host name begins with a number"

Publicado por vitorsilva às 02:26 PM | Comentários (0)

agosto 30, 2005

Unix Progress Application Server Broker Configuration Problem

Progress Solution ID: 20316
Cause(s): Mismatch between the data in the /etc/hosts file, the name returned by the hostname command, and/or the IP address returned by the ifconfig -a command.

Progress Solution ID: P4709
Cause(s): User starting the AdminServer is missing several OS User Rights and Privileges

Progress Solution ID: P22099
Cause(s): The Progress AdminServer has been started under "non-root" user and this user does not have permissions to read /etc/shadow file. For security reasons, only the root user has -r- permissions granted for this file

Publicado por vitorsilva às 04:17 PM | Comentários (0)

maio 17, 2005

oe10 session models

OpenEdge Application Server: Developing AppServer Applications
AppServer and Client Interaction

Session Managed
The session-managed model is specifically designed for application services or Web services that support a single transaction across multiple requests from the same client, returning intermediate results with each request until the transaction is completed.
The connected AppServer is dedicated to serving that one client until the connection between them is terminated.
- state-reset - AppServer broker connects the client application directly to one of the agents in its AppServer agent pool. The connected AppServer agent remains dedicated to the client application for the life of the connection. Between connections, OpenEdge reinitializes the AppServer session to its initial state. This is the state it is in immediately after the AppServer agent is started and after all startup parameters are processed. The AppServer session maintains all session context between client requests.
duvida:para fazer o reset o broker tem que correr os parametros de inicialização ou tem uma cópia em memória do estado inicial e usa essa informação para fazer o reset?
- state-aware - igual ao state-reset excepto, OpenEdge does not reset the AppServer session context between connections. Whatever context remains when one connection finishes is available to the next connection.
For an AppServer running in state-aware operating mode you can also configure Startup and Shutdown procedures that run in every AppServer session when it starts up and shuts down.
- stateless - All AppServer agents remain generally available to execute remote procedure and user-defined function requests from all connected client applications. When a client connects to an AppServer that is running in stateless operating mode, the AppServer broker maintains the connection between itself and the client. The AppServer broker can then dispatch each remote procedure request from the client to any available AppServer agent to execute. Because any AppServer agent that executed a previous request from this client might not be available, the AppServer agent that handles subsequent requests might be different. An AppServer running in stateless operating mode does not reset its session context between client connections. Instead, it maintains most all context created in an AppServer session until a particular AppServer agent terminates or the context is changed by some procedure running in the AppServer session.

session free
The session-free model is specifically designed for application services or Web services that return a complete result, starting and ending any transactions, in a single request.
Thus, a session-free AppServer executes requests from all clients as it receives them, and completes each request independently of any prior request

- state-free - igual ao statelesse excepto, an AppServer running in state-free mode is never physically connected to a single client. The AppServer broker serves, not as a physical connection point, but as a request listener. A state-free AppServer provides the highest degree of availability and responsiveness to clients compared to a comparable configuration using any other operating mode.

cliente => broker => agent/session => bd
controlo inicializações
por agente => startup / shutdown =>The name of a 4GL procedure that executes when an AppServer agent starts up/shuts down for this AppServer. disponivel em todos excepto state-reset
por ligação => connect / disconnect => The name of a 4GL procedure that executes when an AppServer agent starts up/shuts down for this AppServer. disponivel em todos
por pedido => activate/deactivate => The name of a 4GL procedure that executes before / after the AppServer executes a remote procedure request for a client connection that is unbound. só para stateless

Note: Each physical connection in the pool is a separate TCP/IP connection AppServer broker in the list provided by the NameServer.

Publicado por vitorsilva às 09:36 AM

oe10 application server / firewall + configurações

abrir a porta do nameserver (por defeito tcp 5162)
permitir a execução do programa _proapsv.exe
propath - path só funciona se for unc

Publicado por vitorsilva às 09:34 AM

abril 12, 2005

Programação de Sockets em .net / progress

Socket Programming in C# - Part 1 - Introduction
Socket Programming in C# - Part 2 - Introduction
A Simple .NET TCP Socket Component
Socket Programming HOWTO

So first, let's make a distinction between a "client" socket - an endpoint of a conversation, and a "server" socket, which is more like a switchboard operator. The client application (your browser, for example) uses "client" sockets exclusively; the web server it's talking to uses both "server" sockets and "client" sockets.

Publicado por vitorsilva às 04:11 PM

abril 04, 2005

Progress ODBC + triggers

Fiquei sem perceber.

Por um lado há 2 tipos de triggers:
(open edge data management: dataserver for odbc 2-15)
“The DataServer allows an application to execute triggers for both Progress databases (including the schema holder) and ODBC data sources (if the data source supports triggers).”

Por outro:
Distributed Databases, Array Fields, Database Triggers
Our ODBC Drivers facillate the support of the above through the use of a custom "Data Dictionary File", this file is built by running the OpenLink provided Progress Program File "setup.p" situated in the "bin" sub-directory below the OpenLink base installation directory.

E finalmente:
http://www.progresstalk.com/archive/index.php?t-48740.html
If the question is "how do I use 4GL triggers from SQL?", the answer is "you can't".

Resumindo, só testando.

Publicado por vitorsilva às 05:49 PM

abril 01, 2005

Writing Modern Progress

C1350-LV Its Not Your Father’s 4GL
apresentação sobre como aplicar novos métodos de programação no ambiente progress.
gostei principalmente deste bocado de código
Def input parameter tablename as char no-undo.
Def input parameter wherestring as char no-undo.
Def input parameter sortby as char no-undo.
Def var qrystring as char no-undo.

Create buffer hbuf for table tablename.
Hqry:add-buffers(hbuf).
Qrystring = “ for each “ + tablename + “no-lock” +
+ wherestring + sortby.
Hqry:query-prepare(qrystring).
Hqry:query-open.

Writing Modern Progress: Techniques for using the 4GL in OpenEdge.

Publicado por vitorsilva às 09:39 AM

ferramentas progress modernaças

An XML Toolkit
http://www.innov8cs.com/downloads/AnXMLToolKit.pdf
XML Toolkit for simplifying XML Documents.

prounit
ProUnit is an Open source framework for unit test on Progress 4GL components, just like JUnit, NUnit and others

Progress® Compilation Tools
PCT (Progress Compilation Tools) is a set of ANT tasks, designed to compile Progress® procedures and dump/load databases.

Progress Developer's Webring

Publicado por vitorsilva às 09:14 AM

propath

mais umas horas perdidas estupidamente...
na minha senda de testar ligações entre progress e .net segui o procedimento habitual de criar a procedure (.p), compilar (.r), definir broker (Progress Explorer Tool), criar dll (proxy generator), fazer programa (.net) e correr.
tudo bem não fosse o caso do progress procurar o .r numa path especifica que definimos nas propriedades do broker/agent/propath.
progress_propathbroker.jpg
depois de alguns testes e de inspeccionar o log do appserver
[05/03/30@14:43:21.484+0100] P-002848 T-000368 2 AS AS Application Server connected with connection id: 10.1.2.89::multiv91::3091::d9eae801a6ec778f:5d173:102f3b2643a:-7ffc. (8358)
[05/03/30@14:43:23.907+0100] P-002848 T-000368 1 AS -- nome.p Database xxxx not connected. (1006)
[05/03/30@14:43:34.783+0100] P-002848 T-000368 2 AS AS Application Server disconnected. (8360)
a conclusão a que cheguei é que da primeira vez que fiz tudo compilei o .p numa base de dados com o nome lógico errado e depois de corrigir o nome lógico esqueci-me de copiar o .r para a pasta onde o appserver vai verificar a existencia do ficheiro .r.
resumindo, mais vale acrescentar na propath a pasta para onde vão os .r quando os compilamos no application compiler.

Publicado por vitorsilva às 08:49 AM

notas progress+.net

oe appserver: developing appserver applications (2-36)
Programming for Open Client applications
In general, programming AppServer procedures for Open Client (Java, .NET, and Web service client) applications is not much different than programming for Progress 4GL clients. However, for each AppServer persistent procedure that you expect to be instantiated as an Open Client object, you must also specify the prototypes defined by all super procedures, including user-defined functions, that your persistent procedure uses. The reason for this is that the Open Client Toolkit, which generates the proxy objects and Web service interface for use by Open Client and Web service applications, analyzes the r-code to help determine class definitions for proxy objects. This r-code analysis includes any super procedure references required to define equivalent method overrides for each class.
You can specify super procedure prototypes in one of two ways, depending on how you write your procedures:
• Using the ProtoGen utility available from the OpenEdge Application Development Environment (ADE).
• Using a text editor or the Progress Procedure Editor.
Caution: Binding a single session-free AppServer agent to a single client, as described in this section, reduces the resources available to handle requests from all clients for the session-free application service. Therefore, be certain that your application requires this type of agent binding before using it for application development.
==================================
oe development: open client introduction and programming (4-9)
ProxyGen maps each 4GL non-persistent procedure, internal procedure, and user-defined function that you expose on the AppServer, to a remote 4GL method. When invoked, each remote 4GL method executes the procedure (or user-defined function) on the AppServer, passes any parameter values, and makes any return values available to the Open Client. Note: If the 4GL persistent procedure has a super procedure, the proxy also contains remote 4GL methods for the super procedure, as long as the remote procedure declares the super procedure prototypes. For more information, see the information on programming for Open Client applications in OpenEdge Application Server: Developing AppServer Applications.

Publicado por vitorsilva às 08:36 AM

março 18, 2005

Opções para integração progress / outras aplicações

appServer - implica a aquisição de uma licença para o appServer. só funciona a partir da v9. através do proxygenerator fazemos dll que acede à base de dados
odbc - implica a aquisição do driver odbc progress. sendo um driver sql92, triggers existentes não são executados.
shell - lançar periodicamente o proview.exe e ir buscar ao standard output o resultado. é uma solução muito ineficiente.
xml - criar programa progress que está sempre a correr e que ou lê informação de ficheiro xml para integrar como input ou despeja informação para ficheiro xml como output.
api - ainda não descobri nenhuma outra api que permita o acesso a base de dados progress.

Publicado por vitorsilva às 11:33 AM

março 03, 2005

Progress prodataset + xml

Introducing the Progress DataSet
Implementando_Net_Open_client.ppt

C2730-LV Working with Dynamic Database Objects
Progress AppServer V9 - A Technical Overview (Updated October 2002)

xml and the progress 4 gl

Using XML with the Progress 4GL

Publicado por vitorsilva às 10:13 AM

progress links

http://www.progress.com/
http://www.progress-software.com.br/
http://www.progresstalk.com/
http://psdn.progress.com/
http://www.peg.com

Publicado por vitorsilva às 09:40 AM

março 02, 2005

.net + progress

depois de muito martelar lá consegui correr os programas de demonstração da progress para aceder uma base de dados progress v10 (e v9.1) através do .net sem necessidade de uma ligação ODBC.
definir no progress explorer tool: base de dados a utilizar; broker que liga à base de dados.
no caso de ser uma base de dados não local, basta definir o broker.
depois destas definições temos que ter os ficheiros de progress com os procedimentos que vamos querer aceder.
no meu caso, e como estou a aceder a uma base de dados v9.1, tenho que iniciar o progress desktop da v10 e tentar ligar à bd v9. aparece uma mensagem de erro a dizer que não consigo modificar coisas na bd v9 mas como a bd fica lançada não há problema e posso criar e compilar os meus ficheiros... agora que escrevo lembro-me que ainda não experimentei fazer tudo na v9 e depois por o proxygenerator a usar esses ficheiros .r
finalmente podemos começar a fazer as dll que vão servir de proxys entre o .net e o progress. para isso usamos o proxygenerator... uma ferramenta com muita personalidade...
dll criada e quando se pensa que está tudo feito, falta ainda copiar para o directorio de trabalho os ficheiros compilados, de outra forma ao executar o codigo .net recebemos a mensagem de erro source code not found ou algo parecido - mensagem um bocado enganadora porque não precisamos de ter o source code disponivel (.p), basta o compilado (.r)

Publicado por vitorsilva às 04:00 PM

janeiro 08, 2005

Integração Progress / .NET

Building an EDI Hub using AS2, OpenEdge™ 10 and .NET
Technical issues
.ASP.NET does not release the AppServer – fixed in 10.0B
.Occasional random disconnections
.Some lapses in integration with .NET tools e.g. flaws in data binding
.Issues with number of rows returned
Other issues
Be aware of OpenEdge 10 licensing before you embark on a project
Interfacing to .NET
.ProxyGen creates a .NET Managed Assembly
.This is imported into .NET along with some standard Progress .DLLs
.NET can now see the business logic methods plus the standard methods that are part of the ProDataSet
.NET sees the ProDataSet as an ADO.NET data set, so can databind with it

Creating a Dynamic .NET Client for OpenEdge™ 10
The OpenEdge 10
Open Client Toolkit
.There were many problems with the .NET proxy during the beta
.Therefore we started with a Web services approach
.The .NET proxy problems were eventually fixed in OpenEdge 10.0A SP1
.However, the .NET proxy will not run with AIA until OpenEdge 10.0B

.NET communication
.ProxyGen generates an .dll file
.This is a so-called .NET assembly (compiled library)
.It enables the .NET program to communicate with the Progress AppServer
.The data traffic is exactly the same as native Progress
.Uses standard HTTP/S and AIA

Web Service approach
..NET natively supports Web services
.ProxyGen generates a .wsdl file and a .wsm file
.The WSDL file describes the Web service (API and location)
.The .wsm file is needed to deploy the Web service
.Communication is standard XML over HTTP/S

Initial approach: Web Services
Not very efficient
But it worked
Uses standard HTTP/S and WSA
Imposes some limitations on the data traffic
There is no state (‘state-free’)

Drawback of Web Services
.A Web service is not very efficient for this purpose because it has too much overhead
.AppServer calls are converted to XML and wrapped in SOAP messages
.Ideal for occasional inter-application communication
.Not ideal for running a single application over the Internet

Using ProxyGen
.Define the server-side procedures that you want to expose in ProxyGen
.For Web services, it is better NOT to use SubAppObjects
.Choose a Namespace for your Web service
.Choose a SOAP message format (RPC/Encoded best matches the 4GL)

Conclusions
.The principle works
.Switch to .NET proxy as soon as possible
..NET proxy with AIA supported in OpenEdge 10.0B
.Figure out and solve all incompatibilities
.Handle the unknown value
.Add new functionality on the client
.Create support for client-side .NET code

.NET Open Client - Progress® DataSet and ADO.NET DataSet
The .NET Open Client is designed from the ground up to support Progress DataSets and ADO.NET DataSets
The best way to leverage the power of the .NET Open Client is to use DataSets

The Nuts and Bolts of a .NET Open Client Implementation
Using .NET Open Client versus Web Services
*Use .NET Open Client
Control both client and server environments
.NET client
ProDataSets map naturally to ADO.NET
Purposed protocol = better performance
*Use Web Services
Control server environment only
Unknown clients
Complex data represented in XML
Caution: XML can be expensive, HTTP chatty

.NET Open Client Development Model
Develop 4GL business logic / data access - Progress AppServer
Use ProxyGen to generate .NET proxy - Fully managed .NET proxy classes
Develop .NET client - Any .NET language; Use generated .NET proxy classes
Deploy .NET client - Proxy assembly, .NET Open Client Runtime
NET client calls proxy methods - Instantiate .NET proxy objects; Call methods using .NET data types
Proxy sends request to the AppServer - Uses the .NET Open Client Runtime; Optimized wire protocol
AppServer sends response back to proxy - Proxy maintains context for the AppServer
Preparing for .NET Open Client

Requirements:
Version 9 AppServer or higher - Business logic must run on the AppServer
Visual Studio .NET and .NET Framework - Choose your .NET language
The OpenEdge .NET Open Client - Available in OpenEdge Release 10

.NET Client Architectures for OpenEdge™ Applications

PROGRESS E-Mail Group

formas de aceder ao progress
OpenEdge .NET Interfaces - AppServer and Database access to the .NET Framework; The OpenEdge Application’s logic is encapsulated as business objects. The business object’s logic is accessible to the .NET application written in C#
or VB .NET

Progress Dynamics for .NET - Dynamic generation and rendering of a .NET UI from the Dynamics repository. In Progress Dynamics, an option for a
.NET User Interface Single design – multiple interfaces .NET UI from the same repository definitions as GUI, WebClient and DHMTL

http://www.peg.com/lists/dotnet/web/msg00091.html
Yes, you can have OE10 based proxies call a V9 AppServer. You just cannot use any of the new OE10 data types.

http://www.peg.com/lists/dotnet/web/msg00017.html
Our application is DLC version 9.1D05. That's the version that compiles and runs the r code.
I have installed OpenEdge 10, so I can create dotnet proxies for procdures that are actually running in a version 9 appserver.

http://www.peg.com/lists/dotnet/web/msg00039.html
Our appserver is still DLC91D (with some service packs).
I have installed OE10 to be able to generate a .NET proxy, and now we have a .NET application that successfully receives data from the DLC91D appserver.
Very nice.

http://www.peg.com/lists/dotnet/web/msg00153.html
Progress 9.1D does not offer ProDataSets, which are available in OpenEdge 10.

Publicado por vitorsilva às 11:54 AM