Hi all,
We are evaluating the efforts to migrate PB NVOs from an EAS web app to REST API using Snap Develop and PB 2019.
We already migrated few methods using the IDataStore object. However we noticed that several methods were missing from the original PB datastore as follows:
1. Describe
2. Modify
3. ClassName
4. Error and DB Error events
5. SelectRow
6. setItemStatus
7. generateResultSet from a datastore
8. createFrom (rSet)
The web App is more than 12 years old and shares several NVO with an even older Client App. Both Apps extensible use the methods mentioned above.
We also noticed that the transaction object SQLCA is not part of any Snap Develop class. This fact is a big inhibitor since the mentioned Apps use SQLCA after every DB access to check if it was successful and, if not, get the error code and text.
Imagine how many times SQLCA is referenced in an enterprise App with more than 2 million lines of Power Script.
Migrate to C# an enormous App is itself a big task and it will be even worse if we have to introduce C# code that does not belong to the original PB code, increasing the chances to add logical errors to a code that works.
Workarounds to wrap code like IF SQLCA.SQLCODE < 0 THEN in a Try/Catch block is sometimes difficult to accomplish due to the way the PB code was written, long time ago.
SQLCA is affected after any DB access, not only by datawindow/datastore retrieve/update methods but also by SQL embedded code, which we also have a lot, making things more complex.
We would like to know if someone already faced these challenges or knows what is Appeon's approach for these concerns.
Thank you in advance,
Paulo Gomes
Interval International
Senior PB Analyst
Thank you for your comments. Yes, re-write an app from ground-up having to "face" million of lines of power script and embedded SQL, even having the data objects converted to reusable C# classes, is a big task.
We already got rid of EA Server via .Net SOAP web services target and .Net Assembly target ( DLL ), both deployed into IIS. We have in Production a hybrid environment.
We had to refactor the PB code to be exposed to receive simple data types (non datastore nor result sets). After the refactor, PB 12.0 did it with 100% of automation. However, both solutions proved not to be the ideal solution:
1. The SOAP web service is too slow due to hundred of thousand of internal calls between the PBDs; a simple login generates more than 150,000 "not coded" io to disk, monitored during sessions by our IIS tech people
2. The .Net assembly DLL is way faster then the SOAP web service but it is not thread-safe, so data get corrupted in a multi-thread environment, like IIS. To make it work I had to write a C Sharp web service to be invoked from the Client (Java front-end) to create a queue of requests and then load balancing the queue to attend the requests one by one, in a single-thread fashion.
We are now evaluating the efforts needed to migrate to REST Web API using Snap Develop classes but so far we found it very time consuming and prone to re-code logic errors (see my comments about SQLCA as example in the blog).
On top of that there is the C Sharp learning curve for the PB professionals thta vener had contact with C Sharp before.
Appeon Tutorials are well prepared and help to understand this new .Net Core 2.0 architecture and there are good videos in the You Tube.
Thank you for the comments.
Paulo Gomes
Senior Analyst
Interval International
pgomes@intervalintl.com