Profiling Windows Workflow Services - profiling

What should I do to profile worflows exposed as Windows Workflow services? Which tool did you use?
I have tried to use dotTrace (jetBrains): I can see data in the profiling snapshot, but it seems I cannot see methods called by workflows.

Depending on the information you want to get out of it you can use AppFabric. Once installed you can go into IIS and set monitoring to "Troubleshooting" and get back pretty much everything the workflow has done.

Related

Does anyone know how to retrieve the list of tasks in Camunda 8, without using tasklist?

I am currently evalauting Camunda, having previously used version 7 in the past which seems to be significantly more open source than version 8.
I am aware that tasklist and an official tasklist-api exist, however they are only permitted during development and testing without a license.
In Bernd Rücker's medium post How Open is Camunda Platform 8?, there is a section:
A path to production with source-available software
...
Additionally, you will need to find solutions to replace the tools you cannot use.
Tasklist
You will need to implement your own task management solution based on using workers subscribing to Zeebe as described in the docs. That also means you have to build your own persistence to allow task queries, as the Tasklist API is part of the Tasklist component and is not free for production use.
I have tried to search the zeebe source for any hints, but the only job/task related APIs I seem to be able to find are:
activateJobs
completeJob
I do not believe that these could be the endpoints that tasklist uses as the jobs have to be manually claimed by user interaction from the UI.
Does anyone know how this is achieved?
Your own zeebe exporter allows you to export any events the engine produces, such as user task state updates. You could store this information in a data sink of your choice and and implement an API on top of it.
See, e.g. https://camunda.com/blog/2019/05/exporter-part-1/

Run automation on headless browser in an ec2 instance with Amazon linux

I have an automation framework that uses static html pages within its project directory to perform certain aws operations such as dynamoDB scan and Aws Lambda executions. Due to some performance bottleneck in a dependent api component for the test we are trying to move the framework to an ec2 instance with Amazon linux and run the tests from there.
Since we have methods in the TestNG class that actually uses selenium web driver to spin up a browser and open up the static page in order to perform the required Aws operations I am pretty sure this test is going to run into issues.
There are two potential approach I see for solving this issue:
Implement AWSUtil classes and use necessary aws clients to replace the web dependent logics (Will require some effort and re-engineering)
Use a headless chrome browser (or any compatible one) in order to run the web dependent steps.
I am pretty sure that number 1 can be easily achieved, just a matter of time and effort. However, would love to know if there is an easy way of accomplishing #2 since this would not require any code rewrite.
We got the same issue and been successful with puppeteer,
https://github.com/GoogleChrome/puppeteer
If you don't want to install the latest version of node, you can dockerize your tests.
puppeteer can run headless or with browser.
Hope it helps.
There is no need to change anything in your tests, just the setup and the execution. The tests can run headlessly on a Continuous Integration (CI) server. There is no out-of-the-box setup since there is no display output for the browser to launch in. However with Xvfb you can launch the browser virtually. Straight from the docs:
Xvfb (short for X virtual framebuffer) is an in-memory display server for UNIX-like operating system (e.g., Linux). It enables you to run graphical applications without a display
Depending from do you want to keep Xvfb running in the background until the process is killed, there are two options:
Xvfb :99 &
export DISPLAY=:99
run-your-tests-here
or
xvfb-run run-your-tests-here
Here is a Linux tutorial. I am using this for my Docker based Jenkins setup and works like a charm, every time.

Deploying Web job with appropriate environments variable

We are trying to deploy a web job via octopus. We have different eventhub keys saved in the variables and we expect the webjob to pick up the right key depending on the environment that it is being deployed to. Has one one done this before? Any advice on settings up configurations in octopus?
<========== UPDATE ===========>
We were being careless and didn't quite set our octopus process to transform the Configuration Variables. You should be able to do so by clicking 'configure variables' in the process step.
I don't think it being deployed via Octopus is all that relevant here. Generally, a .NET WebJob is able to access Azure App Setting using standard configuration API.
If that is not working for you, please update your question to clarify what you tries, and specifically what didn't work.

I deployed to CloudFoundry, now what? (Excuse my ignorance)

I realize CloudFoundry is still in beta and I'll admit to being moderately ignorant when it comes to this level of cloud computing but here's my question: I create an app, everything works, I upload it to CF. Now what? I want to launch my app in the wild. I want users to not see a CF URL.
Here are some pieces I do know, but I'm not getting the entire picture.
I know I can map a URL to an app. So presumably that's just some DNS routing happening. But other than that, is it safe at this point to bet the farm on CF and, for example, launch of startup using it? At what point am I going to realize I need to move to something like RackSpace (or whatever) and is it possible to take my CF VM and just move it?
Overall, I just don't fully understand what we're getting with CF other than a quick way to deploy a demo application.
At this point, if you need a custom domain, you need to configure an external proxy and from there route the traffic to your CF.com URL. This is a good example.
But the advantage of CloudFoundry is that it is entirely open source. You can always move your app to a compatible service provider, for example AppFog, with not much more than a simple push.
You could even deploy your own CF instance/server on Rackspace.
It appears that there is still no support for external domain mapping on Cloud Foundry. Here is another example that uses a Python reverse proxy running on Google AppEngine. This works well. http://programming.mvergel.com/2011/11/cloud-foundry-and-custom-domain.html
Right now, CloudFoundry.com doesn't offer domain mapping. You might expect that it will do so in a future fully-supported paid version, but as you note, right now it is still in beta.
For what it's worth, I am running a startup B2B product on CloudFoundry.
I have deployed the open source version on our own infrastructure though, I keep a close watch on changes and even review other people's commits.
That's a significant investment in terms of learning and time, but in my opinion it's worth it.

How does cloud foundry handle process isolation?

Let's say that I setup my own cloud using the open source cloud foundry implementation provided on cloudfoundry.org. Will each app that I deploy be run as a separate user? Or is there any of VMWare's virtualization technology in use here? E.g. would each app run in a separate virtual machine or anything like that? How can I configure the memory, cpu, and disk resource limits for each app?
I asked this on the mailing list. Here's the response I got:
If your DEA is configured to run in secure mode, then each app runs as its own user and process isolation is used to protect them. We are moving toward a model of using linux cgroups http://en.wikipedia.org/wiki/Cgroups when on linux, using the warden cgroup wrappers that are already in our source tree.
VM based isolation for a single app is pretty heavy weight, but we have long term plans to provide this for apps that need/desire it. (As opposed to the warden/cgroup work which is a near term project)
Since this is related to the open source for cloud foundry, you can try asking your question on https://groups.google.com/a/cloudfoundry.org/group/vcap-dev
You should get a quick response there!