Re: [Lazarus] New feature: SQLDB Rest bridge

2019-02-25 Thread Sven Barth via lazarus
Mattias Gaertner via lazarus  schrieb am
Mo., 25. Feb. 2019, 12:22:

> On Mon, 25 Feb 2019 11:24:29 +0100
> Sven Barth via lazarus  wrote:
>
> >[...]
> > RTTI.Invoke() itself is working as is TRTTIMethod.Invoke(), so the
> > server side wouldn't be a problem, but what I'm still missing is
> > TVirtualInterface for the client side.
>
> Do you mean fpc's unit RTTI?
> pas2js has TVirtualInterface.
>

Yes, I mean FPC's RTTI unit. After all one could use this also for native
FPC clients ;)

Regards,
Sven

>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] New feature: SQLDB Rest bridge

2019-02-25 Thread silvioprog via lazarus
On Mon, Feb 25, 2019 at 4:07 AM Michael Van Canneyt via lazarus <
lazarus@lists.lazarus-ide.org> wrote:
[...]

> Isn't Invoke() working already ? I have a JSON RPC implemention on my list,
> and thought to use Invoke() for that.


Sven implemented it for Windows and it is working fine. I've implemented it
for Linux (sysv x64) and it is almost done, we just need some fixes in the
assembly code to handle functions with results of 128-bit. Sven helped me a
lot (thanks dude! :-) ) to understand all the tests.

(I'm finishing a small project at company and I'll return to this work to
fix invoke() for Linux :-) )

-- 
Silvio Clécio
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] New feature: SQLDB Rest bridge

2019-02-25 Thread silvioprog via lazarus
On Sun, Feb 24, 2019 at 1:46 PM Michael Van Canneyt via lazarus <
lazarus@lists.lazarus-ide.org> wrote:

> Hello,
>
> We received some feedback about Pas2JS - our effort to bring Pascal to the
> browser - that easy database connectivity is an issue, hampering easy
> development.
>
> To alleviate the problem I have created the SQLDB Rest bridge.
>
> This is a set of components that allow you to expose any database supported
> by FPC's SQLDB as a REST service. It is designed to be simple to use, yet
> extensible.
>

This is amazing news! 

Thanks the effort to make it available for the community.

I'm going to upgrade my laz/fpc copy and test it at home...

best,

-- 
Silvio Clécio
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE unstable - Online Package manager bug

2019-02-25 Thread Michael Van Canneyt via lazarus



On Mon, 25 Feb 2019, Balázs Székely via lazarus wrote:


This is my second try. Apparently the previous mail needs moderator
aproval(I attached a screenshot which is bigger then 100K).

Hi Michel,

Clearly the online package manager is doing work behind my back.



By "work behind my back"  I suppose you mean that OPM will try to connect
to various webpages. Here is the reason:
1. In order to download the package list, on IDE startup OPM will attempt
to connect to: https://packages.lazarus-ide.org/(this is the official
Lazarus repository)
2. More over a package maintainer has the posibility to push his/her latest
release through OPM, so from time to times OPM will download and parse a
json file from the package maintainer webpage(to get the latest information
about the packages).

The behaviour is configurable in Lazarus trunk. Please open OPM, then
go to *Options-->Check
for Package Updates* and select Never. Never is the default option by the
way, unless you have some old configuration file. Other then this OPM never
sends any kind of information, only downloads json files.


OK. Probably it is because I have an old config.



PS: The hanging IDE issue should be fixed in r. 60492. If you have some
free time please run a few test again.Thank you.


I will test it, thanks for the fast response !

Michael.-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE unstable - Online Package manager bug

2019-02-25 Thread Balázs Székely via lazarus
 This is my second try. Apparently the previous mail needs moderator
aproval(I attached a screenshot which is bigger then 100K).

Hi Michel,

Clearly the online package manager is doing work behind my back.
>
By "work behind my back"  I suppose you mean that OPM will try to connect
to various webpages. Here is the reason:
1. In order to download the package list, on IDE startup OPM will attempt
to connect to: https://packages.lazarus-ide.org/(this is the official
Lazarus repository)
2. More over a package maintainer has the posibility to push his/her latest
release through OPM, so from time to times OPM will download and parse a
json file from the package maintainer webpage(to get the latest information
about the packages).

The behaviour is configurable in Lazarus trunk. Please open OPM, then
go to *Options-->Check
for Package Updates* and select Never. Never is the default option by the
way, unless you have some old configuration file. Other then this OPM never
sends any kind of information, only downloads json files.

PS: The hanging IDE issue should be fixed in r. 60492. If you have some
free time please run a few test again.Thank you.

regards,
Balázs
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] New feature: SQLDB Rest bridge

2019-02-25 Thread Mattias Gaertner via lazarus
On Mon, 25 Feb 2019 11:24:29 +0100
Sven Barth via lazarus  wrote:

>[...]
> RTTI.Invoke() itself is working as is TRTTIMethod.Invoke(), so the
> server side wouldn't be a problem, but what I'm still missing is
> TVirtualInterface for the client side.

Do you mean fpc's unit RTTI?
pas2js has TVirtualInterface.

Mattias
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] New feature: SQLDB Rest bridge

2019-02-25 Thread Sven Barth via lazarus
Michael Van Canneyt via lazarus  schrieb am
Mo., 25. Feb. 2019, 08:07:

>
>
> On Mon, 25 Feb 2019, Sven Barth via lazarus wrote:
>
> > Michael Van Canneyt via lazarus  schrieb
> am
> > So., 24. Feb. 2019, 17:46:
> >
> >>
> >> Hello,
> >>
> >> We received some feedback about Pas2JS - our effort to bring Pascal to
> the
> >> browser - that easy database connectivity is an issue, hampering easy
> >> development.
> >>
> >> To alleviate the problem I have created the SQLDB Rest bridge.
> >>
> >> This is a set of components that allow you to expose any database
> supported
> >> by FPC's SQLDB as a REST service. It is designed to be simple to use,
> yet
> >> extensible.
> >>
> >
> > Cool! Great work!
> > Now I only need to get the parts for implementing an Interface using RTTI
> > working and I'd be all but set :D
>
> You mean for an RPC mechanism ?
>
> Isn't Invoke() working already ? I have a JSON RPC implemention on my list,
> and thought to use Invoke() for that.
>

RTTI.Invoke() itself is working as is TRTTIMethod.Invoke(), so the server
side wouldn't be a problem, but what I'm still missing is TVirtualInterface
for the client side.


> >
> > HTTP:
> >> * Authentication is handled using the HTTP protocol.
> >>
> >> * Basic authentication is included by default, but is completely
> pluggable.
> >>
> >> * Basic authentication can look up valid users in a database (by default
> >> the database being exposed)
> >>
> >
> > How would one check whether the user is allowed to execute an action?
>
> There is an OnAllowResource event, after the authentication. One of the
> parameters is the operation: GET, PUT etc.
> If you set the 'allow' to false, you'll get a 403, 'Forbidden'.
> It's not yet committed, because I wanted that together with the business
> processor component,
> which will make implementing all kinds of events simpler.
> There are stilll several improvements waiting to be tested and committed.
>

Great! Looking forward to that!

Regards,
Sven

>
-- 
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus


Re: [Lazarus] IDE unstable - Online Package manager bug

2019-02-25 Thread Michael Van Canneyt via lazarus



On Sun, 24 Feb 2019, Martin Frb via lazarus wrote:


On 24/02/2019 22:07, Werner Pamler via lazarus wrote:

Am 24.02.2019 um 12:00 schrieb Michael Van Canneyt via lazarus:


Start lazarus
Open package
Compile package
Switch to form editor of start project
Close (window manager or menu file - exit)
-> hang



Just to confirm: I can observe the same on Windows and have to kill 
the IDE with the task manager. Sometimes the IDE does not close any 
more even after compiling a simple project. After uninstalling OPM the 
issue is gone.



Same question, any change of finding where it hangs?
- attach
- view stack
- set breakpoints further up the stack
- see what's the furthest out breakpoint is that gets reached?


Allow me a counter question (maybe not for you, Martin)

Clearly the online package manager is doing work behind my back.

I do not want the online package manager to do any requests or actions 
unless I instruct it to.


Can this 'behind the scenes' work be disabled ?

Michael.
--
___
lazarus mailing list
lazarus@lists.lazarus-ide.org
https://lists.lazarus-ide.org/listinfo/lazarus