know when a service fabric windows container is being shut down - containers

I can't see any options in the VS project to add any code logic to determine when a container is being shutdown/moved in service fabric.
The only thing I can see this work, would be to have a reliable service in the container, and then override the OnCloseAsync()
Does this sound right/feasible? Are reliable services, in windows containers, available yet?

You can run a service inside a container. This features is currently in preview.
Another way that may work is to register a notification callback for endpoint changes. When a service is moved, or removed, its endpoint changes.

Related

How can I completely remove a hazelcast map from a Hazelcast cluster running externally from my applications?

I am working on a project to externalize some of our maps with an external cluster using the client/server topology provided by Hazelcast. We are using version 5.2. I want to build an endpoint or use some api provided by Hazelcast to allow me to completely remove the map in the external cluster. I don't see anywhere in the Hazelcast Management Center where you can delete maps or any API that allows me to do this.
I don't want to just evict entries I want to remove them and completely get rid of the map. I also don't want to bring the cluster down.
I have tried getting the map from the instance and calling destroy with my local external cluster and that also doesn't seem to work.
externalHazelcastInstance.getMap("mapOfStuff").destroy();
It will evict the entries but the map is still there.
I have found that I can enable the REST api with my NetworkConfig but there doesn't seem to be a solution there either.

What's the proper place to put app configurations for gmail addon?

For a gmail add-on we are developing we need to be able to put different API url's for development vs. production, along with some other configurations. What would be the proper place to put these configurations and how to read them? I saw we can add script properties from Project Properties window and i am guessing we can read them using PropertiesService, but the problem is how can we have different configurations based on environment.
Any ideas?
As you said, store them in the Properties Service, specifically, the Script Properties. You can still access them and modify them after you publish.

How to allow Chrome Kiosk App configuration access for administrators?

I'm building a Chrome kiosk app that will be in a public space. Users can interact with the app, but there are a variety of settings (server addresses, timeouts, etc.) that need to be set. I'm looking for a strategy on how to allow access to that administration config.
On first run - This is straightforward, but I want administrators to be able to pull it up again.
Detect if the app ran as a kiosk app or manually - This would kind of work, not sure if it's the greatest
Detect some key combination - Ctrl + Alt + Something switches over to the settings page, this feels like people could stumble on it accidentally.
Is there another approach I'm missing?
If your Chrome device(s) is managed you have a further option which is to use the Chrome App Management area within the Google Apps admin interface.
To do this you code your app to use the storage.managed API and this should allow a Configure section for your app within Chrome App Management.
I haven't tried this myself yet but this appears to be the way the Chrome Sign Builder app is configured with its schedule.
Another approach would be to have an administrator login button in a corner of the app. You can set a default password for administrators, which could then be changed in the settings dialog.
You can also think of combining suggestions you have made, first run and then a key combination, and this could bring up a password prompt as also suggested. For an example of this see the Zebradog Kiosk app which is in GitHub so you can see code of how this could be done.
I use ctrl-alt-S at boot. This allows me to login and make changes. I know you have to do a couple of reboots, but it is out of service during admin time anyway.

How can i share a wirecloud marketplace between users

I built some widgets and uploaded on my local marketplace, is there a way to share that?
And better is it possible to share a Mashup (the widget composition) without giving the
possibility to wiring to the user?
I mean the user should use an application layout without change anything.
You can make public your workspaces/dashboards following the steps documented in the user guide. Only the owner of a workspace will be able to modify it. I think this is what are you searching for.
Another option is to create a packaged mashup using the "Upload to my resources" option in the editor view:
Take a look to the "Advanced" tab, where you can block widgets (make them unremovable), block connections (make wiring connections unremovable) and embed used widgets/operator (by default packaged mashups depends on the user having installed all the required widgets/operators. This way you can distribute the widgets and operators used by the mashup in the same package).
However, take into account that this method is meant for sharing mashup templates, the user will always be able to add additional widgets and create new connections in the wiring view.
Once packaged, mashups/dashboards (and widgets and operators) can be uploaded to a WStore server (e.g. to the Store portal provided on FIWARE Lab) for sharing them with other users. The steps for making this is also described in the WireCloud's user guide.
I have the problem, revisited.
I have set up a working Marketplace instance (v2.3) but am unable to integrate it with Wirecloud. The marketplace is correctly registered but all the requests i am making to this Marketplace are throwing 502 error, even though i am actually able to see some results when querying the Marketplace server through a browser.
Indicatively, i can issue a GET command at http://:8080/FiwareMarketplace/v1/registration/stores/ and get an answer, but Wirecloud's internal APIs return a 502 (Bad Gateway).
Any idea on what might have gone wrong?
PS: This happens for WC v0.6.5. When upgrading to a newer (Beta) version of WC, everything seems to be performing as expected, i.e. the marketplace is correctly inserted and the stores are correctly retrieved and processed.

Activate chrome app from web page?

I am building a packaged chrome app (It is needed as I want to access chrome.socket). I have a website from which I would like to call my app (if installed or ask the user to install it) by clicking a link. Is this possible ? Not able to find any easy way for this workflow.
The url_handlers might be the best way to achieve this.
You can also use the externally_connectable manifest property to declare that your website can connect to your app, then call chrome.runtime.sendMessage or chrome.runtime.connect from your webpage and handle it in an chrome.runtime.onMessage handler in the app.
Which one is better suited depends on your needs. The url_handlers is an easier way, but it will permanently assign the URL on your link to your app, so you won't be able to use it for anything else if the app is installed. The externally_connectable is a harder way, but it enables a much more elaborate bidirectional communication between your website and the app.
You can even use a combination of the two approaches, if you need: launch the app using the url_handlers feature, then establish a communication channel back to the website once the app is up and running.
Apps can now (as of Chrome 31 I believe) register to handle urls by adding url_handlers in their manifest and detecting the url causing the app to launch in the chrome.app.runtime.onLaunched event. If the app doesn't launch, your hosted web site will be loaded an can present an inline installation with chrome.webstore.install.