Jump to content

All Activity

This stream auto-updates     

  1. Past hour
  2. Primož Gabrijelčič

    pipeline and visual feedback

    I don't know. Show us the code. You are probably doing something after that "WaitFor" and I don't know what. What is confusing here? You don't have to wait for pipeline to terminate (WaitFor) to start processing its output.
  3. Today
  4. Attila Kovacs

    pipeline and visual feedback

    Sadly I'm stuck already, if I omit WaitFor(), nothing happens. Occasionally one task will be executed if I'm hitting the start button like a maniac, but I have 4 values assigned to the input. I'm playing with the example with retriever/inserter. pipeline := Parallel.pipeline // .Stage(Retriever) // .NumTasks(Environment.Process.Affinity.Count * 2) // .Stage(Inserter, Parallel.TaskConfig.OnMessage(Self)) // .Run // ; pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.Add(TThreadParam.Create(....)); pipeline.input.CompleteAdding; // pipeline.WaitFor(INFINITE); I've tried to put ".run" after completeadding as a 'trial and fail'attempt, and in this case on the first run 2 tasks are executed, and from the second run all tasks are executed. I'm really missing the explanations from the doc, there is also an example "procedure TfrmOtlParallelExceptions.btnPipeline1Click(Sender: TObject);" where is no waitfor() but processing output right after "CompleteAdding", which is also confusing. // Provide input 37 with pipeline.Input do begin 38 // few normal elements 39 Add(1); 40 Add(2); 41 // then trigger the exception in the first stage; 42 // this exception should be 'corrected' in the second stage 43 Add('three'); 44 Add(4); 45 CompleteAdding; 46 end; 47 48 // Process output; there should be no exception in the output collection 49 for value in pipeline.Output do 50 Log(value.AsString);
  5. I would love that too!
  6. I too. Our next step is to build our server for linux.
  7. Oh, so simple. I will try it. Thank you
  8. @Primož Gabrijelčič From the wishful thinking department: I'd love to see OTL evolve to support Linux/MacOS, iOS and Android. Hence, I'd love to see solutions that do NOT use Windows messaging - or at least hide it inside the notification implementation.
  9. You can probably use PostThreadMessage Windows API to post a message directly to the main thread. Then you process this message in your process loop.
  10. Hello, I have a new project and want to use OTL (BackgroundWorker). I have read the book, watched the 3 videos and now I try to programming. The situation: The main program is a console application (later a windows service) I use the REST XData from TMS software. This is important, because I want to schedule a WorkerItem from a REST Call in a (for me unknown) thread. (we can accept here, that the function for the REST call is equal to the .execute-function of a thread) The REST call must close before the work (WorkerItem) is ending. The Backgroundworker is declared in the MainThread. Ich have a processloop. Ok. In the REST call I want to start a working task. After start, the REST gives a ok result and is closing. But the working task is still working. I think, I have to send a message from the REST call to the MainThread/BackgroundWorker with the information about the procedure-call and the data-parameter. But how can I do this? Thank you Thomas
  11. Indeed, currently Hyper-V doesn't play well with any other hypervisor system. This is going to change in the near future at least for VMware Workstation, though.
  12. edwinyzh

    Connection string encryption

    I think you nailed it, the others think either bullet-prove encryption or do nothing. And here is a ROT13 algorithm by Andreas Rejbrand: https://stackoverflow.com/a/6800389/133516
  13. Attila Kovacs

    pipeline and visual feedback

    Thank you Primož. Awesome lib.
  14. Cristian Peța

    Using Delphi in Virtual machine for a month

    I enabled out of curiosity the Hyper-V and shut myself in the foot because this enabled Credential Guard. VMware doesn't run with Credential Guard enabled. I lost an hour to turn it off.
  15. Primož Gabrijelčič

    pipeline and visual feedback

    Of course you can run a pipeline without a WaitFor. You have different options to detect when a pipeline has finished its work. a) The main program can count the number of items sent to the pipeline and number of items returned from. (If there is a simple correspondence between two - for example if each input produces exactly one output.) b) The pipeline itself can detect that it has no more work and then it can signal this to the main program. When you detect a terminating condition, you can shut down the pipeline (with WaitFor) and you'll done. See the "folder scanner" in OTL examples folder for an example of the b) technique or read this chapter of the book: http://www.omnithreadlibrary.com/book/chap10.html#howto-webDownload
  16. Attila Kovacs

    pipeline and visual feedback

    Thanks, does this mean pipeline is the wrong approach here or can I run the pipeline without Waitfor? Could not find anything in docs. Edit: ok, I think I just have to omit WaitFor. I'll give it a try.
  17. Primož Gabrijelčič

    pipeline and visual feedback

    There is none. Only the main thread should update the UI in a VCL application so if it is blocked, you're out of options. In theory, you could create a window purely by the Windows API and use it to show the progress, but that is probably much to much work. Better solution would be to not block the VCL application at all.
  18. Peter Davies

    Problems running in 64 bit mega PC

    OK, so just changed line 3755 of OtlCommon.pas to: affMask: NativeUInt; instead of: affMask: DWORD; and it's off and running... This has to be a bug no? -- Peter.
  19. I have no idea how the openssl client tool works or why you are using it to test FTP, but 'AUTH C:\TEMP\TLS' is not a valid command, it should be AUTH TLS'. You have not shown what smartftp sent. Since the ICS sample works, you have missed something in your implementation but I can not debug your code. Angus
  20. Attila Kovacs

    pipeline and visual feedback

    What is the proper way to display the progress from a pipeline stage when the main thread is blocked by WaitFor()? VCL.
  21. Anders Melander

    Connection string encryption

    It sounds like you really just need protection against casual discovery of the information. In that case just obfuscate it. E.g. with a simple ROT13 or even base64 encode. If someone already has access to the physical machine, and is willing to do the work required, the battle is lost any way. There are a million ways to circumvent any local encryption scheme so forget about that.
  22. Vandrovnik

    Connection string encryption

    I think till now they store database password in plain text in a config file and now they want something better, so that their users cannot read password from it. If they store password xored with a secret key, it would help against "normal" users. If they do not want to store that secret key in .exe, they can generate it on the fly - for example, using a random number generator set to a specific seed and obtaining generated values. It will not be hacker-proof, but it will be curious-user-proof, which is probably good enough for a legacy application.
  23. >> You don't log the IP address and port your server is using, although your client says port 5420 which is not an SSL FTP port, so the server does not attempt to negotiate SSL Using non standard ports for SSL requires extra code. V8.64 has a new Option ftpsAuthForceSsl that might do it simply. Using normal FTP port 21 also doing the same thing in openssl s_client and filezilla/smartftp. I have specified in filezilla/smartftp to do explicit AUTH TLS. Can you tell me on which event or parts for the extra code?, so i can make comparison with the ICS project. Already tried using 'ftpsAuthForceSsl' option but doesn't make any differences :-(. >> Not sure why you are testing an FTP servers with a non-FTP client that does not send the correct protocol. The following command below is sending the correct explicit TLS protocol, first connect with plain text FTP protocol until "AUTH TLS", you can search it on the internet about it. It being used normally for testing TLS server. The specified ftp part is for the FTP testing specification not a port. (using it on ICS sample project is working perfectly) openssl s_client -connect 127.0.0.1:5420 -starttls ftp The same thing from filezilla or smartftp 6:25:37 Status: Connecting to 127.0.0.1:5420... 16:25:37 Status: Connection established, waiting for welcome message... 16:25:37 Status: Initializing TLS... 16:25:37 Error: GnuTLS error -110: The TLS connection was non-properly terminated. 16:25:37 Status: Server did not properly shut down TLS connection 16:25:37 Status: Connection attempt failed with "ECONNABORTED - Connection aborted". 16:25:37 Error: Could not connect to server 16:25:37 Status: Waiting to retry...
  24. Peter Davies

    Problems running in 64 bit mega PC

    Well, this is weird... So I put together a test application to post... And it works... we must be pulling in something which is redefining an API call or something... I'll update if/when I find anything... -- Peter.
  25. Tntman

    Connection string encryption

    It does not matter. It's the same idea for mobile, desktop, watch or website... Even if we write apps only for ourselves we should use this approach. I have my own website and few apps and i still use this approach that i wrote...
  26. Vincent Parrett

    VSoft.Awaitable - async/await for Delphi

    What would that look like? I guess I could try adding overloads that take regular methods, I'll have a stab at it. As for captures, yes I've been caught out myself a few times.
  27. This is more an FYI, instead of hardcasting a Pointer, you could use Variant Parts in Records to get the illusion of typesafety.
  1. Load more activity
×